我尝试将更改从本地存储库推送到远程存储库。当我输入:
git push origin
我收到以下错误:
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 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx
Connection abandoned.
fatal: The remote end hung up unexpectedly
我该如何解决这个问题?我在 Windows 7 中从命令行使用 git。
Edit
当我尝试做一个简单的 ssh 时
ssh user@hostname
我收到以下错误:
Could not create directory '/c//%HOMEDRIVE%%HOMEPATH%/.ssh'.
percent_expand: unknown key %H
不知何故,它不会创建该目录,因为路径无效。如何解决这个问题?
@eckes: Edit2
我的主页设置为%HOMEDRIVE%%HOMEPATH%
它是否正确?
对于那些通过标准命令提示符使用 PuTTY 在 Windows 上设置 MSYS Git 的人来说,将主机添加到 PuTTY 缓存的方法是运行
> plink.exe <host>
例如:
> plink.exe codebasehq.com
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 2e:db:b6:22:f7:bd:48:f6:da:72:bf:59:d7:75:d7:4e
If you trust this host, enter "y" to add the key to
PuTTY's cache and carry on connecting.
If you want to carry on connecting just once, without
adding the key to the cache, enter "n".
If you do not trust this host, press Return to abandon the
connection.
Store key in cache? (y/n)
只回答y
,然后 Ctrl+C 其余部分。
不过,请检查指纹。这个警告是有充分理由的。一些 git 服务的指纹(请编辑以添加更多):
- GitHub: 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48 https://help.github.com/articles/what-are-github-s-ssh-key-fingerprints
- 位桶:97:8c:1b:f2:6f:14:6b:5c:3b:ec:aa:46:46:74:7c:40 https://confluence.atlassian.com/display/BITBUCKET/Use+the+SSH+protocol+with+Bitbucket
- 吉托瑞斯:7e:af:8d:ec:f0:39:5e:ba:52:16:ce:19:fa:d4:b8:7d https://gitorious.org/about/faq
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)