我添加了一个名为'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 master
和git 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)
提前感谢您的帮助。
答案 0 :(得分:0)
确保您的ssh公钥通常~/.ssh/id_rsa.pub
已在heroku注册。您可以在https://dashboard.heroku.com/account