CGITRC(5) cgit CGITRC(5) (NAME) cgitrc - cgit (SYNOPSIS) cgitrc cgit git NAME=VALUE . # . (LOCATION) cgitrc /etc/cgitrc . cgit CGIT_CONFIG . (GLOBAL SETTINGS) about-filter ( ) . about-file STDIN STDOUT . : none. : "FILTER API". agefile . "parse_date" libgit . "yyyy-mm-dd hh:mm:ss" . post-receive . : "info/web/last-modified". auth-filter . stdin stdout . . auth-filter . : none. : "FILTER API". branch-sort "age" "name" . : "name". cache-about-ttl (TTL) () . : "CACHE". : "15". cache-dynamic-ttl (TTL) SHA1 . : "CACHE". : "5". cache-repo-ttl (TTL) . : "CACHE". : "5". cache-root cgit . : "/var/cache/cgit". : "MACRO EXPANSION". cache-root-ttl (TTL) . : "CACHE". : "5". cache-scanrc-ttl (TTL) git . : "CACHE". : "15". case-sensitive-sort . : "1". : repository-sort, section-sort. cache-size cgit. "0" . : "CACHE". : "0" cache-snapshot-ttl (TTL) (snapshots) . : "CACHE". : "5". cache-static-ttl (TTL) SHA1 . : "CACHE". : -1". clone-prefix . repo.clone-url . : none. clone-url . repo.clone-url . : none. : "MACRO EXPANSION", "FILTER API". commit-filter . STDIN STDOUT (bugtracker) . : none. : "FILTER API". commit-sort "date" "topo" . "git log" . : unset. css css cgit . : "/cgit.css". css head . email-filter (taggers) cgit . STDIN . STDOUT . : none. : "FILTER API". embedded "1" cgit html html . : none. : "noheader". enable-blame "1" cgit "blame" . : "0". enable-commit-graph "1" cgit (ASCII-art) . : "0". enable-filter-overrides "1" cgitrc . : none. enable-follow-links "1" . : "0". enable-git-config "1" cgit git config . "scan-path" . gitweb.owner gitweb.category gitweb.description gitweb.homepage cgit repo.owner repo.section repo.desc repo.homepage . git config "cgit." "repo." cgit . : "0". : scan-path, section-from-path. enable-http-clone "1" cgit HTTP git clone . "http://$HTTP_HOST$SCRIPT_NAME/$CGIT_REPO_URL" clone-url . git . : "1". enable-html-serving "1" /plain mimetype HTML . "0" text/plain application/octet-stream . : "0". : "repo.enable-html-serving". enable-index-links "1" cgit ( "summary" "commit" "tree") . : "0". enable-index-owner "1" cgit . : "1". enable-log-filecount "1" cgit . : "0". enable-log-linecount "1" cgit . : "0". enable-remote-branches "1" cgit summary refs . : "0". : "repo.enable-remote-branches". enable-subject-links "1" cgit . : "0". : "repo.enable-subject-links". enable-tree-linenumbers "1" cgit . : "1". favicon () cgit . "/favicon.ico" . : "/favicon.ico". footer ( "generated by..." ). : none. head-include html HEAD . : none. header . : none. include . : none. : "MACRO EXPANSION". js cgit . : "/cgit.js". head . local-time "1" cgit . : "0". logo cgit . : "/cgit.png". logo-link cgit . . : none. max-atom-items (atom feeds) . : "10". max-blob-size (blob) HTML . : "0" ( ). max-commit-count "log" . : "50". max-message-length "log" . : "80". max-repo-count . "0" . : "50". max-repodesc-length . : "80". max-stats . "week" "month" "quarter" "year". . : none. : "repo.max-stats". mimetype. mime . plain . mimetype-file mime . "mimetype." . . /etc/mime.types . : o (#) o mimetype ( image/png) ( jpg) : none. : "mimetype.". module-link . SHA1 . : none. noplainemail "1" . : "0". noheader "1" cgit . : none. : "embedded". owner-filter . STDIN STDOUT . . . : none. : "FILTER API". project-list scan-path git . scan-path . : none. : scan-path, "MACRO EXPANSION". readme "repo.readme" . cgit . scan-path . : none. : scan-path, repo.readme. remove-suffix "1" scan-path ".git" . scan-path . : "0". : scan-path. renamelimit . "-1" git ( man git-diff ). : "-1". repository-sort . "name" "age" . : "name". : section, case-sensitive-sort, section-sort. robots "robots". : "index, nofollow". root-desc . : "a fast webinterface for the git dscm". root-readme "about" . : none. root-title . : "Git Repository Browser". scan-hidden-path "1" scan-path scan-path (.) . scan-path ( "" ) . ".git" -bare . scan-path . : 0. : scan-path. scan-path . cgitrc . project-list scan-path scan-path project-list . scan-path . : none. : cache-scanrc-ttl, project-list, "MACRO EXPANSION". section - . : none. section-sort "1" . cgitrc "0" . : "1". : section, case-sensitive-sort, repository-sort. section-from-path scan-path . cgit . : "0". side-by-side-diffs "1" unidiff . : "0". snapshots cgit . "tar" "tar.gz" "tar.bz2" "tar.lz" "tar.xz" "tar.zst" "zip" . "all" . : none. . ZSTD_CLEVEL=10 ( ) zstd. source-filter . STDIN . STDOUT . : none. : "FILTER API". summary-branches "summary" . : "10". summary-log "summary" . : "10". summary-tags "summary" . : "10". strict-export cgit . EXPORT_OK STRICT_EXPORT gitweb cgit git-daemon . scan-path . virtual-root cgit . cgit /cgit/tree/README ?r=cgit&p=tree&path=README . : none. : cgit PATH_INFO . (REPOSITORY SETTINGS) repo.about-filter about-filter . : none. : "enable-filter-overrides". : "FILTER API". repo.branch-sort "age" "name" . : "name". repo.clone-url . : none. : "MACRO EXPANSION". repo.commit-filter commit-filter . : none. : "enable-filter-overrides". : "FILTER API". repo.commit-sort "date" "topo" . "git log" . : unset. repo.defbranch . ( ) . : HEAD "master" HEAD . repo.desc . : none. repo.email-filter email-filter . : none. : "enable-filter-overrides". : "FILTER API". repo.enable-blame `enable-blame' . : none. repo.enable-commit-graph `enable-commit-graph' . : none. repo.enable-follow-links `enable-follow-links' . : none. repo.enable-html-serving enable-html-serving . : none. repo.enable-log-filecount `enable-log-filecount' . : none. repo.enable-log-linecount `enable-log-linecount' . : none. repo.enable-remote-branches "1" cgit summary refs . : . repo.enable-subject-links `enable-subject-links' . : none. repo.extra-head-content head . : none. repo.hide "1" . . : "0". : "repo.ignore". repo.homepage . : none. repo.ignore "1" . . : "0". : "repo.hide". repo.logo . : global logo. repo.logo-link cgit . . : global logo-link. repo.module-link . SHA1 . : repo.module-link. . SHA1 . : none. repo.max-stats . "max-stats" . : none. repo.name . : . repo.owner . : none. repo.owner-filter owner-filter . : none. : "enable-filter-overrides". : "FILTER API". repo.path . -bare .git . : none. repo.readme ( ) "" . refspec refspec . "master:docs/readme.mkd". ":docs/readme.rst" . "/about/PATH" readme . : . repo.section . : none. repo.snapshots cgit "snapshots". : . repo.snapshot-prefix . "linux-stable" "linux" "linux-3.15.4" "linux-stable-3.15.4" . : . repo.source-filter source-filter . : none. : "enable-filter-overrides". : "FILTER API". repo.url . . : none. CGITRC (REPOSITORY-SPECIFIC CGITRC FILE) "scan-path" git cgit "cgitrc" . "repo.url" "repo.path". "filter" "enable-filter-overrides" "1" . : "repo." "repo.desc" "desc" . (FILTER API) . : exec: " ". lua: Lua . cgit cgit filter email . : filter_open(argument1, argument2, argument3, ...) . filter_write(buffer) cgit . filter_close() . . 0 . cgit Lua : html(str) str . html_txt(str) HTML str . html_attr(str) HTML "str" . html_url_path(str) URL str . html_url_arg(str) URL str . html_include(file) file . . about filter : . () readme . . auth filter : o (filter action) o http cookie o http method o http referer o http path o http https flag o cgit repo o cgit page o cgit url o cgit login url "body" HTML login url (POST) . "authenticate-cookie" http cookie 0 1 / . "authenticate-post" POST CGI 302 HTTP "Set-Cookie" . `filters/simple-authentication.lua` . commit filter . . email filter : . . owner filter . . (Owner) . source filter : . () . . : o CGIT_REPO_URL ( repo.url) o CGIT_REPO_NAME ( repo.name) o CGIT_REPO_PATH ( repo.path) o CGIT_REPO_OWNER ( repo.owner) o CGIT_REPO_DEFBRANCH ( repo.defbranch) o CGIT_REPO_SECTION ( repo.section) o CGIT_REPO_CLONE_URL ( repo.clone-url) ( ) (unset) . (MACRO EXPANSION) cgitrc "$" : o cache-root o include o project-list o scan-path $CGIT_CONFIG . /etc/cgitrc : include=/etc/cgitrc.d/$HTTP_HOST "FILTER API" : o clone-url o repo.clone-url (CACHE) ttl . ttl git . ttl . (SIGNATURES) cgit .asc (git notes) . .tar.xz : git notes --ref=refs/notes/signatures/tar.xz add -C "$( gpg --output - --armor --detach-sign cgit-1.1.tar.xz | git hash-object -w --stdin )" v1.1 .tar .tar.* . : tag="$(git describe --abbrev=0)" git notes --ref=refs/notes/signatures/tar add -C "$( git archive --format tar --prefix "cgit-${tag#v}/" "$tag" | gpg --output - --armor --detach-sign | git hash-object -w --stdin )" "$tag" git-archive(1) . CGITRC (EXAMPLE CGITRC FILE) # cache-size=1000 # clone-url=git://foo.org/$CGIT_REPO_URL git@foo.org:$CGIT_REPO_URL # css css=/css/cgit.css # enable-index-owner=1 # http enable-http-clone=1 # enable-index-links=1 # blame enable-blame=1 # enable-commit-graph=1 # enable-log-filecount=1 # / enable-log-linecount=1 # branch-sort=age # cgit favicon=/favicon.ico # logo=/img/mylogo.png # max-stats=quarter # root-title=example.com git repositories # root-desc=tracking the foobar development # example.com root-readme=/var/www/htdocs/about.html # tar.gz tar.bz2 zip snapshots=tar.gz tar.bz2 zip ## ## mime ## mimetype.gif=image/gif mimetype.html=text/html mimetype.jpg=image/jpeg mimetype.jpeg=image/jpeg mimetype.pdf=application/pdf mimetype.png=image/png mimetype.svg=image/svg+xml # pygments source-filter=/var/www/cgit/filters/syntax-highlighting.py # markdown restructuredtext html # about-filter=/var/www/cgit/filters/about-formatting.sh ## ## ## : ## readme=:README.md readme=:readme.md readme=:README.mkd readme=:readme.mkd readme=:README.rst readme=:readme.rst readme=:README.html readme=:readme.html readme=:README.htm readme=:readme.htm readme=:README.txt readme=:readme.txt readme=:README readme=:readme readme=:INSTALL.md readme=:install.md readme=:INSTALL.mkd readme=:install.mkd readme=:INSTALL.rst readme=:install.rst readme=:INSTALL.html readme=:install.html readme=:INSTALL.htm readme=:install.htm readme=:INSTALL.txt readme=:install.txt readme=:INSTALL readme=:install ## ## . ## : section ## ## : ( '/etc/cgitrepos') ## : ## include=/etc/cgitrepos ## repo.url=foo repo.path=/pub/git/foo.git repo.desc=the master foo repository repo.owner=fooman@example.com repo.readme=info/web/about.html repo.url=bar repo.path=/pub/git/bar.git repo.desc=the bars for your foo repo.owner=barman@example.com repo.readme=info/web/about.html # 'extras' section=extras repo.url=baz repo.path=/pub/git/baz.git repo.desc=a set of extensions for bar users repo.url=wiz repo.path=/pub/git/wiz.git repo.desc=the wizard of foo # section=mirrors repo.url=git repo.path=/pub/git/git.git repo.desc=the dscm repo.url=linux repo.path=/pub/git/linux.git repo.desc=the kernel # repo.snapshots=0 # repo.enable-log-linecount=0 # repo.max-stats=month (BUGS) () . : robots=index # allow indexing html : (AUTHOR) Lars Hjemli Jason A. Donenfeld cgit 05/05/2026 CGITRC(5)