Gitlab Push出现错误WARNING REMOTE HOST IDENTIFICATION HAS CHANGED


当我在从CE 版本 升级 到 EE 版本后 Push出现错误WARNING REMOTE HOST IDENTIFICATION HAS CHANGED,完整如下

Push failed
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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 ED25519 key sent by the remote host is
SHA256:/zem+6t1sCd4bS9p/UPZBuBZ9Mgl+rWI6SkIJo9EMDY.
Please contact your system administrator.
Add correct host key in /c/Users/Ding/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /c/Users/Ding/.ssh/known_hosts:3
Host key for [example.example.com] has changed and you have requested strict checking.
Host key verification failed.
Could not read from remote repository.
        
Please make sure you have the correct access rights
and the repository exists.
Show details in console

解决方法

有几种处理方式(选适合的)

方式一:

[root@localhost ~]# vim /root/.ssh/known_hosts
#把有問題的example.example.com KEY刪掉

方式二:

[root@localhost ~]# rm -rf  /root/.ssh/known_hosts
#把整個known_hosts都刪除
#或是把known_hosts 移到別的地方

方式三:

[root@localhost ~]# ssh-keygen -R example.example.com
#將此有問題的移除,下次登入就可正常。

参考资料

声明:纯情阿丁|版权所有,违者必究|如未注明,均为原创|本网站采用BY-NC-SA协议进行授权

转载:转载请注明原文链接 - Gitlab Push出现错误WARNING REMOTE HOST IDENTIFICATION HAS CHANGED


阿丁在Coding,等你成为我的朋友!