我正在尝试将cgit v0.11.0与Gerrit v2.11一起用作内置存储库浏览器。
基于Gerrit的documentation,我能够通过在gerrit.config中指定以下两个设置来使Gitweb正常工作:
[gitweb]
type = gitweb
cgi = /path/to/gitweb/gitweb.cgi
但是,cgit的说明在文档中有点模糊。我尝试将设置更改为以下内容:
[gitweb]
type = cgit
cgi = /path/to/cgit/cgit.cgi
通过这些改变,Gerrit展示了'(cgit)'在用户界面中正确链接,但是当我点击链接时,我会找到“未找到”#39;错误。生成的URL似乎是错误的(repo的名称连接到没有任何分隔符的URL):
https://gerrit.myserver.org:8443/gitwebAll-Projects.git/summary
使用' gitweb'作为提供者,URL会不同地生成:
https://gerrit.myserver.org:8443/gitweb?p=All-Projects.git;a=summary
我尝试使用' cgit'运行相同的网址作为提供者,现在我没有得到“未找到”#39;错误。而是显示由cgit生成的空页面,其中显示:
No repository selected
generated by cgit v0.11.0 at 2015-04-22 03:04:49 (UTC)
有没有人使用内置的gitweb.type = cgit成功地将cgit与Gerrit集成?如果是这样,你能分享我遗漏的任何特定的gerrit / cgit配置吗?
答案 0 :(得分:1)
如果你的cgit是从另一个网络服务器或链接运行的,你只需要为它添加正确的URL。
<div class="embed-responsive embed-responsive-4by3">
<div id="map-canvas" class="embed-responsive-item"></div><p>
</div>
https://code-review.phablet.ubuntu.com/Documentation/config-gitweb.html