Overview
Discover what makes Gerrit powerful
Gerrit is a full‑stack, self‑hosted code review platform tightly coupled with Git. From a developer’s standpoint it functions as an intermediary between the Git repository and the pull‑request workflow, providing a web UI for reviewing changes, inline comments, and automated merge policies. It exposes a rich REST API (v2) that allows tooling to query change status, submit reviews programmatically, and integrate with CI pipelines. The core of Gerrit is written in Java and runs on a servlet container (Jetty) packaged as a WAR file, but the project also ships native Docker images for quick deployment.
Language & Runtime
Build System
Database
Git Transport
Overview
Gerrit is a full‑stack, self‑hosted code review platform tightly coupled with Git. From a developer’s standpoint it functions as an intermediary between the Git repository and the pull‑request workflow, providing a web UI for reviewing changes, inline comments, and automated merge policies. It exposes a rich REST API (v2) that allows tooling to query change status, submit reviews programmatically, and integrate with CI pipelines. The core of Gerrit is written in Java and runs on a servlet container (Jetty) packaged as a WAR file, but the project also ships native Docker images for quick deployment.
Technical Stack
- Language & Runtime: Java 8+ (currently 11), running on a Jetty servlet container bundled in the WAR.
- Build System: Bazel, used for compiling the source tree and generating release artifacts. Maven coordinates are available in Maven Central (
com.google.gerrit:gerrit-war). - Database: PostgreSQL, MySQL, or Oracle via JDBC; the choice is configurable at startup. Gerrit stores metadata (changes, reviews, permissions) in the RDBMS while Git objects reside in the file system.
- Git Transport: Built‑in SSH and HTTPS servers that speak the Git protocol, enabling any Git client to push/pull directly. The server can also act as a remote for other Git servers, supporting mirroring and replication.
- Web UI: A single‑page application built with AngularJS (legacy) and later React, served from the same Jetty instance. The UI communicates with the REST API for real‑time updates.
Core Capabilities
- Change Lifecycle Management: Create, update, and submit changes with merge strategies (merge if conflict-free, rebase, cherry‑pick). Supports multiple submit policies per project.
- Permission Model: Fine‑grained access control using groups and project/branch permissions. The ACL system is hierarchical, inheriting from global → project → branch levels.
- Review Workflow: Inline comments, file diffs (side‑by‑side or unified), code owners, and voting. Reviewers can approve, request changes, or block merges.
- REST API & Webhooks: Full CRUD operations on changes, projects, accounts. Supports event hooks (HTTP callbacks) for CI/CD integration.
- Plugin Architecture: Server‑side plugins written in Java (or Groovy) that hook into events, extend REST endpoints, or add UI components. The plugin repository is open source and can be self‑hosted.
Deployment & Infrastructure
Gerrit can run on any Linux distribution with Java and a supported database. It is available as a binary package for Debian/Ubuntu, CentOS/RHEL, and Fedora, making it easy to install via apt or yum. Containerization is first‑class: Docker images for CentOS 8 and Ubuntu 20.04 are maintained on DockerHub, enabling zero‑configuration deployments in Kubernetes or Docker Swarm. For high availability, Gerrit supports database replication and Git repository mirroring across geographically distributed servers; the git gc scheduler can be tuned for large repositories. Horizontal scaling is achieved by clustering multiple Gerrit instances behind a load balancer, sharing the same database and storage backend.
Integration & Extensibility
The plugin system is the cornerstone of Gerrit’s extensibility. Plugins can register REST resources, UI panels, or event listeners (e.g., ChangeCreatedListener). The public API allows external services to trigger change submissions, query audit logs, or enforce custom policies. Webhooks expose events such as patchset_created and change_merged, which can be consumed by CI tools like Jenkins or GitHub Actions. Gerrit also supports LDAP/SSO for authentication, and can be integrated with OAuth providers or SAML IdPs.
Developer Experience
Configuration is driven by a gerrit.config file and optional environment variables; the wizard in the web UI helps bootstrap projects. Documentation is comprehensive, with a dedicated API reference and plugin development guide. The community is active on the repo-discuss mailing list, and the source code is open for inspection. Licensing under Apache 2.0 removes any vendor lock‑in concerns, and the project’s long history (over a decade) guarantees stability.
Use Cases
- Enterprise Git Governance: Large teams needing fine‑grained access control and audit trails for critical codebases.
- Open‑Source Projects: Projects that prefer a self‑hosted review system over hosted services, retaining control over data and plugin ecosystem.
- CI/CD Pipelines: Automated testing frameworks that trigger on review events, enforce quality gates before merge.
- Repository Mirroring: Organizations spread across regions can mirror Gerrit repositories to reduce latency and provide hot‑spare redundancy.
Advantages
- Performance: Jetty’s lightweight server and efficient JDBC pooling keep request latency low, even with thousands of concurrent reviewers.
- Flexibility: The plugin API allows almost any custom workflow, from automated code formatting to complex approval chains.
- Licensing: Apache 2.0 ensures no royalties or licensing fees, unlike commercial alternatives.
- Maturity: A stable release cycle and extensive community support make it a reliable choice for production workloads.
In sum, Gerrit offers developers a robust, extensible platform that bridges Git operations with formal review processes, all while remaining fully self‑hosted and open source.
Open SourceReady to get started?
Join the community and start self-hosting Gerrit today
Related Apps in development-tools
Hoppscotch
Fast, lightweight API development tool
code-server
Self-hosted development-tools
AppFlowy
AI-powered workspace for notes, projects, and wikis
Appwrite
All-in-one backend platform for modern apps
PocketBase
Lightweight Go backend in a single file
Gitea
Fast, lightweight self-hosted Git platform
Weekly Views
Repository Health
Information
Explore More Apps
ybFeed
Sync micro‑feeds across machines with a secret link or PIN
Hypersomnia
Community-driven multiplayer shooter built in modern C++
WriteFreely
Minimalist, distraction‑free blogging platform
PluXml
Lightweight flat‑file CMS for portable websites
Jitsi Meet
Free, encrypted video conferencing for everyone
Kestra
Event‑driven, declarative workflow orchestrator