"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
Wed Aug 14 21:12:17 CEST 2019


> could you please also provide your cgit config? Also, which user is 
> executing cgit

my current config is

	cat /etc/cgitrc

		virtual-root=/
		css=/cgit.css
		logo=/cgit.png

		cache-size=1000
		enable-index-links=1
		enable-log-filecount=1
		enable-log-linecount=1
		root-title=git repositories

		robots=noindex, nofollow

		mimetype.git=image/git
		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

		snapshots=tar.gz tar.bz2 tar.xz zip
		source-filter=/usr/lib/cgit/filters/syntax-highlighting-EDITED.sh
		scan-path=/data/git/gitolite/repositories/

	cat /usr/lib/cgit/filters/syntax-highlighting-EDITED.sh | grep -v ^#

		BASENAME="$1"
		EXTENSION="${BASENAME##*.}"

		[ "${BASENAME}" = "${EXTENSION}" ] && EXTENSION=txt
		[ -z "${EXTENSION}" ] && EXTENSION=txt

		[ "${BASENAME%%.*}" = "Makefile" ] && EXTENSION=mk

		exec highlight --force -f -I -O xhtml -S "$EXTENSION" 2>/dev/null

> can he access repositories owned by gitolite?

that was the _intention_, at least, with

	>     Users/groups are setup as
	> 	>       id wwwrun
	>         uid=30(wwwrun) gid=8(www) groups=8(www),475(gitolite)
	>       id wwwrun-cgit
	>         uid=474(wwwrun-cgit) gid=8(www) groups=8(www),475(gitolite)
	>       id gitolite
	>         uid=475(gitolite) gid=475(gitolite) groups=475(gitolite)

the systemd units for uwsgi service & socket are templated,

	/etc/systemd/system/uwsgi-app at .service
		[Unit]
		Description=%i uWSGI app
		After=syslog.target

		[Service]
		ExecStart=/usr/sbin/uwsgi \
		 --ini /etc/uwsgi/apps-available/%i.ini \
		 --socket /run/uwsgi/%i.sock
		User=wwwrun-%i
		Group=www
		Restart=on-failure
		KillSignal=SIGQUIT
		Type=notify
		StandardError=syslog
		NotifyAccess=all

	/etc/systemd/system/uwsgi-app at .socket
		[Unit]
		Description=Socket for uWSGI app %i

		[Socket]
		ListenStream=/run/uwsgi/%i.sock
		SocketUser=wwwrun-%i
		SocketGroup=www
		SocketMode=0660

		[Install]
		WantedBy=sockets.target

so that, in the case of app == 'cgit', they get enabled/started as

	systemctl enable uwsgi-app at cgit.socket

and, uwsgi/cgit execs as

	wwwrun-cgit:www

which, i thought, should make it behave with gitolite repos.

if not a bug, it's certainly possible i've missed some config, perm, etc.


More information about the CGit mailing list