git使用问题.md

push

kex_exchange_identification

文档标题: 解决通过 SSH 连接 GitHub 时的连接问题

目的: 本文档旨在提供一个清晰的指南,用于解决在通过 SSH 连接到 GitHub 时遇到的连接问题,特别是当出现 “kex_exchange_identification: Connection closed by remote host” 错误时。


问题描述:

  • 很可能是由于 github gitee 混用导致的
  • 执行
1
2
3
4
5
6
7
8
# 察看详细日志
ssh -vT git@github.com

# 查看 本地仓库设置
git config -l

# 查看 git 全局配置
git config --global -l

在这里基本可以看出来了,可能是 credential 导致的

可以通过

1
2
# 切换成 https 拉取
git remote set-url origin https://github.com/abrance/dairy.git

git使用问题.md
https://abrance.github.io/2024/01/04/mdstorage/domain/vsc/git使用问题/
Author
xiaoy
Posted on
January 4, 2024
Licensed under