git的时候 WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!

更改Ubuntu服务器的时候,提交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:gGG+emM4NwPCp6Bm6tQgDUsaHXJIckbtNthXhkSIfns.
Please contact your system administrator.
Add correct host key in /c/Users/Administrator/.ssh/known_hosts to get rid of th
is message.
Offending ECDSA key in /c/Users/Administrator/.ssh/known_hosts:7
ECDSA host key for 118.89.59.124 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.

删除ssh本地的密钥即可:

C:\Users\Administrator\.ssh\known_hosts

打开这个文件,找到对应服务器的web地址,删除。

猜你喜欢

转载自www.cnblogs.com/andu99/p/9271746.html