745 B
745 B
Git Hooks Tutorial
The goal is to test creating a git hook on serge.
steps
Create new user on serge that belongs to www-data and git groups:
useradd -G www-data git -M mkdocs
Create new directory in /var/www; chown to mkdocs:www-data
mkdir /var/www/services.anarchyplanet.org
chown mkdocs:www-data /var/www/services.anarchyplanet.org
Create new post-receive git hook
Gogs has a post-receive hook that seems to be active: "/srv/git/gogs/gogs" hook --config='/srv/git/gogs/custom/conf/app.ini' post-receive
Not sure what this does. I commented it out and replaced it to test hooks. committing now!
That didn't work so trying again
That worked! and the user is git. now testing what happens when it's owned by mkdocs