相关疑难解决方法(0)

Jenkins:Credentials中私钥的正确格式是什么

我正在Windows Server 2016上运行的Jenkins 2.152中创建一个工作,需要从bitbucket.org上托管的git repo中提取.我通过git-bash测试了ssh密钥,所以我知道它有效并且没有密码短语.当我尝试使用与Jenkins完全相同的私钥时,我收到一条错误消息.

Failed to connect to repository : Command "git.exe ls-remote -h 
git@bitbucket.org:mygroup/myrepo HEAD" returned status code 128:
stdout: 
stderr: Load key 
"C:\\Users\\JE~1\\AppData\\Local\\Temp\\ssh2142299850576289882.key": invalid format 
git@bitbucket.org: Permission denied (publickey). 
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
Run Code Online (Sandbox Code Playgroud)

凭据设置为

 scope: Global
 user: git
 Private Key -> Enter Directly -> copy and past - generated by ssh-keygen -t rsa in gitbash
 Passphrase: empty
 ID: empty
 description: bitbucket.org …
Run Code Online (Sandbox Code Playgroud)

git ssh bitbucket jenkins

10
推荐指数
4
解决办法
6181
查看次数

标签 统计

bitbucket ×1

git ×1

jenkins ×1

ssh ×1