本文主要是介绍【git之窗】(十八)WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
今天在拉取远程分支时,提示我这个:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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:*********************/r/0Mv*****On/wQ.
Please contact your system administrator.
Add correct host key in /c/Users/*****/.ssh/known_hosts to get rid of this message.
Offending RSA key in /c/Users/****/.ssh/known_hosts:5
RSA host key for gitlab.1****.com has changed and you have requested strict checking.
Host key verification failed.
翻译、分析下报错原因:
1.有人窃取了你的git ssh信息。
2.RSA host key 发生了变化。
从后续的报错信息来看:
Add correct host key in /c/Users/%……%……/.ssh/known_hosts to get rid of this message.
Offending RSA key in /c/Users/%……%……/.ssh/known_hosts:5
RSA host key for gitlab.……%¥#.com has changed and you have requested strict checking.
Host key verification failed.
第2个原因的可能性更大的。
如上图,打开本地pc的.ssh路径。进入known_hosts文件:
报错信息中说第5行这里有问题,查了下资料,参考:https://blog.csdn.net/thdsea4/article/details/74942327 中的内容,
1.删除“known_hosts”文件(my solution)
2.删除第5行的信息
通过删除“known_hosts”文件,该问题解决。
这篇关于【git之窗】(十八)WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!