Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
616 views
in Technique[技术] by (71.8m points)

git - 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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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 "yourpathohome"

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...