git 服务器的主机密钥未缓存在注册表中

git server's host key is not cached in the registry

我尝试将更改从我的本地存储库提取到远程存储库。当我输入

git pull origin hubert

我收到以下错误:

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: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

但是当我输入时

ssh hubert@remove_host

它工作正常。

我正在使用 Windows 7 32 bits,我在目录中有相同的文件:

感谢您的帮助。

检查$GIT_SSH的值(在git-bash会话中):如果涉及plink.exe,则不会使用$HOME/.ssh/known_host (已经包含原始服务器,因为手动 ssh 有效)

您可以配置 plink:

plink.exe hubert@remote_host
# answer 'y'

或者您可以设置git to use openssh