Forking my existing heroku app for multiple environments
I’m trying to fork my existing app so that i can create a staging environment separate to a production one, and I’m running into errors no matter what I try.
I definitely have a heroku toolbelt, and I’m definitely logged in.
When I run
git remote -v I get this:
origin https://github.com/account/mysite.git (fetch) origin https://github.com/account/mysite.git (push) production email@example.com:mysite.git (fetch) production firstname.lastname@example.org:mysite.git (push)
When I run
heroku fork -a production staging I get this:
Failed to fork app production to staging. ! WARNING: Potentially Destructive Action ! This command will destroy staging (including all add-ons). ! To proceed, type "staging" or re-run this command with --confirm staging
If I type
staging then I get this:
Deleting staging... failed ! You do not have access to the app staging.
What I’m confused about is why it thinks an app called ‘staging’ exists at all, I’m trying to fork it as a new environment.
When I try the other suggestion in the terminal I get this:
heroku fork -a production --confirm staging ! Mismatch between --app and --confirm Failed to fork app to . ! Confirmed app staging did not match the selected app .
When I try
heroku apps:info I get:
! App not found
which also seem weird. If I specify
heroku apps:info --app staging or
heroku apps:info --app production then I get
! You do not have access to the app staging.
When I try
git remote rm staging it just confirms there is no ‘staging’ environment:
error: Could not remove config section 'remote.staging'
I also don’t seem to have the ‘production’ side of things working either, as when I do
git push production master I get
! No such app as mysite.
But when I visit http://mysite.herokuapp.com it absolutely exists!
This is driving me crazy – can anyone help?
One Solution collect form web for “Forking my existing heroku app for multiple environments”
staging should be the name of the application you are creating, not the name of the git remote. You need to pick a unique name. I typically use
mysite-staging as my application names.