Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm attempting to setup Git with OpenSSH under Cygwin. I almost got everything setup. I have the agent and public key and all that.. but now I get this really weird error:

$ git pull -u origin master
Bad owner or permissions on /home/Jordan/.ssh/config
fatal: The remote end hung up unexpectedly

Googling it appears to be a permissions error(of course). One problem: the permissions look fine to me.

I've also tried doing a chmod 0600 ~/.ssh/config, but that didn't help. What I've tried doing:

Jordan@EarlzWindows8VM ~/dev/NonExceptional
$ chmod 0600 ~/.ssh/config 

Jordan@EarlzWindows8VM ~/dev/NonExceptional
$ stat ~/.ssh/config 
  File: `/home/Jordan/.ssh/config'
  Size: 47              Blocks: 1          IO Block: 65536  regular file
Device: 4ade2efdh/1256075005d   Inode: 1970324837237461  Links: 1
Access: (0660/-rw-rw----)  Uid: ( 1001/  Jordan)   Gid: (  513/    None)
Access: 2013-01-12 22:53:32.483072600 -0500
Modify: 2013-01-12 22:53:32.486074700 -0500
Change: 2013-01-12 23:27:33.077476800 -0500
 Birth: 2013-01-12 22:53:32.483072600 -0500

Notice that for whatever reason, the permissions still appear to be 0660. I don't understand why though. I've verified these permissions in Windows Explorer. Only I have access to the file, and when checking the "effective access", the group Users does not have access to the file.

How do I fix this error?

Also, some background: Windows 8 Enterprise. Joined to a domain(which always makes permissions fun). Cygwin is up to date

share|improve this question
Does it make a difference to move the config file to config-old and then create a new config file with the right permissions? –  Heptite Jan 13 '13 at 4:58
@Heptite no it doesn;t –  Earlz Jan 13 '13 at 16:07

5 Answers 5

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
group:Authenticated Users:rwx

After: (working)

# file: config
# owner: myusername
# group: None
share|improve this answer
This is the only solution that worked for me after I recently upgraded to the latest cygwin. ssh worked fine before the upgrade, but not after. Running on windows 7. –  gdw2 Feb 18 at 16:37
This requires cygwin 1.7.34-6 –  ClintM Feb 20 at 22:18

Iv'e found that this always fixes it:

chown Username:Users ~/.ssh/config
chmod go-rw ~/.ssh/config
share|improve this answer
This solution worked for me with the same issue. –  firefusion Apr 8 '13 at 14:25
up vote 4 down vote accepted

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

share|improve this answer

This solution helped me:

cd ~/.ssh
chmod 600 *
share|improve this answer

Your configuration file is writable for the group, and SSH doesn't like that. Do a

chmod go-rw ~/.ssh/config

share|improve this answer
The question shows that he tried that, and the mode did not change. –  Heptite Jan 15 '13 at 19:11

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.