Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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!

like image 317
Yael Herrera Halley Avatar asked Sep 15 '15 03:09

Yael Herrera Halley


People also ask

How do I access heroku console?

Get Started with the Heroku CLIAfter you install the CLI, run the heroku login command. Enter any key to go to your web browser to complete login. The CLI then logs you in automatically. If you'd prefer to stay in the CLI to enter your credentials, run heroku login -i .

What is my heroku app URL?

By default, a Heroku app is available at its Heroku domain, which has the form [name of app]. herokuapp.com . For example, an app named serene-example-4269 is hosted at serene-example-4269.herokuapp.com .

How do I deploy a heroku terminal?

To deploy your app to Heroku, use the git push command to push the code from your local repository's main branch to your heroku remote. For example: $ git push heroku main Initializing repository, done.


2 Answers

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.

like image 56
Yael Herrera Halley Avatar answered Sep 16 '22 14:09

Yael Herrera Halley


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.

like image 39
IAmNaN Avatar answered Sep 16 '22 14:09

IAmNaN