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自己代码仓库里的代码,发现可以正常拉取,问题至此解决
相关推荐
charlie1145141911 小时前
Git团队协作完全入门指南(上)
笔记·git·学习·教程·工程
迷茫的启明星1 小时前
Git命令学习
git·学习
云和数据.ChenGuang5 小时前
运维工程师技术教程之Pull Requests(PR)
运维·分布式·git·数据库运维工程师·运维教程
好好学习O(∩_∩)O6 小时前
Git快速复习(基础指令篇)
git
Franklin6 小时前
如何解决git HEAD detached 分离头指针问题
git·python·pycharm
one-ccs6 小时前
git 多分支工作流
git
时光Autistic7 小时前
【搭建教程】腾讯混元3D模型部署
开发语言·python·3d·github
黛玉晴雯子0017 小时前
Devops基础之Gitlab概述(持续更新)
git
Mr-Wanter7 小时前
麒麟V10x86 系统 curl报错SSLv3符号缺失问题解决
linux·服务器·github
逛逛GitHub7 小时前
推荐 5 个 yyds 的 AI 开源项目,给劲儿啊。
github