From 61263eb64ae3224d6581837058626b3520f0f787 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Wed, 11 Aug 2021 20:14:28 +0200 Subject: separate admin tasks, and improve explanation of special strings --- ADMIN.md | 25 +++++++++++++++++++++++++ SETUP.md | 45 +++++++++++---------------------------------- 2 files changed, 36 insertions(+), 34 deletions(-) create mode 100644 ADMIN.md diff --git a/ADMIN.md b/ADMIN.md new file mode 100644 index 0000000..5b4635a --- /dev/null +++ b/ADMIN.md @@ -0,0 +1,25 @@ +# Administrate source hosting + + +## Special strings + +NB! This documentation uses special strings +which you may want to adapt for your local setup: + +gitshellhost: git.example.org + + +## Prerequisites + +Clone the gitolite3 settings repository: + + git clone git@git.example.org:gitolite-admin + + +## Web export + +edit the file gitolite.conf +to add FIXME to repos that should be exported for web publishing, +e.g. add these likes to add repository "foobar": + + FIXME diff --git a/SETUP.md b/SETUP.md index fee4460..b37ff80 100644 --- a/SETUP.md +++ b/SETUP.md @@ -3,18 +3,20 @@ ## Special strings -NB! This documentation uses special strings -which you may want to adapt for your local setup: +NB! This documentation includes the following special strings +used when integrating it e.g. for a documentation website: redpill_root: /usr/local/share/redpill feature_root: /usr/local/share/redpill/source-hosting -githost: source.example.org gitshellhost: git.example.org ## Prerequisites +All actions are done on the server git.example.org, +except collecting your SSH public key. + Gitolite service need to know the public SSH key of its administrator. You can let it ask during install, but it may be more convenient to preconfigure that information instead. @@ -27,7 +29,7 @@ e.g. with this command cat ~/.ssh/id_ed25519.pub -**On the server**, +**On the server git.example.org**, preconfigure git user with above public key (the whole line without newline) as $YOURKEY, and install needed packages: @@ -37,30 +39,14 @@ and install needed packages: sudo apt install gitolite3 myrepos git-daemon-sysvinit cgit cmark highlight -## Configure git access - -**On your local host**, -Clone the gitolite3 settings repository: - - git clone git@git.example.org:gitolite-admin - -**On your local host**, -edit the file gitolite.conf, -e.g. add these likes to add repository "foobar": - - FIXME - - ## Enable hook -This is all done **On the server**. - Clone the redpill feature project for source-hosting and register with myrepos (to ease later update): sudo mkdir --parents /usr/local/share/redpill cd /usr/local/share/redpill - sudo git clone https://source.redpill.dk/source-hosting.git + sudo git clone https://git.example.org/source-hosting.git cd source-hosting sudo mr reg @@ -76,29 +62,20 @@ by running this command: sudo -u git gitolite setup -## Web export +### Web export -FIXME: move to separate feature +When some git project need to be exported to a website, +a base directory should first be prepared. -**On the server**, -grant access for gitolite to write below /var/www +Grant access for gitolite to write below /var/www with these commands: sudo mkdir /var/www/gitolite3 sudo chown git:www-data /var/www/gitolite3 -**On your local host**, -edit the file gitolite.conf -to add FIXME to repos that should be exported for web publishing, -e.g. add these likes to add repository "foobar": - - FIXME - ## Configure web access -This is all done **On the server**. - Adapt the file `/etc/default/git-daemon`: GIT_DAEMON_ENABLE=true -- cgit v1.2.3