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.

Advertisement

2 thoughts on “Stumped by multiple ssh key pair on github or unfuddle?

  1. Not sure I understand the comment about ssh-agent being killed. Does it have to be killed before you generate your key pair or what?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s