Using 2 usernames with the same Git server

The quickest way to solve this is to have two entries in ~/.ssh/config:

Host github.com
 HostName github.com
 IdentityFile /path/to/your/personal/github/private/key
 User personalusername

Host github-work
 HostName github.com
 IdentityFile /path/to/your/work/github/private/key
 User workusername

Source
Jason Blackeye

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 )

Google+ photo

You are commenting using your Google+ 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 )

Connecting to %s