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

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

    None of the workarounds suggested here (chmod/chgrp/setfacl/windows perms) worked for me with msys64 on a Windows 7 corporate VM. In the end I worked around the problem by using an ssh agent with the key provided on stdin. Adding this to my .bash_profile makes it the default for my login:

    eval $(ssh-agent -s)
    cat ~/.ssh/id_rsa | ssh-add -k -
    

    Now I can do git push and pull with ssh remotes.

提交回复
热议问题