aboutsummaryrefslogtreecommitdiff
path: root/roles/cgit/templates/cgitrc.j2
diff options
context:
space:
mode:
authorMiguel Dalberto Pedro <miguel.pedro@precisioninno.com>2026-10-29 16:42:44 -0300
committerMiguel Dalberto Pedro <miguel.pedro@precisioninno.com>2026-10-29 16:42:44 -0300
commiteab4f5746a69783e4e3a3c05808ab58b5d2f494d (patch)
treeff6e149dccbd5ccc999d9e4f648bed823433ffab /roles/cgit/templates/cgitrc.j2
parent4b7379914a1865f07b2c54252234cc90158fc253 (diff)
downloadmy-infra-master.tar.gz
my-infra-master.zip
feat(cgit): deploy cgit, fcgiwrap, and dedicated git SSH serverHEADmaster
- Enable cgit role (cgit_enabled: true) for git.miguelpedro.xyz.br - Provision dedicated 'git' user/group (/srv/git, git-shell, authorized_keys) - Add custom git-shell commands ('init' and 'list') for remote bare repo creation - Configure /etc/cgitrc with HTTP clone support, Pygments syntax highlighting, and README rendering - Add Nginx virtual host with automatic TLS upgrade once Let's Encrypt cert is present - Update DISCOVERY_REPORT.md, COMMAND_LOG.md, README.md, and AGENT_INSTRUCTIONS.md per Self-Updating Protocol
Diffstat (limited to 'roles/cgit/templates/cgitrc.j2')
-rw-r--r--roles/cgit/templates/cgitrc.j211
1 files changed, 11 insertions, 0 deletions
diff --git a/roles/cgit/templates/cgitrc.j2 b/roles/cgit/templates/cgitrc.j2
index 0cae2ab..6e9cbd0 100644
--- a/roles/cgit/templates/cgitrc.j2
+++ b/roles/cgit/templates/cgitrc.j2
@@ -7,11 +7,21 @@ root-title={{ cgit_title }}
root-desc={{ cgit_description }}
virtual-root=/
+{% if cgit_enable_http_clone | default(true) %}
+enable-http-clone=1
+clone-url=https://{{ cgit_domain }}/$CGIT_REPO_URL git@{{ primary_domain }}:$CGIT_REPO_URL
+{% else %}
+enable-http-clone=0
+clone-url=git@{{ primary_domain }}:$CGIT_REPO_URL
+{% endif %}
+
enable-index-links=1
enable-index-owner=0
enable-commit-graph=1
enable-log-filecount=1
enable-log-linecount=1
+enable-git-config=1
+remove-suffix=1
snapshots=tar.gz zip
about-filter=/usr/lib/cgit/filters/about-formatting.sh
@@ -23,4 +33,5 @@ readme=:README.rst
readme=:README.txt
readme=:README
+# Scan path must be placed after global repository defaults
scan-path={{ cgit_repos_path }}