Closed kennknowles closed 9 months ago
Same issue here. The assumption of pushing to heroku
remote is actually dangerous because that may not be the remote of the app a user is wishing to rebuild.
:+1:
just got bitten by this...is there a workaround other than to git push afresh to heroku?
error log here: https://gist.github.com/khoan/753927225c120739b3aa
:+1:
This "problem" is the same as with all toolbelt commands. You should be able to specify an app's name with the -a
option.
heroku repo:purge_cache -a <app name>
It's even specified in the README, and I just tried to confirm that it works properly.
I can confirm that it doesn't work even with the -a
flag.
I have the exact same situation as @kennknowles : one application with two remotes (production
and staging
and the command ends up with:
~/tmp/repo_tmp/unpack $ exit
exit
fatal: 'heroku' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
The issue appears to be not having a remote named heroku
.
My working workaround was:
$ heroku git:remote -r heroku -a the_application_name
$ heroku repo:rebuild -a the_application_name
$ git remote rm heroku
It would be really great if this didn't require a workaround. I'm in this position, as well, as we have both the stage & production remotes, named as such, and neither remote is named 'heroku'.
Would love a patch.
Just need the ability to pass in an -r option for what the remote is named and inject it on line 108 of https://github.com/heroku/heroku-repo/blob/master/lib/heroku/command/repo.rb
Is there a way to have it also respect the standard heroku --remote xyz
method of selecting a heroku app? I don't know much about how these plugins work at all.
heroku repo:rebuild
cannot read my application's remote from my git config because there are two applications with different remotes (production
andstaging
)So it defaults to a remote named
heroku
which does not exist.Suggested behavior:
--app
parameter. I don't know much about Heroku plugins so I don't know if this is possible.--remote
that the user must pass. If they do not, then print a useful message andexit 1
.I'm not that picky about my own configuration, if you have any suggestions.