提问者:小点点

2023-03-23 - GitHub问题:远程主机标识已更改[重复]


当我尝试从/向我通常的 GitHub 存储库提取、提取推送我的代码时,我最近遇到了以下错误:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
SHA256:uNiVztksCsDhcc0u9e8BujQXVUpKZIDTMczCvj3tD2s.
Please contact your system administrator.
Add correct host key in ~/.ssh/known_hosts to get rid of this message.
Host key for github.com has changed and you have requested strict checking.
Host key verification failed.

我努力弄清楚如何解决它以及它来自哪里。


共1个答案

匿名用户

希望他们昨天发布了一篇关于它的文章!

长话短说,这是你问题的答案:

ssh-keygen -R github.com
curl -L https://api.github.com/meta | jq -r '.ssh_keys | .[]' | sed -e 's/^/github.com /' >> ~/.ssh/known_hosts

但不要盲目相信我,看看博客文章:https://github.blog/2023-03-23-we-updated-our-rsa-ssh-host-key/