Ronn
Ronn

Reputation: 1773

Git : fatal: exec hooks/post-receive failed

I have a remote created with git --bare init.

When I push I get:

Delta compression using up to 2 threads. 
Compressing objects: 100% (3/3), done. 
Writing objects: 100% (4/4), 368 bytes, done. 
Total 4 (delta 1), reused 0 (delta 0)

fatal: exec hooks/post-receive failed.
error: hooks/post-receive exited with error code 128

hooks/post-receive looks like this:

 #!/bin/sh
 git checkout -f

The working tree is set in the remote config (path is fine, if I cd into the remote and do git checkout -f it checks out into the worktree).

the perms on the hook look like:

-rwxr-xr-x 1 my-user git 28 Sep 20  2010 my.git/hooks/post-receive

Any clues as to why the hook may be failing?

Upvotes: 2

Views: 1101

Answers (1)

Ronn
Ronn

Reputation: 1773

@Mark Longair and @Jan Hudec, thanks for pointing me in the right direction.

I command Z'd out of cat when creating the post-receive hook, the cat process still had that file open.

So, I killed that process and I'm back in business. Thanks

Upvotes: 1

Related Questions