Skip to content
Multiple account management for Heroku
Find file
New pull request
Pull request Compare This branch is 3 commits ahead, 22 commits behind ddollar:master.
Fetching latest commit...
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib/ext/heroku make user/password private to avoid appearing in help
init.rb typo

Heroku Accounts

Helps use multiple accounts on Heroku.


$ heroku plugins:install git://


To add accounts:

$ heroku accounts:add personal
Enter your Heroku credentials.
Password: ******

Add the following to your ~/.ssh/config

Host heroku.personal
  IdentitiesOnly yes

Or you can choose a fully-automated approach:

$ heroku accounts:add work --auto
Enter your Heroku credentials.
Password: ******
Generating new SSH key
Generating public/private rsa key pair.
Your identification has been saved in ~/.ssh/
Your public key has been saved in ~/.ssh/
Adding entry to ~/.ssh/config
Adding public key to Heroku account:

To switch an app to a different account:

# in project root
heroku accounts:set personal

To list accounts:

$ heroku accounts

To remove an account:

$ heroku accounts:remove personal
Account removed: personal

Set a machine-wide default account:

$ heroku accounts:default personal

To clone a git repository from Heroku, change '' to the Host of the desired account defined in your .ssh/config:

$ git clone

If you want to switch the account for an app:

$ heroku accounts:set work

This also changes the URL of the git origin heroku to make sure you're using the correct SSH host.

Something went wrong with that request. Please try again.