本文主要是介绍github: 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
致命错误:无法读取远程仓库。
解决方案
参照下边文档
https://docs.github.com/en/authentication/troubleshooting-ssh/using-ssh-over-the-https-port
- 进入config文件
(base) ➜ .ssh vi ~/.ssh/config
- 添加下述配置
Host github.comHostname ssh.github.comPort 443User git
- 结果如下图
- 运行如下代码进行验证
$ ssh -T git@github.com
> Hi USERNAME! You've successfully authenticated, but GitHub does not
> provide shell access.
- 如果都没问题,重新git pull自己代码仓库里的代码,发现可以正常拉取,问题至此解决
这篇关于github: kex_exchange_identification: Connection closed by remote host的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!