When using Git via SSH with services such as GitHub and Gitorious, it can be useful to use specific / different ssh keys than your default.
This is accomplished with an entry such as the following in your ~/.ssh/config
:
1 2 3 4 5 |
Host some-alias IdentityFile /home/username/.ssh/id_rsa-some-alias IdentitiesOnly yes HostName git.example.com User git |
You then specify this remote as follows in .git/config
:
1 |
url = some-alias:project/repository.git |