blob: 93d2a52ddfca7c6c320a81647a3d4af13a18f6e5 [file] [log] [blame]
Marian Harbachebeb1542019-12-13 10:42:46 +01001:linkattrs:
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002= Gerrit Code Review - Configuration
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08003
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08004== File `etc/gerrit.config`
Shawn O. Pearce51967cd2009-05-08 19:46:57 -07005
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08006The optional file `'$site_path'/etc/gerrit.config` is a Git-style
7config file that controls many host specific settings for Gerrit.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -07008
9[NOTE]
Shawn O. Pearcec5fed822009-11-17 16:10:10 -080010The contents of the `etc/gerrit.config` file are cached at startup
Sven Selberg2a0beab2018-04-20 14:49:20 +020011by Gerrit. For most properties, if they are modified in this file, Gerrit
12needs to be restarted before it will use the new values. Some properties
David Pursehousec5286212019-10-21 20:50:17 +090013support being link:#reloadConfig[`reloaded`] without restart.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -070014
Shawn O. Pearcec5fed822009-11-17 16:10:10 -080015Sample `etc/gerrit.config`:
Shawn O. Pearce51967cd2009-05-08 19:46:57 -070016----
17[core]
Shawn O. Pearce9d342a42009-12-16 15:49:05 -080018 packedGitLimit = 200 m
Shawn O. Pearce51967cd2009-05-08 19:46:57 -070019
20[cache]
David Pursehouse64df83a2017-07-04 21:20:47 +090021 directory = /var/cache/gerrit
Shawn O. Pearce51967cd2009-05-08 19:46:57 -070022----
23
Sven Selberg2a0beab2018-04-20 14:49:20 +020024[[reloadConfig]]
25=== Reload `etc/gerrit.config`
26Some properties support being reloaded without restart when a `reload config`
27command is issued through link:cmd-reload-config.html[`SSH`] or the
28link:rest-api-config.html#reload-config[`REST API`]. If a property supports
29this it is specified in the documentation for the property below.
30
31
Hongkai Liu49799b22017-04-07 16:54:25 -040032[[accountPatchReviewDb]]
33=== Section accountPatchReviewDb
34
Gert van Dijk49c56132017-10-17 23:44:25 +020035The AccountPatchReviewDb is a database used to store the user file reviewed
David Pursehousee3eaf9e2019-02-01 10:41:20 +090036flags.
Gert van Dijk49c56132017-10-17 23:44:25 +020037
Hongkai Liu49799b22017-04-07 16:54:25 -040038[[accountPatchReviewDb.url]]accountPatchReviewDb.url::
39+
Paladox nonee3a9dd72017-04-26 12:45:56 +000040The url of accountPatchReviewDb. Supported types are `H2`, `POSTGRESQL`,
41`MARIADB`, and `MYSQL`. Drop the driver jar in the lib folder of the site path
42if the Jdbc driver of the corresponding Database is not yet in the class path.
Hongkai Liu49799b22017-04-07 16:54:25 -040043+
44Default is to create H2 database in the db folder of the site path.
45+
46Changing this parameter requires to migrate database using the
Hugo Arès3e1d4cd2017-04-26 12:02:53 +020047link:pgm-MigrateAccountPatchReviewDb.html[MigrateAccountPatchReviewDb] program.
48Migration cannot be done while the server is running.
Paladox none1a4c01f2017-04-29 18:19:37 +000049+
Dave Borowitzada289c2018-12-18 13:24:14 -080050Also note that the db_name has to be a new db and not reusing an old ReviewDb
51database from a former 2.x site, otherwise gerrit's init will remove the table.
Hongkai Liu49799b22017-04-07 16:54:25 -040052
53----
54[accountPatchReviewDb]
55 url = jdbc:postgresql://<host>:<port>/<db_name>?user=<user>&password=<password>
56----
57
Hector Oswaldo Caballero8dead962017-08-08 05:30:06 -040058[[accountPatchReviewDb.poolLimit]]accountPatchReviewDb.poolLimit::
59+
60Maximum number of open database connections. If the server needs
61more than this number, request processing threads will wait up
62to <<accountPatchReviewDb.poolMaxWait, poolMaxWait>> seconds for a
63connection to be released before they abort with an exception.
64This limit must be several units higher than the total number of
65httpd and sshd threads as some request processing code paths may
66need multiple connections.
67+
68Default is <<sshd.threads, sshd.threads>>
69 + <<httpd.maxThreads, httpd.maxThreads>> + 2.
70+
71
72[[accountPatchReviewDb.poolMinIdle]]database.poolMinIdle::
73+
74Minimum number of connections to keep idle in the pool.
75Default is 4.
76+
77
78[[accountPatchReviewDb.poolMaxIdle]]accountPatchReviewDb.poolMaxIdle::
79+
80Maximum number of connections to keep idle in the pool. If there
81are more idle connections, connections will be closed instead of
82being returned back to the pool.
83Default is min(<<accountPatchReviewDb.poolLimit, accountPatchReviewDb.poolLimit>>, 16).
84+
85
86[[accountPatchReviewDb.poolMaxWait]]accountPatchReviewDb.poolMaxWait::
87+
88Maximum amount of time a request processing thread will wait to
89acquire a database connection from the pool. If no connection is
90released within this time period, the processing thread will abort
91its current operations and return an error to the client.
92Values should use common unit suffixes to express their setting:
93+
94* ms, milliseconds
95* s, sec, second, seconds
96* m, min, minute, minutes
97* h, hr, hour, hours
98
99+
Hector Oswaldo Caballero8dead962017-08-08 05:30:06 -0400100If a unit suffix is not specified, `milliseconds` is assumed.
Hector Oswaldo Caballero8dead962017-08-08 05:30:06 -0400101Default is `30 seconds`.
102
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -0800103[[accounts]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800104=== Section accounts
Dave Borowitz45baa892012-02-23 16:43:05 -0800105
Matthias Sohnf3360662012-04-05 15:42:52 +0200106[[accounts.visibility]]accounts.visibility::
Dave Borowitz45baa892012-02-23 16:43:05 -0800107+
108Controls visibility of other users' dashboard pages and
109completion suggestions to web users.
110+
111If `ALL`, all users are visible to all other users, even
112anonymous users.
113+
114If `SAME_GROUP`, only users who are also members of a group the
115current user is a member of are visible.
116+
117If `VISIBLE_GROUP`, only users who are members of at least one group
118that is visible to the current user are visible.
119+
120If `NONE`, no users other than the current user are visible.
121+
122Default is `ALL`.
123
Ben Rohlfs99f16a12020-02-11 19:44:17 +0100124[[accounts.defaultDisplayName]]accounts.defaultDisplayName::
125+
126If a user account does not have a display name set, which is the normal
127case, then this configuration value chooses the strategy how to choose
128the display name. Note that this strategy is not applied by the backend.
129If the AccountInfo has the display name unset, then the client has to
130apply this strategy.
131+
132If `FULL_NAME`, then the (full) name of the user is chosen from
133link:rest-api-accounts.html#account-info[AccountInfo].
134+
135If `FIRST_NAME`, then the first word (i.e. everything until first
136whitespace character) of the (full) name of the user is chosen from
137link:rest-api-accounts.html#account-info[AccountInfo].
138+
139If `USERNAME`, then the username of the user is chosen from
140link:rest-api-accounts.html#account-info[AccountInfo]. If that is not
141set, then the (full) name will be used.
142+
143Default is `FULL_NAME`.
144
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -0800145[[addreviewer]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800146=== Section addreviewer
Edwin Kempin49cb3e12011-06-29 14:35:14 +0200147
148[[addreviewer.maxWithoutConfirmation]]addreviewer.maxWithoutConfirmation::
149+
150The maximum number of reviewers a user can add at once by adding a
151group as reviewer without being asked to confirm the operation.
152+
153If set to 0, the user will never be asked to confirm adding a group
154as reviewer.
155+
156Default is 10.
Edwin Kempin5e65d9b2011-07-08 07:35:48 +0200157+
David Pursehousea1d633b2014-05-02 17:21:02 +0900158This setting only applies for adding reviewers in the Gerrit Web UI,
Edwin Kempin5e65d9b2011-07-08 07:35:48 +0200159but is ignored when adding reviewers with the
Edwin Kempin33e92d02011-07-11 22:00:57 +0200160link:cmd-set-reviewers.html[set-reviewers] command.
Gustaf Lundh25e608f2018-04-16 10:54:53 +0200161+
Sven Selberg2a0beab2018-04-20 14:49:20 +0200162This value supports link:#reloadConfig[configuration reloads].
Edwin Kempin49cb3e12011-06-29 14:35:14 +0200163
164[[addreviewer.maxAllowed]]addreviewer.maxAllowed::
165+
166The maximum number of reviewers a user can add at once by adding a
167group as reviewer.
168+
169If set to 0, there is no limit for the number of reviewers that can
170be added at once by adding a group as reviewer.
171+
172Default is 20.
Gustaf Lundh25e608f2018-04-16 10:54:53 +0200173+
Sven Selberg2a0beab2018-04-20 14:49:20 +0200174This value supports link:#reloadConfig[configuration reloads].
Edwin Kempin49cb3e12011-06-29 14:35:14 +0200175
Patrick Hiesel87880b02016-05-03 18:15:08 +0200176[[addReviewer.baseWeight]]addReviewer.baseWeight::
177+
178The weight that will be applied in the default reviewer ranking algorithm.
179This can be increased or decreased to give more or less influence to plugins.
180If set to zero, the base ranking will not have any effect. Reviewers will then
181be ordered as ranked by the plugins (if there are any).
182+
183By default 1.
184
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -0800185[[auth]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800186=== Section auth
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700187
188See also link:config-sso.html[SSO configuration].
189
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700190[[auth.type]]auth.type::
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700191+
Shawn O. Pearce2920ef32009-08-03 08:03:34 -0700192Type of user authentication employed by Gerrit. The supported
193values are:
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700194+
195* `OpenID`
196+
197The default setting. Gerrit uses any valid OpenID
198provider chosen by the end-user. For more information see
Marian Harbach34253372019-12-10 18:01:31 +0100199http://openid.net/[openid.net,role=external,window=_blank].
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700200+
James E. Blairca8bc3b2011-12-21 18:12:26 +0000201* `OpenID_SSO`
202+
203Supports OpenID from a single provider. There is no registration
204link, and the "Sign In" link sends the user directly to the provider's
205SSO entry point.
206+
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700207* `HTTP`
208+
Shawn O. Pearce2920ef32009-08-03 08:03:34 -0700209Gerrit relies upon data presented in the HTTP request. This includes
Edwin Kempinf1acbb82011-09-15 12:49:42 +0200210HTTP basic authentication, or some types of commercial single-sign-on
Shawn O. Pearce2920ef32009-08-03 08:03:34 -0700211solutions. With this setting enabled the authentication must
212take place in the web server or servlet container, and not from
213within Gerrit.
214+
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -0700215* `HTTP_LDAP`
216+
217Exactly like `HTTP` (above), but additionally Gerrit pre-populates
218a user's full name and email address based on information obtained
219from the user's account object in LDAP. The user's group membership
220is also pulled from LDAP, making any LDAP groups that a user is a
David Pursehouseef92bec2017-08-25 18:45:02 +0900221member of available as groups in Gerrit. Hence the `_LDAP` suffix in
222the name of this authentication type. Gerrit does NOT authenticate
223the user via LDAP.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -0700224+
Sasa Zivkoveabc8972010-10-04 15:47:08 +0200225* `CLIENT_SSL_CERT_LDAP`
226+
227This authentication type is actually kind of SSO. Gerrit will configure
David Pursehouse221d4f62012-06-08 17:38:08 +0900228Jetty's SSL channel to request the client's SSL certificate. For this
Sasa Zivkoveabc8972010-10-04 15:47:08 +0200229authentication to work a Gerrit administrator has to import the root
230certificate of the trust chain used to issue the client's certificate
231into the <review-site>/etc/keystore.
232After the authentication is done Gerrit will obtain basic user
233registration (name and email) from LDAP, and some group memberships.
David Pursehouseef92bec2017-08-25 18:45:02 +0900234Hence the `_LDAP` suffix in the name of this authentication type.
235Gerrit does NOT authenticate the user via LDAP.
Sasa Zivkoveabc8972010-10-04 15:47:08 +0200236This authentication type can only be used under hosted daemon mode, and
237the httpd.listenUrl must use https:// as the protocol.
Chulho Yangb72ff8f2013-07-04 02:35:53 -0400238Optionally, certificate revocation list file can be used
239at <review-site>/etc/crl.pem. For details, see httpd.sslCrl.
Sasa Zivkoveabc8972010-10-04 15:47:08 +0200240+
Shawn O. Pearcef7e065e2009-09-26 20:01:10 -0700241* `LDAP`
242+
243Gerrit prompts the user to enter a username and a password, which
244it then verifies by performing a simple bind against the configured
245<<ldap.server,ldap.server>>. In this configuration the web server
246is not involved in the user authentication process.
247+
Shawn O. Pearcec892d342010-02-17 17:00:50 -0800248The actual username used in the LDAP simple bind request is the
249account's full DN, which is discovered by first querying the
250directory using either an anonymous request, or the configured
Robin Rosenberga3baed02012-10-14 14:09:32 +0200251<<ldap.username,ldap.username>> identity. Gerrit can also use kerberos if
252<<ldap.authentication,ldap.authentication>> is set to `GSSAPI`.
Han-Wen Nienhuys84d830b2017-02-15 16:36:04 +0100253+
254If link:#auth.gitBasicAuthPolicy[`auth.gitBasicAuthPolicy`] is set to `HTTP`,
255the randomly generated HTTP password is used for authentication. On the other hand,
256if link:#auth.gitBasicAuthPolicy[`auth.gitBasicAuthPolicy`] is set to `HTTP_LDAP`,
257the password in the request is first checked against the HTTP password and, if
258it does not match, it is then validated against the LDAP password.
259Service users that only exist in the Gerrit database are authenticated by their
260HTTP passwords.
Shawn O. Pearcec892d342010-02-17 17:00:50 -0800261
262* `LDAP_BIND`
263+
264Gerrit prompts the user to enter a username and a password, which
265it then verifies by performing a simple bind against the configured
266<<ldap.server,ldap.server>>. In this configuration the web server
267is not involved in the user authentication process.
268+
David Pursehouse42f42042013-08-01 14:02:25 +0900269Unlike `LDAP` above, the username used to perform the LDAP simple bind
David Pursehouse1344f5b2013-08-09 17:35:47 +0900270request is the exact string supplied in the dialog by the user.
Robin Rosenberg524a3032012-10-14 14:24:36 +0200271The configured <<ldap.username,ldap.username>> identity is not used to obtain
Shawn O. Pearcec892d342010-02-17 17:00:50 -0800272account information.
273+
Michael Ochmanne9e046a2015-10-20 15:34:29 +0200274* `OAUTH`
David Ostrovskye9707d82015-02-22 01:14:02 +0100275+
276OAuth is a protocol that lets external apps request authorization to private
277details in a user's account without getting their password. This is
278preferred over Basic Authentication because tokens can be limited to specific
279types of data, and can be revoked by users at any time.
280+
281Site owners have to register their application before getting started. Note
282that provider specific plugins must be used with this authentication scheme.
283+
Han-Wen Nienhuys84d830b2017-02-15 16:36:04 +0100284Git clients may send OAuth 2 access tokens instead of passwords in the Basic
285authentication header. Note that provider specific plugins must be installed to
286facilitate this authentication scheme. If multiple OAuth 2 provider plugins are
287installed one of them must be selected as default with the
288`auth.gitOAuthProvider` option.
289+
Shawn O. Pearce2920ef32009-08-03 08:03:34 -0700290* `DEVELOPMENT_BECOME_ANY_ACCOUNT`
291+
292*DO NOT USE*. Only for use in a development environment.
293+
294When this is the configured authentication method a hyperlink titled
295`Become` appears in the top right corner of the page, taking the
296user to a form where they can enter the username of any existing
297user account, and immediately login as that account, without any
David Ostrovsky7163dac2017-07-29 06:49:38 +0200298authentication taking place.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700299
300+
301By default, OpenID.
302
Shawn O. Pearce533cafc2010-05-11 16:05:27 -0700303[[auth.allowedOpenID]]auth.allowedOpenID::
304+
305List of permitted OpenID providers. A user may only authenticate
306with an OpenID that matches this list. Only used if `auth.type`
David Pursehouse42f42042013-08-01 14:02:25 +0900307is set to `OpenID` (the default).
Shawn O. Pearce533cafc2010-05-11 16:05:27 -0700308+
Magnus Bäcke5611832011-02-02 08:57:15 +0100309Patterns may be either a
310link:http://download.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html[standard
Marian Harbach34253372019-12-10 18:01:31 +0100311Java regular expression (java.util.regex),role=external,window=_blank] (start with `^` and
Shawn O. Pearce533cafc2010-05-11 16:05:27 -0700312end with `$`) or be a simple prefix (any other string).
313+
314By default, the list contains two values, `http://` and `https://`,
315allowing users to authenticate with any OpenID provider.
316
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700317[[auth.trustedOpenID]]auth.trustedOpenID::
Shawn O. Pearced7c026d2009-08-05 20:11:22 -0700318+
David Pursehouse221d4f62012-06-08 17:38:08 +0900319List of trusted OpenID providers. Only used if `auth.type` is
David Pursehouse42f42042013-08-01 14:02:25 +0900320set to `OpenID` (the default).
Shawn O. Pearced7c026d2009-08-05 20:11:22 -0700321+
322In order for a user to take advantage of permissions beyond those
323granted to the `Anonymous Users` and `Registered Users` groups,
324the user account must only have OpenIDs which match at least one
325pattern from this list.
326+
Magnus Bäcke5611832011-02-02 08:57:15 +0100327Patterns may be either a
328link:http://download.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html[standard
Marian Harbach34253372019-12-10 18:01:31 +0100329Java regular expression (java.util.regex),role=external,window=_blank] (start with `^` and
Shawn O. Pearced7c026d2009-08-05 20:11:22 -0700330end with `$`) or be a simple prefix (any other string).
331+
332By default, the list contains two values, `http://` and `https://`,
333allowing Gerrit to trust any OpenID it receives.
334
Mike Goulined2ab0cd2012-12-18 11:20:53 +1100335[[auth.openIdDomain]]auth.openIdDomain::
336+
337List of allowed OpenID email address domains. Only used if
David Pursehouse42f42042013-08-01 14:02:25 +0900338`auth.type` is set to `OPENID` or `OPENID_SSO`.
Mike Goulined2ab0cd2012-12-18 11:20:53 +1100339+
340Domain is case insensitive and must be in the same form as it
341appears in the email address, for example, "example.com".
342+
343By default, any domain is accepted.
344
Shawn O. Pearce89030bc2010-04-24 17:25:29 -0700345[[auth.maxOpenIdSessionAge]]auth.maxOpenIdSessionAge::
346+
347Time in seconds before an OpenID provider must force the user
348to authenticate themselves again before authentication to this
349Gerrit server. Currently this is only a polite request, and users
350coming from providers that don't support the PAPE extension will
351be accepted anyway. In the future it may be enforced, rejecting
352users coming from providers that don't honor the max session age.
353+
354If set to 0, the provider will always force the user to authenticate
355(e.g. supply their password). Values should use common unit suffixes
356to express their setting:
357+
358* s, sec, second, seconds
359* m, min, minute, minutes
360* h, hr, hour, hours
361* d, day, days
362* w, week, weeks (`1 week` is treated as `7 days`)
363* mon, month, months (`1 month` is treated as `30 days`)
364* y, year, years (`1 year` is treated as `365 days`)
365
366+
367Default is -1, permitting infinite time between authentications.
368
David Pursehouse5be35a32015-09-09 17:35:32 +0900369[[auth.registerEmailPrivateKey]]auth.registerEmailPrivateKey::
370+
371Private key to use when generating an email verification token.
372+
373If not set, a random key is generated when running the
374link:pgm-init.html[site initialization].
375
Shawn O. Pearce34f38cf2011-06-16 19:18:54 -0700376[[auth.maxRegisterEmailTokenAge]]auth.maxRegisterEmailTokenAge::
377+
378Time in seconds before an email verification token sent to a user in
379order to validate their email address expires.
380+
381* s, sec, second, seconds
382* m, min, minute, minutes
383* h, hr, hour, hours
384* d, day, days
385* w, week, weeks (`1 week` is treated as `7 days`)
386* mon, month, months (`1 month` is treated as `30 days`)
387* y, year, years (`1 year` is treated as `365 days`)
388
389+
Shawn O. Pearced6bd00b2012-01-20 12:40:51 -0800390Default is 12 hours.
Shawn O. Pearce34f38cf2011-06-16 19:18:54 -0700391
James E. Blairca8bc3b2011-12-21 18:12:26 +0000392[[auth.openIdSsoUrl]]auth.openIdSsoUrl::
393+
David Pursehouse42f42042013-08-01 14:02:25 +0900394The SSO entry point URL. Only used if `auth.type` is set to
395`OpenID_SSO`.
James E. Blairca8bc3b2011-12-21 18:12:26 +0000396+
397The "Sign In" link will send users directly to this URL.
398
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700399[[auth.httpHeader]]auth.httpHeader::
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700400+
401HTTP header to trust the username from, or unset to select HTTP basic
Han-Wen Nienhuys84d830b2017-02-15 16:36:04 +0100402authentication. Only used if `auth.type` is set to `HTTP`.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700403
Luca Milanesio384ed6c2013-07-30 09:10:07 +0100404[[auth.httpDisplaynameHeader]]auth.httpDisplaynameHeader::
405+
406HTTP header to retrieve the user's display name from. Only used if `auth.type`
407is set to `HTTP`.
408+
409If set, Gerrit trusts and enforces the user's full name using the HTTP header
410and disables the ability to manually modify the user's full name
411from the contact information page.
412
413[[auth.httpEmailHeader]]auth.httpEmailHeader::
414+
415HTTP header to retrieve the user's e-mail from. Only used if `auth.type`
416is set to `HTTP`.
417+
418If set, Gerrit trusts and enforces the user's e-mail using the HTTP header
419and disables the ability to manually modify or register other e-mails
420from the contact information page.
421
Luca Milanesio97d07352014-07-17 08:31:06 +0100422[[auth.httpExternalIdHeader]]auth.httpExternalIdHeader::
423+
424HTTP header to retrieve the user's external identification token.
425Only used if `auth.type` is set to `HTTP`.
426+
427If set, Gerrit adds the value contained in the HTTP header to the
428user's identity. Typical use is with a federated identity token from
429an external system (e.g. GitHub OAuth 2.0 authentication) where
430the user's auth token exchanged during authentication handshake
431needs to be used for authenticated communication to the external
432system later on.
433+
434Example: `auth.httpExternalIdHeader: X-GitHub-OTP`
435
Luca Milanesio5185b042013-07-27 22:03:06 +0100436[[auth.loginUrl]]auth.loginUrl::
437+
438URL to redirect a browser to after the end-user has clicked on the
David Pursehouse42f42042013-08-01 14:02:25 +0900439login link in the upper right corner. Only used if `auth.type` is set
440to `HTTP` or `HTTP_LDAP`.
Luca Milanesio5185b042013-07-27 22:03:06 +0100441Organizations using an enterprise single-sign-on solution may want to
442redirect the browser to the SSO product's sign-in page for completing the
443login process and validate their credentials.
444+
David Pursehouse42f42042013-08-01 14:02:25 +0900445If set, Gerrit allows anonymous access until the end-user performs the login
446and provides a trusted identity through the HTTP header.
Luca Milanesio5185b042013-07-27 22:03:06 +0100447If not set, Gerrit requires the HTTP header with a trusted identity
David Pursehouse42f42042013-08-01 14:02:25 +0900448and returns the error page 'LoginRedirect.html' if such a header is not
449present.
Luca Milanesio5185b042013-07-27 22:03:06 +0100450
451[[auth.loginText]]auth.loginText::
452+
David Pursehouse42f42042013-08-01 14:02:25 +0900453Text displayed in the loginUrl link. Only used if `auth.loginUrl` is set.
Luca Milanesio5185b042013-07-27 22:03:06 +0100454+
David Pursehouse42f42042013-08-01 14:02:25 +0900455If not set, the "Sign In" text is used.
Luca Milanesio5185b042013-07-27 22:03:06 +0100456
Luca Milanesio111e0b72013-08-15 18:56:42 +0100457[[auth.registerPageUrl]]auth.registerPageUrl::
458+
David Pursehouse268744b2013-08-17 15:32:11 +0900459URL of the registration page to use when a new user logs in to Gerrit for
460the first time. Used only when `auth.type` is set to `HTTP`.
Luca Milanesio111e0b72013-08-15 18:56:42 +0100461+
462If not set, the standard Gerrit registration page `/#/register/` is displayed.
463
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700464[[auth.logoutUrl]]auth.logoutUrl::
Shawn O. Pearce12b5d842009-08-15 15:11:10 -0700465+
466URL to redirect a browser to after the end-user has clicked on the
467"Sign Out" link in the upper right corner. Organizations using an
468enterprise single-sign-on solution may want to redirect the browser
469to the SSO product's sign-out page.
470+
471If not set, the redirect returns to the list of all open changes.
472
Shawn O. Pearcec9d26b52009-12-16 08:05:27 -0800473[[auth.registerUrl]]auth.registerUrl::
474+
475Target for the "Register" link in the upper right corner. Used only
Edwin Kempin54093152015-05-08 10:50:35 +0200476when `auth.type` is `LDAP`, `LDAP_BIND` or `CUSTOM_EXTENSION`.
Shawn O. Pearcec9d26b52009-12-16 08:05:27 -0800477+
478If not set, no "Register" link is displayed.
479
Chad Horohoe65897082012-11-10 10:26:25 -0800480[[auth.registerText]]auth.registerText::
481+
482Text for the "Register" link in the upper right corner. Used only
Edwin Kempin54093152015-05-08 10:50:35 +0200483when `auth.type` is `LDAP`, `LDAP_BIND` or `CUSTOM_EXTENSION`.
Chad Horohoe65897082012-11-10 10:26:25 -0800484+
485If not set, defaults to "Register".
486
David Pursehouse3d604492013-01-25 17:41:53 +0900487[[auth.editFullNameUrl]]auth.editFullNameUrl::
488+
489Target for the "Edit" button when the user is allowed to edit their
Edwin Kempin54093152015-05-08 10:50:35 +0200490full name. Used only when `auth.type` is `LDAP`, `LDAP_BIND` or
491`CUSTOM_EXTENSION`.
David Pursehouse3d604492013-01-25 17:41:53 +0900492
493[[auth.httpPasswordUrl]]auth.httpPasswordUrl::
494+
David Pursehouse42f42042013-08-01 14:02:25 +0900495Target for the "Obtain Password" link. Used only when `auth.type` is
Edwin Kempin54093152015-05-08 10:50:35 +0200496`CUSTOM_EXTENSION`.
Shawn Pearcee0cafe42013-08-29 23:28:13 -0700497
498[[auth.switchAccountUrl]]auth.switchAccountUrl::
David Pursehouse3d604492013-01-25 17:41:53 +0900499+
Shawn Pearcee0cafe42013-08-29 23:28:13 -0700500URL to switch user identities and login as a different account than
501the currently active account. This is disabled by default except when
502`auth.type` is `OPENID` and `DEVELOPMENT_BECOME_ANY_ACCOUNT`. If set
503the "Switch Account" link is displayed next to "Sign Out".
504+
505When `auth.type` does not normally enable this URL administrators may
Logan Hanks71d1ffd2017-03-16 14:12:23 -0700506set this to `login/`, allowing users to begin a new web session. This value
Ben Rohlfsda0a62b2021-04-26 17:02:19 +0200507is used as an href in the Gerrit web app, so absolute URLs like
Logan Hanks71d1ffd2017-03-16 14:12:23 -0700508`https://someotherhost/login` work as well.
509+
Ben Rohlfsda0a62b2021-04-26 17:02:19 +0200510If a ${path} parameter is included, then the Gerrit web app will substitute the
Logan Hanks71d1ffd2017-03-16 14:12:23 -0700511currently viewed path in the link. Be aware that this path will include
512a leading slash, so a value like this might be appropriate: `/login${path}`.
David Pursehouse3d604492013-01-25 17:41:53 +0900513
Piotr Sikora7cec2f82011-02-26 12:57:30 +0000514[[auth.cookiePath]]auth.cookiePath::
515+
516Sets "path" attribute of the authentication cookie.
517+
518If not set, HTTP request's path is used.
519
Sammy Gillespie26873c02016-02-11 14:39:43 +0000520[[auth.cookieDomain]]auth.cookieDomain::
521+
522Sets "domain" attribute of the authentication cookie.
523+
524If not set, HTTP request's domain is used.
525
Piotr Sikora7cec2f82011-02-26 12:57:30 +0000526[[auth.cookieSecure]]auth.cookieSecure::
527+
528Sets "secure" flag of the authentication cookie. If true, cookies
529will be transmitted only over HTTPS protocol.
530+
531By default, false.
532
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700533[[auth.emailFormat]]auth.emailFormat::
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700534+
535Optional format string to construct user email addresses out of
David Pursehouse42f42042013-08-01 14:02:25 +0900536user login names. Only used if `auth.type` is `HTTP`, `HTTP_LDAP`
Shawn O. Pearcef7e065e2009-09-26 20:01:10 -0700537or `LDAP`.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700538+
Shawn O. Pearce44221bf2011-06-27 10:37:30 -0700539This value can be set to a format string, where `{0}` is replaced
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700540with the login name. E.g. "\{0\}+gerrit@example.com" with a user
541login name of "foo" will produce "foo+gerrit@example.com" during
542the first time user "foo" registers.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -0700543+
Shawn O. Pearcef7e065e2009-09-26 20:01:10 -0700544If the site is using `HTTP_LDAP` or `LDAP`, using this option is
545discouraged. Setting `ldap.accountEmailAddress` and importing the
546email address from the LDAP directory is generally preferred.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700547
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700548[[auth.contributorAgreements]]auth.contributorAgreements::
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700549+
550Controls whether or not the contributor agreement features are
551enabled for the Gerrit site. If enabled a user must complete a
552contributor agreement before they can upload changes.
553+
Marc Petit-Hugueninbbb85492012-12-03 11:11:00 -0800554If enabled, the admin must also add one or more
555link:config-cla.html[contributor-agreement sections]
556in project.config and create agreement files under
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700557`'$site_path'/static`, so users can actually complete one or
Grzegorz Kossakowski28e4e1b2009-09-23 11:33:34 -0700558more agreements.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700559+
560By default this is false (no agreements are used).
Fredrik Luthandera3cf3542012-07-04 16:55:35 -0700561+
562To enable the actual usage of contributor agreement the project
563specific config option in the `project.config` must be set:
564link:config-project-config.html[receive.requireContributorAgreement].
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700565
Christian Halstricka3d88a52011-08-31 09:21:41 +0200566[[auth.trustContainerAuth]]auth.trustContainerAuth::
567+
568If true then it is the responsibility of the container hosting
569Gerrit to authenticate users. In this case Gerrit will blindly trust
570the container.
571+
572This parameter only affects git over http traffic. If set to false
Han-Wen Nienhuys84d830b2017-02-15 16:36:04 +0100573then Gerrit will do the authentication (using Basic authentication).
Christian Halstricka3d88a52011-08-31 09:21:41 +0200574+
575By default this is set to false.
576
Luca Milanesio42058842012-01-05 21:25:38 +0000577
Hector Oswaldo Caballero2a9ad1f2016-09-15 18:24:42 -0400578[[auth.gitBasicAuthPolicy]]auth.gitBasicAuthPolicy::
579+
David Pursehousef7a1c2a2017-08-25 19:12:54 +0900580When `auth.type` is `LDAP`, `LDAP_BIND` or `OAUTH`, it allows using either the generated
Luca Milanesio51edcb72017-03-06 11:59:55 +0000581HTTP password, the LDAP or OAUTH password, or a combination of HTTP and LDAP
582authentication, to authenticate Git over HTTP and REST API requests.
583The supported values are:
Hector Oswaldo Caballero2a9ad1f2016-09-15 18:24:42 -0400584+
585*`HTTP`
586+
David Pursehousee2920032017-08-25 19:12:21 +0900587Only the HTTP password is accepted when doing Git over HTTP and REST API requests.
Hector Oswaldo Caballero2a9ad1f2016-09-15 18:24:42 -0400588+
589*`LDAP`
590+
591Only the `LDAP` password is allowed when doing Git over HTTP and REST API
592requests.
593+
Luca Milanesio51edcb72017-03-06 11:59:55 +0000594*`OAUTH`
595+
David Pursehousee2920032017-08-25 19:12:21 +0900596Only the `OAUTH` authentication is allowed when doing Git over HTTP and REST API
Luca Milanesio51edcb72017-03-06 11:59:55 +0000597requests.
598+
Hector Oswaldo Caballero2a9ad1f2016-09-15 18:24:42 -0400599*`HTTP_LDAP`
600+
601The password in the request is first checked against the HTTP password and, if
602it does not match, it is then validated against the `LDAP` password.
603+
Luca Milanesio51edcb72017-03-06 11:59:55 +0000604By default this is set to `LDAP` when link:#auth.type[`auth.type`] is `LDAP`
605and `OAUTH` when link:#auth.type[`auth.type`] is `OAUTH`.
Hector Oswaldo Caballero2a9ad1f2016-09-15 18:24:42 -0400606Otherwise, the default value is `HTTP`.
Luca Milanesio1a918712021-05-06 20:20:48 +0100607+
608When gitBasicAuthPolicy is set to `LDAP` or `HTTP_LDAP` and the user
609is authenticating with the LDAP username/password, the Git client config
610needs to have `http.cookieFile` set to a local file, otherwise every
611single call would trigger a full LDAP authentication and groups resolution
612which could introduce a noticeable latency on the overall execution
613and produce unwanted load to the LDAP server.
614+
Michael Ochmanne9e046a2015-10-20 15:34:29 +0200615[[auth.gitOAuthProvider]]auth.gitOAuthProvider::
616+
617Selects the OAuth 2 provider to authenticate git over HTTP traffic with.
618+
619In general there is no way to determine from an access token alone, which
620OAuth 2 provider to address to verify that token, and the BasicAuth
621scheme does not support amending such details. If multiple OAuth provider
622plugins in a system offer support for git over HTTP authentication site
623administrators must configure, which one to use as default provider.
624In case the provider cannot be determined from a request the access token
625will be sent to the default provider for verification.
626+
627The value of this parameter must be the identifier of an OAuth 2 provider
628in the form `plugin-name:provider-name`. Consult the respective plugin
629documentation for details.
630
Edwin Kempin4b9e5e72011-09-22 15:06:14 +0200631[[auth.userNameToLowerCase]]auth.userNameToLowerCase::
632+
633If set the username that is received to authenticate a git operation
634is converted to lower case for looking up the user account in Gerrit.
635+
636By setting this parameter a case insensitive authentication for the
637git operations can be achieved, if it is ensured that the usernames in
638Gerrit (scheme `username`) are stored in lower case (e.g. if the
639parameter link:#ldap.accountSshUserName[ldap.accountSshUserName] is
640set to `${sAMAccountName.toLowerCase}`). It is important that for all
641existing accounts this username is already in lower case. It is not
642possible to convert the usernames of the existing accounts to lower
643case because this would break the access to existing per-user
Thomas Draebing85510402021-03-15 08:03:00 +0100644branches and Gerrit provides no tool to do such a conversion. Accounts
645created using the REST API or the `create-account` SSH command will
646be created with all lowercase characters, when this option is set.
Edwin Kempine7ae45c2018-09-20 09:57:15 +0200647+
648Setting this parameter to `true` will prevent all users from login that
649have a non-lower-case username.
Edwin Kempin4b9e5e72011-09-22 15:06:14 +0200650+
651This parameter only affects git over http and git over SSH traffic.
652+
653By default this is set to false.
654
Shawn Pearcea931fe12013-06-11 12:29:17 -0700655[[auth.enableRunAs]]auth.enableRunAs::
656+
657If true HTTP REST APIs will accept the `X-Gerrit-RunAs` HTTP request
658header from any users granted the link:access-control.html#capability_runAs[Run As]
659capability. The header and capability permit the authenticated user
660to impersonate another account.
661+
662If false the feature is disabled and cannot be re-enabled without
663editing gerrit.config and restarting the server.
664+
665Default is true.
666
David Pursehouse21bd07b2015-11-27 00:15:42 +0900667[[auth.allowRegisterNewEmail]]auth.allowRegisterNewEmail::
668+
669Whether users are allowed to register new email addresses.
670+
671In addition for the HTTP authentication type
672link:#auth.httpemailheader[auth.httpemailheader] must *not* be set to
673enable registration of new email addresses.
674+
675By default, true.
676
Owen Lic24f7242017-06-14 10:04:00 -0400677[[auth.autoUpdateAccountActiveStatus]]auth.autoUpdateAccountActiveStatus::
678+
679Whether to allow automatic synchronization of an account's inactive flag upon login.
680If set to true, upon login, if the authentication back-end reports the account as active,
681the account's inactive flag in the internal Gerrit database will be updated to be active.
682If the authentication back-end reports the account as inactive, the account's flag will be
683updated to be inactive and the login attempt will be blocked. Users enabling this feature
684should ensure that their authentication back-end is supported. Currently, only
685strict 'LDAP' authentication is supported.
686+
Owen Lie2877bb2017-07-14 09:11:20 -0400687In addition, if this parameter is not set, or false, the corresponding scheduled
688task to deactivate inactive Gerrit accounts will also be disabled. If this
689parameter is set to true, users should also consider configuring the
690link:#accountDeactivation[accountDeactivation] section appropriately.
691+
Owen Lic24f7242017-06-14 10:04:00 -0400692By default, false.
693
Patrick Hiesel8d0770e2018-10-09 13:39:54 +0200694[[auth.skipFullRefEvaluationIfAllRefsAreVisible]]auth.skipFullRefEvaluationIfAllRefsAreVisible::
695+
Edwin Kempin3e856b22020-11-04 14:45:21 +0100696Whether to skip the full ref visibility checks as a performance shortcut when a
697user has READ permission for all refs.
698+
699The full ref filtering would filter out refs for pending edits, private changes
700and auto merge commits.
Patrick Hiesel8d0770e2018-10-09 13:39:54 +0200701+
702By default, true.
703
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -0800704[[cache]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800705=== Section cache
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700706
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700707[[cache.directory]]cache.directory::
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700708+
709Path to a local directory where Gerrit can write cached entities for
Shawn O. Pearce4b212282009-08-05 19:45:56 -0700710future lookup. This local disk cache is used to retain potentially
711expensive to compute information across restarts. If the location
712does not exist, Gerrit will try to create it.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700713+
David Pursehousea61ee502016-09-06 16:27:09 +0900714Technically, cached entities are persisted as a set of H2 databases
Saša Živkove607d6c2016-02-24 10:46:46 +0000715inside this directory.
716+
Shawn O. Pearce4b212282009-08-05 19:45:56 -0700717If not absolute, the path is resolved relative to `$site_path`.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700718+
Shawn O. Pearce4b212282009-08-05 19:45:56 -0700719Default is unset, no disk cache.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700720
Thomas Draebinge5dcc602020-04-20 15:40:54 +0200721[[cache.enableDiskStatMetrics]]cache.enableDiskStatMetrics::
722+
723Whether to enable the computation of disk statistics of persistent caches.
724This computation is expensive and requires a long time on larger installations.
725+
726By default, false.
727
Saša Živkovf3134572016-02-09 11:42:46 +0100728[[cache.h2CacheSize]]cache.h2CacheSize::
729+
Björn Pedersen64af3ad2016-05-20 10:21:07 +0200730The size of the in-memory cache for each opened H2 cache database, in bytes.
Saša Živkove607d6c2016-02-24 10:46:46 +0000731+
Björn Pedersen64af3ad2016-05-20 10:21:07 +0200732Some caches of Gerrit are persistent and are backed by an H2 database.
Saša Živkove607d6c2016-02-24 10:46:46 +0000733H2 uses memory to cache its database content. The parameter `h2CacheSize`
734allows to limit the memory used by H2 and thus prevent out-of-memory
Saša Živkovf3134572016-02-09 11:42:46 +0100735caused by the H2 database using too much memory.
736+
Dave Borowitz3d1f85c2018-11-16 15:36:04 -0800737Technically the H2 cache size is configured using the CACHE_SIZE parameter in
738the H2 JDBC connection URL, as described
Marian Harbach34253372019-12-10 18:01:31 +0100739link:http://www.h2database.com/html/features.html#cache_settings[here,role=external,window=_blank]
Saša Živkovf3134572016-02-09 11:42:46 +0100740+
Björn Pedersen64af3ad2016-05-20 10:21:07 +0200741Default is unset, using up to half of the available memory.
David Pursehousee6976dc2017-06-30 16:33:44 +0900742+
Björn Pedersen64af3ad2016-05-20 10:21:07 +0200743H2 will persist this value in the database, so to unset explicitly specify 0.
Saša Živkovf3134572016-02-09 11:42:46 +0100744+
745Common unit suffixes of 'k', 'm', or 'g' are supported.
746
Björn Pedersen64af3ad2016-05-20 10:21:07 +0200747[[cache.h2AutoServer]]cache.h2AutoServer::
748+
749If set to true, enable H2 autoserver mode for the H2-backed persistent cache
750databases.
751+
Marian Harbach34253372019-12-10 18:01:31 +0100752See link:http://www.h2database.com/html/features.html#auto_mixed_mode[here,role=external,window=_blank]
Björn Pedersen64af3ad2016-05-20 10:21:07 +0200753for detail.
754+
755Default is false.
756
Antonio Barone09250812020-11-13 18:06:00 +0100757[[cache.openFiles]]cache.openFiles::
758+
759The number of file descriptors to add to the limit set by the Gerrit daemon.
760+
761Persistent caches are stored on the file system and as such participate in the
762file descriptors utilization. The number of file descriptors can vary depending
763on the cache configuration and the specific backend used.
764+
765The additional file descriptors required by the cache should be accounted for
766via this setting, so that the Gerrit daemon can adjust the ulimit accordingly.
767+
768If you increase this to a larger setting you may need to also adjust
769the ulimit on file descriptors for the host JVM, as Gerrit needs
770additional file descriptors available for network sockets and other
771repository data manipulation.
772+
773Default is 0.
774
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700775[[cache.name.maxAge]]cache.<name>.maxAge::
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700776+
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700777Maximum age to keep an entry in the cache. Entries are removed from
778the cache and refreshed from source data every maxAge interval.
Shawn O. Pearced9c403e2009-08-19 08:35:41 -0700779Values should use common unit suffixes to express their setting:
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700780+
Shawn O. Pearced9c403e2009-08-19 08:35:41 -0700781* s, sec, second, seconds
782* m, min, minute, minutes
783* h, hr, hour, hours
784* d, day, days
785* w, week, weeks (`1 week` is treated as `7 days`)
786* mon, month, months (`1 month` is treated as `30 days`)
787* y, year, years (`1 year` is treated as `365 days`)
788
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -0700789+
Edwin Kempina09ebcf2015-04-16 14:53:23 +0200790--
Edwin Kempinabcd5042013-03-12 16:04:37 +0100791If a unit suffix is not specified, `seconds` is assumed. If 0 is
Shawn O. Pearce3fdbf392009-09-04 18:08:26 -0700792supplied, the maximum age is infinite and items are never purged
793except when the cache is full.
Edwin Kempina09ebcf2015-04-16 14:53:23 +0200794
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700795Default is `0`, meaning store forever with no expire, except:
Edwin Kempina09ebcf2015-04-16 14:53:23 +0200796
Shawn O. Pearce05687e92011-04-04 17:29:03 -0400797* `"adv_bases"`: default is `10 minutes`
Shawn O. Pearced9c403e2009-08-19 08:35:41 -0700798* `"ldap_groups"`: default is `1 hour`
Shawn O. Pearced9c403e2009-08-19 08:35:41 -0700799* `"web_sessions"`: default is `12 hours`
Edwin Kempina09ebcf2015-04-16 14:53:23 +0200800--
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700801
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700802[[cache.name.memoryLimit]]cache.<name>.memoryLimit::
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700803+
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700804The total cost of entries to retain in memory. The cost computation
805varies by the cache. For most caches where the in-memory size of each
806entry is relatively the same, memoryLimit is currently defined to be
807the number of entries held by the cache (each entry costs 1).
808+
809For caches where the size of an entry can vary significantly between
810individual entries (notably `"diff"`, `"diff_intraline"`), memoryLimit
811is an approximation of the total number of bytes stored by the cache.
812Larger entries that represent bigger patch sets or longer source files
813will consume a bigger portion of the memoryLimit. For these caches the
814memoryLimit should be set to roughly the amount of RAM (in bytes) the
815administrator can dedicate to the cache.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700816+
Shawn O. Pearceefaf9792009-09-02 18:12:52 -0700817Default is 1024 for most caches, except:
818+
Shawn O. Pearce05687e92011-04-04 17:29:03 -0400819* `"adv_bases"`: default is `4096`
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700820* `"diff"`: default is `10m` (10 MiB of memory)
821* `"diff_intraline"`: default is `10m` (10 MiB of memory)
Dave Borowitz7388e9e2016-09-23 13:20:29 +0200822* `"diff_summary"`: default is `10m` (10 MiB of memory)
Dave Borowitz70dfbd62018-06-05 13:30:48 -0400823* `"external_ids_map"`: default is `2` and should not be changed
Edwin Kempind967ec42017-11-13 15:14:41 +0100824* `"groups"`: default is unlimited
825* `"groups_byname"`: default is unlimited
826* `"groups_byuuid"`: default is unlimited
Gal Paikinf74ee382021-03-22 16:00:25 +0100827* `"groups_byuuid_persisted"`: default is `1g` (1 GiB of disk space)
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700828* `"plugin_resources"`: default is 2m (2 MiB of memory)
829
830+
831If set to 0 the cache is disabled. Entries are removed immediately
832after being stored by the cache. This is primarily useful for testing.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700833
Dave Borowitz08bac5ca2018-06-05 14:58:28 -0400834[[cache.name.expireFromMemoryAfterAccess]]cache.<name>.expireFromMemoryAfterAccess::
835+
836Time after last access to automatically expire entries from an in-memory
837cache. If 0 or not specified, entries are never expired in this manner.
838Values may use unit suffixes as in link:#cache.name.maxAge[maxAge].
839+
840This option only applies to in-memory caches; persistent cache values are
841not expired in this manner, and are only pruned via
842link:#cache.name.diskLimit[diskLimit].
843
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700844[[cache.name.diskLimit]]cache.<name>.diskLimit::
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700845+
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700846Total size in bytes of the keys and values stored on disk. Caches that
847have grown bigger than this size are scanned daily at 1 AM local
848server time to trim the cache. Entries are removed in least recently
849accessed order until the cache fits within this limit. Caches may
850grow larger than this during the day, as the size check is only
851performed once every 24 hours.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700852+
Saša Živkove789f2e2016-09-22 10:37:34 +0200853Default is 128 MiB per cache, except:
854+
Dave Borowitzbab45862018-05-01 12:31:48 -0400855* `"change_notes"`: disk storage is disabled by default
Dave Borowitz7388e9e2016-09-23 13:20:29 +0200856* `"diff_summary"`: default is `1g` (1 GiB of disk space)
Dave Borowitzb20d23a82018-08-21 13:43:10 -0700857* `"external_ids_map"`: disk storage is disabled by default
Patrick Hieselc2c108c2020-07-23 09:54:22 +0200858* `"persisted_projects"`: default is `1g` (1 GiB of disk space)
Saša Živkove789f2e2016-09-22 10:37:34 +0200859
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700860+
Dave Borowitzdab51552018-05-14 16:35:37 -0700861If 0 or negative, disk storage for the cache is disabled.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700862
Patrick Hieseld70f37f2020-04-16 14:12:31 +0200863[[cache.name.expireAfterWrite]]cache.<name>.expireAfterWrite::
864+
865Duration after which a cached value will be evicted and not
866read anymore.
867+
868Values should use common unit suffixes to express their setting:
869+
870* ms, milliseconds
871* s, sec, second, seconds
872* m, min, minute, minutes
873* h, hr, hour, hours
874+
875Disabled by default.
876
877[[cache.name.refreshAfterWrite]]cache.<name>.refreshAfterWrite::
878+
879Duration after which we asynchronously refresh the cached value.
880+
881Values should use common unit suffixes to express their setting:
882+
883* ms, milliseconds
884* s, sec, second, seconds
885* m, min, minute, minutes
886* h, hr, hour, hours
887+
888This applies only to these caches that support refreshing:
889+
890* `"projects"`: Caching project information in-memory. Defaults to 15 minutes.
891
892[[cache.refreshThreadPoolSize]]cache.refreshThreadPoolSize::
893+
894Number of threads that are available to refresh cached values that became
895out of date. This applies only to these caches that support refreshing:
896+
897* `"projects"`: Caching project information in-memory
898+
899Refreshes will only be scheduled on this executor if the values are
900out of sync.
901The check if they are is cheap and always happens on the thread that
902inquires for a cached value.
903+
904Defaults to 2.
905
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800906==== [[cache_names]]Standard Caches
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700907
Shawn O. Pearce4a452712009-05-28 20:12:33 -0700908cache `"accounts"`::
909+
Shawn O. Pearce4dba9882009-08-05 19:55:15 -0700910Cache entries contain important details of an active user, including
Alice Kober-Sotzekeab33202017-09-27 13:54:30 +0200911their display name, preferences, and known email addresses. Entry
Dave Borowitzada289c2018-12-18 13:24:14 -0800912information is obtained from NoteDb data in the `All-Users` repo.
Shawn O. Pearce4dba9882009-08-05 19:55:15 -0700913
914+
Dave Borowitzada289c2018-12-18 13:24:14 -0800915If direct updates are made to `All-Users`, this cache should be flushed.
Shawn O. Pearce4dba9882009-08-05 19:55:15 -0700916
Shawn O. Pearce05687e92011-04-04 17:29:03 -0400917cache `"adv_bases"`::
918+
919Used only for push over smart HTTP when branch level access controls
David Pursehouse92463562013-06-24 10:16:28 +0900920are enabled. The cache entry contains all commits that are available
Shawn O. Pearce05687e92011-04-04 17:29:03 -0400921for the client to use as potential delta bases. Push over smart HTTP
922requires two HTTP requests, and this cache tries to carry state from
923the first request into the second to ensure it can complete.
924
Patrick Hiesel7575e882020-04-06 14:09:32 +0200925cache `"default_preferences"`::
926+
927Caches the server's default general, edit and diff preferences.
928+
929Default value is 1 to hold only the most current version in-memory.
930
Patrick Hieselace3dc92019-01-15 14:08:13 +0000931cache `"changes"`::
Gustaf Lundh47ce4e32012-05-21 11:18:42 +0200932+
Gustaf Lundh3353c362013-04-24 17:25:39 +0200933The size of `memoryLimit` determines the number of projects for which
934all changes will be cached. If the cache is set to 1024, this means all
Patrick Hieselace3dc92019-01-15 14:08:13 +0000935changes for up to 1024 projects can be held in the cache.
Gustaf Lundh53493772012-11-18 18:41:15 -0800936+
Patrick Hieselace3dc92019-01-15 14:08:13 +0000937Default value is 0 (disabled). It is disabled by default due to the fact
938that change updates are not communicated between Gerrit servers. Hence
Matthias Sohnd8182ba2019-12-09 14:50:23 +0100939this cache should be disabled in a cluster setup using multiple primary
940or multiple replica nodes.
Gustaf Lundh53493772012-11-18 18:41:15 -0800941+
Patrick Hieselace3dc92019-01-15 14:08:13 +0000942The cache should be flushed whenever the database changes table is modified
943outside of Gerrit.
Gustaf Lundh47ce4e32012-05-21 11:18:42 +0200944
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700945cache `"diff"`::
946+
Shawn O. Pearceefaf9792009-09-02 18:12:52 -0700947Each item caches the differences between two commits, at both the
948directory and file levels. Gerrit uses this cache to accelerate
949the display of affected file names, as well as file contents.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700950+
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700951Entries in this cache are relatively large, so memoryLimit is an
952estimate in bytes of memory used. Administrators should try to target
953cache.diff.memoryLimit to fit all changes users will view in a 1 or 2
954day span.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700955
Shawn O. Pearcef0cfe532011-04-11 23:40:06 -0400956cache `"diff_intraline"`::
957+
958Each item caches the intraline difference of one file, when compared
959between two commits. Gerrit uses this cache to accelerate display of
960intraline differences when viewing a file.
961+
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700962Entries in this cache are relatively large, so memoryLimit is an
963estimate in bytes of memory used. Administrators should try to target
964cache.diff.memoryLimit to fit all files users will view in a 1 or 2
965day span.
Shawn O. Pearcef0cfe532011-04-11 23:40:06 -0400966
Dave Borowitz7388e9e2016-09-23 13:20:29 +0200967cache `"diff_summary"`::
Saša Živkove789f2e2016-09-22 10:37:34 +0200968+
969Each item caches list of file paths which are different between two
970commits. Gerrit uses this cache to accelerate computing of the list
971of paths of changed files.
972+
973Ideally, disk limit of this cache is large enough to cover all changes.
974This should significantly speed up change reindexing, especially
975full offline reindexing.
976
Dave Borowitz6f7fa0a2018-06-05 13:30:48 -0400977cache `"external_ids_map"`::
978+
979A singleton cache whose sole entry is a map of the parsed representation
Dave Borowitz70dfbd62018-06-05 13:30:48 -0400980of link:config-accounts.html#external-ids[all current external IDs]. The
981cache may temporarily contain 2 entries, but the second one is promptly
982expired.
Dave Borowitz6f7fa0a2018-06-05 13:30:48 -0400983+
Dave Borowitzb20d23a82018-08-21 13:43:10 -0700984It is not recommended to change the in-memory attributes of this cache
985away from the defaults. The cache may be persisted by setting
986`diskLimit`, which is only recommended if cold start performance is
987problematic.
Patrick Hiesel42b47b12019-07-22 09:32:37 +0200988+
989`external_ids_map` supports computing the new cache value based on a
990previously cached state. This applies modifications based on the Git
991diff and is almost always faster.
992`cache.external_ids_map.enablePartialReloads` turns this behavior on
Patrick Hieselc486edf2019-08-19 15:55:17 +0200993or off. The default is `true`.
Dave Borowitz6f7fa0a2018-06-05 13:30:48 -0400994
Shawn O. Pearce2d65d292011-06-24 08:12:02 -0700995cache `"git_tags"`::
996+
997If branch or reference level READ access controls are used, this
998cache tracks which tags are reachable from the branch tips of a
999repository. Gerrit uses this information to determine the set
1000of tags that a client may access, derived from which tags are
1001part of the history of a visible branch.
1002+
1003The cache is persisted to disk across server restarts as it can
1004be expensive to compute (60 or more seconds for a large history
1005like the Linux kernel repository).
1006
Youssef Elghareeb3d549302020-07-15 17:08:28 +02001007cache `"comment_context"`::
1008+
1009Caches the context lines of comments, which are the lines of the source file
1010highlighted by the user when the comment was written.
1011
Shawn O. Pearce4a452712009-05-28 20:12:33 -07001012cache `"groups"`::
1013+
Edwin Kempin3091e112017-11-13 15:23:58 +01001014Caches the basic group information of internal groups by group ID,
1015including the group owner, name, and description.
1016+
Edwin Kempind967ec42017-11-13 15:14:41 +01001017For this cache it is important to configure a size that is larger than
1018the number of internal Gerrit groups, otherwise general Gerrit
1019performance may be poor. This is why by default this cache is
1020unlimited.
1021+
Edwin Kempin3091e112017-11-13 15:23:58 +01001022External group membership obtained from LDAP is cached under
1023`"ldap_groups"`.
1024
1025cache `"groups_byname"`::
1026+
1027Caches the basic group information of internal groups by group name,
1028including the group owner, name, and description.
1029+
Edwin Kempind967ec42017-11-13 15:14:41 +01001030For this cache it is important to configure a size that is larger than
1031the number of internal Gerrit groups, otherwise general Gerrit
1032performance may be poor. This is why by default this cache is
1033unlimited.
1034+
Edwin Kempin3091e112017-11-13 15:23:58 +01001035External group membership obtained from LDAP is cached under
1036`"ldap_groups"`.
1037
1038cache `"groups_byuuid"`::
1039+
1040Caches the basic group information of internal groups by group UUID,
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001041including the group owner, name, and description.
1042+
Edwin Kempind967ec42017-11-13 15:14:41 +01001043For this cache it is important to configure a size that is larger than
1044the number of internal Gerrit groups, otherwise general Gerrit
1045performance may be poor. This is why by default this cache is
1046unlimited.
1047+
Alice Kober-Sotzekeab33202017-09-27 13:54:30 +02001048External group membership obtained from LDAP is cached under
1049`"ldap_groups"`.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001050
Gal Paikinf74ee382021-03-22 16:00:25 +01001051cache `"groups_byuuid_persisted"`::
1052+
1053Caches the basic group information of internal groups by group UUID,
1054including the group owner, name, and description.
1055+
1056This is the persisted version of `groups_byuuid` cache. The intention of this
1057cache is to have an in-memory size of 0.
1058+
1059External group membership obtained from LDAP is cached under
1060`"ldap_groups"`.
1061
Alice Kober-Sotzek864ed142017-10-12 14:24:36 +02001062cache `"groups_bymember"`::
Matt Fischer620255a2011-03-22 14:28:23 -05001063+
Alice Kober-Sotzek864ed142017-10-12 14:24:36 +02001064Caches the groups which contain a specific member (account). If direct
1065updates are made to the `account_group_members` table, this cache should
1066be flushed.
1067
Alice Kober-Sotzek3e1fe1b2017-10-12 14:44:17 +02001068cache `"groups_bysubgroups"`::
1069+
1070Caches the parent groups of a subgroup. If direct updates are made
Matt Fischer620255a2011-03-22 14:28:23 -05001071to the `account_group_includes` table, this cache should be flushed.
1072
Youssef Elghareebf08d4b32020-03-26 18:02:15 +01001073cache `"groups_external"`::
1074+
1075Caches all the external groups available to Gerrit. The cache holds a
1076single entry which maps to the latest available of all external groups'
1077UUIDs. This cache uses "groups_external_persisted" to load its value.
1078
1079cache `"groups_external_persisted"`::
1080+
1081Caches all external groups available to Gerrit at some point in history.
1082The cache key is representation of a specific groups state in NoteDb and
1083the value is the list of all external groups.
1084The cache is persisted to enhance performance.
1085
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001086cache `"ldap_groups"`::
1087+
1088Caches the LDAP groups that a user belongs to, if LDAP has been
1089configured on this server. This cache should be configured with a
1090low maxAge setting, to ensure LDAP modifications are picked up in
1091a timely fashion.
Shawn O. Pearce4a452712009-05-28 20:12:33 -07001092
Gustaf Lundh0919a492012-10-19 15:29:23 +02001093cache `"ldap_groups_byinclude"`::
1094+
1095Caches the hierarchical structure of LDAP groups.
1096
Shawn O. Pearce6d26f4a2009-08-24 15:43:52 -07001097cache `"ldap_usernames"`::
1098+
1099Caches a mapping of LDAP username to Gerrit account identity. The
1100cache automatically updates when a user first creates their account
1101within Gerrit, so the cache expire time is largely irrelevant.
1102
Shawn O. Pearce0c1abdb2011-06-24 11:01:25 -07001103cache `"permission_sort"`::
1104+
David Pursehouse221d4f62012-06-08 17:38:08 +09001105Caches the order in which access control sections must be applied to a
Shawn O. Pearce0c1abdb2011-06-24 11:01:25 -07001106reference. Sorting the sections can be expensive when regular
1107expressions are used, so this cache remembers the ordering for
1108each branch.
1109
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -07001110cache `"plugin_resources"`::
1111+
1112Caches formatted plugin resources, such as plugin documentation that
1113has been converted from Markdown to HTML. The memoryLimit refers to
1114the bytes of memory dedicated to storing the documentation.
1115
Patrick Hieselc2c108c2020-07-23 09:54:22 +02001116cache `"persisted_projects"`::
1117+
1118Caches the project description records, from the `refs/meta/config`
1119branch of each project. This is the persisted variant of the
1120`projects` cache. The intention is for this cache to have an in-memory
1121size of 0.
1122
Shawn O. Pearce4a452712009-05-28 20:12:33 -07001123cache `"projects"`::
1124+
Patrick Hieselc2c108c2020-07-23 09:54:22 +02001125Caches the project description records, from the `refs/meta/config`
1126branch of each project. If a project record is updated or deleted, this
Shawn O. Pearce4a452712009-05-28 20:12:33 -07001127cache should be flushed. Newly inserted projects do not require
1128a cache flush, as they will be read upon first reference.
1129
Dave Borowitz08aa8bb2018-04-05 12:01:06 -04001130cache `"prolog_rules"`::
1131+
1132Caches parsed `rules.pl` contents for each project. This cache uses the same
1133size as the `projects` cache, and cannot be configured independently.
1134
Patrick Hiesela57c0d62019-02-19 09:09:22 +01001135cache `"pure_revert"`::
1136+
1137Result of checking if one change or commit is a pure/clean revert of
1138another.
1139
Shawn O. Pearce51967cd2009-05-08 19:46:57 -07001140cache `"sshkeys"`::
1141+
1142Caches unpacked versions of user SSH keys, so the internal SSH daemon
1143can match against them during authentication. The unit of storage
1144is per-user, so 1024 items translates to 1024 unique user accounts.
1145As each individual user account may configure multiple SSH keys,
1146the total number of keys may be larger than the item count.
1147
Shawn O. Pearceb09322b2009-08-15 17:49:00 -07001148cache `"web_sessions"`::
1149+
1150Tracks the live user sessions coming in over HTTP. Flushing this
1151cache would cause all users to be signed out immediately, forcing
Shawn O. Pearce727d80f2009-08-17 07:57:54 -07001152them to sign-in again. To avoid breaking active users, this cache
1153is not flushed automatically by `gerrit flush-caches --all`, but
1154instead must be explicitly requested.
1155+
1156If no disk cache is configured (or `cache.web_sessions.diskLimit`
1157is set to 0) a server restart will force all users to sign-out,
1158and need to sign-in again after the restart, as the cache was
1159unable to persist the session information. Enabling a disk cache
1160is strongly recommended.
1161+
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -07001162Session storage is relatively inexpensive. The average entry in
1163this cache is approximately 346 bytes.
Shawn O. Pearceb09322b2009-08-15 17:49:00 -07001164
Shawn O. Pearce4016a932009-05-28 15:12:40 -07001165See also link:cmd-flush-caches.html[gerrit flush-caches].
1166
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001167==== [[cache_options]]Cache Options
Shawn O. Pearce29de4362010-03-03 17:51:26 -08001168
Hugo Arès2bc86812015-03-09 15:20:28 -04001169[[cache.diff.timeout]]cache.diff.timeout::
1170+
1171Maximum number of milliseconds to wait for diff data before giving up and
1172falling back on a simpler diff algorithm that will not be able to break down
1173modified regions into smaller ones. This is a work around for an infinite loop
1174bug in the default difference algorithm implementation.
1175+
1176Values should use common unit suffixes to express their setting:
1177+
1178* ms, milliseconds
1179* s, sec, second, seconds
1180* m, min, minute, minutes
1181* h, hr, hour, hours
1182
1183+
Edwin Kempina09ebcf2015-04-16 14:53:23 +02001184--
Hugo Arès2bc86812015-03-09 15:20:28 -04001185If a unit suffix is not specified, `milliseconds` is assumed.
Edwin Kempina09ebcf2015-04-16 14:53:23 +02001186
Hugo Arès2bc86812015-03-09 15:20:28 -04001187Default is 5 seconds.
Edwin Kempina09ebcf2015-04-16 14:53:23 +02001188--
Hugo Arès2bc86812015-03-09 15:20:28 -04001189
Edwin Kempin42d27432013-11-24 17:06:24 +01001190[[cache.diff_intraline.timeout]]cache.diff_intraline.timeout::
Shawn O. Pearce617aa392010-11-15 14:03:28 -08001191+
1192Maximum number of milliseconds to wait for intraline difference data
1193before giving up and disabling it for a particular file pair. This is
1194a work around for an infinite loop bug in the intraline difference
David Pursehousee8c1fb92013-04-17 17:18:43 +09001195implementation.
1196+
1197If computation takes longer than the timeout, the worker thread is
1198terminated, an error message is shown, and no intraline difference is
1199displayed for the file pair.
Shawn O. Pearce617aa392010-11-15 14:03:28 -08001200+
1201Values should use common unit suffixes to express their setting:
1202+
1203* ms, milliseconds
1204* s, sec, second, seconds
1205* m, min, minute, minutes
1206* h, hr, hour, hours
1207
1208+
Edwin Kempina09ebcf2015-04-16 14:53:23 +02001209--
Shawn O. Pearce617aa392010-11-15 14:03:28 -08001210If a unit suffix is not specified, `milliseconds` is assumed.
Edwin Kempina09ebcf2015-04-16 14:53:23 +02001211
Shawn O. Pearce617aa392010-11-15 14:03:28 -08001212Default is 5 seconds.
Edwin Kempina09ebcf2015-04-16 14:53:23 +02001213--
Shawn O. Pearce617aa392010-11-15 14:03:28 -08001214
Edwin Kempin42d27432013-11-24 17:06:24 +01001215[[cache.diff_intraline.enabled]]cache.diff_intraline.enabled::
Shawn O. Pearce29de4362010-03-03 17:51:26 -08001216+
1217Boolean to enable or disable the computation of intraline differences
Shawn O. Pearce307dd4e2010-11-15 12:12:20 -08001218when populating a diff cache entry. This flag is provided primarily
1219as a backdoor to disable the intraline difference feature if
David Pursehouse92463562013-06-24 10:16:28 +09001220necessary. To maintain backwards compatibility with prior versions,
Shawn O. Pearce307dd4e2010-11-15 12:12:20 -08001221this setting will fallback to `cache.diff.intraline` if not set in the
1222configuration.
Shawn O. Pearce29de4362010-03-03 17:51:26 -08001223+
1224Default is true, enabled.
1225
Simon Leifc19ff12014-10-02 13:36:00 -04001226[[cache.projects.loadOnStartup]]cache.projects.loadOnStartup::
1227+
1228If the project cache should be loaded during server startup.
1229+
1230The cache is loaded concurrently. Admins should ensure that the cache
1231size set under <<cache.name.memoryLimit,cache.projects.memoryLimit>>
1232is not smaller than the number of repos.
1233+
1234Default is false, disabled.
1235
1236[[cache.projects.loadThreads]]cache.projects.loadThreads::
1237+
1238Only relevant if <<cache.projects.loadOnStartup,cache.projects.loadOnStartup>>
1239is true.
1240+
1241The number of threads to allocate for loading the cache at startup. These
1242threads will die out after the cache is loaded.
1243+
1244Default is the number of CPUs.
1245
Shawn Pearce67a33302016-08-11 11:51:59 -07001246
1247[[capability]]
1248=== Section capability
1249
1250[[capability.administrateServer]]capability.administrateServer::
1251+
1252Names of groups of users that are allowed to exercise the
Edwin Kempin53d52ba2017-06-09 10:57:43 +02001253`administrateServer` capability, in addition to those listed in
Shawn Pearce67a33302016-08-11 11:51:59 -07001254All-Projects. Configuring this option can be a useful fail-safe
1255to recover a server in the event an administrator removed all
Edwin Kempin53d52ba2017-06-09 10:57:43 +02001256groups from the `administrateServer` capability, or to ensure that
Shawn Pearce67a33302016-08-11 11:51:59 -07001257specific groups always have administration capabilities.
1258+
1259----
1260[capability]
1261 administrateServer = group Fail Safe Admins
1262----
1263+
1264The configuration file uses group names, not UUIDs. If a group is
1265renamed the gerrit.config file must be updated to reflect the new
1266name. If a group cannot be found for the configured name a warning
1267is logged and the server will continue normal startup.
1268+
1269If not specified (default), only the groups listed by All-Projects
Edwin Kempin53d52ba2017-06-09 10:57:43 +02001270may use the `administrateServer` capability.
1271
1272[[capability.makeFirstUserAdmin]]capability.makeFirstUserAdmin::
1273+
1274Whether the first user that logs in to the Gerrit server should
1275automatically be added to the administrator group and hence get the
1276`administrateServer` capability assigned. This is useful to bootstrap
1277the authentication database.
1278+
1279Default is true.
Shawn Pearce67a33302016-08-11 11:51:59 -07001280
1281
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08001282[[change]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001283=== Section change
Shawn Pearceb9ebb662013-07-19 19:45:25 -07001284
Gabor Somossyb72d4c62015-10-20 23:40:07 +01001285[[change.allowBlame]]change.allowBlame::
1286+
David Ostrovsky7163dac2017-07-29 06:49:38 +02001287Allow blame on side by side diff. If set to false, blame cannot be used.
Gabor Somossyb72d4c62015-10-20 23:40:07 +01001288+
1289Default is true.
1290
Dave Borowitzf5e6e042016-04-25 13:03:42 -04001291[[change.cacheAutomerge]]change.cacheAutomerge::
1292+
Sven Selberg0299e252020-05-05 16:16:41 +02001293When reviewing merge commits, the left-hand side shows the output of the
Dave Borowitzf5e6e042016-04-25 13:03:42 -04001294result of JGit's automatic merge algorithm. This option controls whether
1295this output is cached in the change repository, or if only the diff is
1296cached in the persistent `diff` cache.
1297+
1298If true, automerge results are stored in the repository under
1299`refs/cache-automerge/*`; the results of diffing the change against its
1300automerge base are stored in the diff cache. If false, no extra data is
1301stored in the repository, only the diff cache. This can result in slight
1302performance improvements by reducing the number of refs in the repo.
1303+
1304Default is true.
1305
Joerg Zieren7cac5d12020-01-02 10:18:14 +01001306[[change.commentSizeLimit]]change.commentSizeLimit::
1307+
1308Maximum allowed size in characters of a regular (non-robot) comment. Comments
1309which exceed this size will be rejected. Size computation is approximate and may
1310be off by roughly 1%. Common unit suffixes of 'k', 'm', or 'g' are supported.
1311The value must be positive.
1312+
Joerg Zierenfaea7e12020-04-06 10:44:46 +02001313The default limit is 16kiB.
1314
1315[[change.cumulativeCommentSizeLimit]]change.cumulativeCommentSizeLimit::
1316+
1317Maximum allowed size in characters of all comments (including robot comments)
1318and change messages. Size computation is approximate and may be off by roughly
13191%. Common unit suffixes of 'k', 'm', or 'g' are supported.
1320+
1321The default limit is 3MiB.
Joerg Zieren7cac5d12020-01-02 10:18:14 +01001322
Dave Borowitz1f85d3a2019-04-16 12:16:04 -07001323[[change.disablePrivateChanges]]change.disablePrivateChanges::
Patrick Hieseldb8df482019-01-24 10:11:23 +01001324+
Dave Borowitz1f85d3a2019-04-16 12:16:04 -07001325If set to true, users are not allowed to create private changes.
Patrick Hieseldb8df482019-01-24 10:11:23 +01001326+
Dave Borowitz1f85d3a2019-04-16 12:16:04 -07001327The default is false.
1328
Ben Rohlfs2cc33542020-02-28 12:44:09 +01001329[[change.enableAttentionSet]]change.enableAttentionSet::
1330+
1331If set to true, then all UI features for using and interacting with the
1332attention set are enabled.
1333+
Ben Rohlfs4427d432020-10-28 09:14:10 +01001334The default is true.
Ben Rohlfs2cc33542020-02-28 12:44:09 +01001335
1336[[change.enableAssignee]]change.enableAssignee::
1337+
1338If set to true, then all UI features for using and interacting with the
1339assignee are enabled.
1340+
Ben Rohlfs4427d432020-10-28 09:14:10 +01001341The default is false.
Ben Rohlfs2cc33542020-02-28 12:44:09 +01001342
Joerg Zieren7cac5d12020-01-02 10:18:14 +01001343[[change.maxComments]]change.maxComments::
1344+
1345Maximum number of comments (regular plus robot) allowed per change. Additional
1346comments are rejected.
1347+
1348By default 5,000.
1349
Joerg Zieren1ebe6872021-01-28 13:45:55 +01001350[[change.maxFiles]]change.maxFiles::
1351+
1352Maximum number of files allowed per change. Larger changes are rejected and must
1353be split up.
1354+
1355By default 100,000.
1356
1357[[change.maxPatchSets]]change.maxPatchSets::
1358+
1359Maximum number of patch sets allowed per change. If this is insufficient,
1360recreate the change with a new Change-Id, then abandon the old change.
1361+
1362By default 1,500.
1363
Dave Borowitzca614bc2019-04-15 15:29:15 -07001364[[change.maxUpdates]]change.maxUpdates::
1365+
1366Maximum number of updates to a change. Counts only updates to the main NoteDb
1367meta ref; draft comments, robot comments, stars, etc. do not count towards the
1368total.
1369+
1370Many NoteDb operations require walking the entire change meta ref and loading
1371its contents into memory, so changes with arbitrarily many updates may cause
1372high CPU usage, memory pressure, persistent cache bloat, and other problems.
1373+
Dave Borowitz18e7b552019-04-17 07:53:38 -07001374The following operations are allowed even when a change is at the limit:
Edwin Kempinf2f815b2020-01-22 17:09:16 +01001375
Dave Borowitz18e7b552019-04-17 07:53:38 -07001376* Abandon
1377* Submit
1378* Submit by push with `%submit`
1379* Auto-close by pushing directly to the branch
1380* Fix with link:rest-api-changes.html#fix-input[`expect_merged_as`]
Edwin Kempinf2f815b2020-01-22 17:09:16 +01001381
Dave Borowitzca614bc2019-04-15 15:29:15 -07001382By default 1000.
1383
Patrick Hiesela4824db2019-12-20 10:55:26 +01001384[[change.mergeabilityComputationBehavior]]change.mergeabilityComputationBehavior::
1385+
1386This setting determines when Gerrit computes if a change is mergeable or not.
1387This computation is expensive, especially when the repository is large or when
1388there are many open changes.
1389+
1390This config can have the following states:
1391+
1392* `API_REF_UPDATED_AND_CHANGE_REINDEX`: Gerrit indexes `mergeability` enabling
1393 the `is:mergeable` predicate in change search and allowing fast retrieval of
1394 this bit in query responses. Gerrit will always serve `mergeable` in
1395 link:rest-api-changes.html#change-info[ChangeInfo] objects.
1396 Gerrit will reindex all open changes when the target ref advances (expensive).
1397* `REF_UPDATED_AND_CHANGE_REINDEX`: Gerrit indexes `mergeability` enabling the
1398 `is:mergeable` predicate in change search and allowing fast retrieval of this
1399 bit in query responses. Gerrit will never serve `mergeable` in
1400 link:rest-api-changes.html#change-info[ChangeInfo]
1401 objects. This state can be a final state for instances that only want to
1402 optimize the read path, but not the write path for speed or serve as an
1403 intermediary step for instances that want to optimize both and need to migrate
1404 callers of their API.
1405 Gerrit will reindex all open changes when the target ref advances (expensive).
1406* `NEVER`: Gerrit does not index `mergeable`, so `is:mergeable` is disabled as
1407 query operator. Gerrit does not serve `mergeable` in
1408 link:rest-api-changes.html#change-info[ChangeInfo].
1409
David Ostrovsky8aaace12021-05-12 12:27:54 +02001410Default is `NEVER`.
Patrick Hiesela4824db2019-12-20 10:55:26 +01001411
Edwin Kempin67229a42019-10-08 09:13:34 +02001412[[change.move]]change.move::
1413+
1414Whether the link:rest-api-changes.html#move-change[Move Change] REST
1415endpoint is enabled.
1416+
1417The move change functionality has some corner cases with undesired side
1418effects. Hence administrators may decide to disable this functionality.
1419In particular, if a change that has dependencies on other changes is
1420moved to a new branch, and the moved change gets submitted to the new
1421branch, the changes on which the change depends are silently merged
1422into the new branch, although these changes have not been moved to that
1423branch (see details in
1424link:https://bugs.chromium.org/p/gerrit/issues/detail?id=9877[issue
14259877]).
1426+
1427By default true.
1428
Dave Borowitz1f85d3a2019-04-16 12:16:04 -07001429[[change.replyLabel]]change.replyLabel::
1430+
1431Label name for the reply button. In the user interface an ellipsis (…)
1432is appended.
1433+
1434Default is "Reply". In the user interface it becomes "Reply…".
1435
1436[[change.replyTooltip]]change.replyTooltip::
1437+
1438Tooltip for the reply button. In the user interface a note about the
1439keyboard shortcut is appended.
1440+
1441Default is "Reply and score". In the user interface it becomes "Reply
1442and score (Shortcut: a)".
1443
1444[[change.robotCommentSizeLimit]]change.robotCommentSizeLimit::
1445+
Joerg Zieren7cac5d12020-01-02 10:18:14 +01001446Maximum allowed size in characters of a robot comment. Robot comments which
1447exceed this size will be rejected on addition. Size computation is approximate
1448and may be off by roughly 1%. Common unit suffixes of 'k', 'm', or 'g' are
1449supported. Zero or negative values allow robot comments of unlimited size.
Dave Borowitz1f85d3a2019-04-16 12:16:04 -07001450+
Joerg Zierenfaea7e12020-04-06 10:44:46 +02001451The default limit is 1MiB.
Patrick Hieseldb8df482019-01-24 10:11:23 +01001452
Gal Paikin02d6ba62020-07-13 23:49:24 +03001453[[change.sendNewPatchsetEmails]]change.sendNewPatchsetEmails::
1454+
1455When false, emails will not be sent to owners, reviewers, and cc for
1456creating a new patchset unless they are project watchers or have starred
1457the change.
1458+
1459Default is true.
1460
Luca Milanesiof2a275b2017-04-10 10:59:34 +01001461[[change.showAssigneeInChangesTable]]change.showAssigneeInChangesTable::
Gustaf Lundh661d30a2016-09-19 14:41:29 +02001462+
Luca Milanesio50057ff2017-04-06 09:59:11 +01001463Show assignee field in changes table. If set to false, assignees will
1464not be visible in changes table.
Gustaf Lundh661d30a2016-09-19 14:41:29 +02001465+
Luca Milanesio50057ff2017-04-06 09:59:11 +01001466Default is false.
Gustaf Lundh661d30a2016-09-19 14:41:29 +02001467
Dave Borowitz1f85d3a2019-04-16 12:16:04 -07001468[[change.strictLabels]]change.strictLabels::
1469+
1470Reject invalid label votes: invalid labels or invalid values. This
David Pursehouse33495ab2019-10-31 09:38:43 +09001471configuration option is provided for backwards compatibility and may
Dave Borowitz1f85d3a2019-04-16 12:16:04 -07001472be removed in future gerrit versions.
1473+
1474Default is false.
1475
David Ostrovsky9933eb32014-05-20 16:08:20 +02001476[[change.submitLabel]]change.submitLabel::
1477+
1478Label name for the submit button.
1479+
1480Default is "Submit".
1481
Stefan Beller7c380d512015-08-21 10:55:21 -07001482[[change.submitLabelWithParents]]change.submitLabelWithParents::
1483+
1484Label name for the submit button if the change has parents which will
1485be submitted together with this change.
1486+
1487Default is "Submit including parents".
1488
David Ostrovsky9933eb32014-05-20 16:08:20 +02001489[[change.submitTooltip]]change.submitTooltip::
1490+
1491Tooltip for the submit button. Variables available for replacement
1492include `${patchSet}` for the current patch set number (1, 2, 3),
1493`${branch}` for the branch name ("master") and `${commit}` for the
1494abbreviated commit SHA-1 (`c9c0edb`).
1495+
1496Default is "Submit patch set ${patchSet} into ${branch}".
1497
Stefan Beller0e655542015-07-20 21:14:38 -07001498[[change.submitTooltipAncestors]]change.submitTooltipAncestors::
1499+
1500Tooltip for the submit button if there are ancestors which would
1501also be submitted by submitting the change. Additionally to the variables
1502as in link:#change.submitTooltip[change.submitTooltip], there is the
1503variable `${submitSize}` indicating the number of changes which are
1504submitted.
1505+
1506Default is "Submit all ${topicSize} changes of the same topic (${submitSize}
1507changes including ancestors and other changes related by topic)".
1508
Stefan Bellera038cf72015-01-13 16:25:10 -08001509[[change.submitTopicLabel]]change.submitTopicLabel::
1510+
1511If `change.submitWholeTopic` is set and a change has a topic,
1512the label name for the submit button is given here instead of
1513the configuration `change.submitLabel`.
1514+
1515Defaults to "Submit whole topic"
1516
1517[[change.submitTopicTooltip]]change.submitTopicTooltip::
1518+
David Pursehousea61ee502016-09-06 16:27:09 +09001519If `change.submitWholeTopic` is configured to true and a change has a
Stefan Bellera038cf72015-01-13 16:25:10 -08001520topic, this configuration determines the tooltip for the submit button
1521instead of `change.submitTooltip`. The variable `${topicSize}` is available
Stefan Beller7c380d512015-08-21 10:55:21 -07001522for the number of changes in the same topic to be submitted. The number of
1523all changes to be submitted is in the variable `${submitSize}`.
Stefan Bellera038cf72015-01-13 16:25:10 -08001524+
Stefan Beller7c380d512015-08-21 10:55:21 -07001525Defaults to "Submit all ${topicSize} changes of the same topic
1526(${submitSize} changes including ancestors and other
1527changes related by topic)".
Stefan Bellera038cf72015-01-13 16:25:10 -08001528
Dave Borowitz1f85d3a2019-04-16 12:16:04 -07001529[[change.submitWholeTopic]]change.submitWholeTopic::
Richard Möhne4abe9a2014-11-13 20:05:13 +01001530+
Dave Borowitz1f85d3a2019-04-16 12:16:04 -07001531Determines if the submit button submits the whole topic instead of
1532just the current change.
David Ostrovskya304aff2018-04-05 23:07:51 +02001533+
1534Default is false.
1535
Dave Borowitz1f85d3a2019-04-16 12:16:04 -07001536[[change.updateDelay]]change.updateDelay::
Changcheng Xiao16095352017-12-18 10:03:08 +01001537+
Dave Borowitz1f85d3a2019-04-16 12:16:04 -07001538How often in seconds the web interface should poll for updates to the
1539currently open change. The poller relies on the client's browser
1540cache to use If-Modified-Since and respect `304 Not Modified` HTTP
1541responses. This allows for fast polls, often under 8 milliseconds.
Changcheng Xiao16095352017-12-18 10:03:08 +01001542+
Dave Borowitz1f85d3a2019-04-16 12:16:04 -07001543With a configured 30 second delay a server with 4900 active users will
1544typically need to dedicate 1 CPU to the update check. 4900 users
1545divided by an average delay of 30 seconds is 163 requests arriving per
1546second. If requests are served at \~6 ms response time, 1 CPU is
1547necessary to keep up with the update request traffic. On a smaller
1548user base of 500 active users, the default 30 second delay is only 17
1549requests per second and requires ~10% CPU.
1550+
1551If 0 the update polling is disabled.
1552+
1553Default is 5 minutes.
Changcheng Xiao16095352017-12-18 10:03:08 +01001554
Edwin Kempine326a1d2015-06-03 10:27:39 +02001555[[changeCleanup]]
1556=== Section changeCleanup
1557
1558This section allows to configure change cleanups and schedules them to
1559run periodically.
1560
1561[[changeCleanup.abandonAfter]]changeCleanup.abandonAfter::
1562+
1563Period of inactivity after which open changes should be abandoned
1564automatically.
1565+
1566By default `0`, never abandon open changes.
1567+
1568[WARNING] Auto-Abandoning changes may confuse/annoy users. When
1569enabling this, make sure to choose a reasonably large grace period and
1570inform users in advance.
1571+
1572The following suffixes are supported to define the time unit:
1573+
1574* `d, day, days`
1575* `w, week, weeks` (`1 week` is treated as `7 days`)
1576* `mon, month, months` (`1 month` is treated as `30 days`)
1577* `y, year, years` (`1 year` is treated as `365 days`)
1578
Edwin Kempin7080ef12015-06-10 15:03:09 +02001579[[changeCleanup.abandonIfMergeable]]changeCleanup.abandonIfMergeable::
1580+
David Pursehousef4bc2562019-12-04 09:55:40 +09001581Whether changes which are mergeable should be auto-abandoned. When set
1582to `false`, `-is:mergeable` is appended to the query used to find
1583the changes to auto-abandon.
Edwin Kempin7080ef12015-06-10 15:03:09 +02001584+
David Pursehousef4bc2562019-12-04 09:55:40 +09001585By default `true`, meaning mergeable changes are auto-abandoned.
1586+
Patrick Hiesela4824db2019-12-20 10:55:26 +01001587If
1588link:#change.mergeabilityComputationBehavior[`change.mergeabilityComputationBehavior`]
1589is set to `NEVER`, setting this option to `false` has no effect and it behaves
1590as though it were set to `true`.
Edwin Kempin7080ef12015-06-10 15:03:09 +02001591
Jacek Centkowski36d35212019-05-13 14:32:00 +02001592[[changeCleanup.cleanupAccountPatchReview]]changeCleanup.cleanupAccountPatchReview::
1593+
1594Whether accountPatchReview data should be also removed when change
1595gets auto-abandoned.
1596+
1597By default `false`.
1598
Edwin Kempine326a1d2015-06-03 10:27:39 +02001599[[changeCleanup.abandonMessage]]changeCleanup.abandonMessage::
1600+
1601Change message that should be posted when a change is abandoned.
1602+
1603'${URL}' can be used as a placeholder for the Gerrit web URL.
1604+
1605By default "Auto-Abandoned due to inactivity, see
1606${URL}Documentation/user-change-cleanup.html#auto-abandon\n\n
1607If this change is still wanted it should be restored.".
1608
1609[[changeCleanup.startTime]]changeCleanup.startTime::
1610+
Edwin Kempind33d95a2018-02-16 11:44:04 +01001611The link:#schedule-configuration-startTime[start time] for running
1612change cleanups.
Edwin Kempine326a1d2015-06-03 10:27:39 +02001613
1614[[changeCleanup.interval]]changeCleanup.interval::
1615+
Edwin Kempind33d95a2018-02-16 11:44:04 +01001616The link:#schedule-configuration-interval[interval] for running
1617change cleanups.
Edwin Kempine326a1d2015-06-03 10:27:39 +02001618
Edwin Kempind33d95a2018-02-16 11:44:04 +01001619link:#schedule-configuration-examples[Schedule examples] can be found
1620in the link:#schedule-configuration[Schedule Configuration] section.
Edwin Kempine326a1d2015-06-03 10:27:39 +02001621
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08001622[[commentlink]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001623=== Section commentlink
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08001624
Brad Larson991a31b2009-11-03 14:30:26 -06001625Comment links are find/replace strings applied to change descriptions,
Chris Harris63c7cdd2012-11-23 12:17:36 -05001626patch comments, in-line code comments and approval category value descriptions
1627to turn set strings into hyperlinks. One common use is for linking to
1628bug-tracking systems.
Brad Larson991a31b2009-11-03 14:30:26 -06001629
1630In the following example configuration the 'changeid' comment link
Shawn O. Pearceda866ae2009-12-16 15:46:03 -08001631will match typical Gerrit Change-Id values and create a hyperlink
1632to changes which reference it. The second configuration 'bugzilla'
1633will hyperlink terms such as 'bug 42' to an external bug tracker,
1634supplying the argument record number '42' for display. The third
David Pursehouse221d4f62012-06-08 17:38:08 +09001635configuration 'tracker' uses raw HTML to more precisely control
Shawn O. Pearceda866ae2009-12-16 15:46:03 -08001636how the replacement is displayed to the user.
Brad Larson991a31b2009-11-03 14:30:26 -06001637
Sven Selberg2a0beab2018-04-20 14:49:20 +02001638commentlinks supports link:#reloadConfig[configuration reloads]. Though a
Gustaf Lundhca7eb792018-04-16 10:56:03 +02001639link:cmd-flush-caches.html[flush-caches] of "projects" is needed for the
1640commentlinks to be immediately available in the UI.
1641
Shawn O. Pearceda866ae2009-12-16 15:46:03 -08001642----
1643[commentlink "changeid"]
1644 match = (I[0-9a-f]{8,40})
David Pursehouse9f68e1a2016-01-28 09:21:03 +00001645 link = "#/q/$1"
Brad Larson991a31b2009-11-03 14:30:26 -06001646
Shawn O. Pearceda866ae2009-12-16 15:46:03 -08001647[commentlink "bugzilla"]
Shawn O. Pearcec99630a2010-02-21 19:11:56 -08001648 match = "(bug\\s+#?)(\\d+)"
Shawn O. Pearceda866ae2009-12-16 15:46:03 -08001649 link = http://bugs.example.com/show_bug.cgi?id=$2
Brad Larson991a31b2009-11-03 14:30:26 -06001650
Shawn O. Pearceda866ae2009-12-16 15:46:03 -08001651[commentlink "tracker"]
1652 match = ([Bb]ug:\\s+)(\\d+)
1653 html = $1<a href=\"http://trak.example.com/$2\">$2</a>
1654----
1655
Dave Borowitz13b38002013-04-08 12:03:29 -07001656Comment links can also be specified in `project.config` and sections in
1657children override those in parents. The only restriction is that to
1658avoid injecting arbitrary user-supplied HTML in the page, comment links
1659defined in `project.config` may only supply `link`, not `html`.
1660
Shawn O. Pearceda866ae2009-12-16 15:46:03 -08001661[[commentlink.name.match]]commentlink.<name>.match::
Brad Larson991a31b2009-11-03 14:30:26 -06001662+
Shawn O. Pearceda866ae2009-12-16 15:46:03 -08001663A JavaScript regular expression to match positions to be replaced
1664with a hyperlink. Subexpressions of the matched string can be
1665stored using groups and accessed with `$'n'` syntax, where 'n'
1666is the group number, starting from 1.
Brad Larson991a31b2009-11-03 14:30:26 -06001667+
Shawn O. Pearcec99630a2010-02-21 19:11:56 -08001668The configuration file parser eats one level of backslashes, so the
1669character class `\s` requires `\\s` in the configuration file. The
1670parser also terminates the line at the first `#`, so a match
1671expression containing # must be wrapped in double quotes.
Shawn O. Pearceda866ae2009-12-16 15:46:03 -08001672+
Shawn O. Pearce665beaa2010-02-21 22:41:03 -08001673To match case insensitive strings, a character class with both the
1674upper and lower case character for each position must be used. For
1675example, to match the string `bug` in a case insensitive way the match
1676pattern `[bB][uU][gG]` needs to be used.
1677+
David Ostrovsky7163dac2017-07-29 06:49:38 +02001678The commentlink.name.match regular expressions are applied to the raw,
1679unformatted and unescaped text form. Regex matching against HTML is not
1680supported. Comment link patterns that are written in this style should
1681be updated to match text formats.
Matthew Webbercd7d2bf2015-10-14 15:54:06 +01001682+
Shawn O. Pearceda866ae2009-12-16 15:46:03 -08001683A common pattern to match is `bug\\s+(\\d+)`.
Brad Larson991a31b2009-11-03 14:30:26 -06001684
Shawn O. Pearceda866ae2009-12-16 15:46:03 -08001685[[commentlink.name.link]]commentlink.<name>.link::
Brad Larson991a31b2009-11-03 14:30:26 -06001686+
Shawn O. Pearceda866ae2009-12-16 15:46:03 -08001687The URL to direct the user to whenever the regular expression is
1688matched. Groups in the match expression may be accessed as `$'n'`.
1689+
1690The link property is used only when the html property is not present.
1691
1692[[commentlink.name.html]]commentlink.<name>.html::
1693+
1694HTML to replace the entire matched string with. If present,
1695this property overrides the link property above. Groups in the
1696match expression may be accessed as `$'n'`.
1697+
1698The configuration file eats double quotes, so escaping them as
1699`\"` is necessary to protect them from the parser.
Brad Larson991a31b2009-11-03 14:30:26 -06001700
Dave Borowitz82d79c02013-04-08 15:45:12 -07001701[[commentlink.name.enabled]]commentlink.<name>.enabled::
1702+
1703Whether the comment link is enabled. A child project may override a
1704section in a parent or the site-wide config that is disabled by
1705specifying `enabled = true`.
1706+
1707Disabling sections in `gerrit.config` can be used by site administrators
1708to create a library of comment links with `html` set that are not
1709user-supplied and thus can be verified to be XSS-free, but are only
1710enabled for a subset of projects.
1711+
David Pursehouse6f1af472013-12-11 19:23:33 +09001712By default, true.
1713+
Dave Borowitz82d79c02013-04-08 15:45:12 -07001714Note that the names and contents of disabled sections are visible even
1715to anonymous users via the
1716link:rest-api-projects.html#get-config[REST API].
1717
Brad Larson991a31b2009-11-03 14:30:26 -06001718
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08001719[[container]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001720=== Section container
Shawn O. Pearcee24c71fb2009-12-07 20:32:40 -08001721
1722These settings are applied only if Gerrit is started as the container
1723process through Gerrit's 'gerrit.sh' rc.d compatible wrapper script.
1724
1725[[container.heapLimit]]container.heapLimit::
1726+
1727Maximum heap size of the Java process running Gerrit, in bytes.
1728This property is translated into the '-Xmx' flag for the JVM.
1729+
1730Default is platform and JVM specific.
1731+
1732Common unit suffixes of 'k', 'm', or 'g' are supported.
1733
1734[[container.javaHome]]container.javaHome::
1735+
1736Path of the JRE/JDK installation to run Gerrit with. If not set, the
1737Gerrit startup script will attempt to search your system and guess
1738a suitable JRE. Overrides the environment variable 'JAVA_HOME'.
1739
1740[[container.javaOptions]]container.javaOptions::
1741+
David Pursehousea13052b2020-02-10 14:26:08 +09001742Additional options to pass along to the Java runtime. May be specified
1743multiple times to configure multiple values. If multiple values are
1744configured, they are passed in order on the command line, separated by
1745spaces. These options are appended onto 'JAVA_OPTIONS'.
David Pursehousea70a60c2020-02-10 14:22:43 +09001746+
David Ostrovskyc772bd82013-10-03 10:37:51 +02001747For example, it is possible to overwrite Gerrit's default log4j
1748configuration:
David Pursehousea70a60c2020-02-10 14:22:43 +09001749+
David Ostrovskyc772bd82013-10-03 10:37:51 +02001750----
1751 javaOptions = -Dlog4j.configuration=file:///home/gerrit/site/etc/log4j.properties
1752----
Antoine Musso9ed4b4f2020-11-17 16:52:35 +01001753+
1754Gerrit built-in loggers are then ignored: error logger (`error_log` file),
1755link:#httpd.requestLog[httpd.requestLog] and
1756link:#sshd.requestLog[sshd.requestLog]. The
1757link:#log.jsonLogging[log.jsonLogging] and
1758link:#log.textLogging[log.textLogging] options are also ignored.
David Ostrovskyc772bd82013-10-03 10:37:51 +02001759
Hugo Arès6710f0a2014-11-04 10:28:42 -05001760[[container.daemonOpt]]container.daemonOpt::
1761+
1762Additional options to pass to the daemon (e.g. '--enable-httpd'). If
1763multiple values are configured, they are passed in that order to the command
1764line, separated by spaces.
1765+
1766Execute `java -jar gerrit.war daemon --help` to see all possible
1767options.
1768
Han-Wen Nienhuysa51f1c02019-10-14 18:56:01 +02001769[[container.replica]]container.replica::
Fredrik Luthanderb8f7d6d2010-05-18 21:11:22 +02001770+
Han-Wen Nienhuys348a6032019-09-24 19:44:57 +02001771Used on Gerrit replica installations. If set to true the Gerrit JVM is
1772called with the '--replica' switch, enabling replica mode. If no value is
Matthias Sohnd8182ba2019-12-09 14:50:23 +01001773set (or any other value), Gerrit defaults to primary mode enabling write
1774operations.
Fredrik Luthanderb8f7d6d2010-05-18 21:11:22 +02001775
David Ostrovsky21fca752019-10-18 08:50:29 +02001776[[container.slave]]container.slave::
Han-Wen Nienhuysa51f1c02019-10-14 18:56:01 +02001777+
Christian Aistleitnerde8b0722020-06-20 22:17:23 +02001778Backward compatibility for link:#container.replica[`container.replica`]
1779config setting.
Han-Wen Nienhuysa51f1c02019-10-14 18:56:01 +02001780
Khai Do6168beb2016-12-19 17:26:28 -08001781[[container.startupTimeout]]container.startupTimeout::
1782+
1783The maximum time (in seconds) to wait for a gerrit.sh start command
1784to run a new Gerrit daemon successfully. If not set, defaults to
178590 seconds.
1786
Shawn O. Pearcee24c71fb2009-12-07 20:32:40 -08001787[[container.user]]container.user::
1788+
1789Login name (or UID) of the operating system user the Gerrit JVM
1790will execute as. If not set, defaults to the user who launched
1791the 'gerrit.sh' wrapper script.
1792
1793[[container.war]]container.war::
1794+
1795Path of the JAR file to start daemon execution with. This should
1796be the path of the local 'gerrit.war' archive. Overrides the
1797environment variable 'GERRIT_WAR'.
1798+
1799If not set, defaults to '$site_path/bin/gerrit.war', or to
1800'$HOME/gerrit.war'.
1801
1802
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08001803[[core]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001804=== Section core
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -07001805
Saša Živkovd34dfe32017-11-20 11:14:35 +01001806[NOTE]
1807The link:#jgitConfig[etc/jgit.config] file supports configuration of all JGit
1808options.
1809
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001810[[core.packedGitWindowSize]]core.packedGitWindowSize::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -07001811+
1812Number of bytes of a pack file to load into memory in a single
1813read operation. This is the "page size" of the JGit buffer cache,
1814used for all pack access operations. All disk IO occurs as single
1815window reads. Setting this too large may cause the process to load
1816more data than is required; setting this too small may increase
1817the frequency of `read()` system calls.
1818+
1819Default on JGit is 8 KiB on all platforms.
1820+
1821Common unit suffixes of 'k', 'm', or 'g' are supported.
1822
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001823[[core.packedGitLimit]]core.packedGitLimit::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -07001824+
1825Maximum number of bytes to load and cache in memory from pack files.
1826If JGit needs to access more than this many bytes it will unload less
1827frequently used windows to reclaim memory space within the process.
1828As this buffer must be shared with the rest of the JVM heap, it
1829should be a fraction of the total memory available.
1830+
1831Default on JGit is 10 MiB on all platforms.
1832+
1833Common unit suffixes of 'k', 'm', or 'g' are supported.
1834
Matthias Sohn79bec412020-02-12 01:00:31 +01001835[[core.packedGitUseStrongRefs]]core.packedGitUseStrongRefs::
1836+
1837Set to `true` in order to use strong references to reference packfile
1838pages cached in the WindowCache. Otherwise SoftReferences are used.
1839If this option is set to `false`, the Java garbage collector will
1840flush the WindowCache to free memory if the used heap comes close to
1841the maximum heap size. This has the advantage that it can quickly
1842reclaim memory which was used by the WindowCache but comes at the
1843price that the previously cached pack file content needs to be again
1844copied from the file system cache to the Gerrit process.
1845Setting this option to `true` prevents flushing the WindowCache
1846which provides more predictable performance.
1847+
1848Default is `false`.
1849
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001850[[core.deltaBaseCaseLimit]]core.deltaBaseCacheLimit::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -07001851+
1852Maximum number of bytes to reserve for caching base objects
1853that multiple deltafied objects reference. By storing the entire
1854decompressed base object in a cache Git is able to avoid unpacking
1855and decompressing frequently used base objects multiple times.
1856+
1857Default on JGit is 10 MiB on all platforms. You probably do not
1858need to adjust this value.
1859+
1860Common unit suffixes of 'k', 'm', or 'g' are supported.
1861
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001862[[core.packedGitOpenFiles]]core.packedGitOpenFiles::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -07001863+
1864Maximum number of pack files to have open at once. A pack file
1865must be opened in order for any of its data to be available in
1866a cached window.
1867+
1868If you increase this to a larger setting you may need to also adjust
1869the ulimit on file descriptors for the host JVM, as Gerrit needs
1870additional file descriptors available for network sockets and other
1871repository data manipulation.
1872+
1873Default on JGit is 128 file descriptors on all platforms.
1874
Shawn O. Pearce329fe792010-09-03 15:44:23 -07001875[[core.streamFileThreshold]]core.streamFileThreshold::
1876+
1877Largest object size, in bytes, that JGit will allocate as a
1878contiguous byte array. Any file revision larger than this threshold
1879will have to be streamed, typically requiring the use of temporary
David Pursehouse92463562013-06-24 10:16:28 +09001880files under '$GIT_DIR/objects' to implement pseudo-random access
Shawn O. Pearce329fe792010-09-03 15:44:23 -07001881during delta decompression.
1882+
1883Servers with very high traffic should set this to be larger than
1884the size of their common big files. For example a server managing
1885the Android platform typically has to deal with ~10-12 MiB XML
1886files, so `15 m` would be a reasonable setting in that environment.
1887Setting this too high may cause the JVM to run out of heap space
1888when handling very big binary files, such as device firmware or
1889CD-ROM ISO images.
1890+
Luca Milanesiob104a552019-11-18 17:28:56 -08001891Defaults to 25% of the available JVM heap, limited to 2g.
Shawn O. Pearce329fe792010-09-03 15:44:23 -07001892+
1893Common unit suffixes of 'k', 'm', or 'g' are supported.
1894
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001895[[core.packedGitMmap]]core.packedGitMmap::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -07001896+
1897When true, JGit will use `mmap()` rather than `malloc()+read()`
1898to load data from pack files. The use of mmap can be problematic
1899on some JVMs as the garbage collector must deduce that a memory
1900mapped segment is no longer in use before a call to `munmap()`
1901can be made by the JVM native code.
1902+
1903In server applications (such as Gerrit) that need to access many
David Pursehouse92463562013-06-24 10:16:28 +09001904pack files, setting this to true risks artificially running out
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -07001905of virtual address space, as the garbage collector cannot reclaim
1906unused mapped spaces fast enough.
1907+
1908Default on JGit is false. Although potentially slower, it yields
1909much more predictable behavior.
1910
Sasa Zivkovf69aeb12012-06-11 14:05:14 +02001911[[core.asyncLoggingBufferSize]]core.asyncLoggingBufferSize::
1912+
1913Size of the buffer to store logging events for asynchronous logging.
1914Putting a larger value can protect threads from stalling when the
1915AsyncAppender threads are not fast enough to consume the logging events
David Pursehouse1ff91c02015-05-19 15:05:26 +09001916from the buffer. It also protects from losing log entries in this case.
Sasa Zivkovf69aeb12012-06-11 14:05:14 +02001917+
1918Default is 64 entries.
1919
Dave Borowitz1bec65a2013-03-13 10:59:01 -07001920[[core.useRecursiveMerge]]core.useRecursiveMerge::
1921+
Edwin Kempin71831d22014-07-15 08:54:29 +02001922Use JGit's recursive merger for three-way merges. This only affects
Sebastian Schuberth774aac92015-04-16 13:21:04 +02001923projects that allow content merges.
Edwin Kempin71831d22014-07-15 08:54:29 +02001924+
1925As explained in this
1926link:http://codicesoftware.blogspot.com/2011/09/merge-recursive-strategy.html[
Marian Harbach34253372019-12-10 18:01:31 +01001927blog,role=external,window=_blank], the recursive merge produces better results if the two commits
Edwin Kempin71831d22014-07-15 08:54:29 +02001928that are merged have more than one common predecessor.
Dave Borowitz1bec65a2013-03-13 10:59:01 -07001929+
Edwin Kempin7853c5b2014-07-15 08:57:17 +02001930Default is true.
Dave Borowitz1bec65a2013-03-13 10:59:01 -07001931
Hugo Arès47344372016-06-27 10:23:17 -04001932[[core.repositoryCacheCleanupDelay]]core.repositoryCacheCleanupDelay::
1933+
1934Delay between each periodic cleanup of expired repositories.
1935+
1936Values can be specified using standard time unit abbreviations (`ms`, `sec`,
1937`min`, etc.).
1938+
1939Set it to 0 in order to switch off cache expiration. If cache expiration is
1940switched off, the JVM can still evict cache entries when it is running low
1941on available heap memory.
1942+
1943Set it to -1 to automatically derive cleanup delay from
1944`core.repositoryCacheExpireAfter` (lowest value between 1/10 of
1945`core.repositoryCacheExpireAfter` and 10 minutes).
1946+
1947Default is -1.
1948
1949[[core.repositoryCacheExpireAfter]]core.repositoryCacheExpireAfter::
1950+
1951Time an unused repository should expire and be evicted from the repository
1952cache.
1953+
1954Values can be specified using standard time unit abbreviations (`ms`, `sec`,
1955`min`, etc.).
1956+
1957Default is 1 hour.
1958
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08001959[[download]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001960=== Section download
monica.dionisio3f630442010-06-29 15:42:57 -03001961
1962----
1963[download]
Edwin Kempin08b03a22012-09-14 16:32:57 +02001964 command = checkout
1965 command = cherry_pick
1966 command = pull
1967 command = format_patch
monica.dionisio3f630442010-06-29 15:42:57 -03001968 scheme = ssh
1969 scheme = http
1970 scheme = anon_http
1971 scheme = anon_git
1972 scheme = repo_download
1973----
1974
1975The download section configures the allowed download methods.
1976
Edwin Kempin08b03a22012-09-14 16:32:57 +02001977[[download.command]]download.command::
1978+
1979Commands that should be offered to download changes.
1980+
1981Multiple commands are supported:
1982+
1983* `checkout`
1984+
1985Command to fetch and checkout the patch set.
1986+
1987* `cherry_pick`
1988+
1989Command to fetch the patch set and to cherry-pick it onto the current
1990commit.
1991+
1992* `pull`
1993+
1994Command to pull the patch set.
1995+
1996* `format_patch`
1997+
1998Command to fetch the patch set and to feed it into the `format-patch`
1999command.
2000
2001+
2002If `download.command` is not specified, all download commands are
2003offered.
2004
monica.dionisio3f630442010-06-29 15:42:57 -03002005[[download.scheme]]download.scheme::
2006+
2007Schemes that should be used to download changes.
2008+
2009Multiple schemes are supported:
2010+
2011* `http`
2012+
Shawn O. Pearce5c46a072010-08-23 08:33:32 -07002013Authenticated HTTP download is allowed.
monica.dionisio3f630442010-06-29 15:42:57 -03002014+
2015* `ssh`
2016+
Shawn O. Pearce5c46a072010-08-23 08:33:32 -07002017Authenticated SSH download is allowed.
monica.dionisio3f630442010-06-29 15:42:57 -03002018+
2019* `anon_http`
2020+
2021Anonymous HTTP download is allowed.
2022+
2023* `anon_git`
2024+
Shawn O. Pearce5c46a072010-08-23 08:33:32 -07002025Anonymous Git download is allowed. This is not default, it is also
2026necessary to set <<gerrit.canonicalGitUrl,gerrit.canonicalGitUrl>>
2027variable.
monica.dionisio3f630442010-06-29 15:42:57 -03002028+
2029* `repo_download`
2030+
Shawn O. Pearce5c46a072010-08-23 08:33:32 -07002031Gerrit advertises patch set downloads with the `repo download`
2032command, assuming that all projects managed by this instance are
2033generally worked on with the repo multi-repository tool. This is
2034not default, as not all instances will deploy repo.
monica.dionisio3f630442010-06-29 15:42:57 -03002035
2036+
Edwin Kempin08b03a22012-09-14 16:32:57 +02002037If `download.scheme` is not specified, SSH, HTTP and Anonymous HTTP
Shawn O. Pearce5c46a072010-08-23 08:33:32 -07002038downloads are allowed.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08002039
Edwin Kempin322db672015-07-03 08:50:46 +02002040[[download.checkForHiddenChangeRefs]]download.checkForHiddenChangeRefs::
2041+
2042Whether the download commands should be adapted when the change refs
2043are hidden.
2044+
2045Git has a configuration option to hide refs from the initial
2046advertisement (`uploadpack.hideRefs`). This option can be used to hide
2047the change refs from the client. As consequence fetching changes by
2048change ref does not work anymore. However by setting
2049`uploadpack.allowTipSha1InWant` to `true` fetching changes by commit ID
2050is possible. If `download.checkForHiddenChangeRefs` is set to `true`
2051the git download commands use the commit ID instead of the change ref
2052when a project is configured like this.
2053+
2054Example git configuration on a project:
2055+
2056----
2057[uploadpack]
2058 hideRefs = refs/changes/
2059 hideRefs = refs/cache-automerge/
2060 allowTipSha1InWant = true
2061----
2062+
2063By default `false`.
2064
David Ostrovskyfc9cdf02014-03-26 14:46:45 -07002065[[download.archive]]download.archive::
2066+
2067Specifies which archive formats, if any, should be offered on the change
Francois Ferrand1e933882014-09-25 11:19:08 +02002068screen and supported for `git-upload-archive` operation:
David Ostrovskyfc9cdf02014-03-26 14:46:45 -07002069+
2070----
2071[download]
2072 archive = tar
2073 archive = tbz2
2074 archive = tgz
2075 archive = txz
Francois Ferrand1e933882014-09-25 11:19:08 +02002076 archive = zip
David Ostrovskyfc9cdf02014-03-26 14:46:45 -07002077----
2078
Shawn Pearce6edde312014-03-26 22:00:26 -07002079If `download.archive` is not specified defaults to all archive
2080commands. Set to `off` or empty string to disable.
David Ostrovskyfc9cdf02014-03-26 14:46:45 -07002081
Francois Ferrand1e933882014-09-25 11:19:08 +02002082Zip is not supported because it may be interpreted by a Java plugin as a
2083valid JAR file, whose code would have access to cookies on the domain.
2084For this reason `zip` format is always excluded from formats offered
2085through the `Download` drop down or accessible in the REST API.
2086
Stefan Bellere1b2ad32016-11-29 14:54:13 -08002087[[download.maxBundleSize]]download.maxBundleSize::
2088+
2089Specifies the maximum size of a bundle in bytes that can be downloaded.
2090As bundles are kept in memory this setting is to protect the server
2091from a single request consuming too much heap when generating
2092a bundle and thereby impacting other users.
2093+
2094Defaults to 100MB.
2095
Matthias Sohn0fb2c992014-06-03 01:42:59 +02002096[[gc]]
2097=== Section gc
2098
2099This section allows to configure the git garbage collection and schedules it
2100to run periodically. It will be triggered and executed sequentially for all
2101projects.
2102
Christian Halstricke6c68322015-03-11 15:21:42 +01002103[[gc.aggressive]]gc.aggressive::
2104+
2105Determines if scheduled garbage collections and garbage collections triggered
2106through Web-UI should run in aggressive mode or not. Aggressive garbage
2107collections are more expensive but may lead to significantly smaller
2108repositories.
2109+
2110Valid values are "true" and "false," default is "false".
2111
Matthias Sohn0fb2c992014-06-03 01:42:59 +02002112[[gc.startTime]]gc.startTime::
2113+
Edwin Kempind33d95a2018-02-16 11:44:04 +01002114The link:#schedule-configuration-startTime[start time] for running the
2115git garbage collection.
Matthias Sohn0fb2c992014-06-03 01:42:59 +02002116
2117[[gc.interval]]gc.interval::
2118+
Edwin Kempind33d95a2018-02-16 11:44:04 +01002119The link:#schedule-configuration-interval[interval] for running the
2120git garbage collection.
Matthias Sohn0fb2c992014-06-03 01:42:59 +02002121
Edwin Kempind33d95a2018-02-16 11:44:04 +01002122link:#schedule-configuration-examples[Schedule examples] can be found
2123in the link:#schedule-configuration[Schedule Configuration] section.
Matthias Sohn0fb2c992014-06-03 01:42:59 +02002124
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08002125[[gerrit]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002126=== Section gerrit
Shawn O. Pearceeb7f8ce2009-06-01 09:57:15 -07002127
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002128[[gerrit.basePath]]gerrit.basePath::
Shawn O. Pearce9743d0b2009-06-01 10:10:06 -07002129+
2130Local filesystem directory holding all Git repositories that
2131Gerrit knows about and can process changes for. A project
2132entity in Gerrit maps to a local Git repository by creating
Edwin Kempincdb0e002011-09-08 14:23:30 +02002133the path string `"${basePath}/${project_name}.git"`.
Shawn O. Pearce9743d0b2009-06-01 10:10:06 -07002134+
2135If relative, the path is resolved relative to `'$site_path'`.
2136
Shawn O. Pearce897d9212011-06-16 16:59:59 -07002137[[gerrit.allProjects]]gerrit.allProjects::
2138+
2139Name of the permissions-only project defining global server
2140access controls and settings. These are inherited into every
2141other project managed by the running server. The name is
2142relative to `gerrit.basePath`.
2143+
2144Defaults to `All-Projects` if not set.
2145
Marija Savtchouk714fbff2021-03-12 16:02:12 +00002146[[gerrit.defaultBranch]]gerrit.defaultBranch::
2147+
2148Name of the link:project-configuration.html#default-branch[default branch]
2149to use on the project creation, if no other branches were specified in the input.
2150+
2151Defaults to `refs/heads/master` if not set.
2152
Edwin Kempin2bf5edd2014-03-25 22:21:23 +01002153[[gerrit.allUsers]]gerrit.allUsers::
2154+
2155Name of the project in which meta data of all users is stored.
2156The name is relative to `gerrit.basePath`.
2157+
2158Defaults to `All-Users` if not set.
2159
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002160[[gerrit.canonicalWebUrl]]gerrit.canonicalWebUrl::
Shawn O. Pearceeb7f8ce2009-06-01 09:57:15 -07002161+
2162The default URL for Gerrit to be accessed through.
2163+
Sebastian Schuberth64037132016-07-28 13:40:16 +02002164Typically this would be set to something like "http://review.example.com/"
2165or "http://example.com:8080/gerrit/" so Gerrit can output links that point
Shawn O. Pearceeb7f8ce2009-06-01 09:57:15 -07002166back to itself.
2167+
2168Setting this is highly recommended, as its necessary for the upload
2169code invoked by "git push" or "repo upload" to output hyperlinks
2170to the newly uploaded changes.
2171
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002172[[gerrit.canonicalGitUrl]]gerrit.canonicalGitUrl::
Shawn O. Pearceeb7f8ce2009-06-01 09:57:15 -07002173+
2174Optional base URL for repositories available over the anonymous git
2175protocol. For example, set this to `git://mirror.example.com/base/`
2176to have Gerrit display patch set download URLs in the UI. Gerrit
2177automatically appends the project name onto the end of the URL.
2178+
2179By default unset, as the git daemon must be configured externally
2180by the system administrator, and might not even be running on the
2181same host as Gerrit.
2182
Dave Borowitza5d3fec2015-07-09 14:24:02 -07002183[[gerrit.docUrl]]gerrit.docUrl::
2184+
2185Optional base URL for documentation, under which one can find
2186"index.html", "rest-api.html", etc. Used as the base for the fixed set
2187of links in the "Documentation" tab. A slash is implicitly appended.
2188(For finer control over the top menu, consider writing a
2189link:dev-plugins.html#top-menu-extensions[plugin].)
2190+
2191If unset or empty, the documentation tab will only be shown if
2192`/Documentation/index.html` can be reached by the browser at app load
2193time.
2194
Dave Borowitza17a9842015-09-15 09:58:17 -04002195[[gerrit.editGpgKeys]]gerrit.editGpgKeys::
2196+
2197If enabled and server-side signed push validation is also
2198link:#receive.enableSignedPush[enabled], enable the
2199link:rest-api-accounts.html#list-gpg-keys[REST API endpoints] and web UI
2200for editing GPG keys. If disabled, GPG keys can only be added by
2201administrators with direct git access to All-Users.
2202+
2203Defaults to true.
2204
Dave Borowitz76ab1a12013-05-10 17:01:29 +01002205[[gerrit.installCommitMsgHookCommand]]gerrit.installCommitMsgHookCommand::
2206+
2207Optional command to install the `commit-msg` hook. Typically of the
2208form:
David Pursehouse05588e52015-01-07 14:25:11 +09002209+
Dave Borowitz76ab1a12013-05-10 17:01:29 +01002210----
2211fetch-cmd some://url/to/commit-msg .git/hooks/commit-msg ; chmod +x .git/hooks/commit-msg
2212----
2213+
2214By default unset; falls back to using scp from the canonical SSH host,
2215or curl from the canonical HTTP URL for the server. Only necessary if a
2216proxy or other server/network configuration prevents clients from
2217fetching from the default location.
2218
Shawn O. Pearce5d6de522011-10-07 18:00:16 -07002219[[gerrit.gitHttpUrl]]gerrit.gitHttpUrl::
2220+
2221Optional base URL for repositories available over the HTTP
2222protocol. For example, set this to `http://mirror.example.com/base/`
2223to have Gerrit display URLs from this server, rather than itself.
2224+
2225By default unset, as the HTTP daemon must be configured externally
2226by the system administrator, and might not even be running on the
2227same host as Gerrit.
Luca Milanesio2c7ff592021-02-15 23:53:09 +00002228+
2229[[gerrit.installBatchModule]]gerrit.installBatchModule::
2230+
2231Repeatable list of class name of additional Guice modules to load as
2232override to the batchInjector's modules during the init phases.
2233Classes are resolved using the primary Gerrit class loader, hence the
2234class needs to be either declared in Gerrit or an additional JAR
2235located under the `/lib` directory.
2236+
2237By default unset.
2238+
Luca Milanesiob8ec7e22019-04-29 07:26:11 +01002239[[gerrit.installDbModule]]gerrit.installDbModule::
2240+
2241Repeatable list of class name of additional Guice modules to load at
Luca Milanesio2c7ff592021-02-15 23:53:09 +00002242Gerrit startup as part of the dbInjector.
Luca Milanesiob8ec7e22019-04-29 07:26:11 +01002243Classes are resolved using the primary Gerrit class loader, hence the
2244class needs to be either declared in Gerrit or an additional JAR
2245located under the `/lib` directory.
2246+
2247By default unset.
2248
Luca Milanesio62cc3502016-11-15 10:22:38 -08002249[[gerrit.installModule]]gerrit.installModule::
2250+
2251Repeatable list of class name of additional Guice modules to load at
Luca Milanesio2c7ff592021-02-15 23:53:09 +00002252Gerrit startup as part of the sysInjector.
Luca Milanesio62cc3502016-11-15 10:22:38 -08002253Classes are resolved using the primary Gerrit class loader, hence the
2254class needs to be either declared in Gerrit or an additional JAR
2255located under the `/lib` directory.
2256+
2257By default unset.
2258+
2259Example:
2260----
2261[gerrit]
2262 installModule = com.googlesource.gerrit.libmodule.MyModule
2263 installModule = com.example.abc.OurSpecialSauceModule
Luca Milanesiob8ec7e22019-04-29 07:26:11 +01002264 installDbModule = com.example.def.OurCustomProvider
Luca Milanesio2c7ff592021-02-15 23:53:09 +00002265 installBatchModule = com.example.ghi.CustomBatchInitModule
Luca Milanesio62cc3502016-11-15 10:22:38 -08002266----
2267
Luca Milanesio92254852019-02-14 01:33:14 +00002268[[gerrit.listProjectsFromIndex]]gerrit.listProjectsFromIndex::
2269+
2270Enable rendering of project list from the secondary index instead
2271of purely relying on the in-memory cache.
2272+
2273By default false.
2274+
2275[NOTE]
2276The in-memory cache (set to false) rendering provides an **unlimited list** as a result
2277of the list project API, causing the full list of projects to be
2278returned as a result of the link:rest-api-projects.html[/projects/] REST API
2279or the link:cmd-ls-projects.html[gerrit ls-projects] SSH command.
2280When the rendering from the secondary index (set to true),
2281the **list is limited** by the global capability
2282link:access-control.html#capability_queryLimit[queryLimit]
2283which is defaulted to 500 entries.
2284
Sven Selberge63e92d2019-01-22 18:19:19 +01002285[[gerrit.primaryWeblinkName]]gerrit.primaryWeblinkName::
2286+
2287Name of the link:dev-plugins.html#links-to-external-tools[Weblink] that should
2288be chosen in cases where only one Weblink can be used in the UI, for example in
2289inline links.
2290+
2291By default unset, meaning that the UI is responsible for trying to identify
2292a weblink to be used in these cases, most likely weblinks that links to code
2293browsers with known integrations with Gerrit (like Gitiles and Gitweb).
2294+
2295Example:
2296----
2297[gerrit]
2298 primaryWeblinkName = gitiles
2299----
2300
Shawn O. Pearceb8bea1b2012-08-16 17:18:58 -07002301[[gerrit.reportBugUrl]]gerrit.reportBugUrl::
2302+
David Pursehouse214ab862014-12-01 11:48:26 +09002303URL to direct users to when they need to report a bug.
2304+
2305By default unset, meaning no bug report URL will be displayed. Administrators
2306should set this to the URL of their issue tracker, if necessary.
Shawn O. Pearceb8bea1b2012-08-16 17:18:58 -07002307
David Ostrovsky8e6acc92021-04-14 20:00:37 +02002308[[gerrit.enablePeerIPInReflogRecord]]gerrit.enablePeerIPInReflogRecord::
2309
2310Record actual peer IP address in ref log entry for identified user.
2311
David Ostrovsky9f200d22021-04-17 14:06:12 +02002312Defaults to false.
David Ostrovsky8e6acc92021-04-14 20:00:37 +02002313
David Pursehouse962e1182014-12-03 17:17:52 +09002314[[gerrit.secureStoreClass]]gerrit.secureStoreClass::
2315+
2316Use the secure store implementation from a specified class.
2317+
2318If specified, must be the fully qualified class name of a class that implements
2319the `com.google.gerrit.server.securestore.SecureStore` interface, and the jar
2320file containing the class must be placed in the `$site_path/lib` folder.
2321+
2322If not specified, the default no-op implementation is used.
2323
Dariusz Luksza7a046da2014-04-03 17:05:47 +02002324[[gerrit.canLoadInIFrame]]gerrit.canLoadInIFrame::
2325+
2326For security reasons Gerrit will always jump out of iframe.
2327Setting this option to true will prevent this behavior.
2328+
2329By default false.
2330
Marcin Czech559ea2b2020-06-15 17:36:18 +02002331[[gerrit.xframeOption]]gerrit.xframeOption::
2332+
2333Add link:https://tools.ietf.org/html/rfc7034[`X-Frame-Options`] header to all HTTP
2334responses. The `X-Frame-Options` HTTP response header can be used to indicate
2335whether or not a browser should be allowed to render a page in a
2336`<frame>`, `<iframe>`, `<embed>` or `<object>`.
2337+
2338Available values:
2339+
23401. ALLOW - The page can be displayed in a frame.
23412. SAMEORIGIN - The page can only be displayed in a frame on the same origin as the page itself.
2342+
2343If link:#gerrit.canLoadInIFrame is set to false this option is ignored and the
2344`X-Frame-Options` header is always set to `DENY`.
2345Setting this option to `ALLOW` will cause the `X-Frame-Options` header to be omitted
2346the the page can be displayed in a frame.
2347+
2348By default SAMEORIGIN.
2349
Wyatt Allen414659c2017-03-15 09:55:31 -07002350[[gerrit.cdnPath]]gerrit.cdnPath::
2351+
Ben Rohlfsda0a62b2021-04-26 17:02:19 +02002352Path prefix for Gerrit's static resources if using a CDN.
Wyatt Allen414659c2017-03-15 09:55:31 -07002353
Viktar Donich65ae7482017-10-20 14:13:31 -07002354[[gerrit.faviconPath]]gerrit.faviconPath::
2355+
Ben Rohlfsda0a62b2021-04-26 17:02:19 +02002356Path for Gerrit's favicon after link:#gerrit.canonicalWebUrl[default URL],
Viktar Donich65ae7482017-10-20 14:13:31 -07002357including icon name and extension (.ico should be used).
2358
Fabio Ponciroli829be0d2020-05-06 13:59:20 +02002359[[gerrit.instanceId]]gerrit.instanceId::
2360+
2361Optional identifier for this Gerrit instance.
2362Used to identify a specific instance within a group of Gerrit instances with the
2363same `serverId` (i.e.: a Gerrit cluster).
2364Unlike `instanceName` this value is not available in the email templates.
Maxime Guerreiro8d129d42018-03-21 18:59:27 +01002365
2366[[gerrit.instanceName]]gerrit.instanceName::
2367+
2368Short identifier for this Gerrit instance.
2369A good name should be short but precise enough so that users can identify the instance among others.
2370+
2371Defaults to the full hostname of the Gerrit server.
2372
Luca Milanesio1a3d84f2020-05-04 17:14:12 +01002373[[gerrit.experimentalRollingUpgrade]]gerrit.experimentalRollingUpgrade::
2374+
2375Enable Gerrit rolling upgrade to the next version.
Luca Milanesioba8dfad2020-11-27 12:59:07 +00002376For example if Gerrit v3.2 is version N (All-Projects:refs/meta/version=183)
2377then its next version N+1 is v3.3 (All-Projects:refs/meta/version=184).
Luca Milanesio1a3d84f2020-05-04 17:14:12 +01002378Allow Gerrit to start even if the underlying schema version has been bumped to
2379the next Gerrit version.
2380+
2381Set to true if Gerrit is installed in
2382[high-availability configuration](https://gerrit.googlesource.com/plugins/high-availability/+/refs/heads/master/README.md)
2383during the rolling upgrade to the next version.
2384+
2385By default false.
2386+
2387The rolling upgrade process, at high level, assumes that Gerrit is installed
2388on two or more nodes sharing the repositories over NFS. The upgrade is composed
2389of the following steps:
2390+
23911. Set gerrit.experimentalRollingUpgrade to true on all Gerrit masters
23922. Set the first master unhealthy
23933. Shutdown the first master and [upgrade](install.html#init) to the next version
Luca Milanesioba8dfad2020-11-27 12:59:07 +000023944. Startup the first master, wait for the online reindex to complete (where applicable)
Luca Milanesio1a3d84f2020-05-04 17:14:12 +010023955. Verify the the first master upgrade is successful and online reindex is complete
23966. Set the first master healthy
23977. Repeat steps 2. to 6. for all the other Gerrit nodes
2398+
2399[WARNING]
2400Rolling upgrade may or may not be possible depending on the changes introduced
2401by the target version of the upgrade. Refer to the release notes and check whether
2402the rolling upgrade is possible or not and the associated constraints.
Maxime Guerreiro8d129d42018-03-21 18:59:27 +01002403
Sven Selberg327c2e42018-04-10 11:42:19 +02002404[[gerrit.serverId]]gerrit.serverId::
2405+
2406Used by NoteDb to, amongst other things, identify author identities from
2407per-server specific account IDs.
2408+
2409If this value is not set on startup it is automatically set to a random UUID.
2410+
2411[NOTE]
2412If this value doesn't match the serverId used when creating an already existing
2413NoteDb, Gerrit will not be able to use that instance of NoteDb. The serverId
2414used to create the NoteDb will show in the resulting exception message in case
2415the value differs.
2416
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08002417[[gitweb]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002418=== Section gitweb
Shawn O. Pearced7ba11f2009-06-01 09:35:41 -07002419
Shawn O. Pearce618dae22010-03-12 19:07:43 -08002420Gerrit can forward requests to either an internally managed gitweb
2421(which allows Gerrit to enforce some access controls), or to an
2422externally managed gitweb (where the web server manages access).
Shawn O. Pearced7ba11f2009-06-01 09:35:41 -07002423See also link:config-gitweb.html[Gitweb Integration].
2424
Shawn O. Pearce618dae22010-03-12 19:07:43 -08002425[[gitweb.cgi]]gitweb.cgi::
2426+
2427Path to the locally installed `gitweb.cgi` executable. This CGI will
2428be called by Gerrit Code Review when the URL `/gitweb` is accessed.
2429Project level access controls are enforced prior to calling the CGI.
2430+
David Pursehousea89dc982016-09-15 09:35:44 +02002431Defaults to `/usr/lib/cgi-bin/gitweb.cgi` if `gitweb.url` is not set.
Shawn O. Pearce618dae22010-03-12 19:07:43 -08002432
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002433[[gitweb.url]]gitweb.url::
Shawn O. Pearced7ba11f2009-06-01 09:35:41 -07002434+
2435Optional URL of an affiliated gitweb service. Defines the
2436web location where a `gitweb.cgi` is installed to browse
David Pursehousea89dc982016-09-15 09:35:44 +02002437`gerrit.basePath` and the repositories it contains.
Shawn O. Pearced7ba11f2009-06-01 09:35:41 -07002438+
2439Gerrit appends any necessary query arguments onto the end of this URL.
David Pursehousea89dc982016-09-15 09:35:44 +02002440For example, `?p=$project.git;h=$commit`.
Shawn O. Pearced7ba11f2009-06-01 09:35:41 -07002441
Shane Mc Cormack27868a42009-12-28 04:49:39 +00002442[[gitweb.type]]gitweb.type::
2443+
2444Optional type of affiliated gitweb service. This allows using
David Pursehousea66f7ff2016-09-05 21:11:10 +09002445alternatives to gitweb, such as cgit.
Shane Mc Cormack27868a42009-12-28 04:49:39 +00002446+
Shawn O. Pearce2b11da02011-09-06 16:18:12 -07002447Valid values are `gitweb`, `cgit`, `disabled` or `custom`.
David Pursehousea66f7ff2016-09-05 21:11:10 +09002448+
2449If not set, or set to `disabled`, there is no gitweb hyperlinking
2450support.
Shane Mc Cormack27868a42009-12-28 04:49:39 +00002451
Edwin Kempind86909c2012-03-26 10:36:29 +02002452[[gitweb.revision]]gitweb.revision::
Shane Mc Cormack27868a42009-12-28 04:49:39 +00002453+
2454Optional pattern to use for constructing the gitweb URL when pointing
David Pursehousea89dc982016-09-15 09:35:44 +02002455at a specific commit when `gitweb.type` is set to `custom`.
Shane Mc Cormack27868a42009-12-28 04:49:39 +00002456+
Edwin Kempincdb0e002011-09-08 14:23:30 +02002457Valid replacements are `${project}` for the project name in Gerrit
Han-Wen Nienhuys37a1cab2021-04-01 12:46:00 +02002458and `${commit}` for the SHA-1 hash for the commit.
Shane Mc Cormack27868a42009-12-28 04:49:39 +00002459
Edwin Kempind86909c2012-03-26 10:36:29 +02002460[[gitweb.project]]gitweb.project::
Shane Mc Cormack27868a42009-12-28 04:49:39 +00002461+
2462Optional pattern to use for constructing the gitweb URL when pointing
David Pursehousea89dc982016-09-15 09:35:44 +02002463at a specific project when `gitweb.type` is set to `custom`.
Shane Mc Cormack27868a42009-12-28 04:49:39 +00002464+
Edwin Kempincdb0e002011-09-08 14:23:30 +02002465Valid replacements are `${project}` for the project name in Gerrit.
Shane Mc Cormack27868a42009-12-28 04:49:39 +00002466
Edwin Kempind86909c2012-03-26 10:36:29 +02002467[[gitweb.branch]]gitweb.branch::
Shane Mc Cormack27868a42009-12-28 04:49:39 +00002468+
2469Optional pattern to use for constructing the gitweb URL when pointing
David Pursehousea89dc982016-09-15 09:35:44 +02002470at a specific branch when `gitweb.type` is set to `custom`.
Shane Mc Cormack27868a42009-12-28 04:49:39 +00002471+
Edwin Kempincdb0e002011-09-08 14:23:30 +02002472Valid replacements are `${project}` for the project name in Gerrit
2473and `${branch}` for the name of the branch.
Shane Mc Cormack27868a42009-12-28 04:49:39 +00002474
Paladox none5759f2c2017-10-27 18:13:54 +00002475[[gitweb.tag]]gitweb.tag::
2476+
2477Optional pattern to use for constructing the gitweb URL when pointing
2478at a specific tag when `gitweb.type` is set to `custom`.
2479+
2480Valid replacements are `${project}` for the project name in Gerrit
2481and `${tag}` for the name of the tag.
2482
Colby Ranger79d4ebe2013-12-16 14:19:18 -08002483[[gitweb.roottree]]gitweb.roottree::
2484+
2485Optional pattern to use for constructing the gitweb URL when pointing
David Pursehousea89dc982016-09-15 09:35:44 +02002486at the contents of the root tree in a specific commit when `gitweb.type`
2487is set to `custom`.
Colby Ranger79d4ebe2013-12-16 14:19:18 -08002488+
2489Valid replacements are `${project}` for the project name in Gerrit
Han-Wen Nienhuys37a1cab2021-04-01 12:46:00 +02002490and `${commit}` for the SHA-1 hash for the commit.
Colby Ranger79d4ebe2013-12-16 14:19:18 -08002491
2492[[gitweb.file]]gitweb.file::
2493+
2494Optional pattern to use for constructing the gitweb URL when pointing
David Pursehousea89dc982016-09-15 09:35:44 +02002495at the contents of a file in a specific commit when `gitweb.type` is
2496set to `custom`.
Colby Ranger79d4ebe2013-12-16 14:19:18 -08002497+
2498Valid replacements are `${project}` for the project name in Gerrit,
Han-Wen Nienhuys37a1cab2021-04-01 12:46:00 +02002499`${file}` for the file name and `${commit}` for the SHA-1 hash for
Colby Ranger79d4ebe2013-12-16 14:19:18 -08002500the commit.
2501
Edwin Kempin64011562012-03-26 10:50:12 +02002502[[gitweb.filehistory]]gitweb.filehistory::
2503+
2504Optional pattern to use for constructing the gitweb URL when pointing
David Pursehousea89dc982016-09-15 09:35:44 +02002505at the history of a file in a specific branch when when `gitweb.type`
2506is set to `custom`.
Edwin Kempin64011562012-03-26 10:50:12 +02002507+
2508Valid replacements are `${project}` for the project name in Gerrit,
2509`${file}` for the file name and `${branch}` for the name of the
2510branch.
2511
Gustaf Lundha07d2e72011-10-27 15:26:35 -07002512[[gitweb.linkname]]gitweb.linkname::
2513+
2514Optional setting for modifying the link name presented to the user
2515in the Gerrit web-UI.
2516+
David Pursehousea89dc982016-09-15 09:35:44 +02002517The default linkname for custom type is `gitweb`.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002518
Adrian Goerlerf2007072011-11-10 08:39:55 +01002519[[gitweb.pathSeparator]]gitweb.pathSeparator::
2520+
2521Optional character to substitute the standard path separator (slash) in
2522project names and branch names.
2523+
2524By default, Gerrit will use hexadecimal encoding for slashes in project and
2525branch names. Some web servers, such as Tomcat, reject this hexadecimal
2526encoding in the URL.
2527+
Marian Harbach34253372019-12-10 18:01:31 +01002528Some alternative gitweb services, such as link:http://gitblit.com[Gitblit,role=external,window=_blank],
Adrian Goerlerf2007072011-11-10 08:39:55 +01002529allow using an alternative path separator character. In Gitblit, this can be
Marian Harbach34253372019-12-10 18:01:31 +01002530configured through the property link:http://gitblit.com/properties.html[web.forwardSlashCharacter,role=external,window=_blank].
Adrian Goerlerf2007072011-11-10 08:39:55 +01002531In Gerrit, the alternative path separator can be configured correspondingly
David Pursehousea89dc982016-09-15 09:35:44 +02002532using the property `gitweb.pathSeparator`.
Adrian Goerlerf2007072011-11-10 08:39:55 +01002533+
David Pursehousea89dc982016-09-15 09:35:44 +02002534Valid values are the characters `*`, `(` and `)`.
Adrian Goerlerf2007072011-11-10 08:39:55 +01002535
David Pursehouse5d592e82016-06-09 05:12:26 +00002536[[gitweb.urlEncode]]gitweb.urlEncode::
Luca Milanesio25312032013-10-11 11:34:39 +01002537+
2538Whether or not Gerrit should encode the generated viewer URL.
2539+
2540Gerrit composes the viewer URL using information about the project, branch, file
2541or commit of the target object to be displayed. Typically viewers such as CGit
David Pursehousea89dc982016-09-15 09:35:44 +02002542and gitweb do need those parts to be encoded, including the `/` in project's name,
Luca Milanesio25312032013-10-11 11:34:39 +01002543for being correctly parsed.
2544However other viewers could instead require an unencoded URL (e.g. GitHub web
David Pursehousea89dc982016-09-15 09:35:44 +02002545based viewer).
Luca Milanesio25312032013-10-11 11:34:39 +01002546+
David Pursehousea89dc982016-09-15 09:35:44 +02002547Valid values are `true` and `false`. The default is `true`.
Luca Milanesio25312032013-10-11 11:34:39 +01002548
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08002549[[groups]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002550=== Section groups
Edwin Kempin4bbff702013-01-11 09:59:53 +01002551
Patrick Hiesela0242422020-11-30 16:54:21 +01002552[[groups.includeExternalUsersInRegisteredUsersGroup]]groups.includeExternalUsersInRegisteredUsersGroup::
2553+
2554Controls whether external users (these are users we have sufficient
2555knowledge about but who don't yet have a Gerrit account) are considered
2556to be members of the `REGISTERED_USERS` group.
2557+
2558This setting only makes sense if you run custom code (e.g. from a plugin
2559or a custom authentication backend). By default, Gerrit core always requires
2560users to register and doesn't use external users.
2561+
2562By default, true.
2563
Edwin Kempin4bbff702013-01-11 09:59:53 +01002564[[groups.newGroupsVisibleToAll]]groups.newGroupsVisibleToAll::
2565+
2566Controls whether newly created groups should be by default visible to
2567all registered users.
2568+
2569By default, false.
2570
Edwin Kempinf3eddd52017-01-20 14:05:47 +01002571[[groups.uuid.name]]groups.<uuid>.name::
2572+
2573Display name for group with the given UUID.
2574+
2575This option is only supported for system groups (scheme 'global').
2576+
2577E.g. this parameter can be used to configure another name for the
2578`Anonymous Users` group:
2579+
2580----
2581[groups "global:Anonymous-Users"]
2582 name = All Users
2583----
2584+
2585When setting this parameter it should be verified that there is no
2586existing group with the same name (case-insensitive). Configuring an
2587ambiguous name makes Gerrit fail on startup. Once set Gerrit ensures
2588that it is not possible to create a group with this name. Gerrit also
2589keeps the default name reserved so that it cannot be used for new
2590groups either. This means there is no danger of ambiguous group names
2591when this parameter is removed and the system group uses the default
2592name again.
2593
Prakash Aswala6d49fb2020-02-27 15:09:30 +05302594[[has-operand-alias]]
2595=== Section has operand alias
2596
2597'has' operand aliasing allows global aliases to be defined for query
2598'has' operands. Currently only change queries are supported. The alias
2599name is the git config key name, and the 'has' operand being aliased
2600is the git config value.
2601
2602For example:
2603
2604----
2605[has-operand-alias "change"]
2606 oldtopic = topic
2607----
2608
2609This section is particularly useful to alias 'has' operands (which may
2610be long and clunky as they include a plugin name in them) to shorter
2611operands without the plugin name. Admins should take care to choose
2612shorter operands that are unique and unlikely to conflict in the future.
2613
2614Aliases are resolved dynamically at invocation time to the currently
2615loaded version of plugins. If a referenced plugin is not loaded, or
2616does not define the command, "unsupported operand" is returned to the
2617user.
2618
2619Aliases will override existing 'has' operands. In case of multiple
2620aliases with same name, the last one defined will be used.
2621
2622When the target of an alias does not exist, the 'has' operand with the
2623name of the alias will be used (if present). This enables an admin to
2624configure the system to override a core 'has' operand with an operand
2625provided by a plugin when present and otherwise fall back to the 'has'
2626operand provided by core.
2627
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08002628[[http]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002629=== Section http
Shawn O. Pearce309d8d32009-11-17 16:03:16 -08002630
2631[[http.proxy]]http.proxy::
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08002632+
2633URL of the proxy server when making outgoing HTTP
2634connections for OpenID login transactions. Syntax
2635should be `http://`'hostname'`:`'port'.
Shawn O. Pearce309d8d32009-11-17 16:03:16 -08002636
2637[[http.proxyUsername]]http.proxyUsername::
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08002638+
2639Optional username to authenticate to the HTTP proxy with.
Robin Rosenberg524a3032012-10-14 14:24:36 +02002640This property is honored only if the username does not
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08002641appear in the http.proxy property above.
Shawn O. Pearce309d8d32009-11-17 16:03:16 -08002642
2643[[http.proxyPassword]]http.proxyPassword::
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08002644+
2645Optional password to authenticate to the HTTP proxy with.
Robin Rosenberg524a3032012-10-14 14:24:36 +02002646This property is honored only if the password does not
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08002647appear in the http.proxy property above.
Shawn O. Pearce309d8d32009-11-17 16:03:16 -08002648
Hugo Arès88e33ac2014-03-03 13:52:45 -05002649[[http.addUserAsRequestAttribute]]http.addUserAsRequestAttribute::
2650+
2651If true, 'User' attribute will be added to the request attributes so it
2652can be accessed outside the request scope (will be set to username or id
2653if username not configured).
2654+
2655This attribute can be used by the servlet container to log user in the
2656http access log.
2657+
2658When running the embedded servlet container, this attribute is used to
2659print user in the httpd_log.
2660+
2661* `%{User}r`
2662+
2663Pattern to print user in Tomcat AccessLog.
2664
2665+
2666Default value is true.
Shawn O. Pearce309d8d32009-11-17 16:03:16 -08002667
Gustaf Lundhe45c3332018-05-02 10:52:11 +02002668[[http.addUserAsResponseHeader]]http.addUserAsResponseHeader::
2669+
2670If true, the header 'User' will be added to the list of response headers so it
2671can be accessed from a reverse proxy for logging purposes.
2672
2673+
2674Default value is false.
2675
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08002676[[httpd]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002677=== Section httpd
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08002678
2679The httpd section configures the embedded servlet container.
2680
2681[[httpd.listenUrl]]httpd.listenUrl::
2682+
Gert van Dijk70e26612019-09-29 16:20:25 +02002683Configuration for the listening sockets of the internal HTTP daemon.
2684Each entry of `listenUrl` combines the following options for a
2685listening socket: protocol, network address, port and context path.
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08002686+
Gert van Dijk70e26612019-09-29 16:20:25 +02002687_Protocol_ can be either `http://`, `https://`, `proxy-http://` or
2688`proxy-https://`. The latter two are special forms of `http://` with
2689awareness of a reverse proxy (see below). _Network address_ selects
2690the interface and/or scope of the listening socket. For notes
2691examples, see below. _Port_ is the TCP port number and is optional
2692(default value depends on the protocol). _Context path_ is the
2693optional "base URI" for the Gerrit Code Review as application to
2694serve on.
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08002695+
Gert van Dijk70e26612019-09-29 16:20:25 +02002696**Protocol** schemes:
2697+
2698* `http://`
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08002699+
2700Plain-text HTTP protocol. If port is not supplied, defaults to 80,
2701the standard HTTP port.
2702+
Gert van Dijk70e26612019-09-29 16:20:25 +02002703* `https://`
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08002704+
2705SSL encrypted HTTP protocol. If port is not supplied, defaults to
2706443, the standard HTTPS port.
2707+
Gert van Dijk70e26612019-09-29 16:20:25 +02002708For configuration of the certificate and private key, see
2709<<httpd.sslKeyStore,httpd.sslKeyStore>>.
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08002710+
Gert van Dijk70e26612019-09-29 16:20:25 +02002711[NOTE]
2712SSL/TLS configuration capabilities of Gerrit internal HTTP daemon
2713are very limited. Externally facing production sites are strongly
2714encouraged to use a reverse proxy configuration to handle SSL/TLS
2715and use a `proxy-https://` scheme here (below) for security and
2716performance reasons.
2717+
2718* `proxy-http://`
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08002719+
2720Plain-text HTTP relayed from a reverse proxy. If port is not
2721supplied, defaults to 8080.
2722+
Gert van Dijk70e26612019-09-29 16:20:25 +02002723Like `http://`, but additional header parsing features are
2724enabled to honor `X-Forwarded-For`, `X-Forwarded-Host` and
2725`X-Forwarded-Server`. These headers are typically set by Apache's
Marian Harbach34253372019-12-10 18:01:31 +01002726link:https://httpd.apache.org/docs/2.4/mod/mod_proxy.html#x-headers[mod_proxy,role=external,window=_blank].
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08002727+
Gert van Dijk70e26612019-09-29 16:20:25 +02002728[NOTE]
2729--
2730For secruity reasons, make sure to only allow connections from a
2731trusted reverse proxy in your network, as clients could otherwise
2732easily spoof these headers and thus spoof their originating IP
2733address effectively. If the reverse proxy is running on the same
2734machine as Gerrit daemon, the use of a _loopback_ network address
2735to bind to (see below) is strongly recommended to mitigate this.
2736
2737If not using Apache's mod_proxy, validate that your reverse proxy
2738sets these headers on all requests. If not, either configure it to
2739sanitize them from the origin, or use the `http://` scheme instead.
2740--
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08002741+
Gert van Dijk70e26612019-09-29 16:20:25 +02002742* `proxy-https://`
2743+
2744Plain-text HTTP relayed from a reverse proxy that has already
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08002745handled the SSL encryption/decryption. If port is not supplied,
2746defaults to 8080.
2747+
Gert van Dijk70e26612019-09-29 16:20:25 +02002748Behaves exactly like `proxy-http://`, but also sets the scheme to
2749assume `https://` is the proper URL back to the server.
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08002750
2751+
Edwin Kempina09ebcf2015-04-16 14:53:23 +02002752--
Gert van Dijk70e26612019-09-29 16:20:25 +02002753**Network address** forms:
2754
2755* Loopback (localhost): `127.0.0.1` (IPv4) or `[::1]` (IPv6).
2756* All (unspecified): `0.0.0.0` (IPv4), `[::]` (IPv6) or `*`
2757 (IPv4 and IPv6)
2758* Interface IP address, e.g. `1.2.3.4` (IPv4) or
2759 `[2001:db8::a00:20ff:fea7:ccea]` (IPv6)
2760* Hostname, resolved at startup time to an address.
2761
2762**Context path** is the local part of the URL to be used to access
2763Gerrit on ('base URL'). E.g. `/gerrit/` to serve Gerrit on that URI
2764as base. If set, consider to align this with the
2765<<gerrit.canonicalWebUrl,gerrit.canonicalWebUrl>> setting. Correct
2766settings may depend on the reverse proxy configuration as well. By
2767default, this is `/` so that Gerrit serves requests on the root.
2768
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08002769If multiple values are supplied, the daemon will listen on all
2770of them.
Edwin Kempina09ebcf2015-04-16 14:53:23 +02002771
Gert van Dijk70e26612019-09-29 16:20:25 +02002772Examples:
2773
2774----
2775[httpd]
2776 listenUrl = proxy-https://127.0.0.1:9999/gerrit/
2777[gerrit]
2778 # Reverse proxy is configured to serve with SSL/TLS on
2779 # example.com and to relay requests on /gerrit/ onto
2780 # http://127.0.0.1:9999/gerrit/
2781 canonicalWebUrl = https://example.com/gerrit/
2782----
2783
2784----
2785[httpd]
2786 # Listen on specific external interface with plaintext
2787 # HTTP on IPv6.
2788 listenUrl = http://[2001:db8::a00:20ff:fea7:ccea]
2789
2790 # Also listen on specific internal interface for use with
2791 # reverse proxy run on another host.
2792 listenUrl = proxy-https://192.168.100.123
2793----
2794
2795See also the page on link:config-reverseproxy.html[reverse proxy]
2796configuration.
2797
2798By default, `\http://*:8080`.
Edwin Kempina09ebcf2015-04-16 14:53:23 +02002799--
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08002800
2801[[httpd.reuseAddress]]httpd.reuseAddress::
2802+
2803If true, permits the daemon to bind to the port even if the port
2804is already in use. If false, the daemon ensures the port is not
2805in use before starting. Busy sites may need to set this to true
2806to permit fast restarts.
2807+
2808By default, true.
2809
Luca Milanesio4e2bb452018-03-21 09:07:24 +00002810[[httpd.gracefulStopTimeout]]httpd.gracefulStopTimeout::
2811+
2812Set a graceful stop time. If set, the daemon ensures that all incoming
2813calls are preserved for a maximum period of time, before starting
2814the graceful shutdown process. Sites behind a workload balancer such as
2815HAProxy would need this to be set for avoiding serving errors during
2816rolling restarts.
2817+
2818Values should use common unit suffixes to express their setting:
2819+
2820* s, sec, second, seconds
2821* m, min, minute, minutes
2822+
2823By default, 0 seconds (immediate shutdown).
2824
Thomas Meyeraa93fdf2016-10-23 10:53:48 +02002825[[httpd.inheritChannel]]httpd.inheritChannel::
2826+
2827If true, permits the daemon to inherit its server socket channel
2828from fd0/1(stdin/stdout). When set to true, the server can be socket
2829activated via systemd or xinetd.
2830+
2831By default, false.
2832
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08002833[[httpd.requestHeaderSize]]httpd.requestHeaderSize::
2834+
2835Size, in bytes, of the buffer used to parse the HTTP headers of an
2836incoming HTTP request. The entire request headers, including any
2837cookies sent by the browser, must fit within this buffer, otherwise
2838the server aborts with the response '413 Request Entity Too Large'.
2839+
2840One buffer of this size is allocated per active connection.
2841Allocating a buffer that is too large wastes memory that cannot be
2842reclaimed, allocating a buffer that is too small may cause unexpected
2843errors caused by very long Referer URLs or large cookie values.
2844+
2845By default, 16384 (16 K), which is sufficient for most OpenID and
2846other web-based single-sign-on integrations.
2847
Chulho Yangb72ff8f2013-07-04 02:35:53 -04002848[[httpd.sslCrl]]httpd.sslCrl::
2849+
2850Path of the certificate revocation list file in PEM format. This
2851crl file is optional, and available for CLIENT_SSL_CERT_LDAP
2852authentication.
2853+
2854To create and view a crl using openssl:
2855+
2856----
2857openssl ca -gencrl -out crl.pem
2858openssl crl -in crl.pem -text
2859----
2860+
2861If not absolute, the path is resolved relative to `$site_path`.
2862+
2863By default, `$site_path/etc/crl.pem`.
2864
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08002865[[httpd.sslKeyStore]]httpd.sslKeyStore::
2866+
2867Path of the Java keystore containing the server's SSL certificate
2868and private key. This keystore is required for `https://` in URL.
2869+
2870To create a self-signed certificate for simple internal usage:
2871+
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08002872----
2873keytool -keystore keystore -alias jetty -genkey -keyalg RSA
2874chmod 600 keystore
2875----
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08002876+
2877If not absolute, the path is resolved relative to `$site_path`.
2878+
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08002879By default, `$site_path/etc/keystore`.
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08002880
2881[[httpd.sslKeyPassword]]httpd.sslKeyPassword::
2882+
2883Password used to decrypt the private portion of the sslKeyStore.
David Pursehouse221d4f62012-06-08 17:38:08 +09002884Java keystores require a password, even if the administrator
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08002885doesn't want to enable one.
2886+
2887If set to the empty string the embedded server will prompt for the
2888password during startup.
2889+
2890By default, `gerrit`.
2891
Shawn O. Pearce1766f502010-01-15 10:49:46 -08002892[[httpd.requestLog]]httpd.requestLog::
2893+
2894Enable (or disable) the `'$site_path'/logs/httpd_log` request log.
2895If enabled, an NCSA combined log format request log file is written
Matthias Sohn450bc202020-08-20 14:40:32 +02002896out by the internal HTTP daemon. The httpd log format is documented
2897link:logs.html#_httpd_log[here].
Shawn O. Pearce1766f502010-01-15 10:49:46 -08002898+
David Ostrovsky8e4a9902013-11-19 23:57:48 +01002899`log4j.appender` with the name `httpd_log` can be configured to overwrite
2900programmatic configuration.
2901+
Shawn O. Pearce1766f502010-01-15 10:49:46 -08002902By default, true if httpd.listenUrl uses http:// or https://,
2903and false if httpd.listenUrl uses proxy-http:// or proxy-https://.
2904
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08002905[[httpd.acceptorThreads]]httpd.acceptorThreads::
2906+
2907Number of worker threads dedicated to accepting new incoming TCP
David Pursehouse221d4f62012-06-08 17:38:08 +09002908connections and allocating them connection-specific resources.
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08002909+
2910By default, 2, which should be suitable for most high-traffic sites.
2911
2912[[httpd.minThreads]]httpd.minThreads::
2913+
2914Minimum number of spare threads to keep in the worker thread pool.
2915This number must be at least 1 larger than httpd.acceptorThreads
David Pursehouse92463562013-06-24 10:16:28 +09002916multiplied by the number of httpd.listenUrls configured.
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08002917+
2918By default, 5, suitable for most lower-volume traffic sites.
2919
2920[[httpd.maxThreads]]httpd.maxThreads::
2921+
2922Maximum number of threads to permit in the worker thread pool.
2923+
2924By default 25, suitable for most lower-volume traffic sites.
Saša Živkov3d4ed9f2017-10-13 15:30:29 +02002925+
2926[NOTE]
2927Unless SSH daemon is disabled, see <<sshd.listenAddress, sshd.listenAddress>>,
2928the max number of concurrent Git requests over HTTP and SSH together is
2929defined by the <<sshd.threads, sshd.threads>> and
2930<<sshd.batchThreads, sshd.batchThreads>>.
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08002931
2932[[httpd.maxQueued]]httpd.maxQueued::
2933+
2934Maximum number of client connections which can enter the worker
2935thread pool waiting for a worker thread to become available.
David Ostrovsky14fe8bc2014-03-26 06:03:44 -070029360 sets the queue size to the Integer.MAX_VALUE.
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08002937+
Luca Milanesio0ae62fe2015-09-04 07:56:00 -07002938By default 200.
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08002939
Shawn O. Pearcee5452b72010-01-15 14:32:50 -08002940[[httpd.maxWait]]httpd.maxWait::
2941+
David Pursehouse221d4f62012-06-08 17:38:08 +09002942Maximum amount of time a client will wait for an available
Shawn O. Pearcee5452b72010-01-15 14:32:50 -08002943thread to handle a project clone, fetch or push request over the
2944smart HTTP transport.
2945+
2946Values should use common unit suffixes to express their setting:
2947+
2948* s, sec, second, seconds
2949* m, min, minute, minutes
2950* h, hr, hour, hours
2951* d, day, days
2952* w, week, weeks (`1 week` is treated as `7 days`)
2953* mon, month, months (`1 month` is treated as `30 days`)
2954* y, year, years (`1 year` is treated as `365 days`)
2955
2956+
Edwin Kempina09ebcf2015-04-16 14:53:23 +02002957--
Shawn O. Pearcee5452b72010-01-15 14:32:50 -08002958If a unit suffix is not specified, `minutes` is assumed. If 0
2959is supplied, the maximum age is infinite and connections will not
2960abort until the client disconnects.
Edwin Kempina09ebcf2015-04-16 14:53:23 +02002961
Shawn O. Pearcee5452b72010-01-15 14:32:50 -08002962By default, 5 minutes.
Edwin Kempina09ebcf2015-04-16 14:53:23 +02002963--
Shawn O. Pearcee5452b72010-01-15 14:32:50 -08002964
Luca Milanesioce7b7452013-06-18 11:40:49 +01002965[[httpd.filterClass]]httpd.filterClass::
2966+
2967Class that implements the javax.servlet.Filter interface
2968for filtering any HTTP related traffic going through the Gerrit
2969HTTP protocol.
2970Class is loaded and configured in the Gerrit Jetty container
2971and run in front of all Gerrit URL handlers, allowing the filter
2972to inspect, modify, allow or reject each request.
2973It needs to be provided as JAR library
2974under $GERRIT_SITE/lib as it is resolved using the default Gerrit class
2975loader and cannot be dynamically loaded by a plugin.
2976+
2977Failing to load the Filter class would result in a Gerrit start-up
2978failure, as this class is supposed to provide mandatory filtering
2979in front of Gerrit HTTP protocol.
2980+
David Pursehouse42f42042013-08-01 14:02:25 +09002981Typical usage is in conjunction with the `auth.type=HTTP` as replacement
Luca Milanesioce7b7452013-06-18 11:40:49 +01002982of an Apache HTTP proxy layer as security enforcement on top of Gerrit
2983by returning a trusted username as HTTP Header.
2984+
Luca Milanesiodcb4bd52017-05-03 22:20:51 +01002985Allow multiple values to install multiple servlet filters.
2986+
Luca Milanesioce7b7452013-06-18 11:40:49 +01002987Example of using a security library secure.jar under $GERRIT_SITE/lib
Luca Milanesiodcb4bd52017-05-03 22:20:51 +01002988that provides a org.anyorg.MySecureHeaderFilter Servlet Filter that enforces
2989a trusted username in the `TRUSTED_USER` HTTP Header and
2990org.anyorg.MySecureIPFilter that performs source IP security filtering:
Dyrone Teng14fc0832019-09-27 16:59:02 +08002991+
Luca Milanesioce7b7452013-06-18 11:40:49 +01002992----
2993[auth]
2994 type = HTTP
2995 httpHeader = TRUSTED_USER
2996
Dariusz Lukszaaac01132015-02-11 12:13:07 +01002997[httpd]
Luca Milanesiodcb4bd52017-05-03 22:20:51 +01002998 filterClass = org.anyorg.MySecureHeaderFilter
2999 filterClass = org.anyorg.MySecureIPFilter
Luca Milanesioce7b7452013-06-18 11:40:49 +01003000----
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08003001
Teng Longc192ca92019-09-23 11:22:03 +08003002[[filterClass.className.initParam]]filterClass.<className>.initParam::
3003+
3004Gerrit supports customized pluggable HTTP filters as `filterClass`. This
3005option allows to pass extra initialization parameters to the filter. It
3006allows for multiple key/value pairs to be passed in this pattern:
3007+
3008----
3009initParam = <key>=<value>
3010----
3011For a comprehensive example:
3012+
3013----
3014[httpd]
3015 filterClass = org.anyorg.AFilter
3016 filterClass = org.anyorg.BFilter
3017[filterClass "org.anyorg.AFilter"]
3018 key1 = value1
3019 key2 = value2
3020[filterClass "org.anyorg.BFilter"]
3021 key3 = value3
3022----
3023
Luca Milanesiodca95d52017-05-09 21:22:21 +01003024[[httpd.idleTimeout]]httpd.idleTimeout::
3025+
3026Maximum idle time for a connection, which roughly translates to the
3027TCP socket `SO_TIMEOUT`.
3028+
Luca Milanesiodca95d52017-05-09 21:22:21 +01003029This value is interpreted as the maximum time between some progress
3030being made on the connection. So if a single byte is read or written,
3031then the timeout is reset.
3032+
David Pursehouse9f0e5bc2017-06-30 16:16:53 +09003033The max idle time is applied:
3034+
3035* When waiting for a new message to be received on a connection
3036* When waiting for a new message to be sent on a connection
3037
3038+
Luca Milanesiodca95d52017-05-09 21:22:21 +01003039By default, 30 seconds.
3040
Juan Hernandezec512562013-08-06 16:30:50 +02003041[[httpd.robotsFile]]httpd.robotsFile::
3042+
3043Location of an external robots.txt file to be used instead of the one
3044bundled with the .war of the application.
3045+
3046If not absolute, the path is resolved relative to `$site_path`.
3047+
3048If the file doesn't exist or can't be read the default robots.txt file
3049bundled with the .war will be used instead.
3050
Dariusz Luksza011cfed2014-04-03 10:23:35 +02003051[[httpd.registerMBeans]]httpd.registerMBeans::
3052+
3053Enable (or disable) registration of Jetty MBeans for Java JMX.
3054+
3055By default, false.
3056
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08003057[[index]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08003058=== Section index
David Pursehouse6d458432013-08-23 16:17:18 +09003059
3060The index section configures the secondary index.
3061
David Pursehouse3fc5ee32014-03-17 18:35:32 +09003062Note that after enabling the secondary index, the index must be built
3063using the link:pgm-reindex.html[reindex program] before restarting the
3064Gerrit server.
3065
David Pursehouse6d458432013-08-23 16:17:18 +09003066[[index.type]]index.type::
3067+
3068Type of secondary indexing employed by Gerrit. The supported
3069values are:
3070+
3071* `LUCENE`
3072+
3073A link:http://lucene.apache.org/[Lucene] index is used.
3074+
David Pursehouse8e72f532014-06-24 11:01:28 +09003075+
Dariusz Lukszaea529882017-04-25 15:11:31 +02003076* `ELASTICSEARCH` look into link:#elasticsearch[Elasticsearch section]
David Pursehouse8e72f532014-06-24 11:01:28 +09003077+
Marian Harbach34253372019-12-10 18:01:31 +01003078An link:https://www.elastic.co/products/elasticsearch[Elasticsearch,role=external,window=_blank] index is
David Pursehouse2e79e5b2018-04-20 10:23:29 +02003079used. Refer to the link:#elasticsearch[Elasticsearch section] for further
3080configuration details.
David Pursehouse6d458432013-08-23 16:17:18 +09003081
3082+
Shawn Pearced4ae3a162013-11-24 17:00:31 -08003083By default, `LUCENE`.
David Pursehouse6d458432013-08-23 16:17:18 +09003084
David Pursehouse904db302014-03-17 18:55:38 +09003085[[index.threads]]index.threads::
3086+
Hugo Arèsfab06702016-06-10 12:49:52 -04003087Number of threads to use for indexing in normal interactive operations. Setting
3088it to 0 disables the dedicated thread pool and indexing will be done in the same
3089thread as the operation.
David Pursehouse904db302014-03-17 18:55:38 +09003090+
Patrick Hieselbdbee9c2018-07-04 10:54:26 +02003091If not set or set to a zero, defaults to the number of logical CPUs as returned
3092by the JVM. If set to a negative value, defaults to a direct executor.
David Pursehouse00c82142014-01-22 17:41:09 +09003093
Dave Borowitz787af5f2014-10-22 16:26:00 -07003094[[index.batchThreads]]index.batchThreads::
3095+
3096Number of threads to use for indexing in background operations, such as
Christian Aistleitner6e3c1a12020-06-14 20:57:00 +02003097online schema upgrades, and also for offline reindexing.
Dave Borowitz787af5f2014-10-22 16:26:00 -07003098+
Patrick Hieselbdbee9c2018-07-04 10:54:26 +02003099If not set or set to a zero, defaults to the number of logical CPUs as returned
3100by the JVM. If set to a negative value, defaults to a direct executor.
Dave Borowitz787af5f2014-10-22 16:26:00 -07003101
Dave Borowitzd80b9342015-03-25 10:32:21 -07003102[[index.onlineUpgrade]]index.onlineUpgrade::
3103+
3104Whether to upgrade to new index schema versions while the server is
3105running. This is recommended as it prevents additional downtime during
3106Gerrit version upgrades (avoiding the need for an offline reindex step
3107using Reindex), but can add additional server load during the upgrade.
3108+
3109If set to false, there is no way to upgrade the index schema to take
3110advantage of new search features without restarting the server.
3111+
3112Defaults to true.
3113
Dave Borowitzb82fbcb2015-04-22 16:43:54 -07003114[[index.maxLimit]]index.maxLimit::
3115+
3116Maximum limit to allow for search queries. Requesting results above this
3117limit will truncate the list (but will still set `_more_changes` on
3118result lists). Set to 0 for no limit.
3119+
David Pursehouse7c1f4a42018-03-15 17:03:40 +09003120When `index.type` is set to `ELASTICSEARCH`, this value should not exceed
3121the `index.max_result_window` value configured on the Elasticsearch
David Pursehouse52c2b4a2018-04-10 23:38:57 +09003122server. If a value is not configured during site initialization, defaults to
312310000, which is the default value of `index.max_result_window` in Elasticsearch.
David Pursehouse7c1f4a42018-03-15 17:03:40 +09003124+
David Pursehouse52c2b4a2018-04-10 23:38:57 +09003125When `index.type` is set to `LUCENE`, defaults to no limit.
Dave Borowitzb82fbcb2015-04-22 16:43:54 -07003126
Dave Borowitzf56d3652015-04-22 17:35:34 -07003127[[index.maxPages]]index.maxPages::
3128+
3129Maximum number of pages of search results to allow, as index
3130implementations may have to scan through large numbers of skipped
3131results when searching with an offset. Requesting results starting past
3132this threshold times the requested limit will result in an error. Set to
31330 for no limit.
3134+
3135Defaults to no limit.
3136
Dave Borowitzd034ca82015-10-15 11:20:30 -04003137[[index.maxTerms]]index.maxTerms::
3138+
3139Maximum number of leaf terms to allow in a query. Too-large queries may
3140perform poorly, so setting this option causes query parsing to fail fast
Dave Borowitzada289c2018-12-18 13:24:14 -08003141before attempting to send them to the secondary index.
Dave Borowitzd034ca82015-10-15 11:20:30 -04003142+
Marco Miller6da22822016-01-29 12:31:38 -05003143When the index type is `LUCENE`, also sets the maximum number of clauses
3144permitted per BooleanQuery. This is so that all enforced query limits
3145are the same.
3146+
3147Defaults to 1024.
Dave Borowitzd034ca82015-10-15 11:20:30 -04003148
Dave Borowitz3747f0f2017-06-23 14:29:31 -04003149[[index.autoReindexIfStale]]index.autoReindexIfStale::
3150+
3151Whether to automatically check if a document became stale in the index
3152immediately after indexing it. If false, there is a race condition during two
3153simultaneous writes that may cause one of the writes to not be reflected in the
3154index. The check to avoid this does consume some resources.
3155+
Dave Borowitzb7da0762018-03-19 09:08:45 -04003156Defaults to false.
Dave Borowitz3747f0f2017-06-23 14:29:31 -04003157
Edwin Kempin0f0de862018-02-08 16:24:11 +01003158[[index.scheduledIndexer]]
3159==== Subsection index.scheduledIndexer
3160
3161This section configures periodic indexing. Periodic indexing is
Han-Wen Nienhuys348a6032019-09-24 19:44:57 +02003162intended to run only on replicas and only updates the group index.
3163Replication to replicas happens on Git level so that Gerrit is not aware
3164of incoming replication events. But replicas need an updated group index
Edwin Kempin0f0de862018-02-08 16:24:11 +01003165to resolve memberships of users for ACL validation. To keep the group
Han-Wen Nienhuys348a6032019-09-24 19:44:57 +02003166index in replicas up-to-date the Gerrit replica periodically scans the
Edwin Kempin0f0de862018-02-08 16:24:11 +01003167group refs in the All-Users repository to reindex groups if they are
3168stale.
3169
3170The scheduled reindexer is not able to detect group deletions that
Han-Wen Nienhuys348a6032019-09-24 19:44:57 +02003171happened while the replica was offline, but since group deletions are not
Edwin Kempin0f0de862018-02-08 16:24:11 +01003172supported this should never happen. If nevertheless groups refs were
Han-Wen Nienhuys348a6032019-09-24 19:44:57 +02003173deleted while a replica was offline a full offline link:pgm-reindex.html[
Edwin Kempin0f0de862018-02-08 16:24:11 +01003174reindex] must be performed.
3175
Han-Wen Nienhuys348a6032019-09-24 19:44:57 +02003176This section is only used if Gerrit runs in replica mode, otherwise it is
Edwin Kempin0f0de862018-02-08 16:24:11 +01003177ignored.
3178
Edwin Kempina32d4432018-02-16 17:18:31 +01003179[[index.scheduledIndexer.runOnStartup]]index.scheduledIndexer.runOnStartup::
3180+
3181Whether the scheduled indexer should run once immediately on startup.
Han-Wen Nienhuys348a6032019-09-24 19:44:57 +02003182If set to `true` the replica startup is blocked until all stale groups
3183were reindexed. Enabling this allows to prevent that replicas that were
Edwin Kempina32d4432018-02-16 17:18:31 +01003184offline for a longer period of time run with outdated group information
3185until the first scheduled indexing is done.
3186+
3187Defaults to `true`.
3188
Edwin Kempin0f0de862018-02-08 16:24:11 +01003189[[index.scheduledIndexer.enabled]]index.scheduledIndexer.enabled::
3190+
3191Whether the scheduled indexer is enabled. If the scheduled indexer is
3192disabled you must implement other means to keep the group index for the
Han-Wen Nienhuys348a6032019-09-24 19:44:57 +02003193replica up-to-date (e.g. by using ElasticSearch for the indexes).
Edwin Kempin0f0de862018-02-08 16:24:11 +01003194+
3195Defaults to `true`.
3196
3197[[index.scheduledIndexer.startTime]]index.scheduledIndexer.startTime::
3198+
3199The link:#schedule-configuration-startTime[start time] for running
3200the scheduled indexer.
3201+
3202Defaults to `00:00`.
3203
3204[[index.scheduledIndexer.interval]]index.scheduledIndexer.interval::
3205+
3206The link:#schedule-configuration-interval[interval] for running
3207the scheduled indexer.
3208+
3209Defaults to `5m`.
3210
3211link:#schedule-configuration-examples[Schedule examples] can be found
3212in the link:#schedule-configuration[Schedule Configuration] section.
3213
David Pursehouse902b3ee2014-07-09 16:17:49 +09003214==== Lucene configuration
3215
3216Open and closed changes are indexed in separate indexes named
3217'open' and 'closed' respectively.
3218
3219The following settings are only used when the index type is `LUCENE`.
David Pursehouseac88c362014-02-06 12:01:34 +09003220
David Pursehouse00c82142014-01-22 17:41:09 +09003221[[index.name.ramBufferSize]]index.name.ramBufferSize::
3222+
David Pursehouse00c82142014-01-22 17:41:09 +09003223Determines the amount of RAM that may be used for buffering added documents
3224and deletions before they are flushed to the index. See the
3225link:http://lucene.apache.org/core/4_6_0/core/org/apache/lucene/index/LiveIndexWriterConfig.html#setRAMBufferSizeMB(double)[
Marian Harbach34253372019-12-10 18:01:31 +01003226Lucene documentation,role=external,window=_blank] for further details.
David Pursehouse00c82142014-01-22 17:41:09 +09003227+
3228Defaults to 16M.
3229
3230[[index.name.maxBufferedDocs]]index.name.maxBufferedDocs::
3231+
David Pursehouse00c82142014-01-22 17:41:09 +09003232Determines the minimal number of documents required before the buffered
3233in-memory documents are flushed to the index. Large values generally
3234give faster indexing. See the
3235link:http://lucene.apache.org/core/4_6_0/core/org/apache/lucene/index/LiveIndexWriterConfig.html#setMaxBufferedDocs(int)[
Marian Harbach34253372019-12-10 18:01:31 +01003236Lucene documentation,role=external,window=_blank] for further details.
David Pursehouse00c82142014-01-22 17:41:09 +09003237+
3238Defaults to -1, meaning no maximum is set and the writer will flush
3239according to RAM usage.
3240
Dave Borowitzd08b0452014-02-13 11:56:03 -08003241[[index.name.commitWithin]]index.name.commitWithin::
3242+
Dave Borowitzd08b0452014-02-13 11:56:03 -08003243Determines the period at which changes are automatically committed to
3244stable store on disk. This is a costly operation and may block
3245additional index writes, so lower with caution.
3246+
Bruce Zuaf058e62014-03-21 10:03:05 +08003247If zero, changes are committed after every write. This is very costly
3248but may be useful if offline reindexing is infeasible, or for development
3249servers.
Dave Borowitzd08b0452014-02-13 11:56:03 -08003250+
Bruce Zuaf058e62014-03-21 10:03:05 +08003251Values can be specified using standard time unit abbreviations (`ms`, `sec`,
3252`min`, etc.).
David Pursehouse9354c1a2014-03-22 12:23:43 -07003253+
Bruce Zuaf058e62014-03-21 10:03:05 +08003254If negative, `commitWithin` is disabled. Changes are flushed to disk when
3255the in-memory buffer fills, but only committed and guaranteed to be synced
3256to disk when the process finishes.
David Pursehouse902b3ee2014-07-09 16:17:49 +09003257+
Dave Borowitzd08b0452014-02-13 11:56:03 -08003258Defaults to 300000 ms (5 minutes).
3259
Trevor Getty8fb5db52019-08-26 14:33:19 +02003260
3261[[index.name.maxMergeCount]]index.name.maxMergeCount::
3262+
3263Determines the max number of simultaneous merges that are allowed. If a merge
3264is necessary yet we already have this many threads running, the incoming thread
3265(that is calling add/updateDocument) will block until a merge thread has
3266completed. Note that Lucene will only run the smallest maxThreadCount merges
3267at a time. See the
3268link:https://lucene.apache.org/core/5_5_0/core/org/apache/lucene/index/ConcurrentMergeScheduler.html#setDefaultMaxMergesAndThreads(boolean)[
Marian Harbach34253372019-12-10 18:01:31 +01003269Lucene documentation,role=external,window=_blank] for further details.
Trevor Getty8fb5db52019-08-26 14:33:19 +02003270+
3271Defaults to -1 for (auto detection).
3272
3273
3274[[index.name.maxThreadCount]]index.name.maxThreadCount::
3275+
3276Determines the max number of simultaneous Lucene merge threads that should be running at
3277once. This must be less than or equal to maxMergeCount. See the
3278link:https://lucene.apache.org/core/5_5_0/core/org/apache/lucene/index/ConcurrentMergeScheduler.html#setDefaultMaxMergesAndThreads(boolean)[
Marian Harbach34253372019-12-10 18:01:31 +01003279Lucene documentation,role=external,window=_blank] for further details.
Trevor Getty8fb5db52019-08-26 14:33:19 +02003280+
3281For further details on Lucene index configuration (auto detection) which
3282affects maxThreadCount and maxMergeCount settings.
3283See the
3284link:https://lucene.apache.org/core/5_5_0/core/org/apache/lucene/index/ConcurrentMergeScheduler.html#AUTO_DETECT_MERGES_AND_THREADS[
Marian Harbach34253372019-12-10 18:01:31 +01003285Lucene documentation,role=external,window=_blank]
Trevor Getty8fb5db52019-08-26 14:33:19 +02003286+
3287Defaults to -1 for (auto detection).
3288
3289[[index.name.enableAutoIOThrottle]]index.name.enableAutoIOThrottle::
3290+
3291Allows the control of whether automatic IO throttling is enabled and used by
3292default in the lucene merge queue. Automatic dynamic IO throttling, which when
3293on is used to adaptively rate limit writes bytes/sec to the minimal rate necessary
3294so merges do not fall behind. See the
3295link:https://lucene.apache.org/core/5_5_0/core/org/apache/lucene/index/ConcurrentMergeScheduler.html#enableAutoIOThrottle()[
Marian Harbach34253372019-12-10 18:01:31 +01003296Lucene documentation,role=external,window=_blank] for further details.
Trevor Getty8fb5db52019-08-26 14:33:19 +02003297+
3298Defaults to true (throttling enabled).
3299
David Pursehouse902b3ee2014-07-09 16:17:49 +09003300Sample Lucene index configuration:
David Pursehouse00c82142014-01-22 17:41:09 +09003301----
3302[index]
3303 type = LUCENE
3304
3305[index "changes_open"]
3306 ramBufferSize = 60 m
3307 maxBufferedDocs = 3000
Trevor Getty8fb5db52019-08-26 14:33:19 +02003308 maxThreadCount = 5
3309 maxMergeCount = 50
3310
David Pursehouse00c82142014-01-22 17:41:09 +09003311
3312[index "changes_closed"]
3313 ramBufferSize = 20 m
3314 maxBufferedDocs = 500
Trevor Getty8fb5db52019-08-26 14:33:19 +02003315 maxThreadCount = 10
3316 maxMergeCount = 100
3317 enableIOThrottle = false
3318
David Pursehouse00c82142014-01-22 17:41:09 +09003319----
3320
Dariusz Lukszaea529882017-04-25 15:11:31 +02003321[[elasticsearch]]
3322=== Section elasticsearch
David Pursehouse8e72f532014-06-24 11:01:28 +09003323
David Pursehouse1a82b372018-06-19 11:14:21 +09003324WARNING: Support for Elasticsearch is still experimental and is not recommended
David Pursehouse7e566dc2018-09-20 14:12:15 +09003325for production use. For compatibility information, please refer to the
Marian Harbach34253372019-12-10 18:01:31 +01003326link:https://www.gerritcodereview.com/elasticsearch.html[project homepage,role=external,window=_blank].
David Pursehouse8e72f532014-06-24 11:01:28 +09003327
David Pursehouse6ea25322018-07-03 21:26:07 +09003328Note that when Gerrit is configured to use Elasticsearch, the Elasticsearch
3329server(s) must be reachable during the site initialization.
3330
Dariusz Lukszaea529882017-04-25 15:11:31 +02003331[[elasticsearch.prefix]]elasticsearch.prefix::
David Pursehouse8e72f532014-06-24 11:01:28 +09003332+
Hugo Arès3ba6dfe2016-11-15 15:12:55 -08003333This setting can be used to prefix index names to allow multiple Gerrit
David Pursehouse997cf2a2018-05-10 15:40:47 +09003334instances in a single Elasticsearch cluster. Prefix `gerrit1_` would result in a
3335change index named `gerrit1_changes_0001`.
David Pursehouse8e72f532014-06-24 11:01:28 +09003336+
Hugo Arès3ba6dfe2016-11-15 15:12:55 -08003337Not set by default.
David Pursehouse8e72f532014-06-24 11:01:28 +09003338
David Pursehouse479c50b2018-07-02 12:47:07 +09003339[[elasticsearch.server]]elasticsearch.server::
Dariusz Lukszaea529882017-04-25 15:11:31 +02003340+
David Pursehouse479c50b2018-07-02 12:47:07 +09003341Elasticsearch server URI in the form `http[s]://hostname:port`. The `port` is
3342optional and defaults to `9200` if not specified.
Dariusz Lukszaea529882017-04-25 15:11:31 +02003343+
David Pursehouse479c50b2018-07-02 12:47:07 +09003344At least one server must be specified. May be specified multiple times to
3345configure multiple Elasticsearch servers.
Dariusz Lukszaea529882017-04-25 15:11:31 +02003346+
David Pursehouse479c50b2018-07-02 12:47:07 +09003347Note that the site initialization program only allows to configure a single
3348server. To configure multiple servers the `gerrit.config` file must be edited
3349manually.
Dariusz Luksza4ca46be2017-04-25 11:40:29 +02003350
David Pursehouse499f7fe2018-11-30 16:07:21 +09003351[[elasticsearch.numberOfShards]]elasticsearch.numberOfShards::
3352+
3353Sets the number of shards to use per index. Refer to the
Dyrone Tengae8babd2020-03-18 16:06:29 +08003354link:https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules.html#_static_index_settings[
Marian Harbach34253372019-12-10 18:01:31 +01003355Elasticsearch documentation,role=external,window=_blank] for details.
David Pursehouse499f7fe2018-11-30 16:07:21 +09003356+
Marco Miller9caa81a2020-12-06 16:10:20 -05003357Defaults to 1.
David Pursehouse499f7fe2018-11-30 16:07:21 +09003358
3359[[elasticsearch.numberOfReplicas]]elasticsearch.numberOfReplicas::
3360+
3361Sets the number of replicas to use per index. Refer to the
Dyrone Tengae8babd2020-03-18 16:06:29 +08003362link:https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules.html#dynamic-index-settings[
Marian Harbach34253372019-12-10 18:01:31 +01003363Elasticsearch documentation,role=external,window=_blank] for details.
David Pursehouse499f7fe2018-11-30 16:07:21 +09003364+
3365Defaults to 1.
3366
Dyrone Teng76fed532020-03-18 11:20:03 +08003367[[elasticsearch.maxResultWindow]]elasticsearch.maxResultWindow::
3368+
3369Sets the maximum value of `from + size` for searches to use per index. Refer to the
3370link:https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules.html#dynamic-index-settings[
David Pursehoused9aa6b02020-03-19 13:33:17 +09003371Elasticsearch documentation,role=external,window=_blank] for details.
Dyrone Teng76fed532020-03-18 11:20:03 +08003372+
3373Defaults to 10000.
3374
Pat Longcbcbf742020-12-03 11:04:25 -05003375[[elasticsearch.connectTimeout]]elasticsearch.connectTimeout::
3376+
3377Sets the timeout for connecting to elasticsearch.
3378+
3379Defaults to `1 second`.
3380
3381[[elasticsearch.socketTimeout]]elasticsearch.socketTimeout::
3382+
3383Sets the timeout for the underlying connection. For more information, refer to
3384link:#httpd.idleTimeout[`httpd.idleTimeout`].
3385+
3386Defaults to `30 seconds`.
3387
David Pursehouse13f1d632018-07-02 14:37:36 +09003388==== Elasticsearch Security
Dariusz Lukszaea529882017-04-25 15:11:31 +02003389
David Pursehouse13f1d632018-07-02 14:37:36 +09003390When security is enabled in Elasticsearch, the username and password must be provided.
3391Note that the same username and password are used for all servers.
Dariusz Luksza4ca46be2017-04-25 11:40:29 +02003392
Marco Milleree4eefc2020-07-29 16:24:59 -04003393For further information about Elasticsearch security, please refer to
Marco Miller527d2d02020-07-31 13:06:58 -04003394link:https://www.elastic.co/guide/en/elasticsearch/reference/current/security-getting-started.html[the documentation,role=external,window=_blank].
Marco Milleree4eefc2020-07-29 16:24:59 -04003395This is the current documentation link. Select another Elasticsearch version
3396from the dropdown menu available on that page if need be.
Dariusz Luksza4ca46be2017-04-25 11:40:29 +02003397
Shawn O. Pearcef7e065e2009-09-26 20:01:10 -07003398[[elasticsearch.username]]elasticsearch.username::
Dariusz Luksza4ca46be2017-04-25 11:40:29 +02003399+
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07003400Username used to connect to Elasticsearch.
Dariusz Luksza4ca46be2017-04-25 11:40:29 +02003401+
David Pursehouse975fdd22018-07-02 14:23:07 +09003402If a password is set, defaults to `elastic`, otherwise not set by default.
Dariusz Luksza4ca46be2017-04-25 11:40:29 +02003403
Dariusz Luksza4ca46be2017-04-25 11:40:29 +02003404[[elasticsearch.password]]elasticsearch.password::
3405+
3406Password used to connect to Elasticsearch.
3407+
3408Not set by default.
Dariusz Luksza4ca46be2017-04-25 11:40:29 +02003409
Patrick Hieselda692472019-10-07 16:03:23 +02003410[[event]]
3411=== Section event
3412
3413[[event.payload.listChangeOptions]]events.payload.listChangeOptions::
3414+
3415List of options that Gerrit applies when rendering the payload of an
3416internal event. This is the same set of options that are documented
3417link:rest-api-changes.html#query-options[here].
3418+
3419Depending on the setup, these events might get serialized using stream
3420events.
3421+
3422This can be set to the set of minimal options that consumers of Gerrit's
Patrick Hiesela4824db2019-12-20 10:55:26 +01003423events need. A minimal set would be (`SKIP_DIFFSTAT`).
Patrick Hieselda692472019-10-07 16:03:23 +02003424+
3425Every option that gets added here will have a performance impact. The
3426general recommendation is therefore to set this to a minimal set of
3427required options.
3428+
3429Defaults to all available options minus `CHANGE_ACTIONS`,
3430`CURRENT_ACTIONS` and `CHECK`. This is a rich default to make sure the
3431config is backwards compatible with what the default was before the config
3432was added.
3433
David Ostrovsky0e4db922021-02-13 10:06:43 +01003434[[event.comment-added.publishPatchSetLevelComment]]event.comment-added.publishPatchSetLevelComment::
David Ostrovskyd14db1f2020-12-09 19:59:55 +01003435+
3436Add patch set level comment as event comment. Without this option, patch set
3437level comment will not be included in the event comment attribute. Given that
3438currently patch set level, file and robot comments are not exposed in the
3439`comment-added` event type, those comments will be lost. One particular use
3440case is to re-trigger CI build from the change screen by adding a comment with
3441specific content, e.g.: `recheck`. Jenkins Gerrit Trigger plugin and Zuul CI
3442depend on this feature to trigger change verification.
3443+
3444By default, true.
3445
Patrick Hieselbe98d8c2020-12-07 14:59:55 +01003446[[experiments]]
3447=== Section experiments
3448
Marija Savtchoukb062da32021-02-05 09:35:04 +00003449This section covers experimental new features. Gerrit uses experiments
3450to research new behavior in frontend and core backend. Once the research is done, the experimental
3451feature either stays and the experimentation flag gets removed, or the feature as a whole
Patrick Hieselbe98d8c2020-12-07 14:59:55 +01003452gets removed
3453
3454[[experiments.enabled]]experiments.enabled::
3455+
3456List of experiments that are currently enabled. The release notes contain currently
3457available experiments.
3458+
3459We will not remove experiments in stable patch releases. They are likely to be
3460removed in the next stable version.
3461
3462----
3463[experiments]
3464 enabled = ExperimentKey
3465----
Patrick Hieselda692472019-10-07 16:03:23 +02003466
Patrick Hiesel17142dc2020-12-07 15:17:24 +01003467[[experiments.disabled]]experiments.disabled::
3468+
3469List of experiments that are currently disabled. The release notes contain currently
3470available experiments. This list disables experiments with the given key that are
3471either enabled by default or explicitly in the config.
3472
3473----
3474[experiments]
3475 disabled = ExperimentKey
3476----
Shawn O. Pearce37dc1f82009-08-19 09:49:07 -07003477
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07003478[[ldap]]
3479=== Section ldap
3480
Luca Milanesioa05d42b2018-12-19 01:13:06 +00003481LDAP integration is only enabled if `auth.type` is set to
3482`HTTP_LDAP`, `LDAP` or `CLIENT_SSL_CERT_LDAP`. See above for a
3483detailed description of the `auth.type` settings and their
3484implications.
3485
3486An example LDAP configuration follows, and then discussion of
3487the parameters introduced here. Suitable defaults for most
3488parameters are automatically guessed based on the type of server
3489detected during startup. The guessed defaults support
Marian Harbach34253372019-12-10 18:01:31 +01003490link:http://www.ietf.org/rfc/rfc2307.txt[RFC 2307,role=external,window=_blank], Active
3491Directory and link:https://www.freeipa.org[FreeIPA,role=external,window=_blank].
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07003492
3493----
3494[ldap]
3495 server = ldap://ldap.example.com
3496
3497 accountBase = ou=people,dc=example,dc=com
3498 accountPattern = (&(objectClass=person)(uid=${username}))
3499 accountFullName = displayName
3500 accountEmailAddress = mail
3501
3502 groupBase = ou=groups,dc=example,dc=com
3503 groupMemberPattern = (&(objectClass=group)(member=${dn}))
3504----
3505
Luca Milanesioa05d42b2018-12-19 01:13:06 +00003506[[ldap.guessRelevantGroups]]ldap.guessRelevantGroups::
3507+
3508Filter the groups found in LDAP by guessing the ones relevant to
3509Gerrit and removing the others from list completions and ACL evaluations.
3510The guess is based on two elements: the projects most recently
3511accessed in the cache and the list of LDAP groups included in their ACLs.
3512+
3513Please note that projects rarely used and thus not cached may be
3514temporarily inaccessible by users even with LDAP membership and grants
3515referenced in the ACLs.
3516+
3517By default, true.
3518
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07003519[[ldap.server]]ldap.server::
3520+
3521URL of the organization's LDAP server to query for user information
3522and group membership from. Must be of the form `ldap://host` or
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07003523`ldaps://host` to bind with either a plaintext or SSL connection.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07003524+
3525If `auth.type` is `LDAP` this setting should use `ldaps://` to
3526ensure the end user's plaintext password is transmitted only over
3527an encrypted connection.
Matthias Sohn1e2ec072020-10-16 13:57:11 +02003528+
3529If you want to configure multiple ldap servers you can try to put
3530multiple ldap urls separated by a space:
3531`server = ldaps://ldap1 ldaps://ldap2`
3532See https://bugs.chromium.org/p/gerrit/issues/detail?id=10841[issue 10841].
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07003533
Alon Bar-Lev8ae444d2017-05-08 20:11:09 +03003534[[ldap.startTls]]ldap.startTls::
3535+
3536If true, Gerrit will perform StartTLS extended operation.
3537+
3538By default, false, StartTLS will not be enabled.
3539
Alon Bar-Leve39c35c2019-06-10 12:59:55 +03003540[[ldap.supportAnonymous]]ldap.supportAnonymous::
3541+
3542If false, Gerrit will provide credentials only at connection open, this is
3543required for some `LDAP` implementations that do not allow anonymous bind
3544for StartTLS or for reauthentication.
3545+
3546By default, true.
3547
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07003548[[ldap.sslVerify]]ldap.sslVerify::
3549+
Alon Bar-Lev8ae444d2017-05-08 20:11:09 +03003550If false and ldap.server is an `ldaps://` style URL or `ldap.startTls`
3551is true, Gerrit will not verify the server certificate when it connects
3552to perform a query.
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07003553+
3554By default, true, requiring the certificate to be verified.
3555
Olga Grinbergcf1b06a2015-02-03 15:54:48 -05003556[[ldap.groupsVisibleToAll]]ldap.groupsVisibleToAll::
3557+
3558If true, LDAP groups are visible to all registered users.
3559+
3560By default, false, LDAP groups are visible only to administrators and
3561group members.
3562
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07003563[[ldap.username]]ldap.username::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07003564+
3565_(Optional)_ Username to bind to the LDAP server with. If not set,
3566an anonymous connection to the LDAP server is attempted.
3567
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07003568[[ldap.password]]ldap.password::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07003569+
3570_(Optional)_ Password for the user identified by `ldap.username`.
3571If not set, an anonymous (or passwordless) connection to the LDAP
3572server is attempted.
3573
Ben Wu0410a152010-06-04 16:17:24 +08003574[[ldap.referral]]ldap.referral::
3575+
3576_(Optional)_ How an LDAP referral should be handled if it is
3577encountered during directory traversal. Set to `follow` to
James Y Knight1244ed02011-01-04 02:40:32 -05003578automatically follow any referrals, or `ignore` to ignore the
3579referrals.
Ben Wu0410a152010-06-04 16:17:24 +08003580+
3581By default, `ignore`.
3582
Sasa Zivkov100bd4b2011-11-07 14:58:46 +01003583[[ldap.readTimeout]]ldap.readTimeout::
3584+
3585_(Optional)_ The read timeout for an LDAP operation. The value is
3586in the usual time-unit format like "1 s", "100 ms", etc...
3587A timeout can be used to avoid blocking all of the SSH command start
David Pursehouse221d4f62012-06-08 17:38:08 +09003588threads in case the LDAP server becomes slow.
Sasa Zivkov100bd4b2011-11-07 14:58:46 +01003589+
3590By default there is no timeout and Gerrit will wait for the LDAP
3591server to respond until the TCP connection times out.
3592
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07003593[[ldap.accountBase]]ldap.accountBase::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07003594+
3595Root of the tree containing all user accounts. This is typically
3596of the form `ou=people,dc=example,dc=com`.
David Pursehouse82d55632015-12-14 10:31:27 +00003597+
3598This setting may be added multiple times to specify more than
3599one root.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07003600
Shawn O. Pearce304ccdb2009-08-25 12:25:27 -07003601[[ldap.accountScope]]ldap.accountScope::
3602+
3603Scope of the search performed for accounts. Must be one of:
3604+
3605* `one`: Search only one level below accountBase, but not recursive
3606* `sub` or `subtree`: Search recursively below accountBase
3607* `base` or `object`: Search exactly accountBase; probably not desired
3608
3609+
3610Default is `subtree` as many directories have several levels.
3611
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07003612[[ldap.accountPattern]]ldap.accountPattern::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07003613+
3614Query pattern to use when searching for a user account. This may be
3615any valid LDAP query expression, including the standard `(&...)` and
David Pursehouse42f42042013-08-01 14:02:25 +09003616`(|...)` operators. If `auth.type` is `HTTP_LDAP` then the variable
Edwin Kempincdb0e002011-09-08 14:23:30 +02003617`${username}` is replaced with a parameter set to the username
David Pursehouse42f42042013-08-01 14:02:25 +09003618that was supplied by the HTTP server. If `auth.type` is `LDAP` then
Edwin Kempincdb0e002011-09-08 14:23:30 +02003619the variable `${username}` is replaced by the string entered by
Shawn O. Pearcef7e065e2009-09-26 20:01:10 -07003620the end user.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07003621+
3622This pattern is used to search the objects contained directly under
3623the `ldap.accountBase` tree. A typical setting for this parameter
Edwin Kempincdb0e002011-09-08 14:23:30 +02003624is `(uid=${username})` or `(cn=${username})`, but the proper
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07003625setting depends on the LDAP schema used by the directory server.
3626+
Michal Pasierb3e262742017-01-23 12:50:48 +01003627Default is `(uid=${username})` for FreeIPA and RFC 2307 servers,
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07003628and `(&(objectClass=user)(sAMAccountName=${username}))`
3629for Active Directory.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07003630
Shawn O. Pearce37dc1f82009-08-19 09:49:07 -07003631[[ldap.accountFullName]]ldap.accountFullName::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07003632+
3633_(Optional)_ Name of an attribute on the user account object which
3634contains the initial value for the user's full name field in Gerrit.
3635Typically this is the `displayName` property in LDAP, but could
3636also be `legalName` or `cn`.
3637+
David Pursehouse221d4f62012-06-08 17:38:08 +09003638Attribute values may be concatenated with literal strings. For
3639example to join given name and surname together, use the pattern
Edwin Kempincdb0e002011-09-08 14:23:30 +02003640`${givenName} ${SN}`.
Shawn O. Pearceb86ae002009-09-26 16:54:05 -07003641+
Shawn O. Pearce3ca1dcf2009-08-20 08:56:23 -07003642If set, users will be unable to modify their full name field, as
3643Gerrit will populate it only from the LDAP data.
3644+
Michal Pasierb3e262742017-01-23 12:50:48 +01003645Default is `displayName` for FreeIPA and RFC 2307 servers,
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07003646and `${givenName} ${sn}` for Active Directory.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07003647
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07003648[[ldap.accountEmailAddress]]ldap.accountEmailAddress::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07003649+
3650_(Optional)_ Name of an attribute on the user account object which
3651contains the user's Internet email address, as defined by this
3652LDAP server.
3653+
Shawn O. Pearceb86ae002009-09-26 16:54:05 -07003654Attribute values may be concatenated with literal strings,
3655for example to set the email address to the lowercase form
3656of sAMAccountName followed by a constant domain name, use
Edwin Kempincdb0e002011-09-08 14:23:30 +02003657`${sAMAccountName.toLowerCase}@example.com`.
Shawn O. Pearceb86ae002009-09-26 16:54:05 -07003658+
Shawn O. Pearce3ca1dcf2009-08-20 08:56:23 -07003659If set, the preferred email address will be prefilled from LDAP,
David Pursehouse221d4f62012-06-08 17:38:08 +09003660but users may still be able to register additional email addresses,
Shawn O. Pearce3ca1dcf2009-08-20 08:56:23 -07003661and select a different preferred email address.
3662+
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07003663Default is `mail`.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07003664
Shawn O. Pearce59e09222009-08-19 09:04:49 -07003665[[ldap.accountSshUserName]]ldap.accountSshUserName::
3666+
3667_(Optional)_ Name of an attribute on the user account object which
3668contains the initial value for the user's SSH username field in
3669Gerrit. Typically this is the `uid` property in LDAP, but could
3670also be `cn`. Administrators should prefer to match the attribute
3671corresponding to the user's workstation username, as this is what
3672SSH clients will default to.
3673+
Shawn O. Pearceb86ae002009-09-26 16:54:05 -07003674Attribute values may also be forced to lowercase, or to uppercase in
Edwin Kempincdb0e002011-09-08 14:23:30 +02003675an expression. For example, `${sAMAccountName.toLowerCase}` will
Shawn O. Pearceb86ae002009-09-26 16:54:05 -07003676force the value of sAMAccountName, if defined, to be all lowercase.
3677The suffix `.toUpperCase` can be used for the other direction.
3678The suffix `.localPart` can be used to split attribute values of
3679the form 'user@example.com' and return only the left hand side, for
Edwin Kempincdb0e002011-09-08 14:23:30 +02003680example `${userPrincipalName.localPart}` would provide only 'user'.
Shawn O. Pearceb86ae002009-09-26 16:54:05 -07003681+
Shawn O. Pearce3ca1dcf2009-08-20 08:56:23 -07003682If set, users will be unable to modify their SSH username field, as
David Pursehousec12da502016-08-11 20:45:03 +09003683Gerrit will populate it only from the LDAP data. Note that once the
3684username has been set it cannot be changed, therefore it is
3685recommended not to make changes to this setting that would cause the
3686value to differ, as this will prevent users from logging in.
Shawn O. Pearce3ca1dcf2009-08-20 08:56:23 -07003687+
Michal Pasierb3e262742017-01-23 12:50:48 +01003688Default is `uid` for FreeIPA and RFC 2307 servers,
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07003689and `${sAMAccountName.toLowerCase}` for Active Directory.
Shawn O. Pearce59e09222009-08-19 09:04:49 -07003690
Shawn O. Pearce7d25f782009-10-30 08:01:03 -07003691[[ldap.accountMemberField]]ldap.accountMemberField::
Anthony93de7db2009-10-03 10:01:50 -04003692+
3693_(Optional)_ Name of an attribute on the user account object which
Shawn O. Pearce7d25f782009-10-30 08:01:03 -07003694contains the groups the user is part of. Typically used for Active
Michal Pasierb3e262742017-01-23 12:50:48 +01003695Directory and FreeIPA servers.
Anthony93de7db2009-10-03 10:01:50 -04003696+
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07003697Default is unset for RFC 2307 servers (disabled)
Michal Pasierb3e262742017-01-23 12:50:48 +01003698and `memberOf` for Active Directory and FreeIPA.
3699
3700[[ldap.accountMemberExpandGroups]]ldap.accountMemberExpandGroups::
3701+
3702_(Optional)_ Whether to expand nested groups recursively. This
3703setting is used only if `ldap.accountMemberField` is set.
3704+
3705Default is unset for FreeIPA and `true` for RFC 2307 servers
3706and Active Directory.
Anthony93de7db2009-10-03 10:01:50 -04003707
Saša Živkovc81291f2015-02-04 17:19:20 +01003708[[ldap.fetchMemberOfEagerly]]ldap.fetchMemberOfEagerly::
3709+
3710_(Optional)_ Whether to fetch the `memberOf` account attribute on
3711login. Setups which use LDAP for user authentication but don't make
3712use of the LDAP groups may benefit from setting this option to `false`
3713as this will result in a much faster LDAP login.
3714+
3715Default is unset for RFC 2307 servers (disabled) and `true` for
Michal Pasierb3e262742017-01-23 12:50:48 +01003716Active Directory and FreeIPA.
Saša Živkovc81291f2015-02-04 17:19:20 +01003717
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07003718[[ldap.groupBase]]ldap.groupBase::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07003719+
3720Root of the tree containing all group objects. This is typically
3721of the form `ou=groups,dc=example,dc=com`.
David Pursehouse82d55632015-12-14 10:31:27 +00003722+
3723This setting may be added multiple times to specify more than
3724one root.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07003725
Shawn O. Pearce304ccdb2009-08-25 12:25:27 -07003726[[ldap.groupScope]]ldap.groupScope::
3727+
3728Scope of the search performed for group objects. Must be one of:
3729+
3730* `one`: Search only one level below groupBase, but not recursive
3731* `sub` or `subtree`: Search recursively below groupBase
3732* `base` or `object`: Search exactly groupBase; probably not desired
3733
3734+
3735Default is `subtree` as many directories have several levels.
3736
Shawn O. Pearce7d25f782009-10-30 08:01:03 -07003737[[ldap.groupPattern]]ldap.groupPattern::
3738+
3739Query pattern used when searching for an LDAP group to connect
3740to a Gerrit group. This may be any valid LDAP query expression,
3741including the standard `(&...)` and `(|...)` operators. The variable
Edwin Kempincdb0e002011-09-08 14:23:30 +02003742`${groupname}` is replaced with the search term supplied by the
Shawn O. Pearce7d25f782009-10-30 08:01:03 -07003743group owner.
3744+
Michal Pasierb3e262742017-01-23 12:50:48 +01003745Default is `(cn=${groupname})` for FreeIPA and RFC 2307 servers,
Edwin Kempincdb0e002011-09-08 14:23:30 +02003746and `(&(objectClass=group)(cn=${groupname}))` for Active Directory.
Shawn O. Pearce7d25f782009-10-30 08:01:03 -07003747
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07003748[[ldap.groupMemberPattern]]ldap.groupMemberPattern::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07003749+
3750Query pattern to use when searching for the groups that a user
3751account is currently a member of. This may be any valid LDAP query
3752expression, including the standard `(&...)` and `(|...)` operators.
3753+
David Pursehouse42f42042013-08-01 14:02:25 +09003754If `auth.type` is `HTTP_LDAP` then the variable `${username}` is
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07003755replaced with a parameter set to the username that was supplied
3756by the HTTP server. Other variables appearing in the pattern,
Edwin Kempincdb0e002011-09-08 14:23:30 +02003757such as `${fooBarAttribute}`, are replaced with the value of the
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07003758corresponding attribute (in this case, `fooBarAttribute`) as read
3759from the user's account object matched under `ldap.accountBase`.
Edwin Kempincdb0e002011-09-08 14:23:30 +02003760Attributes such as `${dn}` or `${uidNumber}` may be useful.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07003761+
Scott Dial50457502013-08-11 16:52:51 -04003762Default is `(|(memberUid=${username})(gidNumber=${gidNumber}))` for
Michal Pasierb3e262742017-01-23 12:50:48 +01003763RFC 2307, and unset (disabled) for Active Directory and FreeIPA.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07003764
Auke Schrijnen57809132012-09-26 21:05:39 +02003765[[ldap.groupName]]ldap.groupName::
3766+
David Pursehouse39489ae2012-10-12 13:50:04 +09003767_(Optional)_ Name of the attribute on the group object which contains
3768the value to use as the group name in Gerrit.
Auke Schrijnen57809132012-09-26 21:05:39 +02003769+
David Pursehouse39489ae2012-10-12 13:50:04 +09003770Typically the attribute name is `cn` for RFC 2307 and Active Directory
3771servers. For other servers the attribute name may differ, for example
3772`apple-group-realname` on Apple MacOS X Server.
Auke Schrijnen57809132012-09-26 21:05:39 +02003773+
David Pursehouse39489ae2012-10-12 13:50:04 +09003774It is also possible to specify a literal string containing a pattern of
3775attribute values. For example to create a Gerrit group name consisting of
3776LDAP group name and group ID, use the pattern `${cn} (${gidNumber})`.
3777+
3778Default is `cn`.
Auke Schrijnen57809132012-09-26 21:05:39 +02003779
Gustaf Lundhdaf41af2016-12-05 19:05:09 +01003780[[ldap.mandatoryGroup]]ldap.mandatoryGroup::
3781+
3782All users must be a member of this group to allow account creation or
3783authentication.
3784+
3785Setting mandatoryGroup implies enabling of `ldap.fetchMemberOfEagerly`
3786+
3787By default, unset.
3788
Edwin Kempinb3b0d292011-09-14 14:17:34 +02003789[[ldap.localUsernameToLowerCase]]ldap.localUsernameToLowerCase::
3790+
3791Converts the local username, that is used to login into the Gerrit
David Pursehousea1d633b2014-05-02 17:21:02 +09003792Web UI, to lower case before doing the LDAP authentication. By setting
3793this parameter to true, a case insensitive login to the Gerrit Web UI
Edwin Kempinb3b0d292011-09-14 14:17:34 +02003794can be achieved.
3795+
3796If set, it must be ensured that the local usernames for all existing
3797accounts are converted to lower case, otherwise a user that has a
David Pursehouse221d4f62012-06-08 17:38:08 +09003798local username that contains upper case characters will not be able to login
Edwin Kempinb3b0d292011-09-14 14:17:34 +02003799anymore. The local usernames for the existing accounts can be
3800converted to lower case by running the server program
3801link:pgm-LocalUsernamesToLowerCase.html[LocalUsernamesToLowerCase].
3802Please be aware that the conversion of the local usernames to lower
3803case can't be undone. For newly created accounts the local username
3804will be directly stored in lower case.
3805+
3806By default, unset/false.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07003807
Robin Rosenberga3baed02012-10-14 14:09:32 +02003808[[ldap.authentication]]ldap.authentication::
3809+
3810Defines how Gerrit authenticates with the server. When set to `GSSAPI`
3811Gerrit will use Kerberos. To use kerberos the
3812`java.security.auth.login.config` system property must point to a
3813login to a JAAS configuration file and, if Java 6 is used, the system
3814property `java.security.krb5.conf` must point to the appropriate
3815krb5.ini file with references to the KDC.
3816
3817Typical jaas.conf.
3818
3819----
3820KerberosLogin {
3821 com.sun.security.auth.module.Krb5LoginModule
3822 required
3823 useTicketCache=true
3824 doNotPrompt=true
3825 renewTGT=true;
3826};
3827----
3828
3829See Java documentation on how to create the krb5.ini file.
3830
3831Note the `renewTGT` property to make sure the TGT does not expire,
3832and `useTicketCache` to use the TGT supplied by the operating system. As
3833the whole point of using GSSAPI is to have passwordless authentication
David Pursehouse92463562013-06-24 10:16:28 +09003834to the LDAP service, this option does not acquire a new TGT on its own.
Robin Rosenberga3baed02012-10-14 14:09:32 +02003835
3836On Windows servers the registry key `HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\Kerberos\Parameters`
3837must have the DWORD value `allowtgtsessionkey` set to 1 and the account must not
3838have local administrator privileges.
3839
Bruce Zucd04bbc2014-07-25 15:48:09 +08003840[[ldap.useConnectionPooling]]ldap.useConnectionPooling::
3841+
3842_(Optional)_ Enable the LDAP connection pooling or not.
3843+
3844If it is true, the LDAP service provider maintains a pool of (possibly)
3845previously used connections and assigns them to a Context instance as
3846needed. When a Context instance is done with a connection (closed or
3847garbage collected), the connection is returned to the pool for future use.
3848+
3849For details, see link:http://docs.oracle.com/javase/tutorial/jndi/ldap/pool.html[
Marian Harbach34253372019-12-10 18:01:31 +01003850LDAP connection management (Pool),role=external,window=_blank] and link:http://docs.oracle.com/javase/tutorial/jndi/ldap/config.html[
3851LDAP connection management (Configuration),role=external,window=_blank]
Bruce Zucd04bbc2014-07-25 15:48:09 +08003852+
3853By default, false.
3854
3855[[ldap.connectTimeout]]ldap.connectTimeout::
3856+
Saša Živkov303701a2015-01-19 16:24:44 +01003857_(Optional)_ Timeout period for establishment of an LDAP connection.
Bruce Zucd04bbc2014-07-25 15:48:09 +08003858+
3859The value is in the usual time-unit format like "1 s", "100 ms",
3860etc...
3861+
3862By default there is no timeout and Gerrit will wait indefinitely.
3863
Saša Živkov5049f512015-01-19 17:04:43 +01003864[[ldap-connection-pooling]]
3865==== LDAP Connection Pooling
3866Once LDAP connection pooling is enabled by setting the link:#ldap.useConnectionPooling[
3867ldap.useConnectionPooling] configuration property to `true`, the connection pool
3868can be configured using JVM system properties as explained in the
3869link:http://docs.oracle.com/javase/7/docs/technotes/guides/jndi/jndi-ldap.html#POOL[
Marian Harbach34253372019-12-10 18:01:31 +01003870Java SE Documentation,role=external,window=_blank].
Bruce Zucd04bbc2014-07-25 15:48:09 +08003871
Saša Živkov5049f512015-01-19 17:04:43 +01003872For standalone Gerrit (running with the embedded Jetty), JVM system properties
3873are specified in the link:#container[container section]:
Bruce Zucd04bbc2014-07-25 15:48:09 +08003874
Saša Živkov5049f512015-01-19 17:04:43 +01003875----
3876 javaOptions = -Dcom.sun.jndi.ldap.connect.pool.maxsize=20
3877 javaOptions = -Dcom.sun.jndi.ldap.connect.pool.prefsize=10
3878 javaOptions = -Dcom.sun.jndi.ldap.connect.pool.timeout=300000
3879----
Bruce Zucd04bbc2014-07-25 15:48:09 +08003880
Saša Živkovca7a67e2015-12-01 14:25:10 +01003881[[lfs]]
3882=== Section lfs
3883
3884[[lfs.plugin]]lfs.plugin::
3885+
David Pursehouse2463c542016-08-02 16:04:58 +09003886The name of a plugin which serves the
3887link:https://github.com/github/git-lfs/blob/master/docs/api/v1/http-v1-batch.md[
Marian Harbach34253372019-12-10 18:01:31 +01003888LFS protocol,role=external,window=_blank] on the `<project-name>/info/lfs/objects/batch` endpoint. When
David Pursehouse2463c542016-08-02 16:04:58 +09003889not configured Gerrit will respond with `501 Not Implemented` on LFS protocol
3890requests.
Saša Živkovca7a67e2015-12-01 14:25:10 +01003891+
3892By default unset.
3893
Gustaf Lundhaef90122015-04-27 16:48:19 +02003894[[log]]
3895=== Section log
3896
3897[[log.jsonLogging]]log.jsonLogging::
3898+
Antoine Musso9ed4b4f2020-11-17 16:52:35 +01003899If set to true, enables error, ssh and http logging in JSON format (file names:
3900`logs/error_log.json`, `logs/sshd_log.json` and `logs/httpd_log.json`).
3901+
3902The option only applies to Gerrit built-in loggers. It is ignored when a log4j
3903configuration is specified via
3904link:#container.javaOptions[container.javaOptions], for example
3905`-Dlog4j.configuration=file://etc/log4j.properties`.
Gustaf Lundhaef90122015-04-27 16:48:19 +02003906+
3907Defaults to false.
3908
3909[[log.textLogging]]log.textLogging::
3910+
3911If set to true, enables error logging in regular plain text format. Can only be disabled
3912if `jsonLogging` is enabled.
3913+
Antoine Musso9ed4b4f2020-11-17 16:52:35 +01003914The option only applies to Gerrit built-in loggers. It is ignored when a log4j
3915configuration is specified via
3916link:#container.javaOptions[container.javaOptions], for example
3917`-Dlog4j.configuration=file://etc/log4j.properties`.
3918+
Gustaf Lundhaef90122015-04-27 16:48:19 +02003919Defaults to true.
3920
David Pursehouse2281fef2017-11-21 21:27:17 +09003921[[log.compress]]log.compress::
3922+
3923If set to true, log files are compressed at server startup and then daily at 11pm
3924(in the server's local time zone).
3925+
3926Defaults to true.
3927
David Pursehouse633fff32017-11-21 22:08:12 +09003928[[log.rotate]]log.rotate::
3929+
3930If set to true, log files are rotated daily at midnight (GMT).
3931+
3932Defaults to true.
3933
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08003934[[mimetype]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08003935=== Section mimetype
Shawn O. Pearce01cb11902009-07-15 08:19:01 -07003936
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07003937[[mimetype.name.safe]]mimetype.<name>.safe::
Shawn O. Pearce01cb11902009-07-15 08:19:01 -07003938+
3939If set to true, files with the MIME type `<name>` will be sent as
3940direct downloads to the user's browser, rather than being wrapped up
3941inside of zipped archives. The type name may be a complete type
Jonathan Nieder5758f182015-03-30 11:28:55 -07003942name, e.g. `image/gif`, a generic media type, e.g. `+image/*+`,
3943or the wildcard `+*/*+` to match all types.
Shawn O. Pearce01cb11902009-07-15 08:19:01 -07003944+
3945By default, false for all MIME types.
3946
3947Common examples:
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08003948----
3949[mimetype "image/*"]
3950 safe = true
3951
3952[mimetype "application/pdf"]
3953 safe = true
3954
3955[mimetype "application/msword"]
3956 safe = true
3957
3958[mimetype "application/vnd.ms-excel"]
3959 safe = true
3960----
Shawn O. Pearce01cb11902009-07-15 08:19:01 -07003961
Dave Borowitzbc314912017-03-21 14:23:35 -07003962[[note-db]]
3963=== Section noteDb
3964
Dave Borowitzada289c2018-12-18 13:24:14 -08003965NoteDb is the Git-based database storage backend for Gerrit. For more
3966information, including how to migrate data from an older Gerrit version, see the
3967link:note-db.html[documentation].
Dave Borowitzbc314912017-03-21 14:23:35 -07003968
Edwin Kempin5be9c312017-07-07 10:40:55 +02003969[[notedb.accounts.sequenceBatchSize]]notedb.accounts.sequenceBatchSize::
3970+
Edwin Kempin311d5702017-07-28 15:10:24 +02003971The next available account sequence number is stored as UTF-8 text in a
3972blob pointed to by the `refs/sequences/accounts` ref in the `All-Users`
Edwin Kempin5be9c312017-07-07 10:40:55 +02003973repository. Multiple processes share the same sequence by incrementing
3974the counter using normal git ref updates. To amortize the cost of these
3975ref updates, processes increment the counter by a larger number and
3976hand out numbers from that range in memory until they run out. This
3977configuration parameter controls the size of the account ID batch that
3978each process retrieves at once.
3979+
Edwin Kempin5be9c312017-07-07 10:40:55 +02003980By default, 1.
3981
David Pursehouse05eaefe2020-06-02 15:42:46 +09003982[[notedb.changes.sequenceBatchSize]]notedb.changes.sequenceBatchSize::
3983+
3984The next available change sequence number is stored as UTF-8 text in a
3985blob pointed to by the `refs/sequences/changes` ref in the `All-Projects`
3986repository. Multiple processes share the same sequence by incrementing
3987the counter using normal git ref updates. To amortize the cost of these
3988ref updates, processes increment the counter by a larger number and
3989hand out numbers from that range in memory until they run out. This
3990configuration parameter controls the size of the change ID batch that
3991each process retrieves at once.
3992+
3993By default, 20.
Han-Wen Nienhuyse5ca19c2017-11-08 13:33:33 +01003994
Michael Ochmann69813262016-01-27 17:53:55 +01003995[[oauth]]
3996=== Section oauth
3997
3998OAuth integration is only enabled if `auth.type` is set to `OAUTH`. See
3999link:#auth.type[above] for a detailed description of the `auth.type` settings
4000and their implications.
4001
4002By default, contact information, like the full name and email address,
4003is retrieved from the selected OAuth provider when a user account is created,
4004or when a user requests to reload that information in the settings UI. If
4005that is not supported by the OAuth provider, users can be allowed to edit
4006their contact information manually.
4007
4008[[oauth.allowEditFullName]]oauth.allowEditFullName::
4009+
4010If true, the full name can be edited in the contact information.
4011+
4012Default is false.
4013
4014[[oauth.allowRegisterNewEmail]]oauth.allowRegisterNewEmail::
4015+
4016If true, additional email addresses can be registered in the contact
4017information.
4018+
4019Default is false.
Shawn O. Pearce5f11b292010-08-05 17:57:35 -07004020
Zac Livingston70a16102018-11-20 15:07:34 -07004021[[operator-alias]]
4022=== Section operator alias
4023
4024Operator aliasing allows global aliases to be defined for query operators.
4025Currently only change queries are supported. The alias name is the git
4026config key name, and the operator being aliased is the git config value.
4027
4028For example:
4029
4030----
4031[operator-alias "change"]
4032 oldage = age
4033 number = change
4034----
4035
4036This section is particularly useful to alias operator names which may be
4037long and clunky because they include a plugin name in them to a shorter
4038name without the plugin name.
4039
4040Aliases are resolved dynamically at invocation time to any currently
4041loaded versions of plugins. If the alias points to an operator provided
4042by a plugin which is not currently loaded, or the plugin does not define
4043the operator, then "unsupported operator" is returned to the user.
4044
4045Aliases will override existing operators. In the case of multiple aliases
4046with the same name, the last one defined will be used.
4047
4048When the target of an alias doesn't exist, the operator with the name
4049of the alias will be used (if present). This enables an admin to config
4050the system to override a core operator with an operator provided by a
4051plugin when present and otherwise fall back to the operator provided by
4052core.
4053
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08004054[[pack]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08004055=== Section pack
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08004056
Shawn O. Pearce5f11b292010-08-05 17:57:35 -07004057Global settings controlling how Gerrit Code Review creates pack
4058streams for Git clients running clone, fetch, or pull. Most of these
4059variables are per-client request, and thus should be carefully set
4060given the expected concurrent request load and available CPU and
4061memory resources.
4062
4063[[pack.deltacompression]]pack.deltacompression::
4064+
4065If true, delta compression between objects is enabled. This may
4066result in a smaller overall transfer for the client, but requires
4067more server memory and CPU time.
4068+
4069False (off) by default, matching Gerrit Code Review 2.1.4.
4070
4071[[pack.threads]]pack.threads::
4072+
4073Maximum number of threads to use for delta compression (if enabled).
4074This is per-client request. If set to 0 then the number of CPUs is
4075auto-detected and one thread per CPU is used, per client request.
4076+
4077By default, 1.
4078
4079
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08004080[[plugins]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08004081=== Section plugins
Shawn O. Pearce5ad16ea2012-05-09 14:24:25 -07004082
4083[[plugins.checkFrequency]]plugins.checkFrequency::
4084+
4085How often plugins should be examined for new plugins to load, removed
4086plugins to be unloaded, or updated plugins to be reloaded. Values can
4087be specified using standard time unit abbreviations ('ms', 'sec',
4088'min', etc.).
4089+
4090If set to 0, automatic plugin reloading is disabled. Administrators
Christian Aistleitner8ce1a4e2015-06-05 01:54:15 +02004091may force reloading with link:cmd-plugin-reload.html[gerrit plugin reload].
Shawn O. Pearce5ad16ea2012-05-09 14:24:25 -07004092+
4093Default is 1 minute.
4094
Shawn Pearcefd033502014-02-14 16:42:35 -08004095[[plugins.allowRemoteAdmin]]plugins.allowRemoteAdmin::
4096+
4097Enable remote installation, enable and disable of plugins over HTTP
4098and SSH. If set to true Administrators can install new plugins
4099remotely, or disable existing plugins. Defaults to false.
4100
Saša Živkov350fc682019-05-13 14:13:51 +02004101[[plugins.mandatory]]plugins.mandatory::
4102+
4103List of mandatory plugins. If a plugin from this list does not load,
David Pursehousef06aefb2019-10-18 20:39:53 +09004104Gerrit will fail to start.
4105+
4106Disabling and restarting of a mandatory plugin is rejected, but reloading
4107of a mandatory plugin is still possible.
Saša Živkov350fc682019-05-13 14:13:51 +02004108
Dariusz Luksza98f23522015-03-11 11:41:41 +01004109[[plugins.jsLoadTimeout]]plugins.jsLoadTimeout::
4110+
4111Set the timeout value for loading JavaScript plugins in Gerrit UI.
4112Values can be specified using standard time unit abbreviations ('ms',
4113'sec', 'min', etc.).
4114+
4115Default is 5 seconds. Negative values will be converted to 0.
Shawn O. Pearce5ad16ea2012-05-09 14:24:25 -07004116
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08004117[[receive]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08004118=== Section receive
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08004119
Dave Borowitzff243892015-08-31 15:35:28 -04004120This section is used to configure behavior of the 'receive-pack'
4121handler, which responds to 'git push' requests.
lincoln2be11602010-07-05 10:53:25 -03004122
Dave Borowitzff243892015-08-31 15:35:28 -04004123[[receive.allowGroup]]receive.allowGroup::
Dave Borowitz532342bf2015-06-18 20:28:22 -04004124+
Dave Borowitzff243892015-08-31 15:35:28 -04004125Name of the groups of users that are allowed to execute
4126'receive-pack' on the server. One or more groups can be set.
Dave Borowitz532342bf2015-06-18 20:28:22 -04004127+
Dave Borowitzff243892015-08-31 15:35:28 -04004128If no groups are added, any user will be allowed to execute
4129'receive-pack' on the server.
Dave Borowitz532342bf2015-06-18 20:28:22 -04004130
4131[[receive.certNonceSeed]]receive.certNonceSeed::
4132+
4133If set to a non-empty value and server-side signed push validation is
4134link:#receive.enableSignedPush[enabled], use this value as the seed to
4135the HMAC SHA-1 nonce generator. If unset, a 64-byte random seed will be
4136generated at server startup.
4137+
4138As this is used as the seed of a cryptographic algorithm, it is
4139recommended to be placed in link:#secure-config[`secure.config`].
4140+
4141Defaults to unset.
4142
4143[[receive.certNonceSlop]]receive.certNonceSlop::
4144+
4145When validating the nonce passed as part of the signed push protocol,
4146accept valid nonces up to this many seconds old. This allows
4147certificate verification to work over HTTP where there is a lag between
4148the HTTP response providing the nonce to sign and the next request
4149containing the signed nonce. This can be significant on large
4150repositories, since the lag also includes the time to count objects on
4151the client.
4152+
4153Default is 5 minutes.
4154
Dave Borowitzff243892015-08-31 15:35:28 -04004155[[receive.changeUpdateThreads]]receive.changeUpdateThreads::
4156+
4157Number of threads to perform change creation or patch set updates
4158concurrently. Each thread uses its own database connection from
4159the database connection pool, and if all threads are busy then
4160main receive thread will also perform a change creation or patch
4161set update.
4162+
4163Defaults to 1, using only the main receive thread. This feature is for
4164databases with very high latency that can benefit from concurrent
4165operations when multiple changes are impacted at once.
4166
Shawn Pearce5cb31bf2013-02-27 16:20:26 -08004167[[receive.checkMagicRefs]]receive.checkMagicRefs::
4168+
4169If true, Gerrit will verify the destination repository has
David Ostrovsky6ffb7d92017-02-13 21:16:58 +01004170no references under the magic 'refs/for' branch namespace. Names under
4171these locations confuse clients when trying to upload code reviews so
4172Gerrit requires them to be empty.
Shawn Pearce5cb31bf2013-02-27 16:20:26 -08004173+
4174If false Gerrit skips the sanity check and assumes administrators
4175have ensured the repository does not contain any magic references.
4176Setting to false to skip the check can decrease latency during push.
4177+
4178Default is true.
4179
Gustaf Lundhfd5fcf42018-06-25 16:15:21 +02004180[[receive.allowProjectOwnersToChangeParent]]receive.allowProjectOwnersToChangeParent::
4181+
4182If true, Gerrit will allow project owners to change the parent of a project.
4183+
4184By default only Gerrit administrators are allowed to change the parent
4185of a project. By allowing project owners to change parents, it may
4186allow the owner to circumvent certain enforced rules (like important
4187BLOCK rules).
4188+
4189Default is false.
Rikard Almgrene9221be2018-09-18 11:12:03 +02004190+
4191This value supports configuration reloads:
4192link:cmd-reload-config.html[reload-config]
Gustaf Lundhfd5fcf42018-06-25 16:15:21 +02004193
Gustaf Lundh9062fd62013-02-14 17:23:11 +01004194[[receive.checkReferencedObjectsAreReachable]]receive.checkReferencedObjectsAreReachable::
4195+
4196If set to true, Gerrit will validate that all referenced objects that
4197are not included in the received pack are reachable by the user.
4198+
4199Carrying out this check on gits with many refs and commits can be a
4200very CPU-heavy operation. For non public Gerrit-servers this check may
4201be overkill.
4202+
Han-Wen Nienhuys37a1cab2021-04-01 12:46:00 +02004203Only disable this check if you trust the clients not to forge SHA-1
Gustaf Lundh9062fd62013-02-14 17:23:11 +01004204references to access commits intended to be hidden from the user.
4205+
4206Default is true.
4207
Patrick Hiesel24653be2019-10-22 09:47:32 +02004208[[receive.enableInMemoryRefCache]]receive.enableInMemoryRefCache::
4209+
4210If true, Gerrit will cache all refs advertised during push in memory and
4211base later receive operations on that cache.
4212+
4213Turning this cache off is considered experimental.
4214+
4215This cache provides value when the ref database is slow and/or does not
4216offer an inverse lookup of object ID to ref name. When RefTable is used,
4217this cache can be turned off (experimental) to get speed improvements.
4218+
4219Default is true.
4220
Dave Borowitzff243892015-08-31 15:35:28 -04004221[[receive.enableSignedPush]]receive.enableSignedPush::
lincoln2be11602010-07-05 10:53:25 -03004222+
Dave Borowitzff243892015-08-31 15:35:28 -04004223If true, server-side signed push validation is enabled.
lincoln2be11602010-07-05 10:53:25 -03004224+
Dave Borowitzff243892015-08-31 15:35:28 -04004225When a client pushes with `git push --signed`, this ensures that the
4226push certificate is valid and signed with a valid public key stored in
David Pursehouse6117a472016-07-26 08:02:49 +00004227the `refs/meta/gpg-keys` branch of `All-Users`.
Dave Borowitzff243892015-08-31 15:35:28 -04004228+
4229Defaults to false.
4230
4231[[receive.maxBatchChanges]]receive.maxBatchChanges::
4232+
4233The maximum number of changes that Gerrit allows to be pushed
4234in a batch for review. When this number is exceeded Gerrit rejects
4235the push with an error message.
4236+
4237May be overridden for certain groups by specifying a limit in the
4238link:access-control.html#capability_batchChangesLimit['Batch Changes Limit']
4239global capability.
4240+
4241This setting can be used to prevent users from uploading large
4242number of changes for review by mistake.
4243+
4244Default is zero, no limit.
lincoln2be11602010-07-05 10:53:25 -03004245
Dave Borowitz78542192017-08-31 10:45:47 -04004246[[receive.maxBatchCommits]]receive.maxBatchCommits::
4247+
4248The maximum number of commits that Gerrit allows to be pushed in a batch
4249directly to a branch when link:user-upload.html#bypass_review[bypassing review].
4250This limit can be bypassed if a user link:user-upload.html#skip_validation[skips
4251validation].
4252+
4253Default is 10000.
4254
Sasa Zivkov59d89c32011-11-18 15:32:35 +01004255[[receive.maxObjectSizeLimit]]receive.maxObjectSizeLimit::
4256+
4257Maximum allowed Git object size that 'receive-pack' will accept.
4258If an object is larger than the given size the pack-parsing will abort
4259and the push operation will fail. If set to zero then there is no
4260limit.
4261+
David Pursehouse221d4f62012-06-08 17:38:08 +09004262Gerrit administrators can use this setting to prevent developers
Sasa Zivkov59d89c32011-11-18 15:32:35 +01004263from pushing objects which are too large to Gerrit.
4264+
Fredrik Luthandera3cf3542012-07-04 16:55:35 -07004265This setting can also be set in the `project.config`
David Pursehouse2e548682018-08-01 15:12:47 +02004266(link:config-project-config.html[receive.maxObjectSizeLimit]) in order
Fredrik Luthandera3cf3542012-07-04 16:55:35 -07004267to further reduce the global setting. The project specific setting is
4268only honored when it further reduces the global limit.
Sasa Zivkov5a708a82013-06-28 17:07:55 +02004269+
Sasa Zivkov59d89c32011-11-18 15:32:35 +01004270Default is zero.
4271+
4272Common unit suffixes of 'k', 'm', or 'g' are supported.
4273
David Pursehouse3f9c7402018-09-05 18:43:03 +09004274[[receive.inheritProjectMaxObjectSizeLimit]]receive.inheritProjectMaxObjectSizeLimit::
4275+
4276Controls whether the project-level link:config-project-config.html[`receive.maxObjectSizeLimit`]
4277value is inherited from the parent project. When `true`, the value is
4278inherited, otherwise it is not inherited.
4279+
4280Default is false, the value is not inherited.
4281
Dave Borowitz1bb49492015-08-31 15:36:59 -04004282[[receive.maxTrustDepth]]receive.maxTrustDepth::
4283+
4284If signed push validation is link:#receive.enableSignedPush[enabled],
4285set to the maximum depth to search when checking if a key is
4286link:#receive.trustedKey[trusted].
4287+
4288Default is 0, meaning only explicitly trusted keys are allowed.
4289
Dave Borowitz234734a2012-03-01 14:22:29 -08004290[[receive.threadPoolSize]]receive.threadPoolSize::
4291+
4292Maximum size of the thread pool in which the change data in received packs is
4293processed.
4294+
4295Defaults to the number of available CPUs according to the Java runtime.
4296
Dave Borowitz1c401362012-03-02 17:39:17 -08004297[[receive.timeout]]receive.timeout::
4298+
Shawn O. Pearce00dd12d2012-03-12 15:52:11 -07004299Overall timeout on the time taken to process the change data in
4300received packs. Only includes the time processing Gerrit changes
4301and updating references, not the time to index the pack. Values can
4302be specified using standard time unit abbreviations ('ms', 'sec',
4303'min', etc.).
Dave Borowitz1c401362012-03-02 17:39:17 -08004304+
Dariusz Lukszade482b02015-11-09 18:25:04 +01004305Default is 4 minutes. If no unit is specified, milliseconds
Shawn O. Pearce00dd12d2012-03-12 15:52:11 -07004306is assumed.
Dave Borowitz1c401362012-03-02 17:39:17 -08004307
Dave Borowitz1bb49492015-08-31 15:36:59 -04004308[[receive.trustedKey]]receive.trustedKey::
4309+
4310List of GPG key fingerprints that should be considered trust roots by
4311the server when signed push validation is
4312link:#receive.enableSignedPush[enabled]. A key is trusted by the server
4313if it is either in this list, or a path of trust signatures leads from
4314the key to a configured trust root. The maximum length of the path is
4315determined by link:#receive.maxTrustDepth[`receive.maxTrustDepth`].
4316+
4317Key fingerprints can be displayed with `gpg --list-keys
4318--with-fingerprint`.
4319+
4320Trust signatures can be added to a key using the `tsign` command to
4321link:https://www.gnupg.org/documentation/manuals/gnupg/OpenPGP-Key-Management.html[
Marian Harbach34253372019-12-10 18:01:31 +01004322`gpg --edit-key`,role=external,window=_blank], after which the signed key should be re-uploaded.
Dave Borowitz1bb49492015-08-31 15:36:59 -04004323+
4324If no keys are specified, web-of-trust checks are disabled. This is the
4325default behavior.
4326
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08004327[[repository]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08004328=== Section repository
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08004329
Hugo Josefson072b4702010-04-21 19:27:11 +02004330Repositories in this sense are the same as projects.
4331
Shawn O. Pearce897d9212011-06-16 16:59:59 -07004332In the following example configuration `Registered Users` is set
4333to be the default owner of new projects.
Hugo Josefson072b4702010-04-21 19:27:11 +02004334
4335----
4336[repository "*"]
Hugo Josefson072b4702010-04-21 19:27:11 +02004337 ownerGroup = Registered Users
4338----
4339
Hugo Arès7d2b9422014-11-25 15:33:42 -05004340The only matching patterns supported are exact match or wildcard matching which
4341can be specified by ending the name with a `*`. If a project matches more than one
4342repository configuration, then the configuration from the more precise match
4343will be used. In the following example, the default submit type for a project
4344named `project/plugins/a` would be `CHERRY_PICK`.
4345
4346----
4347[repository "project/*"]
4348 defaultSubmitType = MERGE_IF_NECESSARY
4349[repository "project/plugins/*"]
4350 defaultSubmitType = CHERRY_PICK
4351----
4352
Michael Ochmann8129ece2016-07-08 11:25:25 +02004353[NOTE]
4354All properties are used from the matching repository configuration. In
Hugo Arès7d2b9422014-11-25 15:33:42 -05004355the previous example, all properties will be used from `project/plugins/\*`
4356section and no properties will be inherited nor overridden from `project/*`.
Hugo Josefson072b4702010-04-21 19:27:11 +02004357
Hugo Arès218bb3b2015-04-22 15:05:14 -04004358[[repository.name.basePath]]repository.<name>.basePath::
4359+
4360Alternate to <<gerrit.basePath,gerrit.basePath>>. The repository will be created
4361and used from this location instead: ${alternateBasePath}/${projectName}.git.
4362+
4363If configuring the basePath for an existing project in gerrit, make sure to stop
4364gerrit, move the repository in the alternate basePath, configure basePath for
4365this repository and then start Gerrit.
4366+
4367Path must be absolute.
4368
Edwin Kempina79ea552013-11-19 11:24:37 +01004369[[repository.name.defaultSubmitType]]repository.<name>.defaultSubmitType::
4370+
4371The default submit type for newly created projects. Supported values
Dave Borowitzc8f8d2e2017-10-23 11:18:23 -04004372are `INHERIT`, `MERGE_IF_NECESSARY`, `FAST_FORWARD_ONLY`, `REBASE_IF_NECESSARY`,
Gert van Dijka4e49d02017-08-27 22:50:40 +02004373`REBASE_ALWAYS`, `MERGE_ALWAYS` and `CHERRY_PICK`.
4374+
Changcheng Xiao21885982019-01-15 18:16:51 +01004375For more details see link:config-project-config.html#submit-type[Submit Types].
Edwin Kempina79ea552013-11-19 11:24:37 +01004376+
Changcheng Xiao21885982019-01-15 18:16:51 +01004377Default is link:config-project-config.html#submit_type_inherit[`INHERIT`].
Dave Borowitzcad4d262018-01-22 10:02:22 -05004378+
Dave Borowitz03e51742018-01-09 07:57:01 -05004379This submit type is only applied at project creation time if a submit type is
4380omitted from the link:rest-api-projects.html#project-input[ProjectInput]. If the
Dave Borowitzcad4d262018-01-22 10:02:22 -05004381submit type is unset in the project config at runtime, for backwards
4382compatibility purposes, it defaults to
4383link:project-configuration.html#merge_if_necessary[`MERGE_IF_NECESSARY`] rather
4384than `INHERIT`.
Edwin Kempina79ea552013-11-19 11:24:37 +01004385
Hugo Josefson072b4702010-04-21 19:27:11 +02004386[[repository.name.ownerGroup]]repository.<name>.ownerGroup::
4387+
4388A name of a group which exists in the database. Zero, one or many
4389groups are allowed. Each on its own line. Groups which don't exist
4390in the database are ignored.
Hugo Josefson072b4702010-04-21 19:27:11 +02004391
Edwin Kempin22687fa2018-01-22 11:55:07 +01004392[[retry]]
4393=== Section retry
4394
4395[[retry.maxWait]]retry.maxWait::
4396+
4397Maximum time to wait between attempts to retry an operations when one attempt
4398fails (e.g. on NoteDb updates due to contention, aka lock failure, on the
4399underlying ref storage). Operations are retried with exponential backoff, plus
4400some random jitter, until the interval reaches this limit. After that, retries
4401continue to occur after a fixed timeout (plus jitter), up to
4402link:#retry.timeout[`retry.timeout`].
4403+
4404Defaults to 5 seconds; unit suffixes are supported, and assumes milliseconds if
4405not specified.
4406
4407[[retry.timeout]]retry.timeout::
4408+
4409Total timeout for retrying operations when one attempt fails.
4410+
4411It is possible to overwrite this default timeout based on operation types by
4412setting link:#retry.operationType.timeout[`retry.<operationType>.timeout`].
4413+
4414Defaults to 20 seconds; unit suffixes are supported, and assumes milliseconds if
4415not specified.
4416
4417[[retry.operationType.timeout]]retry.<operationType>.timeout::
4418+
4419Total timeout for retrying operations of type `<operationType>` when one
4420attempt fails. `<operationType>` can be `ACCOUNT_UPDATE`, `CHANGE_UPDATE`,
4421`GROUP_UPDATE` and `INDEX_QUERY`.
4422+
4423Defaults to link:#retry.timeout[`retry.timeout`]; unit suffixes are supported,
4424and assumes milliseconds if not specified.
4425
Edwin Kempindd837ae2019-06-18 11:42:14 +02004426[[retry.retryWithTraceOnFailure]]retry.retryWithTraceOnFailure::
4427+
4428Whether Gerrit should automatically retry operations on failure with tracing
4429enabled. The automatically generated traces can help with debugging. Please
4430note that only some of the REST endpoints support automatic retry.
4431+
4432By default this is set to false.
4433
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08004434[[rules]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08004435=== Section rules
Shawn O. Pearce94860ee2011-09-29 13:11:08 -07004436
4437[[rules.enable]]rules.enable::
4438+
Matt Baker8ce12fc2013-11-26 21:43:12 -07004439If true, Gerrit will load and execute 'rules.pl' files in each
Shawn O. Pearce94860ee2011-09-29 13:11:08 -07004440project's refs/meta/config branch, if present. When set to false,
4441only the default internal rules will be used.
4442+
4443Default is true, to execute project specific rules.
4444
Shawn Pearceed001d72014-12-17 14:25:55 -08004445[[rules.reductionLimit]]rules.reductionLimit::
4446+
4447Maximum number of Prolog reductions that can be performed when
4448evaluating rules for a single change. Each function call made
4449in user rule code, internal Gerrit Prolog code, or the Prolog
4450interpreter counts against this limit.
4451+
4452Sites using very complex rules that need many reductions should
4453compile Prolog to Java bytecode with link:pgm-rulec.html[rulec].
4454This eliminates the dynamic Prolog interpreter from charging its
4455own reductions against the limit, enabling more logic to execute
4456within the same bounds.
4457+
4458A reductionLimit of 0 is nearly infinite, implemented by setting
4459the internal limit to 2^31-1.
4460+
4461Default is 100,000 reductions (about 14 ms on Intel Core i7 CPU).
4462
4463[[rules.compileReductionLimit]]rules.compileReductionLimit::
4464+
4465Maximum number of Prolog reductions that can be performed when
4466compiling source code to internal Prolog machine code.
4467+
4468Default is 10x reductionLimit (1,000,000).
4469
Shawn Pearcea2b98522015-11-21 09:47:32 -08004470[[rules.maxSourceBytes]]rules.maxSourceBytes::
4471+
4472Maximum input size (in bytes) of a Prolog rules.pl file. Larger
4473source files may need a larger rules.compileReductionLimit. Consider
4474using link:pgm-rulec.html[rulec] to precompile larger rule files.
4475+
4476A size of 0 bytes disables rules, same as rules.enable = false.
4477+
David Pursehouse0c1dadf2015-11-24 09:14:21 +00004478Common unit suffixes of 'k', 'm', or 'g' are supported.
4479+
Shawn Pearcea2b98522015-11-21 09:47:32 -08004480Default is 128 KiB.
4481
4482[[rules.maxPrologDatabaseSize]]rules.maxPrologDatabaseSize::
4483+
4484Number of predicate clauses allowed to be defined in the Prolog
4485database by project rules. Very complex rules may need more than the
4486default 256 limit, but cost more memory and may need more time to
4487evaluate. Consider using link:pgm-rulec.html[rulec] to precompile
4488larger rule files.
4489+
4490Default is 256.
4491
David Pursehouse511a35b2014-04-04 10:27:13 +09004492[[execution]]
4493=== Section execution
Bruce Zua7e34312014-04-01 17:35:41 +08004494
4495[[execution.defaultThreadPoolSize]]execution.defaultThreadPoolSize::
4496+
4497The default size of the background execution thread pool in
4498which miscellaneous tasks are handled.
4499+
Jacek Centkowskice5510d2019-11-13 16:27:25 -08004500Default and minimum is 2 so that a single, potentially longer executing
4501task (e.g. GC), is not blocking the entire execution.
Bruce Zua7e34312014-04-01 17:35:41 +08004502
Patrick Hiesel2ed39822018-04-16 12:04:02 +02004503[[execution.fanOutThreadPoolSize]]execution.fanOutThreadPoolSize::
4504+
4505Maximum size of thread pool to on which a serving thread can fan-out
4506work to parallelize it.
4507+
4508When set to 0, a direct executor will be used.
4509+
4510By default, 25 which means that formatting happens in the caller thread.
4511
Patrick Hiesel328b7612016-10-21 16:43:13 +02004512[[receiveemail]]
4513=== Section receiveemail
4514
4515[[receiveemail.protocol]]receiveemail.protocol::
4516+
4517Specifies the protocol used for receiving emails. Valid options are
4518'POP3', 'IMAP' and 'NONE'. Note that Gerrit will automatically switch between
4519POP3 and POP3s as well as IMAP and IMAPS depending on the specified
4520link:#receiveemail.encryption[encryption].
4521+
4522Defaults to 'NONE' which means that receiving emails is disabled.
4523
4524[[receiveemail.host]]receiveemail.host::
4525+
4526The hostname of the mailserver. Example: 'imap.gmail.com'.
4527+
4528Defaults to an empty string which means that receiving emails is disabled.
4529
4530[[receiveemail.port]]receiveemail.port::
4531+
David Pursehouse4b067752017-03-03 15:54:53 +09004532The port the email server exposes for receiving emails.
Patrick Hiesel328b7612016-10-21 16:43:13 +02004533+
4534Defaults to the industry standard for a given protocol and encryption:
David Pursehouse34907442017-04-04 09:55:38 +09004535POP3: 110; POP3S: 995; IMAP: 143; IMAPS: 993.
Patrick Hiesel328b7612016-10-21 16:43:13 +02004536
4537[[receiveemail.username]]receiveemail.username::
4538+
4539Username used for authenticating with the email server.
4540+
4541Defaults to an empty string.
4542
4543[[receiveemail.password]]receiveemail.password::
4544+
4545Password used for authenticating with the email server.
4546+
4547Defaults to an empty string.
4548
4549[[receiveemail.encryption]]receiveemail.encryption::
4550+
4551Encryption standard used for transport layer security between Gerrit and the
4552email server. Possible values include 'NONE', 'SSL' and 'TLS'.
4553+
4554Defaults to 'NONE'.
4555
4556[[receiveemail.fetchInterval]]receiveemail.fetchInterval::
4557+
4558Time between two consecutive fetches from the email server. Communication with
4559the email server is not kept alive. Examples: 60s, 10m, 1h.
4560+
4561Defaults to 60 seconds.
4562
4563[[receiveemail.enableImapIdle]]receiveemail.enableImapIdle::
4564+
4565If the IMAP protocol is used for retrieving emails, IMAPv4 IDLE can be used to
4566keep the connection with the email server alive and receive a push when a new
4567email is delivered to the inbox. In this case, Gerrit will process the email
4568immediately and will not have a fetch delay.
Patrick Hiesel328b7612016-10-21 16:43:13 +02004569+
4570Defaults to false.
4571
Patrick Hiesel4266cf72017-02-03 08:18:19 +01004572[[receiveemail.filter.mode]]receiveemail.filter.mode::
4573+
Gal Paikin166e4432020-09-22 19:09:45 +03004574An allow and block filter to filter incoming emails.
Patrick Hiesel4266cf72017-02-03 08:18:19 +01004575+
4576If `OFF`, emails are not filtered by the list filter.
4577+
Gal Paikin166e4432020-09-22 19:09:45 +03004578If `ALLOW`, only emails where a pattern from
Patrick Hiesel4266cf72017-02-03 08:18:19 +01004579<<receiveemail.filter.patterns,receiveemail.filter.patterns>>
4580matches 'From' will be processed.
4581+
Gal Paikin166e4432020-09-22 19:09:45 +03004582If `BLOCK`, only emails where no pattern from
Patrick Hiesel4266cf72017-02-03 08:18:19 +01004583<<receiveemail.filter.patterns,receiveemail.filter.patterns>>
4584matches 'From' will be processed.
4585+
4586Defaults to `OFF`.
Gal Paikin166e4432020-09-22 19:09:45 +03004587+
4588The previous filter-names 'BLACKLIST' and 'WHITELIST' have been deprecated
4589since they may be considered disrespectful and there's no technical or
4590practical reason to use these exact terms for the filters.
4591For backwards compatibility they are still supported but support for these
4592deprecated terms will be removed in future releases.
Patrick Hiesel4266cf72017-02-03 08:18:19 +01004593
4594[[receiveemail.filter.patterns]]receiveemail.filter.patterns::
4595+
4596A list of regular expressions to match the email sender against. This can also
4597be a list of addresses when regular expression characters are escaped.
4598
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08004599[[sendemail]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08004600=== Section sendemail
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07004601
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07004602[[sendemail.enable]]sendemail.enable::
Shawn O. Pearce2e4573b2009-06-02 09:09:50 -07004603+
4604If false Gerrit will not send email messages, for any reason,
4605and all other properties of section sendemail are ignored.
4606+
4607By default, true, allowing notifications to be sent.
4608
Jonathan Niederdabd8c22016-09-20 14:10:11 -07004609[[sendemail.html]]sendemail.html::
4610+
4611If false, Gerrit will only send plain-text emails.
4612If true, Gerrit will send multi-part emails with an HTML and
4613plain text part.
4614+
4615By default, true, allowing HTML in the emails Gerrit sends.
4616
Bruce Zua7e34312014-04-01 17:35:41 +08004617[[sendemail.connectTimeout]]sendemail.connectTimeout::
4618+
4619The connection timeout of opening a socket connected to a
4620remote SMTP server.
4621+
4622Values can be specified using standard time unit abbreviations
4623('ms', 'sec', 'min', etc.).
4624If no unit is specified, milliseconds is assumed.
4625+
4626Default is 0. A timeout of zero is interpreted as an infinite
4627timeout. The connection will then block until established or
4628an error occurs.
4629
4630[[sendemail.threadPoolSize]]sendemail.threadPoolSize::
Alice Kober-Sotzekda0559e2020-09-18 09:25:15 +00004631+
4632Maximum size of thread pool in which the review comments
4633notifications are sent out asynchronously.
4634+
4635By default, 1.
Bruce Zua7e34312014-04-01 17:35:41 +08004636
Shawn O. Pearce5c31bd72009-09-10 18:13:33 -07004637[[sendemail.from]]sendemail.from::
4638+
4639Designates what name and address Gerrit will place in the From
4640field of any generated email messages. The supported values are:
4641+
4642* `USER`
4643+
4644Gerrit will set the From header to use the current user's
David Pursehouse92463562013-06-24 10:16:28 +09004645Full Name and Preferred Email. This may cause messages to be
Shawn O. Pearce5c31bd72009-09-10 18:13:33 -07004646classified as spam if the user's domain has SPF or DKIM enabled
4647and <<sendemail.smtpServer,sendemail.smtpServer>> is not a trusted
Zhen Chenae765aa2016-08-08 15:49:44 -07004648relay for that domain. You can specify
4649<<sendemail.allowedDomain,sendemail.allowedDomain>> to instruct Gerrit to only
4650send as USER if USER is from those domains.
Shawn O. Pearce5c31bd72009-09-10 18:13:33 -07004651+
4652* `MIXED`
4653+
Edwin Kempincdb0e002011-09-08 14:23:30 +02004654Shorthand for `${user} (Code Review) <review@example.com>` where
Shawn O. Pearce5c31bd72009-09-10 18:13:33 -07004655`review@example.com` is the same as <<user.email,user.email>>.
4656See below for a description of how the replacement is handled.
4657+
4658* `SERVER`
4659+
4660Gerrit will set the From header to the same name and address
4661it records in any commits Gerrit creates. This is set by
4662<<user.name,user.name>> and <<user.email,user.email>>, or guessed
4663from the local operating system.
4664+
Edwin Kempinebfbbac2015-07-01 16:02:39 +02004665* `Code Review <review@example.com>`
Shawn O. Pearce5c31bd72009-09-10 18:13:33 -07004666+
4667If set to a name and email address in brackets, Gerrit will use
4668this name and email address for any messages, overriding the name
4669that may have been selected for commits by user.name and user.email.
Edwin Kempincdb0e002011-09-08 14:23:30 +02004670Optionally, the name portion may contain the placeholder `${user}`,
Shawn O. Pearce5c31bd72009-09-10 18:13:33 -07004671which is replaced by the Full Name of the current user.
4672
4673+
4674By default, MIXED.
4675
Zhen Chenae765aa2016-08-08 15:49:44 -07004676[[sendemail.allowedDomain]]sendemail.allowedDomain::
4677+
4678Only used when `sendemail.from` is set to `USER`.
4679List of allowed domains. If user's email matches one of the domains, emails will
4680be sent as USER, otherwise as MIXED mode. Wildcards may be specified by
Maxime Guerreiroebac2d42018-03-21 13:54:51 +01004681including `\*` to match any number of characters, for example `*.example.com`
Zhen Chenae765aa2016-08-08 15:49:44 -07004682matches any subdomain of `example.com`.
4683+
4684By default, `*`.
4685
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07004686[[sendemail.smtpServer]]sendemail.smtpServer::
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07004687+
4688Hostname (or IP address) of a SMTP server that will relay
4689messages generated by Gerrit to end users.
4690+
4691By default, 127.0.0.1 (aka localhost).
4692
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07004693[[sendemail.smtpServerPort]]sendemail.smtpServerPort::
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07004694+
4695Port number of the SMTP server in sendemail.smtpserver.
4696+
Shawn O. Pearce6e9a83f2009-11-02 10:30:48 -08004697By default, 25, or 465 if smtpEncryption is 'ssl'.
4698
4699[[sendemail.smtpEncryption]]sendemail.smtpEncryption::
4700+
4701Specify the encryption to use, either 'ssl' or 'tls'.
4702+
4703By default, 'none', indicating no encryption is used.
4704
4705[[sendemail.sslVerify]]sendemail.sslVerify::
4706+
4707If false and sendemail.smtpEncryption is 'ssl' or 'tls', Gerrit
4708will not verify the server certificate when it connects to send
4709an email message.
4710+
4711By default, true, requiring the certificate to be verified.
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07004712
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07004713[[sendemail.smtpUser]]sendemail.smtpUser::
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07004714+
4715User name to authenticate with, if required for relay.
4716
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07004717[[sendemail.smtpPass]]sendemail.smtpPass::
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07004718+
4719Password for the account named by sendemail.smtpUser.
4720
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07004721[[sendemail.allowrcpt]]sendemail.allowrcpt::
Shawn O. Pearce219a8ee2009-06-01 18:13:57 -07004722+
Gal Paikin166e4432020-09-22 19:09:45 +03004723If present, each value adds one entry to the list of allowed email
4724addresses that Gerrit can send emails to. If set to a complete
4725email address, that one address is added to the list of allowed
4726emails.
Shawn O. Pearce219a8ee2009-06-01 18:13:57 -07004727If set to a domain name, any address at that domain can receive
4728email from Gerrit.
4729+
Rikard Almgren5b9de1c2019-03-12 17:55:16 +01004730If allowrcpt is configured, The set of allowed recipients is:
4731`allowrcpt - denyrcpt`.
4732+
4733By default, unset, permitting delivery to any email address.
4734
4735[[sendemail.denyrcpt]]sendemail.denyrcpt::
4736+
Gal Paikin166e4432020-09-22 19:09:45 +03004737If present, each value adds one entry to the list of email
4738addresses that Gerrit can't send emails to. If set to a complete
4739email address, that one address is added to the list of blocked
4740emails.
Rikard Almgren5b9de1c2019-03-12 17:55:16 +01004741If set to a domain name, any address at that domain can *not* receive
4742email from Gerrit.
4743+
Shawn O. Pearce219a8ee2009-06-01 18:13:57 -07004744By default, unset, permitting delivery to any email address.
4745
Shawn O. Pearce02aacbc2012-06-12 13:44:22 -07004746[[sendemail.includeDiff]]sendemail.includeDiff::
4747+
Bruce Zueb00ff32012-11-27 17:38:10 +08004748If true, new change emails and merged change emails from Gerrit
4749will include the complete unified diff of the change.
4750Variable maxmimumDiffSize places an upper limit on how large the
4751email can get when this option is enabled.
Shawn O. Pearce02aacbc2012-06-12 13:44:22 -07004752+
4753By default, false.
4754
Shawn O. Pearce28a950b2012-06-12 14:36:34 -07004755[[sendemail.maximumDiffSize]]sendemail.maximumDiffSize::
4756+
4757Largest size of unified diff output to include in an email. When
4758the diff exceeds this size the file paths will be listed instead.
4759Standard byte unit suffixes are supported.
4760+
4761By default, 256 KiB.
4762
Alex Blewitt9cca7402011-02-11 01:39:30 +00004763[[sendemail.importance]]sendemail.importance::
4764+
4765If present, emails sent from Gerrit will have the given level
4766of importance. Valid values include 'high' and 'low', which
4767email clients will render in different ways.
4768+
4769By default, unset, so no Importance header is generated.
4770
4771[[sendemail.expiryDays]]sendemail.expiryDays::
4772+
4773If present, emails sent from Gerrit will expire after the given
4774number of days. This will add the Expiry-Date header and
4775email clients may expire or expunge mails whose Expiry-Date
4776header is in the past. This should be a positive non-zero
4777number indicating how many days in the future the mails
4778should expire.
4779+
4780By default, unset, so no Expiry-Date header is generated.
4781
Patrick Hiesel31d60f02017-02-09 17:38:40 +01004782[[sendemail.replyToAddress]]sendemail.replyToAddress::
4783+
4784A custom Reply-To address should only be provided if Gerrit is set up to
4785receive emails and the inbound address differs from
4786<<sendemail.from,sendemail.from>>.
4787It will be set as Reply-To header on all types of outgoing email where
4788Gerrit can parse back a user's reply.
4789+
4790Defaults to an empty string which adds <<sendemail.from,sendemail.from>> as
4791Reply-To if inbound email is enabled and the review's author otherwise.
Shawn O. Pearcedba97642011-09-07 20:12:31 -07004792
David Pursehouse917b7262017-04-21 18:18:52 +02004793[[sendemail.allowTLD]]sendemail.allowTLD::
4794+
4795List of custom TLDs to allow sending emails to in addition to those specified
Marian Harbach34253372019-12-10 18:01:31 +01004796in the link:http://data.iana.org/TLD/[IANA list,role=external,window=_blank].
David Pursehouse917b7262017-04-21 18:18:52 +02004797+
4798Defaults to an empty list, meaning no additional TLDs are allowed.
4799
Maxime Guerreiro8d129d42018-03-21 18:59:27 +01004800
4801[[sendemail.addInstanceNameInSubject]]sendemail.addInstanceNameInSubject::
4802+
4803When set to true, Gerrit will add its short name to the email subject, allowing recipients to quickly identify
4804what Gerrit instance the email came from.
4805+
4806The short name can be customized via the gerrit.instanceName option.
4807+
Luca Milanesiofdfca772018-04-04 23:42:32 +01004808Defaults to false.
Maxime Guerreiro8d129d42018-03-21 18:59:27 +01004809
4810
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08004811[[site]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08004812=== Section site
Shawn O. Pearcedba97642011-09-07 20:12:31 -07004813
Shawn Pearcec896eaa2016-08-23 19:38:58 -07004814[[site.allowOriginRegex]]site.allowOriginRegex::
4815+
4816List of regular expressions matching origins that should be permitted
Shawn Pearce53ebad42017-06-10 11:14:20 -07004817to use the full Gerrit REST API. These should be trusted applications,
4818as the sites may be able to use the user's credentials. Applies to
4819all requests, including state changing methods (PUT, DELETE, POST).
4820+
4821Expressions should not require trailing slash. For example a valid
4822pattern might be `https://build-status[.]example[.]com`.
Shawn Pearcec896eaa2016-08-23 19:38:58 -07004823+
4824By default, unset, denying all cross-origin requests.
4825
Shawn O. Pearcedba97642011-09-07 20:12:31 -07004826[[site.refreshHeaderFooter]]site.refreshHeaderFooter::
4827+
4828If true the server checks the site header, footer and CSS files for
4829updated versions. If false, a server restart is required to change
4830any of these resources. Default is true, allowing automatic reloads.
4831
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08004832[[ssh-alias]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08004833=== Section ssh-alias
Shawn O. Pearce521380a2012-05-11 14:57:56 -07004834
4835Variables in section ssh-alias permit the site administrator to alias
4836another command from Gerrit or a plugin into the `gerrit` command
4837namespace. To alias `replication start` to `gerrit replicate`:
4838
4839----
4840[ssh-alias]
4841 replicate = replication start
4842----
Shawn O. Pearcedba97642011-09-07 20:12:31 -07004843
David Ostrovskyceb5ec12020-04-18 08:50:45 +02004844[[ssh]]
4845=== Section ssh
4846
4847[[ssh.clientImplementation]]ssh.clientImplementation::
4848+
David Ostrovskydb785422020-05-11 23:58:07 +02004849JCraft JSch client is supported in addition to Apache MINA SSH client.
4850To use JSch client set the value to `JSCH`.
David Ostrovskyceb5ec12020-04-18 08:50:45 +02004851+
David Ostrovskydb785422020-05-11 23:58:07 +02004852By default, `APACHE`.
David Ostrovskyceb5ec12020-04-18 08:50:45 +02004853
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08004854[[sshd]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08004855=== Section sshd
Shawn O. Pearce9410f2c2009-05-14 10:26:47 -07004856
Gustaf Lundhd60e90f2015-08-03 16:18:33 +02004857[[sshd.enableCompression]]sshd.enableCompression::
4858+
4859In the general case, we want to disable transparent compression, since
4860the majority of our data transfer is highly compressed Git pack files
4861and we cannot make them any smaller than they already are.
4862+
4863However, if there are CPU in abundance and the server is reachable
4864through slow networks, gits with huge amount of refs can benefit from
4865SSH-compression since git does not compress the ref announcement during
4866handshake.
4867+
Han-Wen Nienhuys348a6032019-09-24 19:44:57 +02004868Compression can be especially useful when Gerrit replicas are being used
Matthias Sohnd8182ba2019-12-09 14:50:23 +01004869for the larger clones and fetches and the primary server mostly takes
Gustaf Lundhd60e90f2015-08-03 16:18:33 +02004870small receive-packs.
4871+
4872By default, `false`.
4873
David Ostrovskye2921b62015-03-04 22:36:10 +01004874[[sshd.backend]]sshd.backend::
4875+
4876Starting from version 0.9.0 Apache SSHD project added support for NIO2
Orgad Shanehb7bb7352019-09-19 10:26:19 +03004877IoSession. To use the old MINA session the `backend` option must be set
4878to `MINA`.
David Ostrovskye2921b62015-03-04 22:36:10 +01004879+
Luca Milanesiofc1ed9c2016-03-01 18:28:36 +00004880By default, `NIO2`.
David Ostrovskye2921b62015-03-04 22:36:10 +01004881
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07004882[[sshd.listenAddress]]sshd.listenAddress::
Shawn O. Pearce1d3cb4442009-05-30 14:03:31 -07004883+
4884Specifies the local addresses the internal SSHD should listen
4885for connections on. The following forms may be used to specify
4886an address. In any form, `:'port'` may be omitted to use the
David Pursehousea3af2552016-08-02 14:04:44 +09004887default of `29418`.
Shawn O. Pearce1d3cb4442009-05-30 14:03:31 -07004888+
David Pursehousea3af2552016-08-02 14:04:44 +09004889* `'hostname':'port'` (for example `review.example.com:29418`)
4890* `'IPv4':'port'` (for example `10.0.0.1:29418`)
4891* `['IPv6']:'port'` (for example `[ff02::1]:29418`)
4892* `+*:'port'+` (for example `+*:29418+`)
Shawn O. Pearce1d3cb4442009-05-30 14:03:31 -07004893
4894+
Edwin Kempina09ebcf2015-04-16 14:53:23 +02004895--
Shawn O. Pearce1d3cb4442009-05-30 14:03:31 -07004896If multiple values are supplied, the daemon will listen on all
4897of them.
Edwin Kempina09ebcf2015-04-16 14:53:23 +02004898
Shawn O. Pearce6af6f5f2010-06-08 17:38:43 -07004899To disable the internal SSHD, set listenAddress to `off`.
Edwin Kempina09ebcf2015-04-16 14:53:23 +02004900
David Pursehousea3af2552016-08-02 14:04:44 +09004901By default, `*:29418`.
Edwin Kempina09ebcf2015-04-16 14:53:23 +02004902--
Shawn O. Pearce1d3cb4442009-05-30 14:03:31 -07004903
James Y Knight910bd862011-01-11 20:05:56 -05004904[[sshd.advertisedAddress]]sshd.advertisedAddress::
4905+
4906Specifies the addresses clients should be told to connect to.
4907This may differ from sshd.listenAddress if a firewall based port
4908redirector is being used, making Gerrit appear to answer on port
490922. The following forms may be used to specify an address. In any
4910form, `:'port'` may be omitted to use the default SSH port of 22.
Edwin Kempina09ebcf2015-04-16 14:53:23 +02004911
David Pursehousea3af2552016-08-02 14:04:44 +09004912* `'hostname':'port'` (for example `review.example.com:22`)
4913* `'IPv4':'port'` (for example `10.0.0.1:29418`)
4914* `['IPv6']:'port'` (for example `[ff02::1]:29418`)
James Y Knight910bd862011-01-11 20:05:56 -05004915
4916+
Edwin Kempina09ebcf2015-04-16 14:53:23 +02004917--
James Y Knight910bd862011-01-11 20:05:56 -05004918If multiple values are supplied, the daemon will advertise all
4919of them.
Edwin Kempina09ebcf2015-04-16 14:53:23 +02004920
David Pursehousea3af2552016-08-02 14:04:44 +09004921By default uses the value of `sshd.listenAddress`.
Edwin Kempina09ebcf2015-04-16 14:53:23 +02004922--
James Y Knight910bd862011-01-11 20:05:56 -05004923
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07004924[[sshd.tcpKeepAlive]]sshd.tcpKeepAlive::
Shawn O. Pearcefc9081f2009-05-14 10:26:59 -07004925+
4926If true, enables TCP keepalive messages to the other side, so
4927the daemon can terminate connections if the peer disappears.
4928+
David Ostrovskye5b7f1a2013-10-23 21:10:39 +02004929Only effective when `sshd.backend` is set to `MINA`.
4930+
David Pursehousea3af2552016-08-02 14:04:44 +09004931By default, `true`.
Shawn O. Pearcefc9081f2009-05-14 10:26:59 -07004932
Shawn O. Pearce1a4580b2009-11-19 17:37:10 -08004933[[sshd.threads]]sshd.threads::
4934+
4935Number of threads to use when executing SSH command requests.
4936If additional requests are received while all threads are busy they
David Pursehouse221d4f62012-06-08 17:38:08 +09004937are queued and serviced in a first-come-first-served order.
Shawn O. Pearce1a4580b2009-11-19 17:37:10 -08004938+
Florian Klink2a389462019-07-23 14:14:32 +02004939By default, 2x the number of CPUs available to the JVM (but at least 4
4940threads).
Saša Živkov3d4ed9f2017-10-13 15:30:29 +02004941+
4942[NOTE]
4943When SSH daemon is enabled then this setting also defines the max number of
4944concurrent Git requests for interactive users over SSH and HTTP together.
Shawn O. Pearce1a4580b2009-11-19 17:37:10 -08004945
Nico Sallembienfc53f7f2010-05-18 16:40:10 -07004946[[sshd.batchThreads]]sshd.batchThreads::
4947+
4948Number of threads to allocate for SSH command requests from
Patrick Hiesele587c402020-08-07 16:11:29 +02004949link:access-control.html#service_users[service users].
Fredrik Luthander46843022012-03-13 16:11:02 +01004950If equals to 0, then all non-interactive requests are executed in the same
4951queue as interactive requests.
Nico Sallembienfc53f7f2010-05-18 16:40:10 -07004952+
4953Any other value will remove the number of threads from the queue
4954allocated to interactive users, and create a separate thread pool
4955of the requested size, which will be used to run commands from
Patrick Hiesele587c402020-08-07 16:11:29 +02004956service users.
Nico Sallembienfc53f7f2010-05-18 16:40:10 -07004957+
Patrick Hiesele587c402020-08-07 16:11:29 +02004958If the number of threads requested for service users is larger
Nico Sallembienfc53f7f2010-05-18 16:40:10 -07004959than the total number of threads allocated in sshd.threads, then the
David Pursehouse92463562013-06-24 10:16:28 +09004960value of sshd.threads is increased to accommodate the requested value.
Nico Sallembienfc53f7f2010-05-18 16:40:10 -07004961+
Dariusz Luksza145de472015-11-09 18:44:35 +01004962By default is 1 on single core node, 2 otherwise.
Saša Živkov3d4ed9f2017-10-13 15:30:29 +02004963+
4964[NOTE]
4965When SSH daemon is enabled then this setting also defines the max number of
4966concurrent Git requests for batch users over SSH and HTTP together.
Nico Sallembienfc53f7f2010-05-18 16:40:10 -07004967
Kenny Root15ac1b82010-02-24 00:29:20 -08004968[[sshd.streamThreads]]sshd.streamThreads::
4969+
4970Number of threads to use when formatting events to asynchronous
4971streaming clients. Event formatting is multiplexed onto this thread
4972pool by a simple FIFO scheduling system.
4973+
4974By default, 1 plus the number of CPUs available to the JVM.
4975
Edwin Kempinb5df3b82011-10-10 11:31:14 +02004976[[sshd.commandStartThreads]]sshd.commandStartThreads::
Shawn O. Pearced6296552011-05-15 13:56:30 -07004977+
4978Number of threads used to parse a command line submitted by a client
4979over SSH for execution, create the internal data structures used by
4980that command, and schedule it for execution on another thread.
4981+
4982By default, 2.
4983
Shawn O. Pearce8a0bf362010-11-05 17:49:41 -07004984[[sshd.maxAuthTries]]sshd.maxAuthTries::
4985+
4986Maximum number of authentication attempts before the server
4987disconnects the client. Each public key that a client has loaded
4988into its local agent counts as one auth request. Users can work
4989around the server's limit by loading less keys into their agent,
4990or selecting a specific key in their `~/.ssh/config` file with
4991the `IdentityFile` option.
4992+
4993By default, 6.
4994
4995[[sshd.loginGraceTime]]sshd.loginGraceTime::
4996+
4997Time in seconds that a client has to authenticate before the server
4998automatically terminates their connection. Values should use common
4999unit suffixes to express their setting:
5000+
5001* s, sec, second, seconds
5002* m, min, minute, minutes
5003* h, hr, hour, hours
5004* d, day, days
5005
5006+
5007By default, 2 minutes.
5008
Christian Aistleitner3d794592013-04-08 00:19:40 +02005009[[sshd.idleTimeout]]sshd.idleTimeout::
5010+
5011Time in seconds after which the server automatically terminates idle
Luca Milanesio9ba08ea2017-10-16 16:04:28 +00005012connections (or 0 to disable closing of idle connections) not waiting for
5013any server operation to complete.
5014Values should use common unit suffixes to express their setting:
Christian Aistleitner3d794592013-04-08 00:19:40 +02005015+
5016* s, sec, second, seconds
5017* m, min, minute, minutes
5018* h, hr, hour, hours
5019* d, day, days
5020
5021+
5022By default, 0.
5023
Paladox nonedaafdb62017-10-14 16:18:42 +00005024[[sshd.waitTimeout]]sshd.waitTimeout::
5025+
Luca Milanesio9ba08ea2017-10-16 16:04:28 +00005026Time in seconds after which the server automatically terminates
5027connections waiting for a server operation to complete, like for instance
5028cloning a very large repo with lots of refs.
Paladox nonedaafdb62017-10-14 16:18:42 +00005029Values should use common unit suffixes to express their setting:
5030+
5031* s, sec, second, seconds
5032* m, min, minute, minutes
5033* h, hr, hour, hours
5034* d, day, days
5035
5036+
5037By default, 30s.
5038
Thomas Draebing2c7346a2020-08-03 17:51:15 +02005039[[sshd.gracefulStopTimeout]]sshd.gracefulStopTimeout::
5040+
5041Set a graceful stop time. If set, Gerrit ensures that all open SSH
5042sessions are preserved for a maximum period of time, before forcing the
5043shutdown of the SSH daemon. During this period, no new requests
5044will be accepted. This option is meant to be used in setups performing
5045rolling restarts.
5046+
5047Values should use common unit suffixes to express their setting:
5048+
5049* s, sec, second, seconds
5050* m, min, minute, minutes
5051+
5052By default, 0 seconds (immediate shutdown).
5053
Shawn O. Pearce8a0bf362010-11-05 17:49:41 -07005054[[sshd.maxConnectionsPerUser]]sshd.maxConnectionsPerUser::
5055+
5056Maximum number of concurrent SSH sessions that a user account
5057may open at one time. This is the number of distinct SSH logins
David Pursehouse221d4f62012-06-08 17:38:08 +09005058that each user may have active at one time, and is not related to
Shawn O. Pearce8a0bf362010-11-05 17:49:41 -07005059the number of commands a user may issue over a single connection.
5060If set to 0, there is no limit.
5061+
5062By default, 64.
5063
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07005064[[sshd.cipher]]sshd.cipher::
Shawn O. Pearce0bf2f522009-05-14 11:02:03 -07005065+
5066Available ciphers. To permit multiple ciphers, specify multiple
5067`sshd.cipher` keys in the configuration file, one cipher name
5068per key. Cipher names starting with `+` are enabled in addition
5069to the default ciphers, cipher names starting with `-` are removed
5070from the default cipher set.
5071+
Gert van Dijkcc03e8a2017-10-23 23:45:24 +02005072Supported ciphers:
5073+
5074* `aes128-ctr`
5075* `aes192-ctr`
5076* `aes256-ctr`
5077* `aes128-cbc`
5078* `aes192-cbc`
5079* `aes256-cbc`
5080* `blowfish-cbc`
5081* `3des-cbc`
5082* `arcfour128`
5083* `arcfour256`
5084* `none`
Shawn O. Pearce0bf2f522009-05-14 11:02:03 -07005085+
5086By default, all supported ciphers except `none` are available.
Gert van Dijkcc03e8a2017-10-23 23:45:24 +02005087+
5088If your setup allows for it, it's recommended to disable all ciphers except
5089the AES-CTR modes.
Shawn O. Pearce0bf2f522009-05-14 11:02:03 -07005090
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07005091[[sshd.mac]]sshd.mac::
Shawn O. Pearce0bf2f522009-05-14 11:02:03 -07005092+
5093Available MAC (message authentication code) algorithms. To permit
5094multiple algorithms, specify multiple `sshd.mac` keys in the
5095configuration file, one MAC per key. MAC names starting with `+`
5096are enabled in addition to the default MACs, MAC names starting with
5097`-` are removed from the default MACs.
5098+
Gert van Dijkcc03e8a2017-10-23 23:45:24 +02005099Supported MACs:
5100+
5101* `hmac-md5`
5102* `hmac-md5-96`
5103* `hmac-sha1`
5104* `hmac-sha1-96`
5105* `hmac-sha2-256`
5106* `hmac-sha2-512`
Shawn O. Pearce0bf2f522009-05-14 11:02:03 -07005107+
5108By default, all supported MACs are available.
5109
David Ostrovskya0f77df2021-06-07 23:04:35 +02005110[[sshd.enableDeprecatedKexAlgorithms]]sshd.enableDeprecatedKexAlgorithms::
5111+
5112Enable deprecated kex algorithms:
5113+
5114* `diffie-hellman-group1-sha1`
5115* `diffie-hellman-group14-sha1`
5116* `diffie-hellman-group-exchange-sha1`
5117
5118By default, the deprecated kex algorithms are disabled.
5119
Scott Dialb4a04fa2016-03-15 09:44:11 -04005120[[sshd.kex]]sshd.kex::
5121+
5122--
5123Available key exchange algorithms. To permit multiple algorithms,
5124specify multiple `sshd.kex` keys in the configuration file, one key
5125exchange algorithm per key. Key exchange algorithm names starting
5126with `+` are enabled in addition to the default key exchange
5127algorithms, key exchange algorithm names starting with `-` are
5128removed from the default key exchange algorithms.
5129
Scott Dialb4a04fa2016-03-15 09:44:11 -04005130Supported key exchange algorithms:
5131
5132* `ecdh-sha2-nistp521`
5133* `ecdh-sha2-nistp384`
5134* `ecdh-sha2-nistp256`
5135* `diffie-hellman-group-exchange-sha256`
David Ostrovskya0f77df2021-06-07 23:04:35 +02005136* `diffie-hellman-group18-sha512`
5137* `diffie-hellman-group17-sha512`
5138* `diffie-hellman-group16-sha512`
5139* `diffie-hellman-group15-sha512`
5140* `diffie-hellman-group14-sha256`
5141
5142See link:#sshd.enableDeprecatedKexAlgorithms[sshd.enableDeprecatedKexAlgorithms]
5143for deprecated key algorithms and how to enable them.
Scott Dialb4a04fa2016-03-15 09:44:11 -04005144
5145By default, all supported key exchange algorithms are available.
Gert van Dijkcc03e8a2017-10-23 23:45:24 +02005146
5147It is strongly recommended to disable at least `diffie-hellman-group1-sha1`
5148as it's known to be vulnerable (logjam attack). Additionally, if your setup
5149allows for it, it is recommended to disable the remaining two `sha1` key
5150exchange algorithms.
Scott Dialb4a04fa2016-03-15 09:44:11 -04005151--
5152
Alex Blewitt7efb06f2013-04-01 12:46:48 -04005153[[sshd.kerberosKeytab]]sshd.kerberosKeytab::
5154+
5155Enable kerberos authentication for SSH connections. To permit
5156kerberos authentication, the server must have a host principal
5157(see `sshd.kerberosPrincipal`) which is acquired from a keytab.
5158This must be provisioned by the kerberos administrators, and is
5159typically installed into `/etc/krb5.keytab` on host machines.
5160+
5161The keytab must contain at least one `host/` principal, typically
5162using the host's canonical name. If it does not use the
5163canonical name, the `sshd.kerberosPrincipal` should be configured
5164with the correct name.
5165+
5166By default, not set and so kerberos authentication is not enabled.
5167
5168[[sshd.kerberosPrincipal]]sshd.kerberosPrincipal::
5169+
5170If kerberos authentication is enabled with `sshd.kerberosKeytab`,
5171instead use the given principal name instead of the default.
5172If the principal does not begin with `host/` a warning message is
5173printed and may prevent successful authentication.
5174+
5175This may be useful if the host is behind an IP load balancer or
5176other SSH forwarding systems, since the principal name is constructed
5177by the client and must match for kerberos authentication to work.
5178+
5179By default, `host/canonical.host.name`
5180
Shawn Pearce318bfca2013-10-17 22:15:38 -07005181[[sshd.requestLog]]sshd.requestLog::
5182+
5183Enable (or disable) the `'$site_path'/logs/sshd_log` request log.
5184If enabled, a request log file is written out by the SSH daemon.
Matthias Sohn450bc202020-08-20 14:40:32 +02005185The sshd log format is documented link:logs.html#_sshd_log[here].
Shawn Pearce318bfca2013-10-17 22:15:38 -07005186+
David Ostrovsky8e4a9902013-11-19 23:57:48 +01005187`log4j.appender` with the name `sshd_log` can be configured to overwrite
5188programmatic configuration.
5189+
David Pursehousea3af2552016-08-02 14:04:44 +09005190By default, `true`.
Gustaf Lundh4e859932018-04-16 10:56:31 +02005191+
Sven Selberg2a0beab2018-04-20 14:49:20 +02005192This value supports link:#reloadConfig[configuration reloads].
Shawn Pearce318bfca2013-10-17 22:15:38 -07005193
David Ostrovsky985201b2015-03-04 22:37:33 +01005194[[sshd.rekeyBytesLimit]]sshd.rekeyBytesLimit::
5195+
5196The SSH daemon will issue a rekeying after a certain amount of data.
5197This configuration option allows you to tweak that setting.
5198+
5199By default, 1073741824 (bytes, 1GB).
5200+
David Pursehousea3af2552016-08-02 14:04:44 +09005201The `rekeyBytesLimit` cannot be set to lower than 32.
David Ostrovsky985201b2015-03-04 22:37:33 +01005202
5203[[sshd.rekeyTimeLimit]]sshd.rekeyTimeLimit::
5204+
5205The SSH daemon will issue a rekeying after a certain amount of time.
5206This configuration option allows you to tweak that setting.
5207+
5208By default, 1h.
5209+
5210Set to 0 to disable this check.
5211
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08005212[[suggest]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08005213=== Section suggest
Shawn O. Pearce07bd6fb2011-04-29 19:15:47 -07005214
Sven Selberg42d9d292014-08-13 11:20:11 +02005215[[suggest.maxSuggestedReviewers]]suggest.maxSuggestedReviewers::
5216+
5217The maximum numbers of reviewers suggested.
5218+
5219By default 10.
Gustaf Lundh25e608f2018-04-16 10:54:53 +02005220+
Sven Selberg2a0beab2018-04-20 14:49:20 +02005221This value supports link:#reloadConfig[configuration reloads].
Sven Selberg42d9d292014-08-13 11:20:11 +02005222
Edwin Kempinf957dc22012-10-19 20:41:18 +02005223[[suggest.from]]suggest.from::
5224+
5225The number of characters that a user must have typed before suggestions
Patrick Hiesel87880b02016-05-03 18:15:08 +02005226are provided. If set to 0, suggestions are always provided. This is only
5227used for suggesting accounts when adding members to a group.
Edwin Kempinf957dc22012-10-19 20:41:18 +02005228+
5229By default 0.
Gal Paikin0d07c542020-01-08 17:11:53 +02005230[[suggest.relevantChanges]]suggest.relevantChanges::
5231+
5232When suggesting reviewers, we go over recent changes of the user, and
5233give priority to users that are present as reviewers in any of those
5234changes. The number of changes we go over is `sugggest.relevantChanges`.
5235+
Gal Paikincb5a7ca2020-02-18 09:44:28 +01005236This nubmer is a tradeoff between speed and accuracy.
Gal Paikin0d07c542020-01-08 17:11:53 +02005237A high number would be accurate but slow, and a low number would be
5238fast but inaccurate.
Gal Paikincb5a7ca2020-02-18 09:44:28 +01005239+
5240By default 50.
Edwin Kempinf957dc22012-10-19 20:41:18 +02005241
Matthias Sohn21b652c2021-02-22 22:51:18 +01005242[[suggest.skipServiceUsers]]suggest.skipServiceUsers::
5243+
5244If link:access-control.html#service_users[service users] should be skipped when
5245suggesting reviewers.
5246+
5247By default true.
5248
Edwin Kempin0a49eca2019-06-21 09:38:46 +02005249[[tracing]]
5250=== Section tracing
5251
5252[[tracing.performanceLogging]]tracing.performanceLogging::
5253+
5254Whether performance logging is enabled.
5255+
5256When performance logging is enabled, performance events for some
5257operations are collected in memory while a request is running. At the
5258end of the request the performance events are handed over to the
5259link:dev-plugins.html#performance-logger[PerformanceLogger] plugins.
5260This means if performance logging is enabled, the memory footprint of
5261requests is slightly increased.
5262+
5263This setting has no effect if no
5264link:dev-plugins.html#performance-logger[PerformanceLogger] plugins are
5265installed, because then performance logging is always disabled.
5266+
5267By default, true.
5268
Edwin Kempin2cba2982019-07-05 13:19:43 +02005269[[tracing.traceid]]
5270==== Subsection tracing.<trace-id>
5271
5272There can be multiple `tracing.<trace-id>` subsections to configure
5273automatic tracing of requests. To be traced a request must match all
5274conditions of one `tracing.<trace-id>` subsection. The subsection name
5275is used as trace ID. Using this trace ID administrators can find
5276matching log entries.
5277
5278[[tracing.traceid.requestType]]tracing.<trace-id>.requestType::
5279+
5280Type of request for which request tracing should be always enabled (can
5281be `GIT_RECEIVE`, `GIT_UPLOAD`, `REST` and `SSH`).
5282+
5283May be specified multiple times.
5284+
5285By default, unset (all request types are matched).
5286
Edwin Kempinb0ddb0b2019-07-08 12:11:32 +02005287[[tracing.traceid.requestUriPattern]]tracing.<trace-id>.requestUriPattern::
5288+
5289Regular expression to match request URIs for which request tracing
5290should be always enabled. Request URIs are only available for REST
5291requests. Request URIs never include the '/a' prefix.
5292+
5293May be specified multiple times.
5294+
5295By default, unset (all request URIs are matched).
5296
Edwin Kempin2cba2982019-07-05 13:19:43 +02005297[[tracing.traceid.account]]tracing.<trace-id>.account::
5298+
5299Account ID of an account for which request tracing should be always
5300enabled.
5301+
5302May be specified multiple times.
5303+
5304By default, unset (all accounts are matched).
5305
5306[[tracing.traceid.projectPattern]]tracing.<trace-id>.projectPattern::
5307+
5308Regular expression to match project names for which request tracing
5309should be always enabled.
5310+
5311May be specified multiple times.
5312+
5313By default, unset (all projects are matched).
5314
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08005315[[trackingid]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08005316=== Section trackingid
Goran Lungberg04132a12010-06-15 17:20:37 -07005317
Shawn O. Pearcee800b1e2010-06-16 17:33:43 -07005318Tagged footer lines containing references to external
5319tracking systems, parsed out of the commit message and
David Pursehoused55a6b62015-02-27 17:39:38 +09005320saved in Gerrit's secondary index.
Shawn Pearceff61c8a2013-10-07 19:35:53 -07005321
5322After making changes to this section, existing changes
Shawn Pearce9f4de522013-11-29 11:57:53 -08005323must be reindexed with link:pgm-reindex.html[reindex].
Goran Lungberg04132a12010-06-15 17:20:37 -07005324
Edwin Kempinbb421f12011-08-25 11:19:00 +02005325The tracking ids are searchable using tr:<tracking id> or
Shawn O. Pearce91763a02010-06-16 15:39:33 -07005326bug:<tracking id>.
Goran Lungberg04132a12010-06-15 17:20:37 -07005327
5328----
5329[trackingid "jira-bug"]
5330 footer = Bugfix:
David Pursehousece7f6862015-02-19 14:52:45 +09005331 footer = Bug:
Goran Lungberg04132a12010-06-15 17:20:37 -07005332 match = JRA\\d{2,8}
5333 system = JIRA
5334
5335[trackingid "jira-feature"]
5336 footer = Feature
5337 match = JRA(\\d{2,8})
5338 system = JIRA
5339----
5340
5341[[trackingid.name.footer]]trackingid.<name>.footer::
5342+
David Pursehousece7f6862015-02-19 14:52:45 +09005343A prefix tag that identifies the footer line to parse for tracking ids.
5344+
5345Several trackingid entries can have the same footer tag, and a single trackingid
5346entry can have multiple footer tags.
5347+
5348If multiple footer tags are specified, each tag will be parsed separately and
5349duplicates will be ignored.
5350+
5351The trailing ":" is optional.
Goran Lungberg04132a12010-06-15 17:20:37 -07005352
5353[[trackingid.name.match]]trackingid.<name>.match::
5354+
Magnus Bäcke5611832011-02-02 08:57:15 +01005355A link:http://download.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html[standard
Marian Harbach34253372019-12-10 18:01:31 +01005356Java regular expression (java.util.regex),role=external,window=_blank] used to match the
Magnus Bäcke5611832011-02-02 08:57:15 +01005357external tracking id part of the footer line. The match can
5358result in several entries in the DB. If grouping is used in the
5359regex the first group will be interpreted as the tracking id.
Christian Aistleitner5cec3682013-03-16 23:02:37 +01005360Tracking ids longer than 32 characters will be ignored.
Goran Lungberg04132a12010-06-15 17:20:37 -07005361+
5362The configuration file parser eats one level of backslashes, so the
5363character class `\s` requires `\\s` in the configuration file. The
5364parser also terminates the line at the first `#`, so a match
5365expression containing # must be wrapped in double quotes.
5366
5367[[trackingid.name.system]]trackingid.<name>.system::
5368+
David Pursehouse221d4f62012-06-08 17:38:08 +09005369The name of the external tracking system (maximum 10 characters).
Goran Lungberg04132a12010-06-15 17:20:37 -07005370It is possible to have several trackingid entries for the same
5371tracking system.
5372
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08005373[[transfer]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08005374=== Section transfer
Shawn O. Pearce6e4dfdd2010-05-12 17:26:08 -07005375
5376[[transfer.timeout]]transfer.timeout::
5377+
5378Number of seconds to wait for a single network read or write
5379to complete before giving up and declaring the remote side is
5380not responding. If 0, there is no timeout, and this server will
5381wait indefinitely for a transfer to finish.
5382+
5383A timeout should be large enough to mostly transfer the objects to
5384the other side. 1 second may be too small for larger projects,
5385especially over a WAN link, while 10-30 seconds is a much more
5386reasonable timeout value.
5387+
5388Defaults to 0 seconds, wait indefinitely.
5389
lincoln2be11602010-07-05 10:53:25 -03005390
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08005391[[upload]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08005392=== Section upload
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08005393
Dave Borowitzb1795142017-10-12 07:13:37 -07005394Options to control the behavior of `upload-pack` on the server side,
5395which handles a user's fetch, clone, or repo sync command.
lincoln2be11602010-07-05 10:53:25 -03005396
5397----
5398[upload]
5399 allowGroup = GROUP_ALLOWED_TO_EXECUTE
5400 allowGroup = YET_ANOTHER_GROUP_ALLOWED_TO_EXECUTE
5401----
5402
5403[[upload.allowGroup]]upload.allowGroup::
5404+
Dave Borowitzb1795142017-10-12 07:13:37 -07005405Name of the groups of users that are allowed to execute 'upload-pack'.
5406One or more groups can be set.
lincoln2be11602010-07-05 10:53:25 -03005407+
5408If no groups are added, any user will be allowed to execute
5409'upload-pack' on the server.
5410
Owen Lie2877bb2017-07-14 09:11:20 -04005411[[accountDeactivation]]
5412=== Section accountDeactivation
5413
5414Configures the parameters for the scheduled task to sweep and deactivate Gerrit
5415accounts according to their status reported by the auth backend. Currently only
5416supported for LDAP backends.
5417
5418[[accountDeactivation.startTime]]accountDeactivation.startTime::
5419+
Edwin Kempind33d95a2018-02-16 11:44:04 +01005420The link:#schedule-configuration-startTime[start time] for running
5421account deactivations.
Owen Lie2877bb2017-07-14 09:11:20 -04005422
5423[[accountDeactivation.interval]]accountDeactivation.interval::
5424+
Edwin Kempind33d95a2018-02-16 11:44:04 +01005425The link:#schedule-configuration-interval[interval] for running
5426account deactivations.
5427
Saša Živkovf0966112020-03-17 12:20:31 +01005428Note that the task will only be scheduled if the
5429link:#autoUpdateAccountActiveStatus[auth.autoUpdateAccountActiveStatus]
5430is set to true.
5431
Edwin Kempind33d95a2018-02-16 11:44:04 +01005432link:#schedule-configuration-examples[Schedule examples] can be found
5433in the link:#schedule-configuration[Schedule Configuration] section.
Owen Lie2877bb2017-07-14 09:11:20 -04005434
Stefan Beller0f724ff2015-07-17 10:17:51 -07005435[[submodule]]
5436=== Section submodule
5437
Shawn Pearcedc477cd2016-03-24 19:56:18 -07005438[[submodule.verbosesuperprojectupdate]]submodule.verboseSuperprojectUpdate::
Stefan Beller0f724ff2015-07-17 10:17:51 -07005439+
5440When using link:user-submodules.html#automatic_update[automatic superproject updates]
Zhen Chenc877ca92016-07-27 14:22:37 -07005441this option will determine how the submodule commit messages are included into
Stefan Beller0f724ff2015-07-17 10:17:51 -07005442the commit message of the superproject update.
5443+
Zhen Chenc877ca92016-07-27 14:22:37 -07005444If `FALSE`, will not include any commit messages for the gitlink update.
5445+
5446If `SUBJECT_ONLY`, will include only the commit subjects.
5447+
5448If `TRUE`, will include full commit messages.
5449+
5450By default this is `TRUE`.
Stefan Beller0f724ff2015-07-17 10:17:51 -07005451
Shawn Pearcedc477cd2016-03-24 19:56:18 -07005452[[submodule.enableSuperProjectSubscriptions]]submodule.enableSuperProjectSubscriptions::
Stefan Beller8cc252e2016-03-10 10:06:53 -08005453+
5454This allows to enable the superproject subscription mechanism.
5455+
5456By default this is true.
Stefan Beller0f724ff2015-07-17 10:17:51 -07005457
Patrick Hiesel44e5d6e2017-08-24 16:07:26 +02005458[[submodule.maxCombinedCommitMessageSize]]submodule.maxCombinedCommitMessageSize::
5459+
5460This allows to limit the length of the commit message for a submodule.
5461+
5462By default this is 262144 (256 KiB).
5463+
5464Common unit suffixes of k, m, or g are supported.
5465
5466[[submodule.maxCommitMessages]]submodule.maxCommitMessages::
5467+
5468This allows to limit the number of commit messages that should be combined when creating
5469a commit message for a submodule.
5470+
5471By default this is 1000.
5472
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08005473[[user]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08005474=== Section user
Shawn O. Pearce0a351912009-06-01 08:14:46 -07005475
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07005476[[user.name]]user.name::
Shawn O. Pearce0a351912009-06-01 08:14:46 -07005477+
5478Name that Gerrit calls itself in Git when it creates a new Git
5479commit, such as a merge during change submission.
5480+
5481By default this is "Gerrit Code Review".
5482
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07005483[[user.email]]user.email::
Shawn O. Pearce0a351912009-06-01 08:14:46 -07005484+
5485Email address that Gerrit refers to itself as when it creates a
5486new Git commit, such as a merge commit during change submission.
5487+
5488If not set, Gerrit generates this as "gerrit@`hostname`", where
5489`hostname` is the hostname of the system Gerrit is running on.
5490+
5491By default, not set, generating the value at startup.
5492
Edwin Kempin0e02ded2011-09-16 15:10:14 +02005493[[user.anonymousCoward]]user.anonymousCoward::
5494+
David Pursehousea1d633b2014-05-02 17:21:02 +09005495Username that is displayed in the Gerrit Web UI and in e-mail
Edwin Kempin0e02ded2011-09-16 15:10:14 +02005496notifications if the full name of the user is not set.
5497+
Han-Wen Nienhuys3fb723d2017-11-20 19:21:13 +01005498By default "Name of user not set" is used.
Edwin Kempin0e02ded2011-09-16 15:10:14 +02005499
Edwin Kempind33d95a2018-02-16 11:44:04 +01005500[[schedule-configuration]]
5501=== Schedule Configuration
5502
5503Schedule configurations are used for running periodic background jobs.
5504
5505A schedule configuration consists of two parameters:
5506
5507[[schedule-configuration-interval]]
5508* `interval`:
5509Interval for running the periodic background job. The interval must be
5510larger than zero. The following suffixes are supported to define the
5511time unit for the interval:
5512** `s`, `sec`, `second`, `seconds`
5513** `m`, `min`, `minute`, `minutes`
5514** `h`, `hr`, `hour`, `hours`
5515** `d`, `day`, `days`
5516** `w`, `week`, `weeks` (`1 week` is treated as `7 days`)
5517** `mon`, `month`, `months` (`1 month` is treated as `30 days`)
5518** `y`, `year`, `years` (`1 year` is treated as `365 days`)
5519
5520[[schedule-configuration-startTime]]
5521* `startTime`:
5522The start time defines the first execution of the periodic background
5523job. If the configured `interval` is shorter than `startTime - now` the
5524start time will be preponed by the maximum integral multiple of
5525`interval` so that the start time is still in the future. `startTime`
5526must have one of the following formats:
5527
5528** `<day of week> <hours>:<minutes>`
5529** `<hours>:<minutes>`
5530
5531+
5532The placeholders can have the following values:
5533
5534*** `<day of week>`:
5535`Mon`, `Tue`, `Wed`, `Thu`, `Fri`, `Sat`, `Sun`
5536*** `<hours>`:
5537`00`-`23`
5538*** `<minutes>`:
5539`00`-`59`
5540
5541+
5542The time zone cannot be specified but is always the system default
David Pursehouse18f388a2019-04-10 09:36:18 +09005543time zone. Hours must be zero-padded, i.e. `06:00` rather than `6:00`.
Edwin Kempind33d95a2018-02-16 11:44:04 +01005544
5545The section (and optionally the subsection) in which the `interval` and
5546`startTime` keys must be set depends on the background job for which a
5547schedule should be configured. E.g. for the change cleanup job the keys
5548must be set in the link:#changeCleanup[changeCleanup] section:
5549
5550----
5551 [changeCleanup]
5552 startTime = Fri 10:30
5553 interval = 2 days
5554----
5555
5556[[schedule-configuration-examples]]
5557Examples for a schedule configuration:
5558
5559* Example 1:
5560+
5561----
5562 startTime = Fri 10:30
5563 interval = 2 days
5564----
5565+
5566Assuming that the server is started on `Mon 07:00` then
5567`startTime - now` is `4 days 3:30 hours`. This is larger than the
5568interval hence the start time is preponed by the maximum integral
5569multiple of the interval so that start time is still in the future,
5570i.e. preponed by 4 days. This yields a start time of `Mon 10:30`, next
5571executions are `Wed 10:30`, `Fri 10:30`. etc.
5572
5573* Example 2:
5574+
5575----
5576 startTime = 06:00
5577 interval = 1 day
5578----
5579+
5580Assuming that the server is started on `Mon 07:00` then this yields the
5581first run on Tuesday at 06:00 and a repetition interval of 1 day.
5582
Dave Borowitzd4fdc932018-11-02 15:06:25 -07005583[[All-Projects-project.config]]
5584== File `etc/All-Projects/project.config`
5585
5586The optional file `'$site_path'/etc/All-Projects/project.config` provides
5587defaults for configuration read from
5588link:config-project-config.html[`project.config`] in the
5589`All-Projects` repo. Unlike `gerrit.config`, this file contains project-type
5590configuration rather than server-type configuration.
5591
5592Most administrators will not need this file, and should instead make commits to
5593`All-Projects` to modify global config. However, a separate file can be useful
5594when managing multiple Gerrit servers, since pushing changes to defaults using
5595Puppet or a similar tool can be easier than scripting git updates to
5596`All-Projects`.
5597
5598The contents of the file are loaded each time the `All-Projects` project is
5599reloaded. Updating the file requires either evicting the project cache or
5600restarting the server.
5601
5602Caveats:
5603
5604* The path from which the file is read corresponds to the name of the repo,
5605 which is link:#gerrit.allProjects[configurable].
5606* Although the file lives in a directory that shares a name with a repository,
5607 this directory is not a Git repository.
5608* Only the file `project.config` is read from this directory to provide
5609 defaults; any other files in this directory, such as `rules.pl`, are ignored.
5610 (This behavior may change in the future.)
5611* Group names listed in the access config in this file are resolved to UUIDs
5612 using the `groups` file in the repository, not in the config directory. As a
5613 result, setting ACLs in this file is not recommended.
5614
Hector Oswaldo Caballero98952b02017-08-24 06:31:28 -04005615[[secure.config]]
5616== File `etc/secure.config`
Shawn O. Pearce0bf2f522009-05-14 11:02:03 -07005617
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08005618The optional file `'$site_path'/etc/secure.config` overrides (or
5619supplements) the settings supplied by `'$site_path'/etc/gerrit.config`.
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08005620The file should be readable only by the daemon process and can be
5621used to contain private configuration entries that wouldn't normally
5622be exposed to everyone.
5623
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08005624Sample `etc/secure.config`:
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08005625----
Shawn O. Pearce34f38cf2011-06-16 19:18:54 -07005626[auth]
5627 registerEmailPrivateKey = 2zHNrXE2bsoylzUqDxZp0H1cqUmjgWb6
5628
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08005629[database]
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08005630 username = webuser
5631 password = s3kr3t
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08005632
5633[ldap]
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08005634 password = l3tm3srch
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08005635
5636[httpd]
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08005637 sslKeyPassword = g3rr1t
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08005638
5639[sendemail]
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08005640 smtpPass = sp@m
Shawn O. Pearce7929d872011-05-15 13:33:15 -07005641
5642[remote "bar"]
5643 password = s3kr3t
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08005644----
5645
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08005646== File `etc/peer_keys`
Johan Bjork3e5ee302012-01-27 17:59:54 +01005647
5648The optional file `'$site_path'/etc/peer_keys` controls who can
5649login as the 'Gerrit Code Review' user, required for the link:cmd-suexec.html[suexec]
5650command.
5651
David Pursehouse90bed3f2020-06-09 22:07:19 +02005652The format is one Base-64 encoded public key per line with optional comment, e.g.:
5653----
5654# Comments allowed at start of line
5655AAAAC3...51R== john@example.net
5656# Another comment
5657AAAAB5...21S== jane@example.net
5658----
Johan Bjork3e5ee302012-01-27 17:59:54 +01005659
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08005660=== Configurable Parameters
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08005661
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07005662site_path::
5663+
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08005664Local filesystem directory holding the site customization assets.
5665Placing this directory under version control and/or backup is a
5666good idea.
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07005667+
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08005668Files in this directory provide additional configuration.
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07005669+
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08005670Other files support site customization.
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07005671+
Dave Borowitz1e49e142013-04-09 12:14:57 -07005672* link:config-themes.html[Themes]
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08005673
Saša Živkovd34dfe32017-11-20 11:14:35 +01005674[[jgitConfig]]
5675== File `etc/jgit.config`
5676
5677Gerrit uses the `$site_path/etc/jgit.config` file instead of the
5678system-wide and user-global Git configuration for its runtime JGit
5679configuration.
5680
5681Sample `etc/jgit.config` file:
5682----
5683[core]
5684 trustFolderStat = false
5685----
5686
Matthias Sohn85c18792020-09-08 01:42:03 +02005687[[jgit-gc]]
5688=== Section gc
5689
5690Options in section gc are used when command link:cmd-gc.html[gerrit gc] is used
5691or scheduled via options link:cmd-gc.html#gc.startTime[gc.startTime] and
5692link:cmd-gc.html#gc.interval[gc.interval].
5693
5694[[gc.auto]]gc.auto::
5695+
5696When there are approximately more than this many loose objects in the repository,
5697auto gc will pack them. Some commands use this command to perform a light-weight
5698garbage collection from time to time. The default value is 6700.
5699+
5700Setting this to 0 disables not only automatic packing based on the number of
5701loose objects, but any other heuristic auto gc will otherwise use to determine
5702if there’s work to do, such as link:#gc.autoPackLimit[gc.autoPackLimit].
5703
5704[[gc.autodetach]]gc.autodetach::
5705+
5706Makes auto gc run in a background thread. Default is `true`.
5707
5708[[gc.autopacklimit]]gc.autopacklimit::
5709+
5710When there are more than this many packs that are not marked with `*.keep` file
5711in the repository, auto gc consolidates them into one larger pack. The
5712default value is 50. Setting this to 0 disables it. Setting `gc.auto` to 0 will
5713also disable this.
5714
5715[[gc.packRefs]]gc.packRefs::
5716+
5717This variable determines whether gc runs git pack-refs. The default is `true`.
5718
5719[[gc.reflogExpire]]gc.reflogExpire::
5720+
5721Removes reflog entries older than this time; defaults to 90 days. The value "now"
5722expires all entries immediately, and "never" suppresses expiration altogether.
5723
5724[[gc.reflogExpireUnreachable]]gc.reflogExpireUnreachable::
5725+
5726Removes reflog entries older than this time and not reachable from the
5727current tip; defaults to 30 days. The value "now" expires all entries immediately,
5728and "never" suppresses expiration altogether.
5729
Matthias Sohnbf7ca5a2020-09-08 00:57:20 +02005730[[jgit-protocol]]
5731=== Section protocol
5732
5733[[protocol.version]]protocol.version::
5734+
5735If set, the server will accept requests from a client attempting to communicate
David Ostrovskydafac1c2021-01-04 09:26:52 +01005736using the specified protocol version. Default is `2`. If set in file
5737`etc/jgit.config` this option will be used for all repositories of the site.
5738It can be overridden for a given repository by configuring a different value in
5739the repository's `config` file.
Matthias Sohnbf7ca5a2020-09-08 00:57:20 +02005740+
5741Supported versions:
57420:: the original wire protocol.
57431:: the original wire protocol with the addition of a version string in the initial response from the server.
57442:: wire protocol version 2. Speeds up fetches from repositories with many refs by allowing the client
5745 to specify which refs to list before the server lists them.
5746
Matthias Sohn85c18792020-09-08 01:42:03 +02005747[[jgit-receive]]
5748=== Section receive
5749
5750[[receive.autogc]]receive.autogc::
5751+
Matthias Sohn53528f42020-11-23 16:23:50 +01005752By default, up to Gerrit 3.2 `git-receive-pack` will run auto gc after receiving data from git-push and updating refs.
Matthias Sohn85c18792020-09-08 01:42:03 +02005753You can stop it by setting this variable to `false`. This is recommended in gerrit to avoid the
5754additional load this creates. Instead schedule gc using link:cmd-gc.html#gc.startTime[gc.startTime]
5755and link:cmd-gc.html#gc.interval[gc.interval] or e.g. in a cron job that runs gc in a separate process.
Matthias Sohn53528f42020-11-23 16:23:50 +01005756Since Gerrit 3.3 the init command will auto-configure `git-receive-pack = false` in `etc/jgit.config` if
5757it wasn't set manually and show a warning if it was set to `true` manually.
Matthias Sohn85c18792020-09-08 01:42:03 +02005758
Shawn O. Pearce5500e692009-05-28 15:55:01 -07005759GERRIT
5760------
5761Part of link:index.html[Gerrit Code Review]
Yuxuan 'fishy' Wang99cb68d2013-10-31 17:26:00 -07005762
5763SEARCHBOX
5764---------