Using Git with Bitvise SSH Client
You can configure Git to use Bitvise SSH Client to connect to a repository over SSH. You can do this for:
- Convenience: You may already have Bitvise SSH Client set up, or you may prefer it for Kerberos authentication.
- Performance: You may find Bitvise SSH Client is faster in your environment.
The component of the SSH Client that can be used for this purpose is sexec. This is a command line client that supports a variety of command line parameters. To learn more about the possible parameters, run sexec in a Command Prompt or PowerShell window like this:
Or like this:
sexec -? | more
Configure Git core.sshCommand to run sexec
Since Git version 2.10, you can configure the Git configuration variable core.sshCommand. You can configure this to run sexec as follows:
git config --global core.sshCommand "sexec -git -pk=g1"
To use the -git parameter, use Bitvise SSH Client version 7.36 or later.
This will authenticate against any SSH server you use with Git using the key stored in the SSH Client's location Global 1.
To use different authentication credentials for different servers, omit the parameter --global so as to configure core.sshCommand specific to the current repository.
If instead of -pk=..., you prefer to authenticate using a client key stored in a file, use:
git config --global core.sshCommand "sexec -git -keypairFile=C:/Path/To/keypair.bkp"
Note the use of forward slashes instead of backslashes because Git interprets backslashes as escape characters.