The Gerrit server functionality can be extended by installing plugins.

Plugin Installation

Plugin installation is as easy as dropping the plugin jar into the $site_path/plugins/ folder. It may take a few minutes until the server picks up new and updated plugins.

Due to caching, you might need to flush your browser cache after installing a plugin. Users will usually see the result within several minutes.

Plugins can also be installed via REST and SSH.

Plugin Development

How to develop plugins is described in the Plugin Development Guide.

If you want to share your plugin under the Apache License 2.0 you can host your plugin development on the gerrit-review Gerrit Server. You can request the creation of a new Project by email to the Gerrit mailing list. You would be assigned as project owner of the new plugin project so that you can submit changes on your own. It is the responsibility of the project owner to maintain the plugin, e.g. to make sure that it works with new Gerrit versions and to create stable branches for old releases.

Core Plugins

Core plugins are packaged within the Gerrit war file and can easily be installed during the Gerrit initialization.

Note that the documentation and configuration links in the list below are to the plugins' master branch. Please refer to the appropriate branch or revision for the Gerrit version you are using.

codemirror-editor

CodeMirror plugin for polygerrit.

commit-message-length-validator

This plugin checks the length of a commit’s commit message subject and message body, and reports warnings or errors to the git client if the lengths are exceeded.

delete-project

Provides the ability to delete a project.

download-commands

This plugin defines commands for downloading changes in different download schemes (for downloading via different network protocols).

gitiles

Plugin running Gitiles alongside a Gerrit server.

hooks

This plugin runs server-side hooks on events.

plugin-manager

This plugins provides an initial wizard to discover and install Gerrit plugins. Per default GerritForge CI is used to download the plugin artifacts from, but this can be changed per plugin configuration.

replication

This plugin can automatically push any changes Gerrit Code Review makes to its managed Git repositories to another system. Usually this would be configured to provide mirroring of changes, for warm-standby backups, or a load-balanced public mirror farm.

reviewnotes

Stores review information for Gerrit changes in the refs/notes/review branch.

singleusergroup

This plugin provides a group per user. This is useful to assign access rights directly to a single user, since in Gerrit access rights can only be assigned to groups.

webhooks

This plugin allows to propagate Gerrit events to remote http endpoints.

Other Plugins

Besides core plugins there are many other Gerrit plugins available. These plugins are developed and maintained by different parties. The Gerrit Project doesn’t guarantee proper functionality of any of these plugins.

The Gerrit Project doesn’t provide binaries for these plugins, but there is one public service that offers the download of pre-built plugin jars:

The following list gives an overview of available plugins, but the list may not be complete. You may discover more plugins on gerrit-review.

Note that the documentation and configuration links in the list below are to the plugins' master branch. Please refer to the appropriate branch for the Gerrit version you are using. Be aware that in some cases a stable branch might not exist when the master branch is compatible with multiple versions, or the plugin might not be compatible at all with your version.

admin-console

Plugin to provide administrator-only functionality, intended to simplify common administrative tasks. Currently providing user-level information. Also providing access control information by project or project/account.

analytics

Plugin to extract commit and review data from Gerrit projects and expose aggregated metrics over REST and SSH API. Metrics are extracted in JSON format with one record per line, ready to be archived and processed with popular BigData transformation tools such Apache Spark or published and visualized in dashboards.

avatars-external

This plugin allows to use an external url to load the avatar images from.

avatars-gravatar

Plugin to display user icons from Gravatar.

branch-network

This plugin allows the rendering of Git repository branch network in a graphical HTML5 Canvas. It is mainly intended to be used as a "project link" in a gitweb configuration.

changemessage

This plugin allows to display a static info message on the change screen.

checks

The checks plugin provides a REST API and UI extensions for integrating CI systems with Gerrit.

egit

This plugin provides extensions for easier usage with EGit.

The plugin adds a download command for EGit that allows to copy only the change ref into the clipboard. The change ref is needed for downloading a Gerrit change from within EGit.

emoticons

This plugin allows users to see emoticons in comments as images.

find-owners

This plugin provides (1) a change review action button [FIND OWNERS] that shows owners of changed files to be included as code reviewers, and (2) Prolog predicates to make sure that a CL is submittable only with owner Code-Review +1 votes.

gitblit

GitBlit code-viewer plugin with SSO and Security Access Control.

github

Plugin to integrate with GitHub: replication, pull-request to Change-Sets

healthcheck

Plugin for monitoring and alerting when Gerrit does not behave properrly.

When Gerrit Server needs to be available 24x7, it is important to know beforehand if something isn’t working correctly: this plugin exposes a REST-API that provides the real-time status of the Gerrit internals and can be integrated with real-time monitoring systems and paging platforms.

Healthcheck metrics (latency and subsystem healthiness) are published as Gerrit internal metrics and can be published to dashboards.

imagare

The imagare plugin allows Gerrit users to upload and share images.

importer

The importer plugin allows to import projects from one Gerrit server into another Gerrit server.

Projects can be imported while both source and target Gerrit server are online. There is no downtime required.

The git repository and all changes of the project, including approvals and review comments, are imported. Historic timestamps are preserved.

