GitBlit code-viewer plug-in with SSO and Security Access Control

Clone this repo:
  1. 1f0cc2e Update doc on building gitblit by Paladox none · 1 year, 2 months ago master
  2. ec93945 Adapt to API changes in core Gerrit by Paladox none · 11 months ago
  3. 550a517 Adapt to new ProjectControl on stable-2.14/master by Luca Milanesio · 1 year, 1 month ago stable-2.14 v2.14
  4. c5d0d15 Fix gitblit looking in the wrong path for your git folder by Paladox none · 1 year, 3 months ago
  5. 0ebb512 Bump Gitblit to 1.9.0-SNAPSHOT by Paladox none · 1 year, 3 months ago

GitBlit plugin


Purpose of this plugin is to use Gitblit as web-based viewer (i.e. GitWeb replacement) on top of Gerrit Code Review.

How to build

As pre-requisites you need to make a custom-build of Gitblit and Wicket: the standard JARs downloaded from a public Maven repository aren't enough as they are missing some specific build parameters and constraints (i.e. shaded-jar) that are needed for a Gerrit plugin to work properly.


You need to clone Gitblit from GitHub and build it locally using the installMaven ANT target.

$ git clone
$ cd gitblit && git checkout master
$ ant -DresourceFolderPrefix=static installMaven

Gitblit plugin

This gitblit plugin is built with Bazel. Only the Gerrit in-tree build is supported.

Clone or link this plugin to the plugins directory of Gerrit's source tree.

  git clone
  git clone
  cd gerrit/plugins
  ln -s ../../gitblit .
  rm external_plugin_deps.bzl
  ln -s gitblit/external_plugin_deps.bzl .
  cd ../

From Gerrit source tree issue the command:

  bazel build plugins/gitblit

The output is created in


This project can be imported into the Eclipse IDE. Add the plugin name to the CUSTOM_PLUGINS set in Gerrit core in tools/bzl/plugins.bzl, and execute:



In order to use GitBlit as GitWeb replacement, run the Gerrit init again and answer ‘Y’ when asked during the Gitblit-specific initialisation.


*** GitBlit Integration

Do you want to use GitBlit as your GitWeb viewer? [Y/n]? y
Link name                      [GitBlit]:
"Repositories" submenu title   [Repositories]:
"Activity" submenu title       [Activity]:
"Documentation" submenu title  [Documentation]:
"Search" submenu title (makes only sense to set if some projects are indexed in GitBlit; single dash unsets) [Search]:
"Browse" submenu title for the "Projects" top-level menu [Browse]: