美文网首页
Git 本地连不上远程报错--WARNING: REMOTE H

Git 本地连不上远程报错--WARNING: REMOTE H

作者: Bigglesworth | 来源:发表于2020-10-26 10:24 被阅读0次

    使用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:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.
    Please contact your system administrator.
    Add correct host key in /c/Users/xxxx/.ssh/known_hosts to get rid of this message.
    Offending ECDSA key in /c/Users/xxxx/.ssh/known_hosts:2
    ECDSA host key for gitlab.xpaas.lenovo.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.
    

    根据报错提示:Offending ECDSA key in /c/Users/xxxx/.ssh/known_hosts:2
    去电脑这个路径找到known_hosts文件,因为我的这个提示是2,所以删掉第二行fingerprint就行。
    再使用git pull重新获取fingerprint即可。

    相关文章

      网友评论

          本文标题:Git 本地连不上远程报错--WARNING: REMOTE H

          本文链接:https://www.haomeiwen.com/subject/tzfamktx.html