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.

  • Migrating a production site with no VCS at all to Git
  • GitHub Deploy via Capistrano. Public Repo and SSH works, but Private doesn't
  • Checking out Git tag leads to “detached HEAD state”
  • Compress JS/CSS files on deploy using Git
  • What is your favorite web app deployment workflow with SVN?
  • Pushing out smallest repo possible, and issues with git subtree on shallow clone
  • 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?

  • git update-index --assume-unchanged not working for me
  • fatal: Pathspec 'autoload_classmap.php' is in submodule 'module/CocktailMakerModule'
  • How to add a file to the last commit in git?
  • How to perform better document version control on Excel files and SQL schema files
  • Git won't add any files - just an empty directory
  • Need little assistance with pexpect module
  • 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.