Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

My website was moved to a new server, ubuntu to centos and git is no longer executing the post-receive hook.

I've tried changing permissions, first adding execution permission and then making it 777.

I've checked mount settings in case it's noexec (it's not).

I added a line touch testing.php to the hook. The file is not created after a push.

I can manually run the hook with ./post-receive and it execute successfully, including making the test file. The only issue was error: git checkout-index: unable to read sha1 file of /file.., but it updated the rest of the files. I fixed this error by deleting the git directory and repushing to the remote.

The problem seems to be git not even attempting to run the hook.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
270 views
Welcome To Ask or Share your Answers For Others

1 Answer

Ended up fixing this by upgrading from git version 1.7.1 to 2.11


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...