:::: MENU ::::

Monthly Archives / May 2016

  • May 09 / 2016
  • 0
Linux

Perform git commands with a specific ssh key

It’s sometimes necessary to execute one git command with a special SSH key rather that the one you’re running with (for example on a remote console).

This can be easily done by using such command:

ssh-agent bash -c 'ssh-add /home/myuser/.ssh/github.key; git pull [email protected]:MYPROJECT/myproject.git'

Question ? Contact