【发布时间】:2014-04-01 23:21:32
【问题描述】:
我在 ruby.railstutorial.org 上工作,我在将我的 first_app 从 git 推送到 heroku 时遇到了各种麻烦。我已经尝试了下面列出的解决方案,但仍然收到相同的错误消息。
我尝试过的解决方案: git push heroku master gives error ssh: connect to host heroku.com port 22: Connection refused git push heroku master gives error ssh: connect to host heroku.com port 22: Connection refused
I have tried precompiling as:
$ rake assets:precompile
$ git add .
$ git commit -m "Add precompiled assets for Heroku"
并获得一个新的 ssh 密钥。我似乎什么也做不了。这是我得到的:
Coreys-MacBook-Pro:first_app coreydavis$ heroku create
Creating radiant-oasis-3729... done, stack is cedar
http://radiant-oasis-3729.herokuapp.com/ | git@heroku.com:radiant-oasis-3729.git
Coreys-MacBook-Pro:first_app coreydavis$ git push heroku master
ssh: connect to host heroku.com port 22: Connection refused
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
我知道存储库存在并且我可以访问,但我无法弄清楚我在这里缺少什么。 任何帮助都会很棒,我对此非常非常陌生,尽管我阅读和谷歌搜索,但并不完全理解出了什么问题。非常感谢。
【问题讨论】:
-
您是否重命名了应用程序或创建了多个 Heroku 应用程序?您可能正在尝试将 master 推送到不再存在的应用程序。查看 devcenter.heroku.com/articles/… 和 stackoverflow.com/questions/6226846/… 删除 orgin
-
谢谢克里斯,我发现我确实有多个应用程序,所以我删除了它们并尝试创建一个新应用程序,但是 $ git remote -v 仍然报告原始应用程序的名称。有什么方法可以让我清洁并重新开始?
-
我已将其添加为答案
标签: ruby-on-rails ruby git heroku ssh