I would like to use Jenkins with a repository on Bitbucket. To do this, I created the ssh key with the user jenkinsand the command ssh-keygen -t rsa -C "my_email". I have added the public key to Bitbucket and I can clone the project using git clone ....
But when I set up the project in Jenkins, I put url git@bitbucket.org:my_username/my_repository.git
Here is the error:
Failed to connect to repository : Command "git ls-remote -h git@bitbucket.org:skurty/ma-carte-augmentee-bo.git HEAD" returned status code 128:
stdout:
stderr: ssh_askpass: exec(/usr/bin/ssh-askpass): No such file or directory
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
If I do ssh git @ bitbucket.org, I get:
PTY allocation request failed on channel 0
conq: logged in as my_username.
You can use git or hg to connect to Bitbucket. Shell access is disabled.
Connection to bitbucket.org closed.
I also tried to create the file ~/.ssh/authorized_keysand put the public key in it, but the same problem.
I also restarted jenkins using sudo /etc/init.d/jenkins restart
Thank you for your help :)
PS: I'm on Debian Squeeze 64 bit
source
share