From mboxrd@z Thu Jan 1 00:00:00 1970 From: pgnet.dev at gmail.com (PGNet Dev) Date: Wed, 14 Aug 2019 19:52:01 -0700 Subject: "no repositories found": cgit + gitolite + nginx -- git/ssh access OK, web access OK, no errors, but no repos found/displayed? In-Reply-To: <1d02a818-d3e8-68dd-ebaf-5e8b6a8d42e3@gmail.com> References: <9735abab-e2e3-c72d-5156-063d3b0c5271@gmail.com> <1d02a818-d3e8-68dd-ebaf-5e8b6a8d42e3@gmail.com> Message-ID: <1daad04e-9f5e-59c1-41b9-093ff90c8c18@gmail.com> a number of popular refs, e.g., https://wiki.archlinux.org/index.php/Cgit#Using_uwsgi recommend an nginx config similar to, location / { try_files $uri @cgit; } location @cgit { gzip off; include uwsgi_params; uwsgi_modifier1 9; uwsgi_pass unix:/run/uwsgi/cgit.sock; } which is what I've been using so far. reading here, https://uwsgi-docs.readthedocs.io/en/latest/Nginx.html#hosting-multiple-apps-in-the-same-process-aka-managing-script-name-and-path-info suggests (?) a script path rewrite issue, though it's not clear to me WHAT's needed. this post https://lists.zx2c4.com/pipermail/cgit/2018-April/003784.html has a working solution. editing my nginx config, location / { - try_files $uri @cgit; + try_files $uri /cgit.cgi?url=$uri&$args; } - location @cgit { + location /cgit.cgi { + internal; gzip off; include uwsgi_params; uwsgi_modifier1 9; uwsgi_pass unix:/run/uwsgi/cgit.sock; } now, I see repos/content in the UI; e.g., @ https://cgit.dev.loc/testing.git/diff/ nicely displays https://i.imgur.com/qCeYHnz.png if that^^ required rewrite is explicitly/clearly in docs somewhere, I've missed it. reading @ cgit manpage, https://git.zx2c4.com/cgit/tree/cgitrc.5.txt#n441 virtual-root:: Url which, if specified, will be used as root for all cgit links. It will also cause cgit to generate 'virtual urls', i.e. urls like '/cgit/tree/README' as opposed to '?r=cgit&p=tree&path=README'. Default value: none. NOTE: cgit has recently learned how to use PATH_INFO to achieve the same kind of virtual urls, so this option will probably be deprecated. suggests that PATH_INFO can (should?) be used to avoid the try/rewrite. on my sys, nginx's 'uwsgi_params' contains uwsgi_param PATH_INFO $document_uri; and, as above, I have /etc/cgitrc ... virtual-root=/ ... I haven't yet found the docs for PATH_INFO usage to do so ...