Project imports can be resumed. This means a project team can continue to work in the source system while the import to the target system is done. By resuming the import the project in the target system can be updated with the missing delta.

The importer plugin can also be used to copy a project within one Gerrit server, and in combination with the delete-project plugin it can be used to rename a project.

Issue Tracker System Plugins

Plugins to integrate with issue tracker systems (ITS), that (based on events in Gerrit) allows to take actions in the ITS. For example, they can add comments to bugs, or change status of bugs.

All its-plugins have a common base implementation which is stored in the its-base project. its-base is not a plugin, but just a framework for the ITS plugins which is packaged within each ITS plugin.

its-bugzilla

Plugin to integrate with Bugzilla.

its-jira

Plugin to integrate with Jira.

its-phabricator

Plugin to integrate with Phabricator.

its-rtc

Plugin to integrate with IBM Rational Team Concert (RTC).

its-storyboard

Plugin to integrate with Storyboard task tracking system.

javamelody

This plugin allows to monitor the Gerrit server.

This plugin integrates JavaMelody in Gerrit in order to retrieve live instrumentation data from Gerrit.

labelui

The labelui plugin adds a user preference that allows users to choose a table control to render the labels/approvals on the change screen (similar to how labels/approvals were rendered on the old change screen).

The menuextender plugin allows Gerrit administrators to configure additional menu entries from the WebUI.

metrics-reporter-elasticsearch

This plugin reports Gerrit metrics to Elasticsearch.

metrics-reporter-graphite

This plugin reports Gerrit metrics to Graphite.

metrics-reporter-jmx

This plugin reports Gerrit metrics to JMX.

metrics-reporter-prometheus

This plugin exposes Gerrit metrics for consumption by Prometheus.

motd

This plugin can output messages to clients when pulling/fetching/cloning code from Gerrit Code Review. If the client (and transport mechanism) can support sending the message to the client, it will be displayed to the user (usually prefixed by β€œremote: ”), but will be silently discarded otherwise.

OAuth authentication provider

This plugin enables Gerrit to use OAuth2 protocol for authentication. Several OAuth2 providers are supported:

  • AirVantage

  • Bitbucket

  • CAS

  • CoreOS Dex

  • Facebook

  • GitHub

  • GitLab

  • Google

  • Keycloak

  • Office365

owners

This plugin provides a Prolog predicate add_owner_approval/3 that appends label('Owner-Approval', need(_)) to a provided list.

project-download-commands

This plugin adds support for project specific download commands.

Project specific download commands that are defined on a parent project are inherited by the child projects. Child projects can overwrite the inherited download command or remove it by assigning no value to it.

quota

This plugin allows to enforce quotas in Gerrit.

To protect a Gerrit installation it makes sense to limit the resources that a project or group can consume. To do this a Gerrit administrator can use this plugin to define quotas on project namespaces.

rabbitmq

A plugin that publishes Gerrit events to a RabbitMQ exchange.

readonly

A plugin that makes the Gerrit server read-only by rejecting git pushes, blocking HTTP PUT/POST/DELETE requests, and disabling SSH commands.

ref-protection

A plugin that protects against commits being lost.

Backups of deleted or non-fast-forward updated refs are created under the refs/backups/ namespace.

reparent

A plugin that provides project reparenting as a self-service for project owners.

review-strategy

This plugin allows users to configure different review strategies.

reviewers

A plugin that allows adding default reviewers to a change.

reviewers-by-blame

A plugin that allows automatically adding reviewers to a change from the git blame computation on the changed files. It will add the users that authored most of the lines touched by the change, since these users should be familiar with the code and can mostly review the change.

scripting/groovy-provider

This plugin provides a Groovy runtime environment for Gerrit plugins in Groovy.

SAML2 authentication provider

This plugin enables Gerrit to use SAML2 protocol for authentication.

scripting/scala-provider

This plugin provides a Scala runtime environment for Gerrit plugins in Scala.

scripts

Repository containing a collection of Gerrit scripting plugins that are intended to provide simple and useful extensions.

Groovy and Scala scripts require the installation of the corresponding scripting/*-provider plugin in order to be loaded into Gerrit.

server-config

This plugin enables access (download and upload) to the server config files. It may be used to change Gerrit config files (like etc/gerrit.config) in cases where direct access to the file system where Gerrit’s config files are stored is difficult or impossible to get.

serviceuser

This plugin allows to create service users in Gerrit.

A service user is a user that is used by another service to communicate with Gerrit. E.g. a service user is needed to run the Gerrit Trigger Plugin in Jenkins. A service user is not able to login into the Gerrit WebUI and it cannot push commits or tags.

uploadvalidator

This plugin allows to configure upload validations per project.

Project owners can configure blocked file extensions, required footers and a maximum allowed path length. Pushes of commits that violate these settings are rejected by Gerrit.

verify-status

This plugin adds a separate channel for Gerrit to store test metadata and view them on the Gerrit UI. The metadata can be stored in the Gerrit database or in a completely separate datastore.

websession-flatfile

This plugin replaces the built-in Gerrit H2 based websession cache with a flatfile based implementation. This implementation is shareable among multiple Gerrit servers, making it useful for multi-master Gerrit installations.

x-docs

This plugin serves project documentation as HTML pages.