在将代码推送到repo中的master分支时,我发现来自sourceTree的这条消息虽然我已经在我的github中添加了公钥并生成了私钥并添加到我的选美键列表中。消息是:
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
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.
我没有找到任何要写的东西。我该如何解决?
答案 0 :(得分:0)
使用SourceTree避免看到它的一种方法是提前预先填充known_hosts
文件:
ssh-keyscan -H github.com >> $HOME/.ssh/known_hosts
# on Windows, with `<git>/usr/bin` in the `%PATH%`
ssh-keyscan -H github.com >> %USERPROFILE%\.ssh\known_hosts