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

前端 未结 25 1801
说谎
说谎 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:21

    This is a particularly involved problem on Windows, where it's not enough to just chmod the files correctly. You have to set up your environment.

    On Windows, this worked for me:

    1. Install cygwin.

    2. Replace the msysgit ssh.exe with cygwin's ssh.exe.

    3. Using cygwin bash, chmod 600 the private key file, which was "id_rsa" for me.

    4. If it still doesn't work, go to Control Panel -> System Properties -> Advanced -> Environment Variables and add the following environment variable. Then repeat step 3.

      Variable      Value
      CYGWIN      sbmntsec

提交回复
热议问题