Created
November 2, 2009 21:15
-
-
Save adambair/224467 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# How to setup multiple heroku accounts | |
# (assuming you already have one setup) | |
# make sure ~/bin is in your path | |
create ~/bin/hcred and populate it with the following: | |
1 #!/usr/bin/env ruby | |
2 | |
3 `rm ~/.heroku/credentials` | |
4 `ln -s ~/.heroku/credentials_#{ARGV[0]} ~/.heroku/credentials` | |
chmod +x hcred | |
mv ~/.heroku/credentials ~/.heroku/credentials_personal | |
cd ~/.ssh | |
ssh-keygen -f another_id_rsa | |
(a password is not required - but can be nice) | |
heroku keys:add ~/.ssh/other_id_rsa.pub | |
enter your other heroku email address | |
enter your other heroku password | |
mv ~/.heroku/credentials ~/.heroku/credentials_other | |
hcred other # to switch to the other account | |
hcred personal # to switch to your personal account |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This works well when you have a personal account, a company account, and a global admin account.