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自己代码仓库里的代码,发现可以正常拉取,问题至此解决
相关推荐
孟郎郎2 小时前
打造一切(Craft Anything)——克隆构造世间万物
人工智能·ai·github·软件构建·开源软件
海洋之恒3 小时前
GitHub Actions 自动化:5 个真实运维提效案例
运维·自动化·github
小Z先生4 小时前
我用 Go + 系统 WebView 写了个纯本地 Postman:不装 Electron、不连云端
后端·github
fthux10 小时前
待办清单写满了,别忘了给休息留个位置:试试 Tick Rest
开源·github·mac·提醒·open source·消息提醒·tick rest·tick rest for mac·消息提醒app
GitHub实测笔记11 小时前
dust 本机实测:/usr 扫树中位 92ms、du -sh 80ms;-s 不是汇总,稀疏文件 0→100Mi
github
逛逛GitHub12 小时前
有个刚开源的 GitHub 项目有说法,竟然能在终端里再跑一台 Mac。
github
用户29914221968012 小时前
GitHub 热榜项目:日榜(2026-11-09)
人工智能·开源·github
徐小夕13 小时前
JitArchives,一款基于JitWord协同AI文档打造的企业级电子档案系统
前端·vue.js·github
特创数字科技13 小时前
写了个 Windows 下载器:一键拉 GitHub / Gitee 源码,带 SHA256 校验
python·github
miofly15 小时前
GitHub 日榜趋势速报 | 2026-11-09
开源·github