在cygwin环境下
$ chmod 0600 id_rsa
$ ls -all
总用量 13
drwxrwxr-x+ 1 zhyf0_000 None 0 4月 22 19:21 .
drwxrwxr-x+ 1 zhyf0_000 None 0 4月 23 08:57 ..
-rw-rw---- 1 zhyf0_000 None 1679 4月 22 19:21 id_rsa
-rwxrwxrwx 1 zhyf0_000 None 394 4月 22 19:21 id_rsa.pub
-rwxrwxrwx 1 zhyf0_000 None 987 4月 22 19:50 known_hosts
不管怎么赋权限 都是-rw-rw----
但是git要求id_rsa 的权限必须为 600
好蛋疼,或者你们是怎么在cygwin 中使用git 的???
某草草2017-04-24 16:02:29
I have encountered a similar situation. Check the /etc/fstab file to see if it looks like this:
none /cygdrive cygdrive binary,noacl,posix=0,user 0 0
Delete the noacl option, which will affect the use of chmod
Then use chmod file permissions