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

后端 未结 7 704
眼角桃花
眼角桃花 2020-12-04 18:19

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

I

相关标签:
7条回答
  • 2020-12-04 18:43

    I had the same kind of problem when using a machine with domain policy setting the user profile to a network drive (in this case mapped to Z:).

    When trying to do anything from Powershell I'd get messages like this. Setting home PATH variable didn't help.

    git clone ssh://myusername@mydomain.com:1234/myproject
    Cloning into 'myproject'...
    Could not create directory '/z/.ssh'.
    The authenticity of host '[mydomain.com]:1234 ([1.1.1.1]:1234)' can't be established.
    RSA key fingerprint is 00:11:22:33:$4:55:66:77:88.
    Are you sure you want to continue connecting (yes/no)? yes
    Failed to add the host to the list of known hosts (/z/.ssh/known_hosts).
    Permission denied (publickey).
    
    Please make sure you have the correct access rights
    and the repository exists.
    

    When I cloned from git bash it was fine, as /z/.ssh etc is a valid way to point to Z:\.ssh from a shell.

    0 讨论(0)
提交回复
热议问题