Git push over SSH is not activating remote hooks

1

I have the following problems that git push over SSH is not activating remote hooks.

The server where Git repo is Linux ubuntu.
Git version 1.7.9.5
My path to repo hooks /path/test.git/hooks/update; with Update executable (chmod +x)

In update file I put just simple check to be sure it works.

#!/bin/bash
echo "Hello World"
echo "098" >> test.txt
exit 1

I am connecting from Ubuntu (on Virtualbox) with following steps:

touch somefile.txt
git add -A
git commit -ma "my somefile add"

Then:

git push origin HEAD:refs/for/master

Counting objects: 3, done.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 291 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 1 (delta 0)
remote: Processing changes: new: 1, refs: 1, done
remote:
remote: New Changes:
remote: https://URL/gerrit/15676
remote:
To ssh://mylogin@URL:29418/reponame

* [new branch] HEAD -> refs/for/master

As you see my update script is not activated during "push".

What could be check why it happens like this?

Lavrentijs L

Posted 2015-12-10T12:44:14.817

Reputation: 31

On what machine do you store the hooks? – choroba – 2015-12-10T12:48:33.917

hooks are located on server. – Lavrentijs L – 2015-12-10T12:49:04.793

No answers