Diff options
Diffstat (limited to 'custom/hooks/post-receive.cgit-cache')
| -rwxr-xr-x | custom/hooks/post-receive.cgit-cache | 12 |
1 file changed, 8 insertions, 4 deletions
diff --git a/custom/hooks/post-receive.cgit-cache b/custom/hooks/post-receive.cgit-cache index 61ac1ea..8aae60b 100755 --- a/custom/hooks/post-receive.cgit-cache +++ b/custom/hooks/post-receive.cgit-cache @@ -17,10 +17,14 @@ # the whole cache goes, as the safe choice. # # The path below is the default cache-root, so a cgitrc that changes the -# setting needs the same change here. The web server owns the cache root, so -# the pushing user needs write access to it. Nothing here complains or exits -# non-zero when that access is missing, so the pusher is not shown an error -# over a stale page. +# setting needs the same change here. The cache root belongs to the account the +# web server runs cgit as, with mode 0700, and so do the files cgit writes +# there, so the hook has to run as that account to read and remove them. A push +# the same web server takes through git-http-backend runs hooks as that account +# already. For a push over ssh, run the hook through sudo -u with that account, +# keeping GIT_DIR so that git still trusts a repository the account does not +# own. Nothing here complains or exits non-zero when that access is missing, so +# the pusher is not shown an error over a stale page. # # To install the hook, copy or link it to hooks/post-receive in each # repository. Git runs one post-receive per repository, so fold this together |
