Store your Heroku credentials in your .git/config
.
This way, you won’t have to manually re-authenticate if you work on apps with different owners and need to perform owner-only operations (say, installing add-ons) on them.
heroku plugins:install git://github.com/matthewtodd/heroku-auth-gitconfig.git
During the course of your normal ‘heroku` command-line usage, you’ll automatically be prompted for your credentials, which will then be stored in your .git/config
. Done.
If you generally use the same account all the time, you can
git config --global heroku.account <EMAIL> git config --global heroku.password <PASSWORD>
And so on.
Inspired by David Dollar’s work-in-progress more comprehensive take on this idea: github.com/ddollar/heroku-accounts. Once that’s ready, you’ll probably prefer it to this little thing.
(And really, has no one done this before? Maybe my GitHub search skills are failing me.)