我在家里不能像平常一样推送代码到Heroku。我已经尝试使用两个不同的帐户(家庭和工作),在不同的应用程序上,使用了不同的SSH密钥。这不是一个受损的仓库,因为它从我的工作电脑中运行正常。(实际上,我通常通过ssh连接到工作计算机并从那里部署来解决这个问题,但那里停电了,所以这个周末我无法这样做!)
首先,这与其他几十个类似的问题不同,主要是因为我没有得到“错误”信息。
错误(非)消息:
注意,在连接关闭并显示之前,它会悬挂60秒。请注意保留HTML标记。
更新:我已向Heroku提交了一个关于这个问题的工单,并正在等待他们的支持回复。如果他们能够解决这个问题,我将在这里回答。
首先,这与其他几十个类似的问题不同,主要是因为我没有得到“错误”信息。
错误(非)消息:
$ git push heroku master
Connection closed by 50.19.85.132
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
注意,在连接关闭并显示之前,它会悬挂60秒。请注意保留HTML标记。
$ git push -v heroku master
Pushing to git@heroku.com:myherokuapp.git
Connection closed by 50.19.85.154
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
我尝试过的
heroku keys:add
-- 命令执行成功,密钥已添加到我的帐户(在 heroku.com 上展示且我收到了电子邮件),但没有任何变化。完全重新生成密钥。与上述相同。
使用
git remote
和heroku git:remote
命令删除并重新添加 git 的heroku
仓库。(没有变化。)通过
ssh -vvv
调试连接。(见下文。)
各种调试命令的输出
$ git remote -v
heroku git@heroku.com:myherokuapp.git (fetch)
heroku git@heroku.com:myherokuapp.git (push)
$ heroku apps:info
=== myherokuapp
Git URL: git@heroku.com:myherokuapp.git
Owner Email: twobitalchemist@gmail.com
Region: us
Stack: cedar
Web URL: http://myherokuapp.herokuapp.com/
$ ping -c4 50.19.85.132
PING 50.19.85.132 (50.19.85.132) 56(84) bytes of data.
64 bytes from 50.19.85.132: icmp_seq=1 ttl=37 time=48.9 ms
64 bytes from 50.19.85.132: icmp_seq=2 ttl=37 time=49.1 ms
64 bytes from 50.19.85.132: icmp_seq=3 ttl=37 time=47.9 ms
64 bytes from 50.19.85.132: icmp_seq=4 ttl=37 time=49.2 ms
--- 50.19.85.132 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 47.997/48.832/49.245/0.498 ms
$ ping -c4 50.19.85.154
PING 50.19.85.154 (50.19.85.154) 56(84) bytes of data.
64 bytes from 50.19.85.154: icmp_seq=1 ttl=41 time=47.8 ms
64 bytes from 50.19.85.154: icmp_seq=2 ttl=41 time=47.7 ms
64 bytes from 50.19.85.154: icmp_seq=3 ttl=41 time=49.7 ms
64 bytes from 50.19.85.154: icmp_seq=4 ttl=41 time=50.0 ms
--- 50.19.85.154 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3005ms
rtt min/avg/max/mdev = 47.746/48.855/50.055/1.059 ms
$ ssh -vvv git@heroku.com
OpenSSH_6.6.1, OpenSSL 1.0.1h 5 Jun 2014
debug1: Reading configuration data /home/user/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to heroku.com [50.19.85.132] port 22.
debug1: Connection established.
[ several lines ommitted ]
debug1: Offering ECDSA public key: /home/user/.ssh/id_ecdsa
debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply
[ hangs here ]
Connection closed by 50.19.85.132
附加信息
我正在使用Arch Linux,与我在工作中使用的相同的ISP(尽管在工作中我们有一个静态IP),而且我没有任何防火墙,除了内置在我的家用(Netgear)路由器中的内容,该路由器设置为不阻止任何东西。我没有使用代理。我可以从这里成功地部署到GitHub。出于某种原因,我甚至无法连接到Heroku。我知道我的公钥没有被拒绝,而且它根本没有连接上,因为日志中没有显示任何内容,也没有任何活动:
$ heroku logs
2014-08-02T02:12:36.883623+00:00 heroku[api]: Enable Logplex by twobitalchemist@gmail.com
更新:我已向Heroku提交了一个关于这个问题的工单,并正在等待他们的支持回复。如果他们能够解决这个问题,我将在这里回答。
ssh -vvv git@heroku.com
时,tcpdump 显示了什么? - Nitzan Shakedssh -vvv git@heroku.com
和git push heroku master
的情况,即一些介绍性的数据包交换,然后是一段“无声电台”时间,对应于命令挂起,接着是一些数据包交换和断开连接。 - Two-Bit Alchemistheroku logs
中没有任何东西甚至表明我已经到达服务器了。据我所知,连接从未完全建立。 - Two-Bit Alchemist