adambair (owner)

Revisions

gist: 224467 Download_button fork
public
Public Clone URL: git://gist.github.com/224467.git
Embed All Files: show embed
How to setup multiple Heroku accounts #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# 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