SSH Private Key Permissions using Git GUI or ssh-keygen are too open

前端 未结 25 1843
说谎
说谎 2020-12-07 06:57

Recently I\'ve been unable to clone or push to github, and I\'m trying to find the root cause.

This is on windows

I have cygwin + git as well as msy

25条回答
  •  星月不相逢
    2020-12-07 07:22

    I had the same issue on Windows 10 where I tried to SSH into a Vagrant box. This seems like a bug in the old OpenSSH version. What worked for me:

    1. Install the latest OpenSSH from http://www.mls-software.com/opensshd.html
    2. where.exe ssh

    (Note the ".exe" if you are using Powershell)

    You might see something like:

    C:\Windows\System32\OpenSSH\ssh.exe
    C:\Program Files\OpenSSH\bin\ssh.exe
    C:\opscode\chefdk\embedded\git\usr\bin\ssh.exe
    

    Note that in the above example the latest OpenSSH is second in the path so it won't execute.

    To change the order:

    1. Right-click Windows button -> Settings -> "Edit the System Environment Variables"
    2. On the "Advance" tab click "Environment Variables..."
    3. Under System Variables edit "Path".
    4. Select "C:\Program Files\OpenSSH\bin" and "Move Up" so that it appears on the top.
    5. Click OK
    6. Restart your Console so that the new environment variables may apply.

提交回复
热议问题