当我尝试在 Windows 上的 gitbash 中克隆 git 存储库时,出现以下错误:
$ ssh -T [email protected]
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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:secretkeysCsDhcc0u9e8BujQXVUpKZIDTMczCvj3tD2s.
Please contact your system administrator.
Add correct host key in /c/Users/asterios/.ssh/known_hosts to get rid of this message.
Offending RSA key in /c/Users/asterios/.ssh/known_hosts:2
Host key for github.com has changed and you have requested strict checking.
Host key verification failed.
答案1
解决方案是删除 known_hosts 文件中现有的来自 github 的条目,然后在 gitbash 上运行相同的命令。然后会出现一个问题,是否要添加来自 github 的指纹。回答是,这将在 known_hosts 文件中插入来自 github 的新条目