看了很多GIT的资料,发现git依赖ssh链接远程仓库,自然公钥是需要的。
好奇心是害死人的,我试验了下:
root@US000690:/btsom/SCM/learn-git# git clone git@10.121.120.73:/btsom/SCM/zk/learn_git/sample.git
Cloning into 'sample'...
git@10.121.120.73's password:
warning: You appear to have cloned an empty repository.
root@US000690:/btsom/SCM/learn-git# git push -u origin master
git@10.121.120.73's password:
Counting objects: 6, done.
Delta compression using up to 16 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (6/6), 435 bytes, done.
Total 6 (delta 0), reused 0 (delta 0)
To git@10.121.120.73:/btsom/SCM/zk/learn_git/sample.git
* [new branch] master -> master
Branch master set up to track remote branch master from origin.
最终结果是,需要人工输入远程仓库git密码。然后一切都 OK。
这个问题可能会造成git与jenkins等CI工具集成的时候住。因为CI工具会帮你填密码的。
本文探讨了Git使用SSH连接远程仓库时,输入远程仓库密码的过程,并指出此操作可能对与CI工具集成时的影响。通过实验展示了如何手动输入密码并成功克隆与推送代码至远程仓库,强调了在集成CI工具时需要考虑的潜在问题。
3272

被折叠的 条评论
为什么被折叠?



