I am trying to get cgit v0.11.0 to work with Gerrit v2.11 as the in-built repository browser.
Based on Gerrit's documentation, I was able to get Gitweb working by just specifying the following two settings in gerrit.config:
[gitweb]
type = gitweb
cgi = /path/to/gitweb/gitweb.cgi
However, the instructions for cgit are a little vague in the documentation. I tried changing the settings to following:
[gitweb]
type = cgit
cgi = /path/to/cgit/cgit.cgi
With these changes Gerrit showed the '(cgit)' link in the UI properly, but when I click on the link, I get a 'Not Found' error. The URL generated seems to be wrong (the name of the repo is concatenated to the URL without any separator):
https://gerrit.myserver.org:8443/gitwebAll-Projects.git/summary
With 'gitweb' as the provider, the URLs are generated diffently:
https://gerrit.myserver.org:8443/gitweb?p=All-Projects.git;a=summary
I tried running the same URL with 'cgit' as the provider and now I do not get the 'Not Found' error. Instead an empty page generated by cgit shows up, which says:
No repository selected
generated by cgit v0.11.0 at 2015-04-22 03:04:49 (UTC)
Has anyone successfully integrated cgit with Gerrit using the in-built gitweb.type = cgit? If so, can you share any specific gerrit/cgit configuration that I am missing?