Created
January 24, 2017 14:08
-
-
Save samueleastdev/8efd5bb480c5aae8b7402060d44f365b to your computer and use it in GitHub Desktop.
Setting Up Multiple Github Accounts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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