Setting up SSH/Git on Cygwin yields "Bad permissions on ~/.ssh/config"
Don't forget the ACLs
Nothing worked for me until I stripped the file of ACLs and reset the permissions.
#remove ACLs
setfacl -b ~/.ssh/config
#reset permissions
chmod 0600 ~/.ssh/config
You can use getfacl
to view the current ACL on a file.
getfacl ~/.ssh/config
Before I removed the ACLs (Broken):
# owner: Administrators
# group: None
user::rw-
group::---
group:Authenticated Users:rwx
group:SYSTEM:rwx
mask:rwx
other:---
After: (working)
# file: config
# owner: myusername
# group: None
user::rw-
group::---
other:---
Iv'e found that this always fixes it:
chown Username:Users ~/.ssh/config
chmod go-rw ~/.ssh/config
The problem ended up being that the file was owned by group "None". I changed the group to "Users" and then I could freely change the permissions
I figured this out from this related question