MAC远程服务修复:WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!

为什么80%的码农都做不了架构师?>>>   hot3.png

今天在使用Git操作远程服务的时候提示远程主机识别修改

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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:----------------------------------.
Please contact your system administrator.
Add correct host key in /Users/dyz/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /Users/dyz/.ssh/known_hosts:1
ECDSA host key for gitlab.baidu.com has changed and you have requested strict checking.
Host key verification failed.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

原因是昨天重装了阿里云主机的系统,导致本机里存储的远程主机信息发生了变化,按照上面的提示信息进入/Users/dyz/.ssh,编辑打开 known_hosts 文件,我这里只连接过一个远程主机,所以删除了里面所有内容,保存后重新Git操作链接到远程,

Are you sure you want to continue connecting (yes/no)?

输入yes即可

转载于:https://my.oschina.net/mdu/blog/3017983

你可能感兴趣的:(MAC远程服务修复:WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!)