Created
July 21, 2020 05:34
-
-
Save 8secz-johndpope/603ae67d7a48bfd9b9c5ea8b7854f550 to your computer and use it in GitHub Desktop.
~/.ssh/config file
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
# --- Sourcetree Generated --- | |
Host 8secz-johndpope-GitHub | |
HostName github.com | |
User 8secz-johndpope | |
PreferredAuthentications publickey | |
IdentityFile /Users/johnpope/.ssh/8secz-johndpope-GitHub | |
UseKeychain yes | |
AddKeysToAgent yes | |
# ---------------------------- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To support multiple github ssh keys
generate new ssh work key
ssh-keygen
save the file clearly with work name / make sure you specify directory
~/.ssh/Github-WORKNAME-username
create a config file
cd ~/.ssh
touch config
update the User + IdentityFile (copy and paste above)
when you clone - use the ssh / and the users should match - eg. 8secz-johndpope
the cloned repo will correspond with the work keys
make sure you use system git in sourcetree - to pick this up correctly.
