How to debug Git SSH setup when using Windows, PowerShell and posh-git

GitHub provides a lot of useful information on setting up SSH keys including a lot of great guides on solving common SSH problems.

I had some trouble recently (copied the SSH key incorrectly into GitHub), but because I was using Windows, PowerShell and posh-git I couldn’t just run a lot of the ssh commands directly to debug what was going wrong as ssh.exe was not in a directory in my PATH.

I found ssh.exe inside the bin directory of my Git install (e.g. C:\Programs (x86)\Git\bin) and then could run the commands from there. Additionally an easy way to work out where Git is located from Powershell is

Get-Command git

Advertisements
How to debug Git SSH setup when using Windows, PowerShell and posh-git