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.

  • Good Git deployment using branches strategy with Heroku?
  • Heroku and Github integration (how to structure the project)
  • How to get Jenkins to perform deletes on remote server
  • Git push to live server
  • Grunt install fails on azure web app deploy through deploy.cmd file
  • How can I effectively version control and deploy a 3rd-party Rails web app?
  • When I run git remote -v I get this:

    origin (fetch)
    origin (push)
    production (fetch)
    production (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 it absolutely exists!

    This is driving me crazy – can anyone help?

  • How to remove files from a Git repository using Windows Tortoise?
  • Trying to clone a repository in git, getting a error
  • Does maven-release-plugin push tags to remote Git repository?
  • Building jenkins job only once, when tracking multiple branches?
  • Phabricator hosted repository returning error 500 on clone
  • How to use 2 different global git configs?
  • 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-prod and mysite-staging as my application names.

    Git Baby is a git and github fan, let's start git clone.