I’ve always just worked with one GitHub account (my personal one), and then came octopress. I wanted to convert all the sites I manage from WordPress to octopress. Everything went well until running rake deploy.
Step 1: Create a new SSH key
I had to generate a new SSH key for the second GitHub account.
Be sure not to over-write your existing key (~/.ssh/id_rsa). I named mine id_rsa_ACCOUNT.
Step 2: Attach the new key to the GitHub Account.
I.m not going to go into any details here, it should be pretty obvious what you need to do.
Step 3: Create a config file
This config file is where all the magic happens. This is what allows you to specify which account to use when pushing things to GitHub.
Add the following to the file
1 2 3 4 5 6 7 8 9
Step 3: Testing
Now when pushing to your different accounts you can specify which one.