gerrit 配置 ----Gitweb集成
Gitweb 集成
Gerrit 代码审查可以管理和生成指向 gitweb 的超链接, 允许用户从Gerrit内容跳转到相同信息, 但由 gitweb 显示。
内部/托管 gitweb
在内部配置中,Gerrit 检查请求并强制执行 其项目级访问控制,并在用户被授权查看页面时直接执行gitweb.cgi
要启用内部配置,设gitweb.cgi路径为安装的CGI。默认为,这是 Linux 发行版上“gitweb”包的常见安装路径。/usr/lib/cgi-bin/gitweb.cgi
git config -f $site_path/etc/gerrit.config gitweb.type gitweb git config -f $site_path/etc/gerrit.config gitweb.cgi /usr/lib/cgi-bin/gitweb.cgi git config -f $site_path/etc/gerrit.config --unset gitweb.url
或者,如果Gerrit通过反向代理送达,它可以 为gitweb的链接生成不同的URL(需要的) 在网页服务器上重写为)。这允许 用于以与 Gerrit 实例不同的 URL 提供 gitweb。 要启用此功能,请设<gerrit>/gitweb?argsgitweb.cgigitweb.url
git config -f $site_path/etc/gerrit.config gitweb.type gitweb git config -f $site_path/etc/gerrit.config gitweb.cgi /usr/lib/cgi-bin/gitweb.cgi git config -f $site_path/etc/gerrit.config gitweb.url /pretty/path/to/gitweb
更新后,Gerrit服务器必须 重启后,客户端必须重新加载主机页面才能查看变更。'$site_path'/etc/gerrit.config
配置
大部分 gitweb 配置文件都是自动处理的 作者:Gerrit Code Review。站点特定的覆盖可以放置在 中,因为该文件加载为 生成配置文件的一部分。'$site_path'/etc/gitweb_config.perl
标志与CSS
如果包管理器安装了CGI() 正在使用时,库存的CSS和标志文件将从以下提供 或 。/usr/lib/cgi-bin/gitweb.cgi/usr/share/gitweb/var/www
否则,格里特期待并被找到 与CGI脚本同一个目录。这与 默认源代码发行版,以及大多数自定义安装。gitweb.cssgit-logo.png