Michael Morisy Michael Morisy - 1 year ago 80
Git Question

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

I'm trying to configure GIT on my Windows XP machine, but SSH keeps creating and looking for the public/private key pair in non-sensical places, e.g. /.ssh/id_rsa

Is there a configuration file in the GIT Installation for Windows where I can switch this to my home directory, or another user defined place? By default, it offers to create new key pairs at //.ssh/id_rsa but that gives me the error "Could not create directory '//.ssh'." And when I'm able to find a directory I can create it in, GIT won't look there.

Answer Source

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 )