SSH:SourceTree 推送失败

问题描述 投票:0回答:2

虽然将代码推送到 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. 

我没有找到任何可以写的东西。我该如何解决?

git github ssh atlassian-sourcetree
2个回答
1
投票

显然我的 sourcetree 安装使用 putty 进行 ssh 连接。通过尝试连接到腻子中的服务器,我可以使用输入并将密钥添加到缓存中。在此之后,sourcetree 推送工作了。


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

2023 年 3 月警告:

"GitHub 已更新其 RSA SSH 主机密钥"


© www.soinside.com 2019 - 2024. All rights reserved.