gerrit-intellij-plugin

uwolferApache-2.0活跃维护

在 IntelliJ IDEA 里直接完成 Gerrit 代码评审的插件,支持查看变更、评论和提交,省去在浏览器和 IDE 之间来回切换。

Gerrit Code Review Tool Integration for the IntelliJ Platform

v2.3.0-203发布于 2026-10-16 15:42 UTC520star +1 / 7 天117fork同步于 2026-11-10 23:57 UTC

怎么上手

由 README 提炼,执行前请确认
Settings > Plugins > Marketplace 搜索 "Gerrit" 并 Install,然后重启 IDE
硬件要求按 README 说明

README 未说明,仅要求 Gerrit 2.9 及以上、IntelliJ 平台 2020.3 及以上的 IDE

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

在 IntelliJ 里直接评审、拉取和推送 Gerrit 变更,不用切浏览器

在 IntelliJ IDEA 里直接完成 Gerrit 代码评审的插件,支持查看变更、评论和提交,省去在浏览器和 IDE 之间来回切换。

核心能力

  • 在编辑器内对文件和行投票、回复与评论
  • 在代码行上查看并回复已检出变更的评论
  • 用 IDE 语法高亮对比变更与本地克隆
  • 推送对话框支持目标分支、topic、评审人、hashtag 与 WIP
  • 从 IDE 克隆 Gerrit 项目并自动装 commit-msg 钩子

容易踩的坑

