当前位置:   article > 正文

github: kex_exchange_identification: Connection closed by remote host_kex exchange identification: connection closed by:

kex exchange identification: connection closed by:remote host

问题描述

(base)test git:(dev) git pull
kex_exchange_identification: Connection closed by remote host
Connection closed by 192.30.255.113 port 22
致命错误:无法读取远程仓库。

  • 1
  • 2
  • 3
  • 4
  • 5

解决方案

参照下边文档
https://docs.github.com/en/authentication/troubleshooting-ssh/using-ssh-over-the-https-port

  • 进入config文件
(base) ➜  .ssh vi ~/.ssh/config
  • 1
  • 添加下述配置
Host github.com
    Hostname ssh.github.com
    Port 443
    User git
  • 1
  • 2
  • 3
  • 4
  • 结果如下图
    在这里插入图片描述
  • 运行如下代码进行验证
$ ssh -T git@github.com
> Hi USERNAME! You've successfully authenticated, but GitHub does not
> provide shell access.
  • 1
  • 2
  • 3
  • 如果都没问题,重新git pull自己代码仓库里的代码,发现可以正常拉取,问题至此解决
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Guff_9hys/article/detail/819368
推荐阅读
相关标签
  

闽ICP备14008679号