开发工具的那些故事Offending ECDSA key in ../.ssh/known_hosts:1ECDSA host key for ip has changed and you ha(代码
Posted 善良勤劳勇敢而又聪明的老杨
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了开发工具的那些故事Offending ECDSA key in ../.ssh/known_hosts:1ECDSA host key for ip has changed and you ha(代码相关的知识,希望对你有一定的参考价值。
热门系列:
-
【开发工具的那些故事】git常用命令,手把手教你配置多个git账号
-
【开发工具的那些故事】git问题记录(一): Failed to connect to github.com port 443: Timed out
-
【开发工具的那些故事】git问题记录(二):Changes not staged for commit
-
【开发工具的那些故事】git问题记录(三):error: The last gc run reported the following. Please correct the root cause and remove
-
程序人生,精彩抢先看
1、问题
使用git pull代码的时候,报了如下错误:
$ git pull
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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 ECDSA key sent by the remote host is
SHA256:bF3yUYHR1Jf3eUbufnCZNiHSgfH4C343ZbV.....
Please contact your system administrator.
Add correct host key in /c/Users/***/.ssh/known_hosts to get rid of th
is message.
Offending ECDSA key in /c/Users/***/.ssh/known_hosts:1
ECDSA host key for 172.xx.xx.xxx has changed and you have requested strict check
ing.
Host key verification failed.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
2、解决办法
其实bash面板中已经给出了提示,在C盘的users目录下找到known_hosts文件,在里面的第一行有一个ip为172.16.xxx.xxx的一行类似秘钥的内容,将这一行整段删掉,再重新拉取,就可以了!!!
我删除的内容如下:
172.16.xx.xxx ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBPTkozctTDmlOIu7b8RgRBr2u9GRksPCcoggBotigx/8qGobyllGbn9oKDxweTar......
另外提示一下,有的人这个known_hosts文件里,可能不止一行关于bash里提示的ip相关的内容,可能有3行,或更多,如:
172.16.xx.xxx ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBPTkozctTDmlOIu7b8RgRBr2u9GRksPCcoggBotigx/8qGobyllGbn9oKDxweTar......
172.16.xx.xxx ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBPTkozctTDmlOIu7b8RgRBr2u9GRksPCcoggBotigx/8qGobyllGbn9oKDxweTar......
172.16.xx.xxx ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBPTkozctTDmlOIu7b8RgRBr2u9GRksPCcoggBotigx/8qGobyllGbn9oKDxweTar......
.....
则需要将bash中提示到的ip相关的行内容,全部删除掉,才可以正常使用git功能啦!!!!
以上是关于开发工具的那些故事Offending ECDSA key in ../.ssh/known_hosts:1ECDSA host key for ip has changed and you ha(代码的主要内容,如果未能解决你的问题,请参考以下文章
开发工具的那些故事git问题记录: Failed to connect to github.com port 443: Timed out
开发工具的那些故事IDEA安装Jrebel教程,并使用Xrebel进行接口分析优化