Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Git Jenkins-使用SSH从BitBucket获取代码_Git_Jenkins_Ssh_Bitbucket_Ssh Keys - Fatal编程技术网

Git Jenkins-使用SSH从BitBucket获取代码

Git Jenkins-使用SSH从BitBucket获取代码,git,jenkins,ssh,bitbucket,ssh-keys,Git,Jenkins,Ssh,Bitbucket,Ssh Keys,我创建了一个私钥,并将公钥添加到bitbucket上的密钥中,如本文所述 我正在尝试将私钥添加到凭证菜单下的Jenkins,但它一直在说: Failed to connect to repository : Command "C:\Program Files\Git\cmd\git.exe -c core.askpass=true ls-remote -h git@bitbucket.org:bla/blabla.git HEAD" returned status code 128: stdou

我创建了一个私钥,并将公钥添加到bitbucket上的密钥中,如本文所述

我正在尝试将私钥添加到凭证菜单下的Jenkins,但它一直在说:

Failed to connect to repository : Command "C:\Program Files\Git\cmd\git.exe -c core.askpass=true ls-remote -h git@bitbucket.org:bla/blabla.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.
我对詹金斯做了什么错事


谢谢。

我和詹金斯也有类似的问题。然后在我工作的配置帮助中,我发现了这个

对于超级项目的远程URL,URL的结尾决定了假定为裸存储库还是非裸存储库:

  • 如果远程URL以/.git结尾,则假定为非裸存储库
  • 如果远程URL不以/.git结尾,则假定为裸存储库
现在我不知道为什么文档会使用/.git,但这让我尝试了不使用.git后缀的repo url,因为bitbucket中的repo是空的

因此,在您的情况下,我会尝试将回购url设置为:

git@bitbucket.org:bla/blabla
注意“.git”已被删除