简体   繁体   中英

Heroku command line “--app” extension permission denied

I have remotes to two heroku apps, one for staging and one for production. I am encountering a strange permission denied error when I try to target one of the apps. For example, if I run:

heroku logs --app staging

I get back:

!    You do not have access to the app staging.

However, if I simply change the command to:

heroku logs --remote staging

it works fine. Of course this isn't a huge inconvenience, but I would like to be able to use the --app extension without permission issue. If anyone has encountered this before, or has any ideas as to why this may be, please let me know :).

Thanks!

These two options use entirely different mechanisms to lookup the Heroku app by 1) git remote name 2) heroku app name.

When you say --app staging you are looking up an app called staging which you do not own, and getting a permission denied.

When you use the --remote staging you are looking up the app attached to your git remote called staging and it works.

The right way to use --app is with --app your-app-name , since staging is not your app.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM