git报错host key has just been changed

git push 或者 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:QPgnxOwhY1gXLCmvMyBnmgxV33iyt66b7W9OVpgFapM.
Please contact your system administrator.
Add correct host key in /c/Users/jiaomu.hu/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /c/Users/jiaomu.hu/.ssh/known_hosts:1
ECDSA host key for [10.10.32.4]:10022 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.

其实不需要像网上说的那么麻烦,只要进入到C:\Users\jiaomu.hu\.ssh目录下将known_hosts文件里面的内容删除即可。

posted @ 2019-12-30 14:58  jim520  阅读(1799)  评论(0编辑  收藏  举报