WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!

210 阅读1分钟

出现问题

今天电脑push到github的时候,push失败

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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:xxx.
Please contact your system administrator.
Add correct host key in xxx/.ssh/known_hosts to get rid of this message.
Offending RSA key in xxx/.ssh/known_hosts:3
Host key for github.com has changed and you have requested strict checking.
Host key verification failed.
致命错误:无法读取远程仓库。

解决

打开known_hosts,将github.com那行的秘钥删除,然后重新push,重新生成即可