Stumped by multiple ssh key pair on github or unfuddle?

I’ve been using git in my new projects these days, just because it’s cool — and it’s FAST! We use unfuddle to host our projects but some of our clients prefer to have their own accounts. You can only associate one ssh key pair to each unfuddle account. So thats fine, you can setup multiple ssh key pairs, github has some good explanations.

Here: http://github.com/guides/multiple-github-accounts

Basically you tell your ssh to use different keypairs for particular hostnames in ~/.ssh/config like so:


Host rorcraft.unfuddle.com
User git
IdentityFile ~/.ssh/id_dsa
Host ankoder.unfuddle.com
User git
IdentityFile ~/.ssh/id_dsa_ankoder

NOTE: If you’re using passphrase and you’re on OSX Leopard or if you’re using ssh-agent. You have to kill your ssh-agent process first.

Leopard has keychain integration built-in for ssh key passphrase by using ssh-agent. This will stop your configs working. Either don’t use passphrase or don’t store it in keychains.


ps xa | grep ssh-agent | grep -v grep
1240 ?? S 0:02.36 /usr/bin/ssh-agent -l

Took me a bit of time of figure this out.. but I still love git.