Git push over SSH is not activating remote hooks

不问归期 提交于 2019-12-21 22:35:29

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!