Just got gitolite
installed on my webserver and am trying to get a post-receive
hook that can point the git dir
in apache\'s direction
This is how I got it working:
Changed post-receive
to:
sudo sh /usr/local/sbin/prgetsimpleappscom
Changed sudoers
with visudo
git ALL = (root) NOPASSWD: /usr/local/sbin/prgetsimpleappscom
git ALL = (root) NOPASSWD: /bin/sh
git ALL = (root) NOPASSWD: /bin/sh /usr/local/sbin/prgetsimpleappscom
Confirm visudo
worked
git@vannevar:~$ sudo -l
Matching Defaults entries for git on this host:
env_reset, secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin
User git may run the following commands on this host:
(root) NOPASSWD: /usr/local/sbin/prgetsimpleappscom
(root) NOPASSWD: /bin/sh
(root) NOPASSWD: /bin/sh /usr/local/sbin/prgetsimpleappscom
run:
sudo sh /usr/local/sbin/prgetsimpleappscom
post-receive getsimpleapps.com triggered
and:
$ git push origin master
remote: post-receive getsimpleapps.com triggered