On Thursday, May 21, 2015 at 2:35:08 PM UTC+2, Mattias Vannergård wrote:
> I have a server with a lot of bare repos, but none of these projects will 
> run the post-receive hook.
> For example:
> Path is /gitRepos/repositories/MyNewProject.git
> The content of the post-receive hook is
> !#/bin/sh
> echo "Hello"
> Running /gitRepos/repositories/MyNewProject.git/hooks/post-receive locally 
> gives the result
> Hello
> so obviously it is runnable. The post-receive file is listed as:
> -rwxr-xr-x 1 gitadmin users  109 May 21 13:57 post-receive
> Also, calling the script via ssh <user>@server 
> "/gitRepos/repositories/MyNewProject.git/hooks/post-receive" also gives the 
> result
> Hello
> All users are in the users group.
> But pushing to MyNewProject yields nothing else but
> remote: Processing changes: refs: 1, done

That's odd. I don't see any text like that when I push to the remote. Are 
you running any special kind of Git-server in between? What is your git 
remote url? 

Keep in mind that the hook won't trigger if there is nothing new to push.

Trying it out locally (over ssh to the same machine), it works as expected:

[master][~/temp/foo]$ git push tfnico@localhost:temp/foo.git master         

Counting objects: 3, done.

Delta compression using up to 4 threads.

Compressing objects: 100% (2/2), done.

Writing objects: 100% (3/3), 306 bytes | 0 bytes/s, done.

Total 3 (delta 1), reused 0 (delta 0)

remote: hello

To tfnico@localhost:temp/foo.git

   934bafb..23aeb19  master -> master

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to