问题
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 here I think i've got it working, running git remote -v shows
heroku git@heroku.com:oldapp.git (fetch)
heroku git@heroku.com:oldapp.git (push)
staging git@heroku.com:newapp.git (fetch)
staging git@heroku.com:newapp.git (push)
but I now want to change the name of heroku to "production". Running heroku apps:rename production --app heroku results in:
Renaming heroku to production... failed
! You do not have access to the app heroku.
Any ideas?
回答1:
To rename a git origin perform the following;
git remote rename heroku production
this will now let you do
git push production master
to deploy your application.
回答2:
Make sure you have "production" app in your heroku account. (You have to have the new app name in your account.)
So basically your command should be something like :
heroku apps:rename newapp --app oldapp
You cannot rename heroku since its not your app.
来源:https://stackoverflow.com/questions/17742946/heroku-you-do-not-have-access-to-the-app-heroku