'You do not have access to the app' when trying to access heroku console

こ雲淡風輕ζ 提交于 2019-12-06 17:30:39

问题


I recently started collaborating in a project on Heroku using Ruby on Rails. I was added as a collaborator and added the remote to my environment. After some development, I pushed some changes and had no problems:

$ git push staging

Where staging is the name of my remote. Later, when trying to run "rake test" on Heroku, I recieved an error:

$heroku run rake test --app staging
Running `rake test` attached to terminal... failed
 !    You do not have access to the app staging.

Which is odd, as I was perfectly able to push my own changes. I checked the Heroku dashboard and saw that my push was logged there. I then tried to view the logs using the console, and the same problem occured.

$ heroku logs --app staging
 !    You do not have access to the app staging.

Finally, I tried to access the console, but it failed as well.

$ heroku run rails console --app staging
Running `rails console` attached to terminal... failed
 !    You do not have access to the app staging.

At this point I updated my Heroku toolbelt installation, and used "heroku auth" to verify that my email was showing up, but the error persists. I'm currently contacting Heroku support but I'm hoping someone with a similar issue could aid me in parallel.

Thanks!


回答1:


So just in case anyone is having a similar problem, this occurs because I was mixing the name of my Heroku Apps with the name of my git remotes. So when I was calling --app staging (the name of my remote), I should have been using the actual name of the app, as found in Heroku.




回答2:


Be sure to run heroku login before using Heroku toolbelt commands for the first time. It will not tell you that you have not signed in before.




回答3:


This happen also when you haven't added heroku git remote repository.

You can add it with this command:

git remote add heroku https://git.heroku.com/<your project>.git

You can also type

heroku git:remote -a AppName



回答4:


This was caused of your ssh key is no more permited to access. Make sure your ssh key is same. You can also regenarate your ssh key and add this to heroku.




回答5:


You can also run:

heroku run rake test --remote staging

Not sure what happens under the hood, but locally the CLI tool figures out which app you mean based on your git remote.



来源:https://stackoverflow.com/questions/32577459/you-do-not-have-access-to-the-app-when-trying-to-access-heroku-console

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!