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自己代码仓库里的代码,发现可以正常拉取,问题至此解决
相关推荐
陪我去看海40 分钟前
JueJin-MCP:让AI帮你一键发布掘金文章
github
魔都吴所谓1 小时前
【Ubuntu】离线环境下Git LFS(deb包)安装与验证完整教程
linux·git·ubuntu
REDcker2 小时前
Git worktree:多工作区并行开发与实践
git·worktree
lifewange2 小时前
Git版本管理
大数据·git·elasticsearch
尘世壹俗人2 小时前
idea提交git版本由于中文文件名卡死不动
java·git·intellij-idea
AI成长日志3 小时前
【GitHub开源项目】推理优化技术栈全览:从PyTorch到专用引擎
pytorch·开源·github
中科三方3 小时前
完整指南:域名解析暂停是什么意思,如何恢复正常解析?
github
Freak嵌入式3 小时前
小作坊 GitHub 协作闭环:fork-sync-dev-pr-merge 实战指南
python·github·远程工作·代码规范·micropython·协作
oushaojun24 小时前
git在项目中常用的操作集合
git
宝桥南山4 小时前
GitHub Copilot - 尝试使用一下GitHub Copilot SDK
microsoft·ai·微软·github·aigc·copilot