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

本秂侑毒 提交于 2019-12-24 11:51:13

问题


I'm following this tutorial

After this step:

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

I always failed, with this error:

fatal: exec hooks/post-update failed.

This is from my /home/git/repositories/gitosis-admin/hooks/post-update:

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

So I change gitosis.conf manually from server for adding new repositories, and repos can work fine.

I've googled what might cause it, I want to admin gitosis in proper way.

Please Help

Regards, REV


回答1:


Your post-update hook can be executed, but it cannot update the pointers in refs/heads/ and refs/remotes/ (which help when cloning with a "dumb" protocol, i.e. over http)

Check the rights associated with your repo on gitosis, especially under .git/refs

Check also if <git>/bin/git-update-server-info is executable
(you can try -- as a test -- to replace your update-hook by a link to git-update-server-info, like this case).
Or, as described here, check if you need to replace in your gitosis/templates/admin/hooks/post-update:

git-update-server-info

with

git update-server-info


来源:https://stackoverflow.com/questions/2432026/gitosis-admin-git-push-failed-exec-hooks-post-update

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!