diff options
| author | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2021-01-19 00:37:04 +0100 |
|---|---|---|
| committer | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2021-01-19 00:37:04 +0100 |
| commit | 59d3128711c0222092135e93ca788d388aacd573 (patch) | |
| tree | 4b21ec4d3a650a432d836bd5afd066e8da958b34 /guides/cloud/git.org | |
| parent | 759f11dc50b2f3694051dd71d0ae6f0bc81a62ae (diff) | |
| download | memory-leaks-59d3128711c0222092135e93ca788d388aacd573.tar.xz | |
Dump notes on how to setup cgit
Diffstat (limited to 'guides/cloud/git.org')
| -rw-r--r-- | guides/cloud/git.org | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/guides/cloud/git.org b/guides/cloud/git.org new file mode 100644 index 0000000..109f306 --- /dev/null +++ b/guides/cloud/git.org @@ -0,0 +1,41 @@ +Necessary configurations for running cgit behind nginx on Debian. +* nginx +In =/etc/nginx/sites-available/git.domain.tld=: +#+begin_src +server { + listen 80; + listen [::]:80; + + server_name git.domain.tld; + + root /usr/share/cgit; + try_files $uri @cgit; + + location @cgit { + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME /usr/lib/cgit/cgit.cgi; + fastcgi_param PATH_INFO $uri; + fastcgi_param QUERY_STRING $args; + fastcgi_param HTTP_HOST $server_name; + fastcgi_pass unix:/run/fcgiwrap.socket; + } +} +#+end_src +* cgit +In =/etc/cgitrc=: +#+begin_src conf +css=/cgit.css +logo=/cgit.png +virtual-root=/ + +scan-path=/srv/git +#+end_src +* git +#+begin_src sh +$ echo $(which git-shell) >> /etc/shells +$ chsh git -s $(which git-shell) +$ mkdir /srv/git +$ chown git:www-data /srv/git +# Each time a repository is added: +$ git -C /srv/git/$repo config core.sharedRepository 0640 +#+end_src |
