git 赫鲁克:!您无权访问应用程序 heroku

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/17742946/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 08:48:14  来源:igfitidea点击:

Heroku: ! You do not have access to the app heroku

githeroku

提问by KingFu

I originally had an app with the default name heroku set up. However I wanted to change this so I had two apps, an staging and production app. Following the heroku guide hereI think i've got it working, running git remote -vshows

我最初有一个设置了默认名称 heroku 的应用程序。但是我想改变这一点,所以我有两个应用程序,一个登台应用程序和一个生产应用程序。按照此处的 heroku 指南我想我已经开始工作了,正在运行git remote -v节目

heroku  [email protected]:oldapp.git (fetch)
heroku  [email protected]:oldapp.git (push)
staging [email protected]:newapp.git (fetch)
staging [email protected]:newapp.git (push)

but I now want to change the name of heroku to "production". Running heroku apps:rename production --app herokuresults in:

但我现在想将 heroku 的名称更改为“生产”。运行heroku apps:rename production --app heroku结果:

Renaming heroku to production... failed
 !    You do not have access to the app heroku.

Any ideas?

有任何想法吗?

采纳答案by John Beynon

To rename a git origin perform the following;

要重命名 git origin,请执行以下操作;

git remote rename heroku production

this will now let you do

这现在让你做

git push production master

to deploy your application.

部署您的应用程序。

回答by nyzm

Make sure you have "production" app in your heroku account. (You have to have the new app name in your account.)

确保您的 heroku 帐户中有“生产”应用程序。(您的帐户中必须有新的应用程序名称。)

So basically your command should be something like :

所以基本上你的命令应该是这样的:

heroku apps:rename newapp --app oldapp

You cannotrename herokusince its not your app.

无法重命名heroku,因为它不是您的应用程序。