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 [email protected]
> Hi USERNAME! You've successfully authenticated, but GitHub does not
> provide shell access.
  • 如果都没问题,重新git pull自己代码仓库里的代码,发现可以正常拉取,问题至此解决
相关推荐
waterHBO3 小时前
( github actions + workflow 03 ) 手动添加 token, 防止权限不够
github
Jditinpc5 小时前
Git使用
git
国际云,接待5 小时前
AWS S3:云存储的“超级基石”
服务器·网络·人工智能·github·aws·亚马逊
寻月隐君6 小时前
手把手教你用 Solana Token-2022 创建支持元数据的区块链代币
后端·web3·github
貂蝉空大6 小时前
Git 常用命令大全
git
MinIO官方账号8 小时前
AIStor 的模型上下文协议 (MCP) 服务器:管理功能
运维·服务器·github
兔斯基灬木木9 小时前
【技术工具】源码管理 - GIT工具
git
工呈士10 小时前
Git 工作流与版本管理策略
前端·git·面试
C++ 老炮儿的技术栈11 小时前
文本文件与二进制文件的区别
大数据·c语言·开发语言·c++·git·算法·visual studio
A-wliang12 小时前
深入解析 GitHub Token 与 NPM Token:自动化发布的完整指南
npm·自动化·github