I’ve been looking to specify the path to ssh key relative to the git directory.
It usually looks like this in .git/config
:
[core]
sshCommand = ssh -i ~/.ssh/id_rsa_repo -F /dev/null #-vvv #Uncomment -vvv for verbose output.
Can be set by editing the .git/config
file or by running:
if another value already exists:
git config --unset core.sshCommand
sshCommand="ssh -i "$SCRIPT_DIR"/../.ssh/id_rsa_repo -F /dev/null"
git config core.sshCommand "$sshCommand"