pub / stagit-scripts

Building src.jayvii.de with stagit
git clone https://src.jayvii.de/pub/stagit-scripts.git
Home | Log | Files | Exports | Refs | README | RSS

commit 4c0de9b0ddf6af390336f1d5af1b7541433c87b8
parent 00287c400a57fa661730e9d9b4ca2d7bb417796f
Author: JayVii <jayvii[AT]posteo[DOT]de>
Date:   Sat,  4 May 2024 17:24:23 +0200

Add notes about repo-creation and access permissions

Diffstat:
MREADME | 22+++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)

diff --git a/README b/README @@ -51,7 +51,7 @@ Setup - Setup the HTML Root: mkdir -p /var/www/git.myserver.com/{pub,priv} - Setup git-user: - useradd -r -m -U -d /var/www/git.myserver.com -s /bin/sh git + useradd -r -m -U -d /var/www/git.myserver.com -s /bin/sh -G www-data git You can also create a "deployable.tar.gz" file with: @@ -85,6 +85,14 @@ You may also setup SSH-credentials for the user or SSH-Auth keys. You most likely want to setup a webserver (e.g. Apache2) with "/var/www/ git.myserver.com" (home of user "git") as its root-dir. +As long as user "git" is in the group "www-data", file permissions should +generally be no problem. For good measure, you may however still set up cron-job +that enforces file permissions every now and then. In crontab, use following +entries (assuming your git-folder is located in "/var/www/src.example.com"): + + 0 0 * * * chown git:www-data -R /var/www/src.example.com + 0 0 * * * chmod 770 -R /var/www/src.example.com + Examples ======== @@ -96,6 +104,18 @@ You'll find a post-update hook example in the "examples/hooks/" directory. |- post-update.sample1 Automatic packaging and deployment '- post-update.sample2 REUSE linting on push +Further notes +============= + +New repositories can be created via the webform in "/create_repo/index.html" or +via an according GET request to that PHP-script: + + curl https://src.example.com/create_repo/?name=test_repo&description=this%20is%20just%20a%20test%20repository&owner=me&type=pub + +The "/create_repo/" endpoint is restricted to authenticated users via htaccess +(just like the "/priv/" repositories). A GET request therefore has to supply the +authentication credentials accordingly. + License =======