Skip to content

Latest commit

 

History

History
15 lines (9 loc) · 357 Bytes

Running-git-command-using-another-ssh-key.md

File metadata and controls

15 lines (9 loc) · 357 Bytes
  • Date : 2018-06-26
  • Tags : #git #github

Running git command using another ssh key

Sometimes you want to use another private key to authorize to remote repository.

Just add an environment variable before the command you wanna run : GIT_SSH_COMMAND='ssh -i [your-private-key]

Example :

$ GIT_SSH_COMMAND='ssh -i ~/keys/key1' git pull