当前位置:   article > 正文

github: kex_exchange_identification: Connection closed by remote host

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/不正经/article/detail/501108
推荐阅读
相关标签
  

闽ICP备14008679号