When setting up automatic deployment on a software project using git, you may want your server to be able to automatically pull changes from the repository. Popular repo hosts like Github and Bitbucket will usually need your server’s public SSH key to allow access. Assuming you have a server with multiple SSH keys, it may become important for you to specify which SSH key to use for specific users when using git. Here I explain how to make git use a specific private key when accessing Github.
host github.com HostName github.com IdentityFile <path to id rsa file> User git
Now you can do
git clone firstname.lastname@example.org:username/repo.git.
Make sure the permissions on IdentityFile are 400.
ssh – How to tell git which private key to use? – Super User. http://superuser.com/questions/232373/how-to-tell-git-which-private-key-to-use