chr*_*san 7 git putty plink pageant
我正在尝试使用Pageant for ssh key克隆cygwin或GitBash(msysgit)中的repo.我收到以下错误:
$ git clone git@github.com:username/your-project.git
Cloning into 'your-project'...
The server's host key is not cached in the registry. You
have no guarantee that the server is the computer you
think it is.
The server's rsa2 key fingerprint is:
ssh-rsa 2048 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48
Connection abandoned.
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)
然而,当尝试使用gitub调试ssh连接时,它表示可行
$ ssh -T git@github.com
Warning: Permanently added the RSA host key for IP address '192.30.252.129' to the list of known hosts.
Hi username! You've successfully authenticated, but GitHub does not provide shell access.
Run Code Online (Sandbox Code Playgroud)
并$ ssh-add -l显示我的github配置文件中列出的相同指纹
所以问题不在于这里描述的问题:https://help.github.com/articles/error-permission-denied-publickey
chr*_*san 19
我发现这个页面上的解决方案http://www.bitsandpix.com/entry/git-setup-msysgit-install-with-pageantplink-from-putty/但希望重新创建这在将来节省别人的时间因为该页面没有在谷歌中轻易出现.
事实证明,为了充分利用pageg与cygwin/msysgit,你首先需要接受服务器的指纹与putty本身.
只需启动putty并连接到主机git@github.com或git@bitbucket.org它将存储该指纹.所有你会看到的是一个腻子会话的短暂闪光,然后它关闭.
现在回到cygwin或msysgit你应该能够克隆.
或者,如果您不希望使用Pageant作为键,则必须取消设置GIT_SSH指向的环境变量,plink.exe并且cygwin/msysgit将自己接受服务器指纹(但您不再使用Pageant).这是在http://sourceforge.net/p/forge/site-support/2959/#204c上发现的