SSH is looking in the wrong place for the public/private key pair on Windows

Recommended method from MSYS2 is to set db_home in /etc/nsswitch.conf to your home directory.

Credit to @VarunAgw for pointing in the right direction.

Git-for-Windows includes env in db_home, which should read your HOME bash variable, however, it is unreliable.


Figured out how to manually set my home directory in Windows XP:

  1. Right click "My Computer"
  2. Choose the "Advanced" tab
  3. Click the "Environmental Variables" button
  4. Under the "System variables" section, click "New"
  5. In the "Variable name" enter in "home".
  6. In the "Variable value" enter in the path to your profile.

To do the same via command prompt do :

setx HOME "your\path\to\home"

( Please note the suffix x - This is used to persist the change )