Gerrit 2.9/2.10 需安装 download-commands 插件,否则点击变更报 Cannot fetch changes;变更列表默认只显示当前 IDE 项目仓库的变更,为空时需检查 Version Control 注册与 remote 指向;插件内克隆不兼容所有认证方式,失败时改用 SSH 克隆 URL 或先用 Git 插件克隆

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v2.3.0-203
  1. v2.3.0-203最新正式版2026-10-16 · 2026-10-16 15:42 UTC

    What's Changed

    Full Changelog: https://github.com/uwolfer/gerrit-intellij-plugin/compare/v2.2.0-203...v2.3.0-203

  2. v2.2.0-2032026-10-09 · 2026-10-09 21:22 UTC
    查看更新说明

    What's Changed

  3. v2.1.0-2032026-10-07 · 2026-10-07 09:46 UTC
    查看更新说明

    What's Changed

  4. v2.0.1-2032026-09-26 · 2026-09-26 13:20 UTC

    这个版本没有写更新说明。

  5. v2.0.0-2032026-09-12 · 2026-09-12 13:37 UTC

    这个版本没有写更新说明。

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    Gerrit for IntelliJ

    Version Downloads

    Unofficial IntelliJ Platform plugin for Gerrit Code Review: review, fetch and push changes without leaving your IDE.

    Features

    • Review changes in the IDE: vote, reply and comment on files and lines
    • See and answer the comments of a checked out change in the editor, on their lines as you edit the file
    • Diff changes against your local clone, with the IDE's syntax highlighting and navigation
    • List and query changes, and get notified of new changes waiting for your review
    • Push to Gerrit from the push dialog: target branch, topic, reviewers and CC with account suggestions, and on Gerrit 2.15+ a hashtag, WIP and private changes
    • Check out, cherry-pick and reset to changes in your local clone
    • Submit, abandon, star changes and add reviewers; publish and delete draft changes (Gerrit older than 2.15)
    • Run the IDE's inspections on the files a change touches
    • Clone Gerrit projects from the IDE, with the commit-msg hook installed
    • Open files and commits in Gitiles, and the Gerrit changes of commits selected in the VCS log
    • Several Gerrit accounts, one per project

    Requirements

    • Gerrit 2.9 or newer (older versions lack parts of the REST API)
    • Any IDE based on the IntelliJ Platform 2020.3 or newer:
      • IntelliJ IDEA
      • IntelliJ IDEA CE
      • RubyMine
      • WebStorm
      • PhpStorm
      • PyCharm
      • PyCharm CE
      • AppCode
      • Android Studio
      • DataGrip
      • CLion
      • GoLand
      • Rider
      • MPS

    Installation

    • From the IDE (recommended, you get notified of updates): Settings > Plugins > Marketplace, search for "Gerrit" and Install.
    • Manually: download the release matching your IDE and install it with Settings > Plugins > ⚙ > Install Plugin from Disk....

    Then restart the IDE.

    Getting started

    1. Open Settings > Version Control > Gerrit and add an account with the web URL of your Gerrit, your login and your HTTP password (in the Gerrit web UI under Settings > HTTP Credentials, or HTTP Password in older versions). Test checks the connection.
    2. Open the Gerrit tool window. It lists the changes of the Gerrit projects whose Git repositories are part of your IDE project.
    3. Push as usual: the push dialog has a "Push to Gerrit" section for the Gerrit options. "Push commits to Gerrit by default" in the settings ticks it in new push dialogs; after that, each project keeps your last choice.

    With accounts on several Gerrit instances, add all of them and pick the one a project talks to with Use for This Project. A project whose remotes point at only one of them picks it by itself.

    To clone a project from Gerrit, use Get from VCS and pick Gerrit as version control.

    Troubleshooting

    List of changes is empty

    By default, the list only shows changes of the Git repositories in your IDE project.

    • Check that the repositories are registered under Settings > Version Control.
    • Check that at least one remote of each repository points at the host of your Gerrit account.
    • If Gerrit is cloned from another host than its web UI, set the "Clone base URL" of the account.
    • Or add a remote named like the Gerrit project, with the Gerrit web URL as its URL.

    Error-message on checkout or cherry-pick: "No repository found for Gerrit project"

    With "List all Gerrit changes (instead of changes from the currently open project only)", the list also shows changes of projects that are not part of your IDE project. You can vote on and submit these, and review them: the files of such a change, their diff and its comments come from Gerrit. Checking a change out, cherry-picking it and fetching it need the local clone of its project; clone the project and add it to your IDE project for these.

    Error-message when clicking a change: "Cannot fetch changes"

    Gerrit 2.9 and 2.10 tell the plugin where to fetch a change from only with the download-commands plugin installed; newer versions do without it. The Gerrit update procedure offers to install it, but it isn't selected by default, so run the update again if you skipped it. For an existing or new instance, this installs it:

    java -jar gerrit.war init -d {gerrit-instance} --install-plugin=download-commands
    

    Error-message when loading changes: "Bad Request. Status-Code: 400. Content: too many terms in query."

    Enable "List all Gerrit changes (instead of changes from the currently open project only)" in the plugin settings.

    Error-message when loading changes: "SSLException: Received fatal alert: bad_record_mac"

    Your Gerrit (or the reverse proxy in front of it) only accepts SSLv3. Enable TLS there; SSLv3 is insecure anyway.

    Checking out from VCS with Gerrit plugin does not work

    Cloning from the plugin does not work with every authentication method. If it fails to authenticate or does not finish:

    • use the SSH clone URL in the clone dialog (the Gerrit web UI shows it in the project settings), or
    • clone with the Git plugin and add the Gerrit account afterwards.

    Background is in this Gerrit mailing list topic.

    Loading file-diff-list is slow

    The file list and diffs come from Git: the plugin fetches the change from Gerrit. Running git gc locally and gerrit gc on the server (ask your Gerrit administrator) usually helps.

    Authenticate against *-review.googlesource.com

    In the Gerrit web UI, open Settings > HTTP Credentials > Obtain password. In the text shown, find the line starting with your host (e.g. gerrit-review.googlesource.com) and take login and password from it:

    gerrit-review.googlesource.com,FALSE,/,TRUE,12345678,o,git-username.gmail.com=password-until-end-of-line
    

    Here the login is git-username.gmail.com and the password is everything after the =.

    How it works

    • IDE integration: a tool window lists the changes, see com.urswolfer.intellij.plugin.gerrit.ui. The push dialog has no extension point, so the plugin adds its options to Git's push dialog at startup, see com.urswolfer.intellij.plugin.gerrit.push.
    • REST API: most of the communication with Gerrit uses the Gerrit REST API, through the standalone gerrit-rest-java-client, see com.urswolfer.intellij.plugin.gerrit.rest.
    • Git: listing the files of a change, diffs, checkout and cherry-pick run on the local clone with the IDE's Git plugin, see com.urswolfer.intellij.plugin.gerrit.git.

    Development

    Open the project in IntelliJ IDEA with the Gradle, Plugin DevKit and UI Designer plugins enabled. CONTRIBUTING.md explains how to build, test and run it in a sandbox IDE. Pull requests go to the default branch intellij2020.3, which targets the oldest supported IDE, so a change reaches every newer one.

    Support the project

    If you like this plugin, you can support it:

    • Spread it: tell your friends who use IntelliJ and Gerrit about it.
    • Rate it on the JetBrains Marketplace.
    • Star it on GitHub.
    • Improve it: report bugs and request features, or fix and build them yourself, everything is open source.
    • Donate, see below.

    Donations

    You can support this work with this donation link. If you would rather not use PayPal (it takes 2.9% plus $0.30 of each donation), please contact me. Only trust the link on github.com/uwolfer/gerrit-intellij-plugin.

    Credits

    • Parts of this plugin are based on the code of the IntelliJ GitHub plugin.

    Thanks to JetBrains for providing a free license for developing this project.

    Copyright and license

    Copyright 2013 - 2026 Urs Wolfer

    Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in compliance with the License. You may obtain a copy of the License in the LICENSE file, or at:

    https://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.