|
Size: 1162
Comment:
|
Size: 2024
Comment:
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 1: | Line 1: |
| ## page was renamed from CGitSetup | |
| Line 10: | Line 9: |
| == NGINX Site == | == Installation == ---- == Setup == === NGINX with FastCGI === |
| Line 38: | Line 45: |
| == Configuration == | |
| Line 39: | Line 47: |
| == Clone URLs == | === Clone URLs === |
| Line 57: | Line 65: |
| === Custom CSS === CGit is typically packaged with an official stylesheet used by upstream. The default `cgitrc` file sets the stylesheet using: {{{ css=/cgit.css }}} Note that this is a URL, not a filesystem path. To include an HTML file into the head of the generated web page, use the `head-include` option in `cgitrc`. {{{ head-include=/path/to/my/head.html }}} === Custom Headers and Footers === To include an HTML file into the body of the generated web page, use one of the `header` or `footer` options in `cgitrc`. {{{ header=/path/to/my/header.html footer=/path/to/my/footer.html }}} This is most commonly used to insert a logo, contact and copyright information, or domain navigation. Given a file as: {{{ <!-- begin header --> <!-- end header --> }}} |
CGit
Contents
Installation
Setup
NGINX with FastCGI
A basic NGINX configuration would look as:
server {
listen 80;
server_name git.my-domain.com;
root /path/to/executable/directory
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;
}
}
Configuration
Clone URLs
First, enable HTTP cloning in your cgitrc.
enable-http-clone=1
Second, insert a space-delimited list of URLs to each repository configuration. SSH clone instructions can be included, though be aware-a port cannot be specified with a relative path. The maximal options are one of user@ip:port/absolute/path/to/my-repo.git and user@ip:relative/path/to/my-repo.git.
repo.name=my-repo repo.path=my-repo.git repo.clone-url=https://git.my-server.com/my-repo [email protected]/my-repo.git
Custom CSS
CGit is typically packaged with an official stylesheet used by upstream. The default cgitrc file sets the stylesheet using:
css=/cgit.css
Note that this is a URL, not a filesystem path.
To include an HTML file into the head of the generated web page, use the head-include option in cgitrc.
head-include=/path/to/my/head.html
Custom Headers and Footers
To include an HTML file into the body of the generated web page, use one of the header or footer options in cgitrc.
header=/path/to/my/header.html footer=/path/to/my/footer.html
This is most commonly used to insert a logo, contact and copyright information, or domain navigation.
Given a file as:
<!-- begin header --> <!-- end header -->
