GIT clone issue in Jenkins resolution

I am trying to extract some documents from git using git clonejenkins as part of the process. The git clone works fine individually, but as part of jenkins, I am facing permission permission.

> echo "pw"| sudo git clone host@IP:git-repo 


> Cloning into 'git-repo'... 
Permission denied, please try again.
Permission denied, please try again.
Permission denied(publickey,password).

fatal: Failed to read from remote repository.

+4
source share
3 answers

Try using the SSH agent plugin to make your private key available for standard build steps.

+1
source

Jenkins creates a system user on your system named jenkins.

  • SSH to your server.
  • Switch user to jenkins.
  • Try git clone.

jenkins sudores, , SSH (git) git.

.:)

+1

Try it,

superuser ALL=(ALL) NOPASSWD:ALL - for single user 

send link

This parameter helps us bypass the user's prompt.

0
source

Source: https://habr.com/ru/post/1606223/


All Articles