Sur ma boîte distante, j'ai initialisé un dépôt git nu. Dans le répertoire des crochets, j'ai initialisés post-réception, crochets post-mise à jour et mise à jour avec le script suivant:Git push sur HTTP n'active pas les hooks distants
#!/bin/bash
echo $0 [email protected] >> /tmp/githooks.log
Sur ma boîte locale, j'ai cloné le dépôt, a ajouté un fichier de test, commis et a poussé le changement vers la boîte à distance.
$ git clone https://remote/git/sandbox.git sandbox
$ cd sandbox
$ touch asdf
$ git add asdf
$ git commit -a
[master (root-commit) 37505de] zxcv
0 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 asdf
$ git push origin master
Fetching remote heads...
refs/
refs/heads/
refs/tags/
updating 'refs/heads/master'
from 0000000000000000000000000000000000000000
to 37505de9c22b0aee84e0071190f4f58728770675
sending 3 objects
done
Updating remote server info
To https://remote/git/sandbox.git
* [new branch] master -> master
Cependant, /tmp/githooks.log est vide sur l'ordinateur distant. Si, toutefois, je clone le référentiel sur la machine distante, les hooks sont appelés avec succès.
Les crochets git ne fonctionnent pas avec http-push?
Huh. La réponse apparente à ceci est Smart HTTP (git http-backend). http://progit.org/2010/03/04/smart-http.html –