init - Initialize a new Gerrit server installation or upgrade an existing installation.
java -jar gerrit.war init -d <SITE_PATH> [--batch] [--delete-caches] [--no-auto-start] [--skip-plugins] [--list-plugins] [--install-plugin=<PLUGIN_NAME>] [--install-all-plugins] [--secure-store-lib=<PATH_TO_JAR>] [--dev] [--skip-all-downloads] [--skip-download=<LIBRARY_NAME>] [--reindex-threads=<N>]
Creates a new Gerrit server installation, interactively prompting
for some basic setup prior to writing default configuration files
into a newly created
If run in an existing
$site_path, init upgrades existing resources
(e.g. NoteDb schema, plugins) as necessary.
Run in batch mode, skipping interactive prompts. For a fresh install, reasonable configuration defaults are chosen based on the whims of the Gerrit developers. On upgrades, the existing settings in
Force deletion of all persistent cache files. Note that re-creation of these caches may be expensive.
Don’t automatically start the daemon after initializing a newly created site path. This permits the administrator to inspect and modify the configuration before the daemon is started.
Location of the
gerrit.configfile, and all other per-site configuration data, supporting libraries and log files.
Entirely skip installation and initialization of plugins. This option is needed when initializing a gerrit site without an archive. That happens when running gerrit acceptance or integration tests in a debugger, using classes. Supplying this option leads to ignoring the
--install-all-pluginsoptions, if supplied as well.
Print names of plugins that can be installed during init process.
Automatically install all plugins from gerrit.war without asking. This option also works in batch mode. This option cannot be supplied alongside
Automatically install plugin with given name without asking. This option also works in batch mode. This option may be supplied more than once to install multiple plugins. This option cannot be supplied alongside
Install in developer mode. Default configuration settings are chosen to run the Gerrit server as a developer.
Do not automatically download and install required libraries. The administrator must manually install the required libraries in the
Do not automatically download and install the library with the given name. The administrator must manually install the required library in the
Show cache statistics at the end of program.
Number of threads to use for reindex after init. Defaults to 1. Can be set to -1 to skip reindex after init. Skipping reindex will also not automatically start the daemon.
This command can only be run on a server which has direct local access to the managed Git repositories.
Part of Gerrit Code Review