/cgit-gitolite

Cgit + Gitolite + nginx + fcgiwrap stuff for void linux

Primary LanguageShell

This is just a reminder for me how to setup cgit + gitolite + fcgiwrap + nginx on server running on void-linux

Update the system and install all the necessary stuff

xbps-install -Syu git net-tools mg highlight cgit nginx fcgiwrap gitolite

Create the git user

useradd -m -r -s /bin/bash git

Add the service to run user-service for git user (to run fcgiwrap)

cp runsvdir-git /etc/sv/runsvdir-git

Add the fcgiwrap service to user git and run the runsvdir-git service

mkdir -p /home/git/service
cp -rv service/fcgiwrap /home/git/service
sv start runsvdir-git

Gitolite (copied from the site, may be changed, dunno)

<yourname> is the public key you copied on the server, actually you can get it from /root/.ssh/authorized_keys I guess.

gitolite setup -pk <yourname>.pub

Cool thingy to auto-create repos

@users = qqq
repo CREATOR/[a-z]..*
    C = @users
    RW+ = CREATOR
    RW = WRITERS
    R = READERS

Add the nginx config (somehow, as a vhost, or just adjust the nginx.conf)

Also don’t forget to change user directive in nginx to run it from git user.

cgit config (/etc/cgitrc)

#cache-size=1000
css=/cgit.css
clone-prefix=git@git.rpi.cc:
enable-index-links=1
enable-follow-links=1
enable-log-filecount=1
enable-log-linecount=1
max-stats=quarter
root-title=QQQ's repos
root-desc=Embarassing stuff
snapshots=tar.gz
project-list=/home/git/projects.list
scan-path=/home/git/repositories/
virtual-root=/

Run nginx

sv start nginx

PROFIT

But probably something is off.