I got SSH working with SourceTree to connect to a private github repo using an alternate keypair (i.e. another one than my id_rsa).
This involved adding the following text to ~/.ssh/config:
Host git-as-USERNAME
HostName DOMAIN.com
User USERNAME
IdentityFile ~/.ssl/USERNAME
And of course generating the USERNAME keypair I referred to this guide, which led to these commands:
ssh-keygen -t rsa -C "your_email@example.com" -f output_keyfile
SourceTree kept asking me for my password even after I set things up to where command line git was working right in the terminal. To fix this I had to format my repo URL with ssh:// in the beginning as suggested by Atlassian.
No comments:
Post a Comment