GIT jenkins integration issues -Permission denied(Public Key)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

GIT jenkins integration issues -Permission denied(Public Key)

jaychandransubramanian
Hi ,

While integrating GIT and Jenkins , getting the below error .

Failed to connect repository : Command "git ls-remote -h git@remote-server:/home/fab.git HEAD" returned status code 128.

stderr:git@ip Permission denied (Public Key)


Kindly let us know the resolution .

Thanks
Jay

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/b4f8aba5-f0bb-46b7-8246-f2ee1413ce71%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: GIT jenkins integration issues -Permission denied(Public Key)

Mark Waite-2
The message means that the remote repository is secured by a private key and will be cloned using the git ssh protocol.  That private key needs to be defined in a Jenkins credential and the credential needs to be used in the Jenkins job definition.

Jenkins credentials are best maintained by the Jenkins credentials plugin.

Some of the possible failure modes include:
  • No credential assigned to the repository in the Jenkins job definition
  • Wrong private key credential assigned to the repository in the Jenkins job definition
  • Wrong type of credential assigned to the repository in the Jenkins job definition.  A username / password credential will not work with ssh clone of a git repository.  The credential must be a private key credential
  • No passphrase provided in the Jenkins credential definition for a private key that is secured with a passphrase
  • Wrong passphrase provided in the Jenkins credential definition for a private key that is secured with a passphrase
  • Private key type (for example ed25519) not supported by the remote ssh server (possibly due to a very old OpenSSH implementation on the remote server)
I'm sure there are other failure modes, but those are the types of failure modes that I've seen in the past.

If you've checked all those failure modes and verified that they are not the issue, then you might use the diagnostic instructions at https://support.cloudbees.com/hc/en-us/articles/115000618372-How-to-trace-git-connections- to investigate more deeply.


On Mon, Jan 13, 2020 at 9:43 PM jaychandran subramanian <[hidden email]> wrote:
Hi ,

While integrating GIT and Jenkins , getting the below error .

Failed to connect repository : Command "git ls-remote -h git@remote-server:/home/fab.git HEAD" returned status code 128.

stderr:git@ip Permission denied (Public Key)


Kindly let us know the resolution .

Thanks
Jay

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/b4f8aba5-f0bb-46b7-8246-f2ee1413ce71%40googlegroups.com.


--
Thanks!
Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtF93QUuyETNxT3KRYoQ8RHM7HmDT-PhHsT%2Bw%3DAo4PNK9g%40mail.gmail.com.