但是,当我尝试让user1在/ var / www上拉回购时,我得到了
error: cannot open .git/FETCH_HEAD: Permission denied
所以我还缺少什么。 GIT回购已经是一个共同的回购。出于某种原因,我无法让这个用户使用/ var / www?
谢谢!
答案 0 :(得分:1)
事实证明,答案是将.git文件夹的GROUP更改为用户的GROUP。 我没有意识到.git / FETCH_HEAD是一个程序,访问被拒绝运行它。我认为这是一个gitosis的事情,但事实并非如此。
谢谢!
答案 1 :(得分:0)
您可以使用
追溯修复它们(之后您不需要配置设置)chmod -R user:group /path/to/shared.git
find /path/to/shared.git -type d |xargs chmod 2775 # or 2770 if you don't want it public
find /path/to/shared.git -type f |xargs chmod 444 # or 440
find /path/to/shared.git/hooks |xargs chmod ugo+x # or ug+x