Time to read: 1 minutes.
Libssh2 vs ssh
Libgit2 does not using the system
Instead, it is statically linked to
which does not read
libgit2 does not support that either.
In contrast, command line
git uses the
and therefore supports
Specifiying an SSH Key
Git can be configured to use a specific
ssh key for authorization of a given repo.
Within the repo, type:
$ git config core.sshCommand "ssh -i ~/.ssh/id_rsa"
The above causes the following to be added to
[core] sshCommand = ssh -i ~/.ssh/id_rsa
This is helpful for debugging ssh connectivity issues, for example by increasing
$ git config core.sshCommand "ssh -vi ~/.ssh/id_rsa"
Both command line
libgit2 use any
ssh-agent that is running.
# Launch ssh-agent; best to do this in ~/.bashrc $ eval $(ssh-agent) > /dev/null $ ssh-add Identity added: /home/mslinn/.ssh/id_rsa (/home/mslinn/.ssh/id_rsa) $ ssh-add -l 1024 SHA256:Xdv1AE4QTd0NfrwOGVTamF/wxnvFufCtsOIoOXtX5Mw /home/mslinn/.ssh/id_rsa (RSA) $ echo $SSH_AGENT_PID 2196