我无法选择heroku远程推送我的应用程序

时间:2015-09-12 14:06:44

标签: ruby-on-rails git heroku github

我添加了一个名为'myapp-production'的heroku应用程序。我可以通过git push heroku master推送这个遥控器。细

我在heroku上创建了第二个名为“myapp-staging”的应用,并通过git remote add myapp-staging git@heroku.com:myapp-staging.git添加此遥控器。

git push heroku master似乎与myapp-production相对应。

当我尝试git push myapp-staging时,我有这个错误:

  

许可被拒绝(公钥)。

     

致命:无法从远程存储库中读取。

     

请确保您拥有正确的访问权限并且存储库已存在。

如何修复它,理想情况下能够git push myapp-staging mastergit push myapp-production master

git remote -v给出:

myapp-staging   git@heroku.com:myapp-staging.git (fetch)
myapp-staging   git@heroku.com:myapp-staging.git (push)
heroku          https://git.heroku.com/myapp-production.git (fetch)
heroku          https://git.heroku.com/myapp-production.git (push)
origin          git@github.com:johndoe/myapp.git (fetch)
origin          git@github.com:johndoe/myapp.git (push)

提前感谢您的帮助。

1 个答案:

答案 0 :(得分:0)

确保您的ssh公钥通常~/.ssh/id_rsa.pub已在heroku注册。您可以在https://dashboard.heroku.com/account

查看