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?
If your PATH is correctly set:
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
You can force git to provide verbose ssh output with the "GIT_SSH_COMMAND" environment variable.
For example, to get verbose output from OpenSSH-For-Windows for a git clone
command, just open a command prompt and enter
set GIT_SSH_COMMAND="C:\Program Files\OpenSSH-Win64\ssh.exe" -vvv
git clone <repo_ssh_url>
Note the location of the quotation marks.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.