相关疑难解决方法(0)

如何在git中提交后自动推送?

如何设置git在每次提交到本地仓库后自动推送到远程仓库(包括自动提供我的密码)?

git git-push githooks post-commit-hook

72
推荐指数
3
解决办法
4万
查看次数

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
查看次数

标签 统计

git ×2

bitbucket ×1

git-push ×1

githooks ×1

jenkins ×1

post-commit-hook ×1

ssh ×1