Use GIT_SSH_COMMAND env variable
Blackjacx opened this issue · comments
Stefan Herold commented
Description
We have a different SSH key for private/work. The environment variable can be used to configure this SSH key. Git automatically used the corect identity then. It would be specifies this way:
$ export GIT_SSH_COMMAND="ssh -i ~/.ssh/id_rsa_work.pub"
It works for all git operations on the repo but not for Mint :-( I don't know why exactly. Since if the env var is set it should be used by git...
Git Docs
https://git-scm.com/docs/git#Documentation/git.txt-codeGITSSHCOMMANDcode
Stefan Herold commented
Okay I was wrong, when you use export GIT_SSH_COMMAND="ssh -i ~/.ssh/id_rsa_work.pub"
instead of GIT_SSH_COMMAND="ssh -i ~/.ssh/id_rsa_work.pub"
it workes. 👍