"no repositories found": cgit + gitolite + nginx -- git/ssh access OK, web access OK, no errors, but no repos found/displayed?

PGNet Dev pgnet.dev at gmail.com
Thu Aug 15 04:52:01 CEST 2019

a number of popular refs, e.g.,


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,


suggests (?) a script path rewrite issue, though it's not clear to me WHAT's needed.

this post


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., @


nicely displays


if that^^ required rewrite is explicitly/clearly in docs somewhere, I've missed it.

reading @ cgit manpage,


			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


I haven't yet found the docs for PATH_INFO usage to do so ...

More information about the CGit mailing list