2

我在一个班级,要求我们将我们的 ruby​​ on rails 应用程序放在 Heroku 上。他们给了我们一步一步的指导来设置 Heroku,我照做了。我可以从命令行登录到 heroku,但是当我尝试将我的应用程序推送到它时,我得到了这个:

Read from socket failed: Connection reset by peer
fatal: The remote end hung up unexpectedly

我已经ping了服务器,它工作正常。我试过重新启动,一天后回来,重新创建应用程序,效果很好。我检查以确保我有 Heroku 工具带。我花了几个小时搜索谷歌。我还没有找到解决方案。

跑步后ssh -vvv mylogin@heroku我得到了

OpenSSH_5.9p1 Debian-5ubuntu1, OpenSSL 1.0.1 14 Mar 2012
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: ssh_connect: needpriv 0
ssh: Could not resolve hostname heroku: Name or service not known

跑步后ssh git@heroku.com -T我得到了

Warning: Permanently added the RSA host key for IP address '50.19.85.154' to the list of known hosts.
Permission denied (publickey).

所以我git push heroku master再次尝试并得到了

Permission denied (publickey).
fatal: The remote end hung up unexpectedly

有任何想法吗?

4

2 回答 2

3

所以我开始工作了!感谢那些做出回应的人 - 他们让我走上了解决问题的道路。所以这就是我所做的。

我跑了ssh -vvv reneeggallison@gmail.com@heroku,这给了我

OpenSSH_5.9p1 Debian-5ubuntu1, OpenSSL 1.0.1 14 Mar 2012
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: ssh_connect: needpriv 0
ssh: Could not resolve hostname heroku: Name or service not known

在研究了这个错误后,我决定运行ssh git@heroku.com -T,收到这个是响应:

Warning: Permanently added the RSA host key for IP address '50.19.85.154' to the list of known hosts.
Permission denied (publickey).

git push heroku master这改变了我的错误

Read from socket failed: Connection reset by peer
fatal: The remote end hung up unexpectedly

Permission denied (publickey).
fatal: The remote end hung up unexpectedly

因此,在研究了该错误后,我运行了heroku keys:add ~/.ssh/id_rsa.pub它返回:

Uploading SSH public key /home/renee/.ssh/id_rsa.pub... done

这对我来说似乎很好,我git push heroku master再次跑步并取得了成功。所以谢谢大家,祝你好运

于 2013-03-09T22:16:17.360 回答
1

尝试使用以下命令进行调试:

ssh -vvv yourlogin@heroku

以下是来自 SO 答案的一些调试提示

于 2013-03-09T08:17:32.907 回答