[英]Not able to connect Jenkins with Bitbucket
I am using redhat6
, Jenkins ver. 1.609.3
我正在使用Jenkins ver. 1.609.3
redhat6
Jenkins ver. 1.609.3
Jenkins ver. 1.609.3
, java1.6_45
and git 2.0.5
. Jenkins ver. 1.609.3
, java1.6_45
和git 2.0.5
。 While cloning the Bitbucket repository with Jenkins I am getting bellow error. 使用Jenkins克隆Bitbucket存储库时,出现以下错误。
Failed to connect to repository : Command "/usr/local/git/bin/git -c core.askpass=true ls-remote -h git@bitbucket.org:DrunkenCooder/spring3helloworld.git HEAD" returned status code 128: stdout: stderr: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
This is the path for my git executable 这是我的git可执行文件的路径
/usr/local/git/bin/git
When I go there cd / /usr/local/git/bin and execute the command 当我去那里cd / / usr / local / git / bin并执行命令
git ls-remote -h git@bitbucket.org:DrunkenCooder/spring3helloworld.git
It is getting executed successfully. 它正在成功执行。 and I get the bellow output 我得到波纹管输出
b148eb99dead9a288afb0c9e6f6e87ae7aa133fe refs/heads/master
Steps I followed to connect Jenkins with Bitbucket 我遵循的将Jenkins与Bitbucket连接的步骤
created id_rsa
and i d_rsa.pub
key using ssh-keygen
使用ssh-keygen
创建了id_rsa
和d_rsa.pub
密钥
which is there in default location. 在默认位置。 that is home/usrname/.ssh
copy the content of id_rsa.pub
key in Bitbucket
. 将home/usrname/.ssh
复制到Bitbucket
中id_rsa.pub
键的内容。
/var/lib/jenkins/.ssh
复制了/var/lib/jenkins/.ssh
id_rsa和id_rsa.pub文件 id_rsa.pub
in Bitbucket
. 将id_rsa.pub
的内容id_rsa.pub
到Bitbucket
。 This also dint work 这也可以工作 tried all the solution from here Stack-overflow solution for the same error but dint work. 尝试了此处的所有解决方案,但对于相同的错误却有点工作,但出现了堆栈溢出解决方案 。 What am I missing? 我想念什么? any idea. 任何想法。
Try change: 尝试更改:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.