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?
In verbose mode, the client prints messages as it proceeds, providing clues to the problem. New SSH users (and quite a few experienced ones) frequently forget or neglect to use verbose mode when problems arise.
The Windows Explorer integration > Context menu entries option allows opening the Git command prompt (Git Bash) from any folder by clicking with the right mouse button on the folder and selecting Git Bash Here. The last option is also interesting in that it installs a better font for all console windows.
According to the manual ( git commit --help ): -v , --verbose. Show unified diff between the HEAD commit and what would be committed at the bottom of the commit message template to help the user describe the commit by reminding what changes the commit has.
Once your key is open, you want to select Conversions -> Export OpenSSH key and save it to HOME\. ssh\id_rsa . After you have the key at that location, Git Bash will recognize the key and use it.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With