User Tools

Site Tools


git

Git Notes

Specify the private SSH-key to use when executing a Git command:

ssh-agent bash -c 'ssh-add /home/git/.ssh/key-filename; git $GIT_COMMAND'

Example:

ssh-agent bash -c 'ssh-add /home/git/.ssh/key-filename; git push'

Source: https://stackoverflow.com/questions/4565700/how-to-specify-the-private-ssh-key-to-use-when-executing-shell-command-on-git

git.txt · Last modified: 2020/05/27 19:38 by hanez