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'

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

git.txt · Last modified: 2019/11/18 22:55 by hanez