ここでいくつか質問を検索しましたが、答えが得られなかったので、具体的な状況についてお伺いします。
本当にシンプルな受信後フック。Redmineにカールして、コミット時にリポジトリのビューを更新するように強制します。(デバッグのために、「PostReceiveHookGo」をエコーして表示します
セットアップ:ベアリポジトリ/git/repos/test.git
$ cd ~/
$ git clone file:///git/repos/test.git
$ cd test/
$ vim somefile_gets_updated
$ git commit -a -m 'Tackling bug #1, include the bug number so Redmine will pick it up and associate it'
$ git push origin master
これは期待どおりにコミットしてプッシュしますが、受信後のフックは起動しません
$ curl http://localhost:3000/sys/fetch_changesets?key=cGdcUaRr8u4Rr4zXzXhr
Redmineの問題ページを更新すると、機能します。
プッシュした後、私が行う場合:
$ ./.git/hooks/post-receive
私は得る:
$ Post Receive Hook Go
それはうまくいきます、やったー!
だから私はカールが機能することを知っています、受信後の機能でさえ、Gitはそれを発射しません
これはフックです
$ cd .git/hooks
$ ls -l | grep post-receive
$ -rwxr-xr-x 1 bobbydown staff 109 Dec 22 03:42 post-receive
なぜgitがフックを実行していないのかわかりません...