Git and RSA identities


Enrico Spinielli


February 6, 2012

Here is the solution I found to be able to use git with a different RSA identity than the rsa_id default one.

My repo on github is logback-android and my user account is espinielli.

I did generate an SSH key as per github help and named it github_rsa:

$ ssh-keygen -t rsa -C "" -f github_rsa

I then added the following section in ~/.ssh/config

# github for espinielli
Host github
User espinielli
IdentityFile /Users/espin/.ssh/github_rsa

From within the repo directory (I cloned it before via http):

$ git remote add gh ssh://

And finally I am able to use it like this:

$ git push gh master
No matching items