Actually non-tor certificates will (sadly) be signed with Let’s Encrypt a bit before 2017-05-26, tor will be self-signed
Support La Quadrature Du Net

My git server setup

So after having problems with gitlab.com (not being able to push to your own repository for example). I decided to have a very simple git setup, inspired by git.linkmauve.fr. I putted all my git repos into /git.

started with just nginx and ssh

This one is dead-simple when you know the trick, simply put git update-server-info into hooks/post-update of your git repo (they have to be bare repo, that’s done with --bare)

Added git-daemon

That one was even more simple, just had to point to where the git repositories are stored

Wanted a better interface

While searching for alternatives to GNU I saw stagit, a static git generator (I don’t like CGI, specially when it could have access to my git repos), to use it I added theses lines to the post-update-hook

repo=$(pwd)
cd "$(pwd | sed s/.git$//)" && stagit -c "$repo.cache" "$repo"
cd /git && stagit-index *.git > /git/index.html

Deployement to blog

This one output an error(probably because the GIT_INDEX_FILE should not be empty) but it works so who cares :P

GIT_INDEX_FILE='' git --work-tree=/srv/web/hacktivis.me --git-dir=/git/blog.git checkout -f

Garbage Collector

It’s not like my repos were getting big, git is supposed to do that itself but it seems like it doesn’t, so I’m doing git gc each time, which isn’t very optimised.

Final post-update hook


#!/bin/sh
repo=$(pwd)
update_f=' * Updating %s…'
is_ok(){ echo ' [OK]'; }

printf "$update_f" 'Garbage Collector'
git gc && is_ok

printf "$update_f" info
git update-server-info && is_ok

printf "$update_f" stagit
cd "$(pwd | sed s/.git$//)" && stagit -c "$repo.cache" "$repo" && is_ok

printf "$update_f" stagit-index
cd /git && stagit-index *.git > /git/index.html && is_ok

# Errors but works
grep blog <<<$repo && printf "$update_f" blog && GIT_INDEX_FILE='' git --work-tree=/srv/web/hacktivis.me --git-dir=/git/blog.git checkout -f && is_ok
article only(plain HTML)