简体   繁体   English

Heroku命令行“ --app”扩展名权限被拒绝

[英]Heroku command line “--app” extension permission denied

I have remotes to two heroku apps, one for staging and one for production. 我有两个Heroku应用程序的遥控器,一个用于登台,另一个用于生产。 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. 当然,这不是一个很大的麻烦,但是我希望能够使用--app扩展名而不会出现权限问题。 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. 这两个选项使用完全不同的机制通过1)git remote name 2)heroku应用名称来查找Heroku应用。

When you say --app staging you are looking up an app called staging which you do not own, and getting a permission denied. 当您说--app staging您正在查找一个您不拥有的名为staging的应用程序,并且获得了拒绝权限。

When you use the --remote staging you are looking up the app attached to your git remote called staging and it works. 当您使用--remote staging您正在查找附加到git远程程序上的名为staging的应用程序,它可以工作。

The right way to use --app is with --app your-app-name , since staging is not your app. 使用--app的正确方法是--app your-app-name ,因为staging不是您的应用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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