问题
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/sh
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?
来源:https://stackoverflow.com/questions/34177811/git-push-over-ssh-is-not-activating-remote-hooks