How can I configure plink.exe to be verbose when run by git?
The problem: on windows, using the command git.cmd clone git+ssh://user@host/repo folder
when GIT_SSH=plink.exe
intermittently fails across build slaves. I need to find the root cause, and make connections reliable, without retrying on some count.
I've narrowed down that sshd is running and terminating its processes without error. The server is running gitosis, so I only have command line output to go on. When the failure happens, gitosis doesn't get called (no gitosis prints), so I'm suspecting the windows ssh client.
I want to connect with verbose logging when plink.exe is invoked by git.
Setting GIT_SSH=plink.exe -v
results in:
error: cannot spawn plink.exe -v: No such file or directory
Turns out, GIT_SSH must be an executable or wrapper script.
Creating such a batch file wrapper gets closer: GIT_SSH=C:\path\to\plink.cmd
where plink cmd is plink.exe -v %*
prints expected verbose logging to console, but terminates unsuccessfully with error code 128. The cloned folder is never created, and the last printed console output is:
Unable to write to standard output: The pipe is being closed.
How can I get the verbose client log at the time of failure from plink?