我试图将我的RoR应用程序推送到另一家公司的Heroku,该公司的防火墙阻止了SSH连接。所以我按照此处的指南进行了操作:https://help.github.com/articles/using-ssh-over-the-https-port/并添加到~/.ssh/config
,代码如下:
Host github.com
Hostname ssh.github.com
Port 443
ssh -T -p 443 git@ssh.github.com
和ssh -T git@github.com
成功运行,我可以通过公司防火墙将我的应用程序推送出去。然而,回到家里,当我再次尝试git push时,我的RoR应用程序在Heroku上崩溃了。当我尝试在Homebrew上安装任何内容时,我收到此错误:LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443
。我认为这个错误和应用程序崩溃与我所做的SSH over HTTPS更改有关。我将OSX从Yosemite升级到High Sierra--不确定这是否相关。
请帮助禁用通过HTTPS的SSH连接。
编辑1:运行ssh -vT git@github.com
会提供以下输出,如果这有帮助:
OpenSSH_7.5p1, LibreSSL 2.5.4
debug1: Reading configuration data /Users/rahn/.ssh/config
debug1: /Users/rahn/.ssh/config line 1: Applying options for *
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 20: Applying options for *
debug1: /etc/ssh/ssh_config line 102: Applying options for *
debug1: Connecting to github.com [192.30.253.113] port 22.
debug1: Connection established.
debug1: identity file /Users/rahn/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/rahn/.ssh/id_rsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.5
debug1: Remote protocol version 2.0, remote software version libssh_0.7.0
debug1: no match: libssh_0.7.0
debug1: Authenticating to github.com:22 as 'git'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256@libssh.org
debug1: kex: host key algorithm: ssh-rsa
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ssh-rsa SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8
debug1: Host 'github.com' is known and matches the RSA host key.
debug1: Found key in /Users/rahn/.ssh/known_hosts:1
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /Users/rahn/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 535
debug1: Authentication succeeded (publickey).
Authenticated to github.com ([192.30.253.113]:22).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: pledge: network
debug1: Sending environment.
debug1: Sending env LANG = en_CA.UTF-8
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
Hi sampbay! You've successfully authenticated, but GitHub does not provide shell access.
debug1: channel 0: free: client-session, nchannels 1
Transferred: sent 3484, received 2104 bytes, in 0.1 seconds
Bytes per second: sent 33097.5, received 19987.7
debug1: Exit status 1