Reputation: 1
I was able to clone Git via ToutoiseGit (used RSA public key) however not able to clone via Jenkins or bash. Can some one help me whether I have to tweak some setting in Jenkins. The error I got in bash is "Permission denied(publickey, keyboard-interactive) fatal: could not read from remote repository. Please make sure you have the correct access rights and the repository exists."
Thanks a lot in advance!
Upvotes: 0
Views: 1675
Reputation: 368
Jenkins needs a key pair to authenticate with:
sudo su - -s /bin/bash jenkins
ssh-keygen -t rsa -C "jenkins@aws"
In your Assembla settings you need to share that secret. Then, connect with git (over ssh) using the shell the first time to get rid of the "press yes" annoyance.
git ls-remote -h [email protected]:projectname.git HEAD
After that Jenkins should cope.
I wrote it all down in a bit more detail to help me remember!
Upvotes: 4
Reputation: 1280
It is possible that the jenkins user is a daemon with limited access. You might have to change the user configuration so that it is not a daemon. See this link below. http://colonelpanic.net/2011/06/jenkins-on-mac-os-x-git-w-ssh-public-key/
Upvotes: 0