Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to setup git ssh client on my windows PC. I was logged in to the PC as a domain user and I installed git and set up the ssh client through the domain user account which I was logged in. My issue is when I generate the ssh key it creates in my private shared folder in the server instead of the default location locally.

Is there anyway I can set the default ssh key generation location in git?

share|improve this question

You can do that but this is an SSH configuration rather than a git one. Your personal configuration file is (on Windows it would be in your private shared folder\.ssh):

~/.ssh/config

Edit this file (and create it if it does not exist already) and set the following:

Host *
  IdentityFile /<drive letter>/<a path>/.ssh/<your_priv_key_name>

This two lines tell that for all hosts the identity file to use for SSH is in the location you specify. Of course, instead of * you can provide an IP address or hostname and set one identity file per host.

share|improve this answer
up vote 0 down vote accepted

You just need to map the domain user home directory locally.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .