在Windows上,SSH正在寻找公钥/私钥对的错误位置 [英] SSH is looking in the wrong place for the public/private key pair on Windows

查看:436
本文介绍了在Windows上,SSH正在寻找公钥/私钥对的错误位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在我的Windows XP机器上配置GIT,但SSH在非感性场所继续创建和查找公钥/私钥对,例如, /.ssh/id_rsa



在GIT Installation for Windows中是否有配置文件,我可以将其切换到我的主目录或其他用户定义的位置?默认情况下,它提供了在//.ssh/id_rsa创建新的密钥对,但是这给了我错误无法创建目录'//.ssh'。当我能够找到一个可以创建它的目录时,GIT不会在那里寻找。

解决方案

如何在Windows XP中手动设置我的主目录:
$ b $ ol

  • 右键点击我的电脑

  • 选择高级选项卡
  • 点击环境变量按钮
  • 在系统变量部分点击新建
  • >
  • 在变量名称中输入home。
  • 在变量值中输入您的个人资料的路径。

  • 通过命令提示符执行同样的操作:

      setx HOMEyour\path\to\home

    (请注意后缀x - 这是用来坚持更改)


    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.

    解决方案

    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 )

    这篇关于在Windows上,SSH正在寻找公钥/私钥对的错误位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