You need to determine if you actually have two ssh keypairs, or just two emails you want to use. An ssh keypair is linked to accounts as described here.
The ssh keypair (specifically the private key), basically gives your git client permission to connect to github, and thus permission to push. This is separate from the user identity, which is just the email in your commit messages.
If you have two ssh keypairs, each linked to one account, follow these instructions to create a ~/.ssh/config
file. The key part is to use a different ssh psuedo-host for each account:
# Default GitHub user (joe)
Host github.com
HostName github.com
User git
IdentityFile /Users/joe/.ssh/id_rsa
# Client user (client)
Host github-client
HostName github.com
User git
IdentityFile /Users/joe/.ssh/id_rsa_client
You then use two corresponding remotes:
git clone git@github.com:joe/my_repo.git
and
git clone git@github-client:client/his_repo.git
If you just want to use two emails, you can just give each clone a separate .git/config
with the desired [user]
settings.