SSH 在 Windows 上寻找公钥/私钥对的位置错误 [英] SSH is looking in the wrong place for the public/private key pair on Windows
问题描述
我正在尝试在我的 Windows XP 机器上配置 GIT,但 SSH 不断在无意义的地方创建和寻找公钥/私钥对,例如/.ssh/id_rsa
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
Windows 的 GIT 安装中是否有配置文件,我可以将其切换到我的主目录或其他用户定义的位置?默认情况下,它提供在//.ssh/id_rsa 上创建新密钥对,但这给了我错误无法创建目录 '//.ssh'".当我能够找到可以在其中创建的目录时,GIT 不会在那里查找.
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.
推荐答案
想出了如何在 Windows XP 中手动设置我的主目录:
Figured out how to manually set my home directory in Windows XP:
- 右键单击我的电脑"
- 选择高级"标签
- 点击环境变量"按钮
- 在系统变量"部分下,点击新建"
- 在变量名"中输入家".
- 在变量值"中输入您的个人资料路径.
要通过命令提示符执行相同操作:
To do the same via command prompt do :
setx HOME "yourpath ohome"
(请注意后缀 x - 这是用于保持更改)
( Please note the suffix x - This is used to persist the change )
这篇关于SSH 在 Windows 上寻找公钥/私钥对的位置错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!