git post-receive hook权限

时间:2013-07-18 09:48:39

标签: git permissions centos githooks

我确实设置了一个多用户的gitolite环境,但我没有得到post-receive hook工作。

问题是我必须在我的VPS服务器上处理两个用户。

例如,如果example.com是我的VPS服务器的主域名,并且我想部署到dev.example.com,那么我的用户git需要对public_html / dev文件夹的写入权限用户example

$ git push
Counting objects: 5, done.
Writing objects: 100% (3/3), 275 bytes, done.
Total 3 (delta 0), reused 0 (delta 0)
remote: fatal: Could not switch to '/home/example/public_html': Permission denied
To ssh://git@example.com:22/project.git
   e0a35f7..4f747e6  master -> master

换句话说,我如何设置后接收挂钩:

home/git/repositories/project.git/hooks

到示例所拥有的托管文件夹:example:

home/example/public_html/dev

1 个答案:

答案 0 :(得分:0)

好的问题解决了。

我正在将群组权限更改为几个小时,但它表现得非常奇怪。 后来我意识到你需要注销登录用户才能获得新的权限。

卫生署!! :P

相关问题