README (view raw)
1cgit - CGI for Git
2==================
3
4This is an attempt to create a fast web interface for the Git SCM, using a
5built-in cache to decrease server I/O pressure.
6
7Installation
8------------
9
10Building cgit involves building a proper version of Git. How to do this
11depends on how you obtained the cgit sources:
12
13a) If you're working in a cloned cgit repository, you first need to
14initialize and update the Git submodule:
15
16 $ git submodule init # register the Git submodule in .git/config
17 $ $EDITOR .git/config # if you want to specify a different url for git
18 $ git submodule update # clone/fetch and checkout correct git version
19
20b) If you're building from a cgit tarball, you can download a proper git
21version like this:
22
23 $ make get-git
24
25When either a) or b) has been performed, you can build and install cgit like
26this:
27
28 $ make
29 $ sudo make install
30
31This will install `cgit.cgi` and `cgit.css` into `/var/www/htdocs/cgit`. You
32can configure this location (and a few other things) by providing a `cgit.conf`
33file (see the Makefile for details).
34
35If you'd like to compile without Lua support, you may use:
36
37 $ make NO_LUA=1
38
39And if you'd like to specify a Lua implementation, you may use:
40
41 $ make LUA_IMPLEMENTATION=JIT
42
43for using the LuaJIT project. Or:
44
45 $ make LUA_IMPLEMENTATION=VANILLA
46
47for the mainline Lua project. If you specify neither implementation, it will
48be auto-detected, preferring LuaJIT if both are present.
49
50
51Dependencies
52------------
53
54* libzip
55* libcrypto (OpenSSL)
56* libssl (OpenSSL)
57* optional: luajit or lua
58
59Apache configuration
60--------------------
61
62A new `Directory` section must probably be added for cgit, possibly something
63like this:
64
65 <Directory "/var/www/htdocs/cgit/">
66 AllowOverride None
67 Options +ExecCGI
68 Order allow,deny
69 Allow from all
70 </Directory>
71
72
73Runtime configuration
74---------------------
75
76The file `/etc/cgitrc` is read by cgit before handling a request. In addition
77to runtime parameters, this file may also contain a list of repositories
78displayed by cgit (see `cgitrc.5.txt` for further details).
79
80The cache
81---------
82
83When cgit is invoked it looks for a cache file matching the request and
84returns it to the client. If no such cache file exists (or if it has expired),
85the content for the request is written into the proper cache file before the
86file is returned.
87
88If the cache file has expired but cgit is unable to obtain a lock for it, the
89stale cache file is returned to the client. This is done to favour page
90throughput over page freshness.
91
92The generated content contains the complete response to the client, including
93the HTTP headers `Modified` and `Expires`.
94
95Online presence
96---------------
97
98* The cgit homepage is hosted by cgit at <http://git.zx2c4.com/cgit/about/>
99
100* Patches, bug reports, discussions and support should go to the cgit
101 mailing list: <cgit@lists.zx2c4.com>. To sign up, visit
102 <http://lists.zx2c4.com/mailman/listinfo/cgit>