Search code examples
windowsgitsshopenssh

How can I run git commands on Windows with SSH verbose mode?


This is the Windows version of How can I run git push/pull commands with SSH verbose mode?

There are times where you just need to debug git's usage of SSH.

OpenSSH has a -v flag for verbose output, but how do you get git to use it?

How can I run git commands on Windows with SSH verbose mode?


Solution

  • If your PATH is correctly set:

    • you don't need OpenSSH-Win64 (ssh is already included in Git)
    • you don't need to specify the full path for SSH

    You need:

    set GH=C:\path\to\git
    set PATH=%GH%\bin;%GH%\usr\bin;%GH%\mingw64\bin;%PATH%
    

    Then

    set GIT_SSH_COMMAND=ssh -vvv