Heroku-ing with multiple personalities

I recently transitioned a client site from my own account on Heroku to their account – which means to manage that site effectively, I need to be able to use Heroku with multiple accounts. Fortunately, there was a great guide on the topic already, so most of what I did came straight from Aeonscope’s notes on how to manage multiple accounts. The gist is that you can use his scripts to easily switch your credentials file (used by the heroku gem) from one account to another.

The problem is with the SSH config – using his instructions and talking to official.heroku.com, you have to add the --app switch to tell heroku which app to talk to. I don’t really want to do that, so I just went a step further with his scripts, creating a link to the ssh identity I want heroku to use at any given time. My version of his switcher.rb is here

[I should also point out that my script assumes you’re using RSA keys and the typical location for the default, /.ssh/id_rsa\ &/.ssh/id_rsa.pub – adjust accordingly if you do otherwise.]

keith@collectiveidea.com

Comments