如何在 Git 中取消链接以前的 SSH 密钥
我已按照以下步骤创建和添加 SSH 密钥,并删除了文件夹 ~/.ssh/
- $ ssh-keygen -t rsa -b 4096 -C "[电子邮件受保护]"
- $ eval "$(ssh-agent -s)"
- $ ssh-add -K ~/.ssh/id_rsa
- $ Clip < 〜/.ssh/id_rsa.pub 然后在 Git 中添加内容
然后我尝试:
- $ git push -u origin master
,我得到:
无法建立主机 'github.com (140.82.121.4)' 的真实性。 ED25519 密钥指纹为 SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU。 该密钥没有任何其他名称。您确定要继续连接吗(是/否/[指纹])?
(该密钥是我之前创建和删除的密钥之一)
我可以做什么来解决这个问题?
I have followed the following steps to create and add a SSH key and deleted all the previously created keys in the folder ~/.ssh/
- $ ssh-keygen -t rsa -b 4096 -C "[email protected]"
- $ eval "$(ssh-agent -s)"
- $ ssh-add -K ~/.ssh/id_rsa
- $ clip < ~/.ssh/id_rsa.pub
and then added the content in Git
Then I try:
- $ git push -u origin master
and I get:
The authenticity of host 'github.com (140.82.121.4)' can't be established.
ED25519 key fingerprint is SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU.
This key is not known by any other names. Are you sure you want to continue connecting (yes/no/[fingerprint])?
(That key is one of the previous I had created and deleted)
What can I do to overcome this issue?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
此消息与您创建的密钥无关。第一次连接到任何 SSH 服务器时,您都会收到类似这样的消息。您连接到的 SSH 服务器首先向您的 ssh 客户端标识自己,此消息意味着您的客户端无法识别它连接到的服务器。
您通常会通过键入“yes”并按 Enter 来回复此问题,除非您有特殊理由相信正在发生一些有趣的事情。
This message has nothing to do with the key that you created. You'll get a message like this the first time you connect to any SSH server. The SSH server that you connected to starts by identifying itself to your ssh client, and this message means that your client doesn't recognize the server that it connected to.
You would generally reply to this by typing "yes" and pressing Enter, unless you have a particular reason to believe something funny is going on.