Closed cjfields closed 13 years ago
By default, the plugin doesn't log anything but errors in production. If it somehow doesn't notice git failing, I guess it will stay silent.
So the issue here seems to be that the plugin doesn't properly detect a git failure. I wonder if I'm using the wrong command to kick off the git process.
Could you manually run the git command that the hook attempts to run, please, and tell me the exit code returned?
$ git --git-dir=/home/git/bioperl/bioperl-live.git fetch origin
$ echo $?
I fixed permissions so couldn't use that set of commands, but using git reset --soft /refs/remotes/origin/master I get:
[ec2-user@redmine ~]$ sudo git --git-dir=/home/git/bioperl/bioperl-live.git reset --soft /refs/remotes/origin/master fatal: ambiguous argument '/refs/remotes/origin/master': unknown revision or path not in the working tree. Use '--' to separate paths from revisions [ec2-user@redmine ~]$ echo $? 128 [ec2-user@redmine ~]$
Switch to Kernel.system. We explitly log output and we just need a true return value for successful commands. Closed by c6eafd1944318809ec1e17f95e6b9cb58b24f3be
I had some odd issues when using the github_hook to update our Redmine repositories. When testing the hook I had some git repos update and others not, but nothing showed up in the apache error_log or in the Redmine production.log. I finally tracked it down to a bug in the logger, where it always returns as successful when sending the git commands even when there is a failure.
Redirecting the output to production when successful gave me this, which obviously points to a permissions issue (now fixed):