~sircmpwn/sr.ht-docs

6af88fbd0818266f7f13479bb2b59761d455abc9 — Drew DeVault 2 years ago 634cacc
Remove cgit instructions from git.sr.ht install
1 files changed, 0 insertions(+), 45 deletions(-)

M git.sr.ht/installation.md
M git.sr.ht/installation.md => git.sr.ht/installation.md +0 -45
@@ 14,51 14,6 @@ suggest `/var/lib/git/`. Also configure a `git` user and assign ownership over
these for you. If you do not use the package, you must create the user yourself
and ensure that the git.sr.ht web application runs as this user.

## cgit

Presently git.sr.ht's repository viewer is designed as a proxy to
[cgit](https://git.zx2c4.com/cgit/). This is eventually going to change, but
for the time being you must install and configure cgit on your server. Set your
cgitrc file to the following configuration:

    virtual-root=/
    enable-index-owner=0
    embedded=1
    noheader=1
    source-filter=/usr/lib/cgit/filters/syntax-highlighting.sh
    clone-url=__CLONE_URL__
    snapshots=tar.xz
    scan-path=/var/lib/git/
    readme=:README
    readme=:readme

Make sure your syntax highlighting script looks good. You will probably need to
add `--inline-css` or so.

Then configure nginx to serve cgit to localhost with something like this:

	server {
		listen 80;
		server_name cgit.local;
		root /usr/share/webapps/cgit;
		try_files $uri @cgit;

		location @cgit {
			include             fastcgi_params;
			fastcgi_param       SCRIPT_FILENAME $document_root/cgit.cgi;
			fastcgi_param       PATH_INFO       $uri;
			fastcgi_param       QUERY_STRING    $args;
			fastcgi_param       HTTP_HOST       $server_name;
			fastcgi_pass        unix:/run/fcgiwrap.sock;
		}
	}

Update your git.sr.ht configuration accordingly:

    [cgit]
    remote=http://cgit.local
    repos=/var/lib/git/

## SSH dispatch

It is necessary to configure git.sr.ht's SSH dispatcher as the system-wide SSH