【问题标题】:git post-receive hook permissionsgit post-receive hook 权限
【发布时间】:2013-07-17 04:48:55
【问题描述】:

我确实设置了一个多用户 gitolite 环境,但我没有让 post-receive 挂钩工作。

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

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

$ 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:example: 拥有的托管文件夹

home/example/public_html/dev

【问题讨论】:

    标签: git permissions centos githooks


    【解决方案1】:

    好的,问题解决了。

    我改变了几个小时的组权限,它表现得很奇怪。 后来我意识到您需要注销并登录用户才能使新权限生效。

    哇!! :p

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-04-14
      • 2013-03-29
      • 2015-03-22
      • 1970-01-01
      • 2014-06-02
      • 1970-01-01
      • 2013-06-19
      • 1970-01-01
      相关资源
      最近更新 更多