我刚刚设置了我的heroku帐户。 我在我的应用程序的根目录..
所以我跑
heroku login
## give my credentials
heroku create --stack cedar
heroku keys:add
git push heroku master
然后我收到错误:
ssh: Could not resolve hostname heroku: Name or service not known
fatal: The remote end hung up unexpectedly
答案 0 :(得分:2)
也许Heroku git远程地址在某种程度上被打破了。
您可以首先尝试通过执行host heroku.com
和ssh git@heroku.com -T
直接访问Heroku,然后查看产生的结果。像这样:Getting error while trying to push to Heroku
使用host heroku.com
,你应该得到类似的内容:
$ host heroku.com
heroku.com has address 50.19.85.132
heroku.com has address 50.19.85.154
heroku.com has address 50.19.85.156
heroku.com mail is handled by 10 aspmx2.googlemail.com.
heroku.com mail is handled by 10 aspmx3.googlemail.com.
heroku.com mail is handled by 10 aspmx4.googlemail.com.
heroku.com mail is handled by 10 aspmx5.googlemail.com.
heroku.com mail is handled by 10 alt1.aspmx.l.google.com.
heroku.com mail is handled by 10 alt2.aspmx.l.google.com.
heroku.com mail is handled by 10 aspmx.l.google.com.
然后尝试使用:
修复.git / config文件git@heroku.com:your_app.git
像这样:Can't push to existing live heroku app on Cedar Stack
如果这两个没有帮助,那么可能会更复杂。