git: Unable to index file - permission denied

后端 未结 7 924
粉色の甜心
粉色の甜心 2020-12-29 02:34

Only for one file, I am getting the following error:

error: unable to write sha1 filename /opt/www/.git/objects/3f/ce3587c54a8be14c69b08c6b01f94949b11b47: Pe         


        
7条回答
  •  一整个雨季
    2020-12-29 03:01

    I was having this problem on my bare origin repository when the permissions were root:git 770, apparently I had to change it to 771, even though my user is in the git group. I suspect perhaps git is perhaps either not acl-aware, or not so compatible with secondary groups, as the git group was one of my secondary groups in this case.

提交回复
热议问题