From eb90d46eb8c51b27e904486253036ed9b46f1329 Mon Sep 17 00:00:00 2001 From: Loic d'Anterroches Date: Wed, 21 Jan 2009 19:27:56 +0100 Subject: [PATCH] Improved the documentation of the git backend. --- doc/syncgit.mdtext | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/doc/syncgit.mdtext b/doc/syncgit.mdtext index b05bb66..b77af1c 100644 --- a/doc/syncgit.mdtext +++ b/doc/syncgit.mdtext @@ -41,6 +41,12 @@ Then, we need to create the base SSH files with the right permissions: $ chmod 0600 /home/git/.ssh/authorized_keys $ exit +We add the `www-data` user to the `git` group so it can access the +repositories to read the content: + + $ sudo usermod -a -G git www-data + + ## Creation of the repositories base For each project using git in InDefero a corresponding bare repository @@ -75,4 +81,24 @@ keys. The command to run in the cron job is: php /home/www/indefero/scripts/gitcron.php -The user of the cron job must be `git`. \ No newline at end of file +The user of the cron job must be `git`. + +## Git daemon configuration + +Put in `/etc/event.d/local-git-daemon` the following: + + start on startup + stop on shutdown + + exec /usr/bin/git-daemon \ + --user=git --group=git \ + --verbose \ + --reuseaddr \ + --base-path=/home/git/repositories/ \ + /home/git/repositories/ + respawn + +Then run: + + $ sudo start local-git-daemon +