Using special SSH key for Git
In ~/.ssh/config
:
host github.com
HostName github.com
IdentityFile ~/.ssh/id_rsa_github
User git
don’t forget chmod 600 ~/.ssh/config
Or, use GIT_SSH_COMMAND
environment variable:
export GIT_SSH_COMMAND="ssh -i ~/.ssh/id_rsa_example -F /dev/null"
Was this page helpful?