Skip to content

Instantly share code, notes, and snippets.

@samueleastdev
Created January 24, 2017 14:08
Show Gist options
  • Select an option

  • Save samueleastdev/8efd5bb480c5aae8b7402060d44f365b to your computer and use it in GitHub Desktop.

Select an option

Save samueleastdev/8efd5bb480c5aae8b7402060d44f365b to your computer and use it in GitHub Desktop.
Setting Up Multiple Github Accounts
ssh-keygen -t rsa -C "your-email-address"
Be careful that you don't over-write your existing key for your personal account. Instead, when prompted, save the file as id_rsa_COMPANY. In my case, I've saved the file to ~/.ssh/id_rsa_s3bubble.
vim ~/.ssh/id_rsa_COMPANY.pub
touch ~/.ssh/config
vim config
#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_COMPANY
git remote add origin git@github-COMPANY:Company/testing.git
git push origin maste
https://code.tutsplus.com/tutorials/quick-tip-how-to-work-with-github-and-multiple-accounts--net-22574
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment