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

后端 未结 7 752
眼角桃花
眼角桃花 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:29

    ln -s /c/Users/rofrol/.ssh /home/rofrol/ worked for me.

    This did not:

    $ echo $HOME
    /c/Users/rofrol
    
    $ cat ~/nsswitch.conf
    db_home: /c/Users/rofrol
    
    $ cat /home/rofrol/nsswitch.conf
    db_home: /c/Users/rofrol
    
    $ cat /etc/nsswitch.conf
    # Begin /etc/nsswitch.conf
    
    passwd: files db
    group: files db
    
    db_enum: cache builtin
    
    #db_home: cygwin desc
    db_home: /c/Users/rofrol
    db_shell: cygwin desc
    db_gecos: cygwin desc
    
    # End /etc/nsswitch.conf
    

    Probably because of this:

    SSH will require /home/$USER

    https://github.com/git-for-windows/git/issues/736#issuecomment-215123009

提交回复
热议问题