github: kex_exchange_identification: Connection closed by remote host

问题描述

bash 复制代码
(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文件
bash 复制代码
(base) ➜  .ssh vi ~/.ssh/config
  • 添加下述配置
bash 复制代码
Host github.com
    Hostname ssh.github.com
    Port 443
    User git
  • 结果如下图
  • 运行如下代码进行验证
bash 复制代码
$ ssh -T git@github.com
> Hi USERNAME! You've successfully authenticated, but GitHub does not
> provide shell access.
  • 如果都没问题,重新git pull自己代码仓库里的代码,发现可以正常拉取,问题至此解决
相关推荐
逛逛GitHub8 分钟前
发现 3 个牛哄哄 AI 的 GitHub 开源项目,速速收藏。
github
JH307326 分钟前
git和svn一些使用上的区别
git·svn
小喻yushi1 小时前
Git入门
git
大柏怎么被偷了2 小时前
【Git】基本操作
linux·运维·git
1024肥宅2 小时前
告别异地登录告警!用 GitHub Self-Hosted Runner 打造“零打扰”全栈自动化部署
前端·后端·github
源码方舟4 小时前
【GitHub和Gitee两大平台对比分析】
gitee·github
摇滚侠4 小时前
零基础小白自学 Git_Github 教程,Git 命令行操作2,笔记19
笔记·git·github
NocoBase4 小时前
社区用户分享:用 NocoBase 搭建可落地的 ERP
低代码·开源·github
我是若尘4 小时前
Git Rebase深度解析:优雅重写提交历史的艺术
git