title: How to integrate CGit with Gerrit as a replacement for Gitweb?
body: <p>I am trying to get <a href="http://git.zx2c4.com/cgit/" rel="nofollow">cgit</a> v0.11.0 to work with Gerrit v2.11 as the in-built repository browser.</p>
  
  <p>Based on Gerrit's <a href="https://gerrit-documentation.storage.googleapis.com/Documentation/2.11/config-gerrit.html#gitweb" rel="nofollow">documentation</a>, I was able to get Gitweb working by just specifying the following two settings in gerrit.config:</p>
  
  <pre><code>[gitweb]
          type = gitweb
          cgi = /path/to/gitweb/gitweb.cgi
  </code></pre>
  
  <p>However, the instructions for cgit are a little vague in the documentation. I tried changing the settings to following:</p>
  
  <pre><code>[gitweb]
          type = cgit
          cgi = /path/to/cgit/cgit.cgi
  </code></pre>
  
  <p>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):</p>
  
  <pre><code>https://gerrit.myserver.org:8443/gitwebAll-Projects.git/summary
  </code></pre>
  
  <p>With 'gitweb' as the provider, the URLs are generated diffently:</p>
  
  <pre><code>https://gerrit.myserver.org:8443/gitweb?p=All-Projects.git;a=summary
  </code></pre>
  
  <p>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:</p>
  
  <pre><code>No repository selected
  generated by cgit v0.11.0 at 2015-04-22 03:04:49 (UTC)
  </code></pre>
  
  <p>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?</p>