I want to figure which SSH client is used by git commands when running git bash on windows. Is there any git command I can run that will display the ssh client path?
Asked
Active
Viewed 467 times
1 Answers
1
With a recent enough git version, you can use trace2 to display what Git is trying to do:
GIT_TRACE2=1 git clone git@github.com:<me>/<myrepo>
GIT_TRACE2_EVENT=1 git clone git@github.com:<me>/<myrepo>
You can also set the GIT_SSH_COMMAND environment variable to ssh (including its full path) if you want to make sure which SSH client is used.
VonC
- 1,129,465
- 480
- 4,036
- 4,755
-
This will show something like `child_start[0] ssh ...` which isn't terribly helpful since its still unclear which `ssh` is run. – CervEd Nov 10 '21 at 10:13
-
@CervEd "which ssh"? Do you mean you have multiple ssh installed? – VonC Nov 10 '21 at 10:17
-
with Git for Windows one might have both the Git for Windows OpenSSH client as well as the Windows OpenSSH client, both as `ssh`. If running `which ssh` returns what is later run by the git process that's great. In my case I had switched back to the Git for Windows `ssh` client, `which ssh` returned `/usr/bin/ssh` – CervEd Nov 10 '21 at 10:31
-
@CervEd True. I always set the PATH to make sure to use the Git For Windows SSH one. – VonC Nov 10 '21 at 11:09
-
I recently installed on a new machine using the new option to use the native client but found myself reverting. Then I got problems with handshakes and I just wanted to make sure which client was being used – CervEd Nov 10 '21 at 11:36