1

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?

Manuj Bhatia
  • 11
  • 1
  • 3

1 Answers1

1

if your cgit is running from another web server or link, you only need to add the correct url for it.

[gitweb]
        type = cgit
        url = https://gerritServer/cgit/

https://code-review.phablet.ubuntu.com/Documentation/config-gitweb.html

bersalop
  • 13
  • 3