0

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.

Ethan22
  • 747
  • 7
  • 25

1 Answers1

0

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

Ethan22
  • 747
  • 7
  • 25