thoughtbot / parity

Shell commands for development, staging, and production parity for Heroku apps
https://thoughtbot.com
MIT License
889 stars 57 forks source link

Error: Multiple apps in git remotes #114

Closed abhchand closed 7 years ago

abhchand commented 7 years ago

I have a production app (project-jedi) and a staging app (project-sith) hosted on Heroku.

I'm using parity v0.10.0

My relevant git remotes are defined as

> git remote -v

production  git@heroku.com:project-jedi.git (fetch)
production  git@heroku.com:project-jedi.git (push)
staging git@heroku.com:project-sith.git (fetch)
staging git@heroku.com:project-sith.git (push)

When trying to restore staging from production, I'm getting the below error.

I've successfully been using this restore command for several months and nothing has changed in terms of my setup as far as I know

> staging restore production
 ▸    Error: Multiple apps in git remotes
 ▸    Usage: heroku pg:backups:public-url --remote production
 ▸       or: heroku pg:backups:public-url --app project-jedi
 ▸
 ▸    Your local git repository has more than 1 app referenced in git remotes.
 ▸    Because of this, we can't determine which app you want to run this command against.
 ▸    Specify the app you want with --app or --remote.
 ▸
 ▸    Heroku remotes in repo:
 ▸    production                (project-jedi)
 ▸    staging                   (project-sith)
 ▸
 ▸    https://devcenter.heroku.com/articles/multiple-environments
 ▸    Error: Multiple apps in git remotes
 ▸    Usage: heroku pg:backups:restore DATABASE --confirm project-sith --remote production
 ▸       or: heroku pg:backups:restore DATABASE --confirm project-sith --app project-jedi
 ▸
 ▸    Your local git repository has more than 1 app referenced in git remotes.
 ▸    Because of this, we can't determine which app you want to run this command against.
 ▸    Specify the app you want with --app or --remote.
 ▸
 ▸    Heroku remotes in repo:
 ▸    production      (project-jedi)
 ▸    staging         (project-sith)
 ▸
 ▸    https://devcenter.heroku.com/articles/multiple-environments

Even trying with the --remote, --app, or --confirm prompts like it suggests doesn't work.

Thanks!

geoffharcourt commented 7 years ago

@abhchand I think this issue is related to breaking changes to the Heroku CLI. We've pushed version 2.0.0 out to Rubygems. There will be a push to Homebrew shortly.

geoffharcourt commented 7 years ago

@abhchand I missed that you were using Parity 0.10.0. That version no longer works because of changes to Heroku's CLI. Please update to 2.0.1 or later from Rubygems or Homebrew.

Aishwarya19966 commented 4 years ago

$ heroku run rails c --app app1 $ heroku run rails c --app app2

kushagrabansal commented 4 years ago

@Aishwarya19966
Running rails c on ⬢ app1... ! ! You do not have access to the app app1.