gitosis-admin git push failed,exec hooks / post-update

时间:2010-03-12 10:33:44

标签: git gitosis

我正在关注 this tutorial

完成此步骤后:

$ git commit -a -m "Allow jdoe write access to free_monkey"
$ git push

我总是失败,有这个错误:

fatal: exec hooks/post-update failed.

这是来自我的/home/git/repositories/gitosis-admin/hooks/post-update

-rwxr-xr-x 1 git git   83 Mar 10 11:49 post-update

所以我手动从服务器更改gitosis.conf以添加新的存储库,并且repos可以正常工作。

我用Google搜索了可能导致它的原因,我想以适当的方式管理gitosis。

请帮助

此致 REV

1 个答案:

答案 0 :(得分:0)

您的更新后挂钩可以执行,但它无法更新refs/heads/refs/remotes/中的指针(当使用“哑”协议进行克隆时帮助,即通过http)

检查与gitosis回购相关的权利,尤其是在.git/refs

同时检查<git>/bin/git-update-server-info是否可执行 (您可以尝试 - 作为测试 - 通过指向update-hook的链接替换git-update-server-info,例如this case。) 或者,如described here,请检查您是否需要替换gitosis/templates/admin/hooks/post-update

git-update-server-info

git update-server-info