Mac remote service repair: warning: remote host identification has changed!

Today, when using git to operate remote service, prompt the remote host to identify the modification

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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.

The reason is that the system of Alibaba cloud host was reinstalled yesterday, which caused the remote host information stored in this machine to change. According to the above prompt, enter/users/dyz /. SSH, edit and open known_ Hosts file. I have only connected to one remote host here, so I delete all the contents in it. After saving, I will link to the remote host again by git operation

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

Enter yes

Similar Posts: