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

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

    My system is a bit of a mess with bash/cygwin/git/msysgit/maybe-more...

    chmod had no effect on the key, or the config file.

    Then I decided to approach it from Windows, which worked.

    1. Right-Click the file whose permission needs fixing.
    2. Select Properties.
    3. Select the Security tab.
    4. Click Advanced near the bottom.
    5. Click Change, next to Owner near the top.
    6. Type "My-Awesome-Username" (obviously change that to your current Windows username), and click Check Names, then OK.
    7. Under Permission entries:, highlight each user that isn't "My-Awesome-Username", and select Remove. Repeat this until "My-Awesome-Username" is the only one left.
    8. Select "My-Awesome-Username", and click Edit below.
    9. Make sure the Type: at the top is set to Allow, and then tick the checkbox next to Full control.
    10. Hit OK, Apply, OK, OK.

    11. Give it another try now...

    Seems the sometimes the mock-bash can't control the file ownership. It's especially weird, as it's generated from a mock-bash script. Go figure.

提交回复
热议问题