mort9 content
Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. Git is easy to learn and has a tiny footprint with lightning fast performance. ~ Git-SCM
GIT_SSH_COMMAND:GIT_SSH_COMMAND="ssh -i ~/.ssh/id_rsa_example" git clone example
Note that -i can sometimes be overridden by your config file, in which case, you should give SSH an empty config file, like this:
GIT_SSH_COMMAND="ssh -i ~/.ssh/id_rsa_example -F /dev/null" git clone example
core.sshCommand:git config core.sshCommand "ssh -i ~/.ssh/id_rsa_example -F /dev/null"
git pull
git push
config file~/.ssh/config with different Hosts but same HostNames.Example:
Host work
HostName github.com
IdentityFile ~/.ssh/id_rsa_work
User git
Host personal
HostName github.com
IdentityFile ~/.ssh/id_rsa_personal
User git
And then try to access the repositories like this :
git clone git@work:username/my-work-project.git
git clone git@personal:username/my-personal-project.git