升级到 Catalina (MAC OS) 后无法访问 github

时间:2021-07-07 01:09:27

标签: bash git macos ssh

我升级了 Catalina,然后无法访问我的 github 存储库:

$ ssh -T git@github.com
kex_exchange_identification: Connection closed by remote host
$ ssh -vvv git@github.com
OpenSSH_8.1p1, LibreSSL 2.7.3
debug1: Reading configuration data /Users/XXX/.ssh/config
debug1: /Users/XXX/.ssh/config line 1: Applying options for *
debug1: /Users/XXX/.ssh/config line 6: Applying options for github.com
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 47: Applying options for *
debug1: Connecting to ssh.github.com port 443.
debug1: Connection established.
debug1: identity file /Users/XXX/.ssh/id_rsa type 0
debug1: identity file /Users/XXX/.ssh/id_rsa-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.1
kex_exchange_identification: Connection closed by remote host

这曾经工作得很好。知道如何调试吗?

1 个答案:

答案 0 :(得分:0)

<块引用>
      <input
        name={inputName}
        type={inputType} 
        className={`input ${inputClass}`} 
        placeholder={ inputPlaceholder }
        {...register(inputLabel , {...rules})}
        />

这意味着你是 Using SSH over the HTTPS port

试试这个测试:

Connecting to ssh.github.com port 443

但仔细检查该端口 22 是否被阻止:

ssh -Tv -p 443 git@ssh.github.com

如果仍然失败,请查看“The hard way to debug the mysterious git+ssh+proxy failure “bash: No such file or directory”

<块引用>

解决方案:手动将 ssh -T -p 22 git@github.com 设置为 shell 的完整路径名,例如SHELL