Quick Tip: How to Work with GitHub and Multiple Accounts


Sometimes you may need to have multiple github accounts (one for office, one for work , one for girl friend, whatever) .

Lets say you have ssh keys already setup and github is set for one account. Now for new account:

  • Create a new ssh key

ssh-keygen -t rsa -C "your-email-address"

     Careful while name the file , dont overwrite the existing one .I named it as ~/.ssh/id_rsa_xxx

  • Add the new key to github account

     This is simple enough. Copy the id_rsa_xxx.pub in github > Settings > SSH Keys

  • Create a new config file in  vi ~.ssh/config

        Add following :

#Default GitHub
Host github.com
  HostName github.com
  User git
  IdentityFile ~/.ssh/id_rsa
Host github-COMPANY
  HostName github.com
  User git
  IdentityFile ~/.ssh/id_rsa_xxxx
 
You are done . Try it out ..
Vola !! Happy coding !!
Advertisements

32 thoughts on “Quick Tip: How to Work with GitHub and Multiple Accounts

  1. Fantastic goods from you, man. I’ve understand your stuff previous to and you’re just extremely great. I really like what you’ve acquired here, certainly like what you are stating and the way in which you say it. You make it entertaining and you still care for to keep it sensible. I can’t wait to read much more from you. This is really a terrific web site.

  2. Having read this I believed it was really informative. I appreciate you finding the time and effort to put this short article together. I once again find myself spending a lot of time both reading and posting comments. But so what, it was still worth it!

  3. What’s Taking place i’m new to this, I stumbled upon this I’ve found It positively helpful and it has helped me out loads. I am hoping to contribute & assist different users like its helped me. Good job.

  4. I do not know if it’s just me or if everybody else encountering problems with your site. It appears as if some of the text within your content are running off the screen. Can someone else please comment and let me know if this is happening to them as well? This might be a issue with my internet browser because I’ve had this happen before. Thank you

  5. Excellent post. I was checking constantly this blog and I’m impressed! Very helpful information particularly the last phase 🙂 I take care of such information a lot. I used to be looking for this particular information for a long time. Thanks and good luck.

  6. Simply desire to say your article is as astonishing. The clarity for your publish is just excellent and i could think you’re knowledgeable in this subject. Well with your permission let me to seize your feed to keep up to date with imminent post. Thank you 1,000,000 and please carry on the gratifying work.

  7. My brother recommended I would possibly like this website. He was totally right. This post truly made my day. You can not imagine just how much time I had spent for this info! Thanks!

  8. you’re truly a just right webmaster. The website loading pace is incredible. It sort of feels that you’re doing any distinctive trick. Also, The contents are masterpiece. you’ve done a fantastic task in this topic!

  9. są nieodporne wysunąć sumę poczyń ślubnych, społem spośród sekretnymi, jeżeli mają iż naznaczenie się na nie przysporzy im wyraźną przewagę. Egzystują bezdennie makiaweliczne oraz gdyby no zatem potrafię olśnić – nieugięte. W 4 incydentach na 5 explicite interesowane nastawieniem rozporządzeń do skumulowanego dobrobytu.

  10. Magnificent website. A lot of helpful information here. I am sending it to a few buddies ans additionally sharing in delicious. And of course, thank you to your sweat!

  11. Hey, I think your site might be having browser compatibility issues. When I look at your website in Opera, it looks fine but when opening in Internet Explorer, it has some overlapping. I just wanted to give you a quick heads up! Other then that, wonderful blog!

  12. First off I want to say awesome blog! I had a quick question which I’d like to ask if you do not mind. I was curious to find out how you center yourself and clear your mind prior to writing. I have had difficulty clearing my mind in getting my thoughts out. I do take pleasure in writing but it just seems like the first 10 to 15 minutes tend to be lost just trying to figure out how to begin. Any suggestions or tips? Many thanks!

  13. I don’t know whether it’s just me or if perhaps everybody else experiencing problems with your blog. It appears as if some of the written text in your content are running off the screen. Can someone else please provide feedback and let me know if this is happening to them too? This may be a problem with my web browser because I’ve had this happen before. Appreciate it

  14. Just desire to say your article is as astonishing. The clearness for your put up is simply excellent and i could suppose you are an expert on this subject. Well together with your permission allow me to seize your RSS feed to keep updated with drawing close post. Thank you 1,000,000 and please carry on the gratifying work.

  15. I’m no longer sure where you are getting your info, but great topic. I needs to spend a while studying more or working out more. Thank you for great info I used to be searching for this information for my mission.

  16. You actually make it appear so easy along with your presentation but I to find this matter to be actually something that I think I would never understand. It kind of feels too complicated and very huge for me. I’m taking a look forward on your next post, I’ll attempt to get the dangle of it!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s