You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Mac Monterey下git pull遇kex_exchange_identification错误求助

Git Pull失败:kex_exchange_identification: Connection closed by remote host(MacOS Monterey 12.4)

我使用Macbook Air 13(系统为Monterey 12.4)执行git pull从GitHub拉取代码时,遇到如下错误:

kex_exchange_identification: Connection closed by remote host
Connection closed by 20.205.243.166 port 22
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

此前我的SSH密钥一直可以正常使用,但今日突然出现该问题。我尝试执行ssh -vT git@github.com进行调试,输出信息如下(用户名已替换为${username}):

OpenSSH_8.6p1, LibreSSL 3.3.6
debug1: Reading configuration data /Users/${username}/.ssh/config
debug1: /Users/${username}/.ssh/config line 7: Applying options for github.com
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 21: include /etc/ssh/ssh_config.d/* matched no files
debug1: /etc/ssh/ssh_config line 54: Applying options for *
debug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disabling
debug1: Connecting to github.com port 22.
debug1: Connection established.
debug1: identity file /Users/${username}/.ssh/id_github_rsa type 0
debug1: identity file /Users/${username}/.ssh/id_github_rsa-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.6
kex_exchange_identification: Connection closed by remote host
Connection closed by 20.205.243.166 port 22

仍未找到问题原因,恳请各位提供解决帮助,谢谢!

内容的提问来源于stack exchange,提问作者ZYinNJU

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.11 20:55:21