Windows virtual environment: Use SSH binaries from the Git suite by mpdude · Pull Request #63 · webfactory/ssh-agent

This hopefully fixes Windows-based builds, including issue #62.

It was a much bigger rabbit hole than initially expected, and took quite some time and experimentation. It turns out there are two versions of the ssh and related binaries available in the Windows virtual environment.

C:\>C:\Windows\System32\OpenSSH\ssh.exe -v xx
OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5

C:\>C:\"Program Files"\Git\usr\bin\ssh.exe -v xx
OpenSSH_8.4p1, OpenSSL 1.1.1i  8 Dec 2020

Things seem to work when using the ssh-agent and ssh-add binaries provided as part of the Git installation, but not with the native Windows ones.

As of writing, simple git clone ... operations given in a GHA workflow file will use the ssh client from the Git suite, without further configuration. I don't know if this might change in the future; git-for-windows/git#2944 is about possibly changing this.

As a reminder to myself, just in case we need to get back to this sometime:

I don't know if "mixing" the SSH client and/or other binaries (the agent) from Windows and Git has any other side effects or implications.

🤞🏻