github拉取和推送远端报错

编程入门 行业动态 更新时间:2024-10-06 13:24:20

github拉取和推送远端<a href=https://www.elefans.com/category/jswz/34/1771188.html style=报错"/>

github拉取和推送远端报错

报错内容

the RSA host key for github has changed, and the key for the corresponding IP address 20.205.243.166 is unknown. This could either mean that DNS SPOOFING is happening or the IP address for the host and its host key have changed at the same time.

原因:本地计算机 known_hosts 中记录的 git 服务器的公钥和实际返回的公钥不匹配。
解决:

  1. 更新一下本地的 .ssh/known_host文件
    ● 打开 known_hosts 文件,找到 gitlab.xxx 对应的记录,删掉
    ● 然后运行 git pull ,会提示你要不要将新的服务器地址加到 known_hosts 中,如果不像每次都提示一遍的话就加一下
  2. 删除本地known_hosts里面的缓存信息,执行:ssh-keygen -R 域名(或IP) 亲测有效

更多推荐

github拉取和推送远端报错

本文发布于:2024-02-28 12:02:31,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1769379.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:报错   远端   github

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!