JENKINS environment, an error was reported when building ERROR: ERROR FETCHING REMOTE REPO'ORIGIN'

created at 10-19-2021 views: 848

problem

Error ERROR: Error fetching remote repo'origin' was reported when building the project. The main reason is that the user credentials are set incorrectly.

Steps to add and use user credentials:

step1. Premise:

  1. Install git on the server;
  2. git is associated with github
  3. Jenkins set the git path.

path

step2. view the private key

Go to the service to view the private key:

cd ~/.ssh
cat id_rsa

The scope of the copied content is in the red box as shown in the figure below

id_rsa

step3. create Jenkins user credentials

Go to create Jenkins user credentials

I chose ssh here.

ssh

step4. use credentials

github code path, ssh is selected.

github code path

created at:10-19-2021
edited at: 06-04-2022: