summaryrefslogtreecommitdiff
path: root/wiki/cgit.mdwn
blob: 173bdb633f2bd081d619820e2bde6cb0bc1890ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
This page contains a comprehensive guide to setting up cgit on NearlyFreeSpeech. It is assumed that you already have an account with NFS and also have access to a "site" online.

Most of the following has been lifted from [NearlyFreeSpeech cgit application walkthrough](https://members.nearlyfreespeech.net/wiki/Applications/Cgit) but has been tweaked and updated.

You can see a **live version** [here](https://git.btxx.org).

## Building cgit

The following assumes that you wish to have cgit running at the top-level of your chosen domain (ie. git.example.com)

SSH into your account the download and unpack the latest release:

    git clone git://git.zx2c4.com/cgit cgit-src
    cd cgit-src

Create a cgit.conf file with desired locations:

    CGIT_SCRIPT_PATH = /home/public
    CGIT_DATA_PATH = $(CGIT_SCRIPT_PATH)
    CGIT_CONFIG = $(CGIT_SCRIPT_PATH)/cgitrc
    CACHE_ROOT = $(CGIT_SCRIPT_PATH)/cgitcache
    prefix = $(CGIT_SCRIPT_PATH)/local

Get the git sources (needed to build libgit):

    git submodule init
    git submodule update

Build and install it:

    gmake install

## Configuration

Make a text file named `cgitrc` where you specified for CGIT_CONFIG and add the following:

    css=/cgit.css
    logo=/cgit.png
    root-title=My Git Repositories

**And you should be good to go!**