blob: a3a813ed92d9488af20acc30a0c5e9f77d1728b1 [file] [log] [blame]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001= Gerrit Code Review - Configuration
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08002
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08003== File `etc/gerrit.config`
Shawn O. Pearce51967cd2009-05-08 19:46:57 -07004
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08005The optional file `'$site_path'/etc/gerrit.config` is a Git-style
6config file that controls many host specific settings for Gerrit.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -07007
8[NOTE]
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08009The contents of the `etc/gerrit.config` file are cached at startup
Brandon Casey4a21add2011-07-05 13:14:18 -050010by Gerrit. If you modify any properties in this file, Gerrit needs
Shawn O. Pearce51967cd2009-05-08 19:46:57 -070011to be restarted before it will use the new values.
12
Shawn O. Pearcec5fed822009-11-17 16:10:10 -080013Sample `etc/gerrit.config`:
Shawn O. Pearce51967cd2009-05-08 19:46:57 -070014----
15[core]
Shawn O. Pearce9d342a42009-12-16 15:49:05 -080016 packedGitLimit = 200 m
Shawn O. Pearce51967cd2009-05-08 19:46:57 -070017
18[cache]
David Pursehouse64df83a2017-07-04 21:20:47 +090019 directory = /var/cache/gerrit
Shawn O. Pearce51967cd2009-05-08 19:46:57 -070020----
21
Hongkai Liu49799b22017-04-07 16:54:25 -040022[[accountPatchReviewDb]]
23=== Section accountPatchReviewDb
24
25[[accountPatchReviewDb.url]]accountPatchReviewDb.url::
26+
Paladox nonee3a9dd72017-04-26 12:45:56 +000027The url of accountPatchReviewDb. Supported types are `H2`, `POSTGRESQL`,
28`MARIADB`, and `MYSQL`. Drop the driver jar in the lib folder of the site path
29if the Jdbc driver of the corresponding Database is not yet in the class path.
Hongkai Liu49799b22017-04-07 16:54:25 -040030+
31Default is to create H2 database in the db folder of the site path.
32+
33Changing this parameter requires to migrate database using the
Hugo Arès3e1d4cd2017-04-26 12:02:53 +020034link:pgm-MigrateAccountPatchReviewDb.html[MigrateAccountPatchReviewDb] program.
35Migration cannot be done while the server is running.
Paladox none1a4c01f2017-04-29 18:19:37 +000036+
37Also note that the db_name has to be a new db and not reusing gerrit's own review database,
38otherwise gerrit's init will remove the table.
Hongkai Liu49799b22017-04-07 16:54:25 -040039
40----
41[accountPatchReviewDb]
42 url = jdbc:postgresql://<host>:<port>/<db_name>?user=<user>&password=<password>
43----
44
Hector Oswaldo Caballero8dead962017-08-08 05:30:06 -040045[[accountPatchReviewDb.poolLimit]]accountPatchReviewDb.poolLimit::
46+
47Maximum number of open database connections. If the server needs
48more than this number, request processing threads will wait up
49to <<accountPatchReviewDb.poolMaxWait, poolMaxWait>> seconds for a
50connection to be released before they abort with an exception.
51This limit must be several units higher than the total number of
52httpd and sshd threads as some request processing code paths may
53need multiple connections.
54+
55Default is <<sshd.threads, sshd.threads>>
56 + <<httpd.maxThreads, httpd.maxThreads>> + 2.
57+
58
59[[accountPatchReviewDb.poolMinIdle]]database.poolMinIdle::
60+
61Minimum number of connections to keep idle in the pool.
62Default is 4.
63+
64
65[[accountPatchReviewDb.poolMaxIdle]]accountPatchReviewDb.poolMaxIdle::
66+
67Maximum number of connections to keep idle in the pool. If there
68are more idle connections, connections will be closed instead of
69being returned back to the pool.
70Default is min(<<accountPatchReviewDb.poolLimit, accountPatchReviewDb.poolLimit>>, 16).
71+
72
73[[accountPatchReviewDb.poolMaxWait]]accountPatchReviewDb.poolMaxWait::
74+
75Maximum amount of time a request processing thread will wait to
76acquire a database connection from the pool. If no connection is
77released within this time period, the processing thread will abort
78its current operations and return an error to the client.
79Values should use common unit suffixes to express their setting:
80+
81* ms, milliseconds
82* s, sec, second, seconds
83* m, min, minute, minutes
84* h, hr, hour, hours
85
86+
Hector Oswaldo Caballero8dead962017-08-08 05:30:06 -040087If a unit suffix is not specified, `milliseconds` is assumed.
Hector Oswaldo Caballero8dead962017-08-08 05:30:06 -040088Default is `30 seconds`.
89
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -080090[[accounts]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080091=== Section accounts
Dave Borowitz45baa892012-02-23 16:43:05 -080092
Matthias Sohnf3360662012-04-05 15:42:52 +020093[[accounts.visibility]]accounts.visibility::
Dave Borowitz45baa892012-02-23 16:43:05 -080094+
95Controls visibility of other users' dashboard pages and
96completion suggestions to web users.
97+
98If `ALL`, all users are visible to all other users, even
99anonymous users.
100+
101If `SAME_GROUP`, only users who are also members of a group the
102current user is a member of are visible.
103+
104If `VISIBLE_GROUP`, only users who are members of at least one group
105that is visible to the current user are visible.
106+
107If `NONE`, no users other than the current user are visible.
108+
109Default is `ALL`.
110
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -0800111[[addreviewer]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800112=== Section addreviewer
Edwin Kempin49cb3e12011-06-29 14:35:14 +0200113
114[[addreviewer.maxWithoutConfirmation]]addreviewer.maxWithoutConfirmation::
115+
116The maximum number of reviewers a user can add at once by adding a
117group as reviewer without being asked to confirm the operation.
118+
119If set to 0, the user will never be asked to confirm adding a group
120as reviewer.
121+
122Default is 10.
Edwin Kempin5e65d9b2011-07-08 07:35:48 +0200123+
David Pursehousea1d633b2014-05-02 17:21:02 +0900124This setting only applies for adding reviewers in the Gerrit Web UI,
Edwin Kempin5e65d9b2011-07-08 07:35:48 +0200125but is ignored when adding reviewers with the
Edwin Kempin33e92d02011-07-11 22:00:57 +0200126link:cmd-set-reviewers.html[set-reviewers] command.
Edwin Kempin49cb3e12011-06-29 14:35:14 +0200127
128[[addreviewer.maxAllowed]]addreviewer.maxAllowed::
129+
130The maximum number of reviewers a user can add at once by adding a
131group as reviewer.
132+
133If set to 0, there is no limit for the number of reviewers that can
134be added at once by adding a group as reviewer.
135+
136Default is 20.
137
Patrick Hiesel87880b02016-05-03 18:15:08 +0200138[[addReviewer.baseWeight]]addReviewer.baseWeight::
139+
140The weight that will be applied in the default reviewer ranking algorithm.
141This can be increased or decreased to give more or less influence to plugins.
142If set to zero, the base ranking will not have any effect. Reviewers will then
143be ordered as ranked by the plugins (if there are any).
144+
145By default 1.
146
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -0800147[[auth]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800148=== Section auth
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700149
150See also link:config-sso.html[SSO configuration].
151
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700152[[auth.type]]auth.type::
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700153+
Shawn O. Pearce2920ef32009-08-03 08:03:34 -0700154Type of user authentication employed by Gerrit. The supported
155values are:
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700156+
157* `OpenID`
158+
159The default setting. Gerrit uses any valid OpenID
160provider chosen by the end-user. For more information see
Shawn O. Pearce2920ef32009-08-03 08:03:34 -0700161http://openid.net/[openid.net].
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700162+
James E. Blairca8bc3b2011-12-21 18:12:26 +0000163* `OpenID_SSO`
164+
165Supports OpenID from a single provider. There is no registration
166link, and the "Sign In" link sends the user directly to the provider's
167SSO entry point.
168+
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700169* `HTTP`
170+
Shawn O. Pearce2920ef32009-08-03 08:03:34 -0700171Gerrit relies upon data presented in the HTTP request. This includes
Edwin Kempinf1acbb82011-09-15 12:49:42 +0200172HTTP basic authentication, or some types of commercial single-sign-on
Shawn O. Pearce2920ef32009-08-03 08:03:34 -0700173solutions. With this setting enabled the authentication must
174take place in the web server or servlet container, and not from
175within Gerrit.
176+
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -0700177* `HTTP_LDAP`
178+
179Exactly like `HTTP` (above), but additionally Gerrit pre-populates
180a user's full name and email address based on information obtained
181from the user's account object in LDAP. The user's group membership
182is also pulled from LDAP, making any LDAP groups that a user is a
David Pursehouseef92bec2017-08-25 18:45:02 +0900183member of available as groups in Gerrit. Hence the `_LDAP` suffix in
184the name of this authentication type. Gerrit does NOT authenticate
185the user via LDAP.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -0700186+
Sasa Zivkoveabc8972010-10-04 15:47:08 +0200187* `CLIENT_SSL_CERT_LDAP`
188+
189This authentication type is actually kind of SSO. Gerrit will configure
David Pursehouse221d4f62012-06-08 17:38:08 +0900190Jetty's SSL channel to request the client's SSL certificate. For this
Sasa Zivkoveabc8972010-10-04 15:47:08 +0200191authentication to work a Gerrit administrator has to import the root
192certificate of the trust chain used to issue the client's certificate
193into the <review-site>/etc/keystore.
194After the authentication is done Gerrit will obtain basic user
195registration (name and email) from LDAP, and some group memberships.
David Pursehouseef92bec2017-08-25 18:45:02 +0900196Hence the `_LDAP` suffix in the name of this authentication type.
197Gerrit does NOT authenticate the user via LDAP.
Sasa Zivkoveabc8972010-10-04 15:47:08 +0200198This authentication type can only be used under hosted daemon mode, and
199the httpd.listenUrl must use https:// as the protocol.
Chulho Yangb72ff8f2013-07-04 02:35:53 -0400200Optionally, certificate revocation list file can be used
201at <review-site>/etc/crl.pem. For details, see httpd.sslCrl.
Sasa Zivkoveabc8972010-10-04 15:47:08 +0200202+
Shawn O. Pearcef7e065e2009-09-26 20:01:10 -0700203* `LDAP`
204+
205Gerrit prompts the user to enter a username and a password, which
206it then verifies by performing a simple bind against the configured
207<<ldap.server,ldap.server>>. In this configuration the web server
208is not involved in the user authentication process.
209+
Shawn O. Pearcec892d342010-02-17 17:00:50 -0800210The actual username used in the LDAP simple bind request is the
211account's full DN, which is discovered by first querying the
212directory using either an anonymous request, or the configured
Robin Rosenberga3baed02012-10-14 14:09:32 +0200213<<ldap.username,ldap.username>> identity. Gerrit can also use kerberos if
214<<ldap.authentication,ldap.authentication>> is set to `GSSAPI`.
Han-Wen Nienhuys84d830b2017-02-15 16:36:04 +0100215+
216If link:#auth.gitBasicAuthPolicy[`auth.gitBasicAuthPolicy`] is set to `HTTP`,
217the randomly generated HTTP password is used for authentication. On the other hand,
218if link:#auth.gitBasicAuthPolicy[`auth.gitBasicAuthPolicy`] is set to `HTTP_LDAP`,
219the password in the request is first checked against the HTTP password and, if
220it does not match, it is then validated against the LDAP password.
221Service users that only exist in the Gerrit database are authenticated by their
222HTTP passwords.
Shawn O. Pearcec892d342010-02-17 17:00:50 -0800223
224* `LDAP_BIND`
225+
226Gerrit prompts the user to enter a username and a password, which
227it then verifies by performing a simple bind against the configured
228<<ldap.server,ldap.server>>. In this configuration the web server
229is not involved in the user authentication process.
230+
David Pursehouse42f42042013-08-01 14:02:25 +0900231Unlike `LDAP` above, the username used to perform the LDAP simple bind
David Pursehouse1344f5b2013-08-09 17:35:47 +0900232request is the exact string supplied in the dialog by the user.
Robin Rosenberg524a3032012-10-14 14:24:36 +0200233The configured <<ldap.username,ldap.username>> identity is not used to obtain
Shawn O. Pearcec892d342010-02-17 17:00:50 -0800234account information.
235+
Michael Ochmanne9e046a2015-10-20 15:34:29 +0200236* `OAUTH`
David Ostrovskye9707d82015-02-22 01:14:02 +0100237+
238OAuth is a protocol that lets external apps request authorization to private
239details in a user's account without getting their password. This is
240preferred over Basic Authentication because tokens can be limited to specific
241types of data, and can be revoked by users at any time.
242+
243Site owners have to register their application before getting started. Note
244that provider specific plugins must be used with this authentication scheme.
245+
Han-Wen Nienhuys84d830b2017-02-15 16:36:04 +0100246Git clients may send OAuth 2 access tokens instead of passwords in the Basic
247authentication header. Note that provider specific plugins must be installed to
248facilitate this authentication scheme. If multiple OAuth 2 provider plugins are
249installed one of them must be selected as default with the
250`auth.gitOAuthProvider` option.
251+
Shawn O. Pearce2920ef32009-08-03 08:03:34 -0700252* `DEVELOPMENT_BECOME_ANY_ACCOUNT`
253+
254*DO NOT USE*. Only for use in a development environment.
255+
256When this is the configured authentication method a hyperlink titled
257`Become` appears in the top right corner of the page, taking the
258user to a form where they can enter the username of any existing
259user account, and immediately login as that account, without any
260authentication taking place. This form of authentication is only
261useful for the GWT hosted mode shell, where OpenID authentication
262redirects might be risky to the developer's host computer, and HTTP
263authentication is not possible.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700264
265+
266By default, OpenID.
267
Shawn O. Pearce533cafc2010-05-11 16:05:27 -0700268[[auth.allowedOpenID]]auth.allowedOpenID::
269+
270List of permitted OpenID providers. A user may only authenticate
271with an OpenID that matches this list. Only used if `auth.type`
David Pursehouse42f42042013-08-01 14:02:25 +0900272is set to `OpenID` (the default).
Shawn O. Pearce533cafc2010-05-11 16:05:27 -0700273+
Magnus Bäcke5611832011-02-02 08:57:15 +0100274Patterns may be either a
275link:http://download.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html[standard
276Java regular expression (java.util.regex)] (start with `^` and
Shawn O. Pearce533cafc2010-05-11 16:05:27 -0700277end with `$`) or be a simple prefix (any other string).
278+
279By default, the list contains two values, `http://` and `https://`,
280allowing users to authenticate with any OpenID provider.
281
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700282[[auth.trustedOpenID]]auth.trustedOpenID::
Shawn O. Pearced7c026d2009-08-05 20:11:22 -0700283+
David Pursehouse221d4f62012-06-08 17:38:08 +0900284List of trusted OpenID providers. Only used if `auth.type` is
David Pursehouse42f42042013-08-01 14:02:25 +0900285set to `OpenID` (the default).
Shawn O. Pearced7c026d2009-08-05 20:11:22 -0700286+
287In order for a user to take advantage of permissions beyond those
288granted to the `Anonymous Users` and `Registered Users` groups,
289the user account must only have OpenIDs which match at least one
290pattern from this list.
291+
Magnus Bäcke5611832011-02-02 08:57:15 +0100292Patterns may be either a
293link:http://download.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html[standard
294Java regular expression (java.util.regex)] (start with `^` and
Shawn O. Pearced7c026d2009-08-05 20:11:22 -0700295end with `$`) or be a simple prefix (any other string).
296+
297By default, the list contains two values, `http://` and `https://`,
298allowing Gerrit to trust any OpenID it receives.
299
Mike Goulined2ab0cd2012-12-18 11:20:53 +1100300[[auth.openIdDomain]]auth.openIdDomain::
301+
302List of allowed OpenID email address domains. Only used if
David Pursehouse42f42042013-08-01 14:02:25 +0900303`auth.type` is set to `OPENID` or `OPENID_SSO`.
Mike Goulined2ab0cd2012-12-18 11:20:53 +1100304+
305Domain is case insensitive and must be in the same form as it
306appears in the email address, for example, "example.com".
307+
308By default, any domain is accepted.
309
Shawn O. Pearce89030bc2010-04-24 17:25:29 -0700310[[auth.maxOpenIdSessionAge]]auth.maxOpenIdSessionAge::
311+
312Time in seconds before an OpenID provider must force the user
313to authenticate themselves again before authentication to this
314Gerrit server. Currently this is only a polite request, and users
315coming from providers that don't support the PAPE extension will
316be accepted anyway. In the future it may be enforced, rejecting
317users coming from providers that don't honor the max session age.
318+
319If set to 0, the provider will always force the user to authenticate
320(e.g. supply their password). Values should use common unit suffixes
321to express their setting:
322+
323* s, sec, second, seconds
324* m, min, minute, minutes
325* h, hr, hour, hours
326* d, day, days
327* w, week, weeks (`1 week` is treated as `7 days`)
328* mon, month, months (`1 month` is treated as `30 days`)
329* y, year, years (`1 year` is treated as `365 days`)
330
331+
332Default is -1, permitting infinite time between authentications.
333
David Pursehouse5be35a32015-09-09 17:35:32 +0900334[[auth.registerEmailPrivateKey]]auth.registerEmailPrivateKey::
335+
336Private key to use when generating an email verification token.
337+
338If not set, a random key is generated when running the
339link:pgm-init.html[site initialization].
340
Shawn O. Pearce34f38cf2011-06-16 19:18:54 -0700341[[auth.maxRegisterEmailTokenAge]]auth.maxRegisterEmailTokenAge::
342+
343Time in seconds before an email verification token sent to a user in
344order to validate their email address expires.
345+
346* s, sec, second, seconds
347* m, min, minute, minutes
348* h, hr, hour, hours
349* d, day, days
350* w, week, weeks (`1 week` is treated as `7 days`)
351* mon, month, months (`1 month` is treated as `30 days`)
352* y, year, years (`1 year` is treated as `365 days`)
353
354+
Shawn O. Pearced6bd00b2012-01-20 12:40:51 -0800355Default is 12 hours.
Shawn O. Pearce34f38cf2011-06-16 19:18:54 -0700356
James E. Blairca8bc3b2011-12-21 18:12:26 +0000357[[auth.openIdSsoUrl]]auth.openIdSsoUrl::
358+
David Pursehouse42f42042013-08-01 14:02:25 +0900359The SSO entry point URL. Only used if `auth.type` is set to
360`OpenID_SSO`.
James E. Blairca8bc3b2011-12-21 18:12:26 +0000361+
362The "Sign In" link will send users directly to this URL.
363
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700364[[auth.httpHeader]]auth.httpHeader::
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700365+
366HTTP header to trust the username from, or unset to select HTTP basic
Han-Wen Nienhuys84d830b2017-02-15 16:36:04 +0100367authentication. Only used if `auth.type` is set to `HTTP`.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700368
Luca Milanesio384ed6c2013-07-30 09:10:07 +0100369[[auth.httpDisplaynameHeader]]auth.httpDisplaynameHeader::
370+
371HTTP header to retrieve the user's display name from. Only used if `auth.type`
372is set to `HTTP`.
373+
374If set, Gerrit trusts and enforces the user's full name using the HTTP header
375and disables the ability to manually modify the user's full name
376from the contact information page.
377
378[[auth.httpEmailHeader]]auth.httpEmailHeader::
379+
380HTTP header to retrieve the user's e-mail from. Only used if `auth.type`
381is set to `HTTP`.
382+
383If set, Gerrit trusts and enforces the user's e-mail using the HTTP header
384and disables the ability to manually modify or register other e-mails
385from the contact information page.
386
Luca Milanesio97d07352014-07-17 08:31:06 +0100387[[auth.httpExternalIdHeader]]auth.httpExternalIdHeader::
388+
389HTTP header to retrieve the user's external identification token.
390Only used if `auth.type` is set to `HTTP`.
391+
392If set, Gerrit adds the value contained in the HTTP header to the
393user's identity. Typical use is with a federated identity token from
394an external system (e.g. GitHub OAuth 2.0 authentication) where
395the user's auth token exchanged during authentication handshake
396needs to be used for authenticated communication to the external
397system later on.
398+
399Example: `auth.httpExternalIdHeader: X-GitHub-OTP`
400
Luca Milanesio5185b042013-07-27 22:03:06 +0100401[[auth.loginUrl]]auth.loginUrl::
402+
403URL to redirect a browser to after the end-user has clicked on the
David Pursehouse42f42042013-08-01 14:02:25 +0900404login link in the upper right corner. Only used if `auth.type` is set
405to `HTTP` or `HTTP_LDAP`.
Luca Milanesio5185b042013-07-27 22:03:06 +0100406Organizations using an enterprise single-sign-on solution may want to
407redirect the browser to the SSO product's sign-in page for completing the
408login process and validate their credentials.
409+
David Pursehouse42f42042013-08-01 14:02:25 +0900410If set, Gerrit allows anonymous access until the end-user performs the login
411and provides a trusted identity through the HTTP header.
Luca Milanesio5185b042013-07-27 22:03:06 +0100412If not set, Gerrit requires the HTTP header with a trusted identity
David Pursehouse42f42042013-08-01 14:02:25 +0900413and returns the error page 'LoginRedirect.html' if such a header is not
414present.
Luca Milanesio5185b042013-07-27 22:03:06 +0100415
416[[auth.loginText]]auth.loginText::
417+
David Pursehouse42f42042013-08-01 14:02:25 +0900418Text displayed in the loginUrl link. Only used if `auth.loginUrl` is set.
Luca Milanesio5185b042013-07-27 22:03:06 +0100419+
David Pursehouse42f42042013-08-01 14:02:25 +0900420If not set, the "Sign In" text is used.
Luca Milanesio5185b042013-07-27 22:03:06 +0100421
Luca Milanesio111e0b72013-08-15 18:56:42 +0100422[[auth.registerPageUrl]]auth.registerPageUrl::
423+
David Pursehouse268744b2013-08-17 15:32:11 +0900424URL of the registration page to use when a new user logs in to Gerrit for
425the first time. Used only when `auth.type` is set to `HTTP`.
Luca Milanesio111e0b72013-08-15 18:56:42 +0100426+
427If not set, the standard Gerrit registration page `/#/register/` is displayed.
428
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700429[[auth.logoutUrl]]auth.logoutUrl::
Shawn O. Pearce12b5d842009-08-15 15:11:10 -0700430+
431URL to redirect a browser to after the end-user has clicked on the
432"Sign Out" link in the upper right corner. Organizations using an
433enterprise single-sign-on solution may want to redirect the browser
434to the SSO product's sign-out page.
435+
436If not set, the redirect returns to the list of all open changes.
437
Shawn O. Pearcec9d26b52009-12-16 08:05:27 -0800438[[auth.registerUrl]]auth.registerUrl::
439+
440Target for the "Register" link in the upper right corner. Used only
Edwin Kempin54093152015-05-08 10:50:35 +0200441when `auth.type` is `LDAP`, `LDAP_BIND` or `CUSTOM_EXTENSION`.
Shawn O. Pearcec9d26b52009-12-16 08:05:27 -0800442+
443If not set, no "Register" link is displayed.
444
Chad Horohoe65897082012-11-10 10:26:25 -0800445[[auth.registerText]]auth.registerText::
446+
447Text for the "Register" link in the upper right corner. Used only
Edwin Kempin54093152015-05-08 10:50:35 +0200448when `auth.type` is `LDAP`, `LDAP_BIND` or `CUSTOM_EXTENSION`.
Chad Horohoe65897082012-11-10 10:26:25 -0800449+
450If not set, defaults to "Register".
451
David Pursehouse3d604492013-01-25 17:41:53 +0900452[[auth.editFullNameUrl]]auth.editFullNameUrl::
453+
454Target for the "Edit" button when the user is allowed to edit their
Edwin Kempin54093152015-05-08 10:50:35 +0200455full name. Used only when `auth.type` is `LDAP`, `LDAP_BIND` or
456`CUSTOM_EXTENSION`.
David Pursehouse3d604492013-01-25 17:41:53 +0900457
458[[auth.httpPasswordUrl]]auth.httpPasswordUrl::
459+
David Pursehouse42f42042013-08-01 14:02:25 +0900460Target for the "Obtain Password" link. Used only when `auth.type` is
Edwin Kempin54093152015-05-08 10:50:35 +0200461`CUSTOM_EXTENSION`.
Shawn Pearcee0cafe42013-08-29 23:28:13 -0700462
463[[auth.switchAccountUrl]]auth.switchAccountUrl::
David Pursehouse3d604492013-01-25 17:41:53 +0900464+
Shawn Pearcee0cafe42013-08-29 23:28:13 -0700465URL to switch user identities and login as a different account than
466the currently active account. This is disabled by default except when
467`auth.type` is `OPENID` and `DEVELOPMENT_BECOME_ANY_ACCOUNT`. If set
468the "Switch Account" link is displayed next to "Sign Out".
469+
470When `auth.type` does not normally enable this URL administrators may
Logan Hanks71d1ffd2017-03-16 14:12:23 -0700471set this to `login/`, allowing users to begin a new web session. This value
472is used as an href in PolyGerrit and the GWT UI, so absolute URLs like
473`https://someotherhost/login` work as well.
474+
475If a ${path} parameter is included, then PolyGerrit will substitute the
476currently viewed path in the link. Be aware that this path will include
477a leading slash, so a value like this might be appropriate: `/login${path}`.
478Note: in the GWT UI this substitution for ${path} is *always* `/`.
David Pursehouse3d604492013-01-25 17:41:53 +0900479
Piotr Sikora7cec2f82011-02-26 12:57:30 +0000480[[auth.cookiePath]]auth.cookiePath::
481+
482Sets "path" attribute of the authentication cookie.
483+
484If not set, HTTP request's path is used.
485
Sammy Gillespie26873c02016-02-11 14:39:43 +0000486[[auth.cookieDomain]]auth.cookieDomain::
487+
488Sets "domain" attribute of the authentication cookie.
489+
490If not set, HTTP request's domain is used.
491
Piotr Sikora7cec2f82011-02-26 12:57:30 +0000492[[auth.cookieSecure]]auth.cookieSecure::
493+
494Sets "secure" flag of the authentication cookie. If true, cookies
495will be transmitted only over HTTPS protocol.
496+
497By default, false.
498
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700499[[auth.emailFormat]]auth.emailFormat::
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700500+
501Optional format string to construct user email addresses out of
David Pursehouse42f42042013-08-01 14:02:25 +0900502user login names. Only used if `auth.type` is `HTTP`, `HTTP_LDAP`
Shawn O. Pearcef7e065e2009-09-26 20:01:10 -0700503or `LDAP`.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700504+
Shawn O. Pearce44221bf2011-06-27 10:37:30 -0700505This value can be set to a format string, where `{0}` is replaced
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700506with the login name. E.g. "\{0\}+gerrit@example.com" with a user
507login name of "foo" will produce "foo+gerrit@example.com" during
508the first time user "foo" registers.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -0700509+
Shawn O. Pearcef7e065e2009-09-26 20:01:10 -0700510If the site is using `HTTP_LDAP` or `LDAP`, using this option is
511discouraged. Setting `ldap.accountEmailAddress` and importing the
512email address from the LDAP directory is generally preferred.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700513
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700514[[auth.contributorAgreements]]auth.contributorAgreements::
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700515+
516Controls whether or not the contributor agreement features are
517enabled for the Gerrit site. If enabled a user must complete a
518contributor agreement before they can upload changes.
519+
Marc Petit-Hugueninbbb85492012-12-03 11:11:00 -0800520If enabled, the admin must also add one or more
521link:config-cla.html[contributor-agreement sections]
522in project.config and create agreement files under
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700523`'$site_path'/static`, so users can actually complete one or
Grzegorz Kossakowski28e4e1b2009-09-23 11:33:34 -0700524more agreements.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700525+
526By default this is false (no agreements are used).
Fredrik Luthandera3cf3542012-07-04 16:55:35 -0700527+
528To enable the actual usage of contributor agreement the project
529specific config option in the `project.config` must be set:
530link:config-project-config.html[receive.requireContributorAgreement].
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700531
Christian Halstricka3d88a52011-08-31 09:21:41 +0200532[[auth.trustContainerAuth]]auth.trustContainerAuth::
533+
534If true then it is the responsibility of the container hosting
535Gerrit to authenticate users. In this case Gerrit will blindly trust
536the container.
537+
538This parameter only affects git over http traffic. If set to false
Han-Wen Nienhuys84d830b2017-02-15 16:36:04 +0100539then Gerrit will do the authentication (using Basic authentication).
Christian Halstricka3d88a52011-08-31 09:21:41 +0200540+
541By default this is set to false.
542
Luca Milanesio42058842012-01-05 21:25:38 +0000543
Hector Oswaldo Caballero2a9ad1f2016-09-15 18:24:42 -0400544[[auth.gitBasicAuthPolicy]]auth.gitBasicAuthPolicy::
545+
David Pursehousef7a1c2a2017-08-25 19:12:54 +0900546When `auth.type` is `LDAP`, `LDAP_BIND` or `OAUTH`, it allows using either the generated
Luca Milanesio51edcb72017-03-06 11:59:55 +0000547HTTP password, the LDAP or OAUTH password, or a combination of HTTP and LDAP
548authentication, to authenticate Git over HTTP and REST API requests.
549The supported values are:
Hector Oswaldo Caballero2a9ad1f2016-09-15 18:24:42 -0400550+
551*`HTTP`
552+
David Pursehousee2920032017-08-25 19:12:21 +0900553Only the HTTP password is accepted when doing Git over HTTP and REST API requests.
Hector Oswaldo Caballero2a9ad1f2016-09-15 18:24:42 -0400554+
555*`LDAP`
556+
557Only the `LDAP` password is allowed when doing Git over HTTP and REST API
558requests.
559+
Luca Milanesio51edcb72017-03-06 11:59:55 +0000560*`OAUTH`
561+
David Pursehousee2920032017-08-25 19:12:21 +0900562Only the `OAUTH` authentication is allowed when doing Git over HTTP and REST API
Luca Milanesio51edcb72017-03-06 11:59:55 +0000563requests.
564+
Hector Oswaldo Caballero2a9ad1f2016-09-15 18:24:42 -0400565*`HTTP_LDAP`
566+
567The password in the request is first checked against the HTTP password and, if
568it does not match, it is then validated against the `LDAP` password.
569+
Luca Milanesio51edcb72017-03-06 11:59:55 +0000570By default this is set to `LDAP` when link:#auth.type[`auth.type`] is `LDAP`
571and `OAUTH` when link:#auth.type[`auth.type`] is `OAUTH`.
Hector Oswaldo Caballero2a9ad1f2016-09-15 18:24:42 -0400572Otherwise, the default value is `HTTP`.
573
Michael Ochmanne9e046a2015-10-20 15:34:29 +0200574[[auth.gitOAuthProvider]]auth.gitOAuthProvider::
575+
576Selects the OAuth 2 provider to authenticate git over HTTP traffic with.
577+
578In general there is no way to determine from an access token alone, which
579OAuth 2 provider to address to verify that token, and the BasicAuth
580scheme does not support amending such details. If multiple OAuth provider
581plugins in a system offer support for git over HTTP authentication site
582administrators must configure, which one to use as default provider.
583In case the provider cannot be determined from a request the access token
584will be sent to the default provider for verification.
585+
586The value of this parameter must be the identifier of an OAuth 2 provider
587in the form `plugin-name:provider-name`. Consult the respective plugin
588documentation for details.
589
Edwin Kempin4b9e5e72011-09-22 15:06:14 +0200590[[auth.userNameToLowerCase]]auth.userNameToLowerCase::
591+
592If set the username that is received to authenticate a git operation
593is converted to lower case for looking up the user account in Gerrit.
594+
595By setting this parameter a case insensitive authentication for the
596git operations can be achieved, if it is ensured that the usernames in
597Gerrit (scheme `username`) are stored in lower case (e.g. if the
598parameter link:#ldap.accountSshUserName[ldap.accountSshUserName] is
599set to `${sAMAccountName.toLowerCase}`). It is important that for all
600existing accounts this username is already in lower case. It is not
601possible to convert the usernames of the existing accounts to lower
602case because this would break the access to existing per-user
603branches.
604+
605This parameter only affects git over http and git over SSH traffic.
606+
607By default this is set to false.
608
Shawn Pearcea931fe12013-06-11 12:29:17 -0700609[[auth.enableRunAs]]auth.enableRunAs::
610+
611If true HTTP REST APIs will accept the `X-Gerrit-RunAs` HTTP request
612header from any users granted the link:access-control.html#capability_runAs[Run As]
613capability. The header and capability permit the authenticated user
614to impersonate another account.
615+
616If false the feature is disabled and cannot be re-enabled without
617editing gerrit.config and restarting the server.
618+
619Default is true.
620
David Pursehouse21bd07b2015-11-27 00:15:42 +0900621[[auth.allowRegisterNewEmail]]auth.allowRegisterNewEmail::
622+
623Whether users are allowed to register new email addresses.
624+
625In addition for the HTTP authentication type
626link:#auth.httpemailheader[auth.httpemailheader] must *not* be set to
627enable registration of new email addresses.
628+
629By default, true.
630
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -0800631[[cache]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800632=== Section cache
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700633
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700634[[cache.directory]]cache.directory::
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700635+
636Path to a local directory where Gerrit can write cached entities for
Shawn O. Pearce4b212282009-08-05 19:45:56 -0700637future lookup. This local disk cache is used to retain potentially
638expensive to compute information across restarts. If the location
639does not exist, Gerrit will try to create it.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700640+
David Pursehousea61ee502016-09-06 16:27:09 +0900641Technically, cached entities are persisted as a set of H2 databases
Saša Živkove607d6c2016-02-24 10:46:46 +0000642inside this directory.
643+
Shawn O. Pearce4b212282009-08-05 19:45:56 -0700644If not absolute, the path is resolved relative to `$site_path`.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700645+
Shawn O. Pearce4b212282009-08-05 19:45:56 -0700646Default is unset, no disk cache.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700647
Saša Živkovf3134572016-02-09 11:42:46 +0100648[[cache.h2CacheSize]]cache.h2CacheSize::
649+
Björn Pedersen64af3ad2016-05-20 10:21:07 +0200650The size of the in-memory cache for each opened H2 cache database, in bytes.
Saša Živkove607d6c2016-02-24 10:46:46 +0000651+
Björn Pedersen64af3ad2016-05-20 10:21:07 +0200652Some caches of Gerrit are persistent and are backed by an H2 database.
Saša Živkove607d6c2016-02-24 10:46:46 +0000653H2 uses memory to cache its database content. The parameter `h2CacheSize`
654allows to limit the memory used by H2 and thus prevent out-of-memory
Saša Živkovf3134572016-02-09 11:42:46 +0100655caused by the H2 database using too much memory.
656+
Björn Pedersen64af3ad2016-05-20 10:21:07 +0200657See <<database.h2.cachesize,database.h2.cachesize>> for a detailed discussion.
Saša Živkovf3134572016-02-09 11:42:46 +0100658+
Björn Pedersen64af3ad2016-05-20 10:21:07 +0200659Default is unset, using up to half of the available memory.
David Pursehousee6976dc2017-06-30 16:33:44 +0900660+
Björn Pedersen64af3ad2016-05-20 10:21:07 +0200661H2 will persist this value in the database, so to unset explicitly specify 0.
Saša Živkovf3134572016-02-09 11:42:46 +0100662+
663Common unit suffixes of 'k', 'm', or 'g' are supported.
664
Björn Pedersen64af3ad2016-05-20 10:21:07 +0200665[[cache.h2AutoServer]]cache.h2AutoServer::
666+
667If set to true, enable H2 autoserver mode for the H2-backed persistent cache
668databases.
669+
670See link:http://www.h2database.com/html/features.html#auto_mixed_mode[here]
671for detail.
672+
673Default is false.
674
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700675[[cache.name.maxAge]]cache.<name>.maxAge::
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700676+
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700677Maximum age to keep an entry in the cache. Entries are removed from
678the cache and refreshed from source data every maxAge interval.
Shawn O. Pearced9c403e2009-08-19 08:35:41 -0700679Values should use common unit suffixes to express their setting:
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700680+
Shawn O. Pearced9c403e2009-08-19 08:35:41 -0700681* s, sec, second, seconds
682* m, min, minute, minutes
683* h, hr, hour, hours
684* d, day, days
685* w, week, weeks (`1 week` is treated as `7 days`)
686* mon, month, months (`1 month` is treated as `30 days`)
687* y, year, years (`1 year` is treated as `365 days`)
688
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -0700689+
Edwin Kempina09ebcf2015-04-16 14:53:23 +0200690--
Edwin Kempinabcd5042013-03-12 16:04:37 +0100691If a unit suffix is not specified, `seconds` is assumed. If 0 is
Shawn O. Pearce3fdbf392009-09-04 18:08:26 -0700692supplied, the maximum age is infinite and items are never purged
693except when the cache is full.
Edwin Kempina09ebcf2015-04-16 14:53:23 +0200694
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700695Default is `0`, meaning store forever with no expire, except:
Edwin Kempina09ebcf2015-04-16 14:53:23 +0200696
Shawn O. Pearce05687e92011-04-04 17:29:03 -0400697* `"adv_bases"`: default is `10 minutes`
Shawn O. Pearced9c403e2009-08-19 08:35:41 -0700698* `"ldap_groups"`: default is `1 hour`
Shawn O. Pearced9c403e2009-08-19 08:35:41 -0700699* `"web_sessions"`: default is `12 hours`
Edwin Kempina09ebcf2015-04-16 14:53:23 +0200700--
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700701
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700702[[cache.name.memoryLimit]]cache.<name>.memoryLimit::
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700703+
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700704The total cost of entries to retain in memory. The cost computation
705varies by the cache. For most caches where the in-memory size of each
706entry is relatively the same, memoryLimit is currently defined to be
707the number of entries held by the cache (each entry costs 1).
708+
709For caches where the size of an entry can vary significantly between
710individual entries (notably `"diff"`, `"diff_intraline"`), memoryLimit
711is an approximation of the total number of bytes stored by the cache.
712Larger entries that represent bigger patch sets or longer source files
713will consume a bigger portion of the memoryLimit. For these caches the
714memoryLimit should be set to roughly the amount of RAM (in bytes) the
715administrator can dedicate to the cache.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700716+
Shawn O. Pearceefaf9792009-09-02 18:12:52 -0700717Default is 1024 for most caches, except:
718+
Shawn O. Pearce05687e92011-04-04 17:29:03 -0400719* `"adv_bases"`: default is `4096`
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700720* `"diff"`: default is `10m` (10 MiB of memory)
721* `"diff_intraline"`: default is `10m` (10 MiB of memory)
Dave Borowitz7388e9e2016-09-23 13:20:29 +0200722* `"diff_summary"`: default is `10m` (10 MiB of memory)
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700723* `"plugin_resources"`: default is 2m (2 MiB of memory)
724
725+
726If set to 0 the cache is disabled. Entries are removed immediately
727after being stored by the cache. This is primarily useful for testing.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700728
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700729[[cache.name.diskLimit]]cache.<name>.diskLimit::
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700730+
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700731Total size in bytes of the keys and values stored on disk. Caches that
732have grown bigger than this size are scanned daily at 1 AM local
733server time to trim the cache. Entries are removed in least recently
734accessed order until the cache fits within this limit. Caches may
735grow larger than this during the day, as the size check is only
736performed once every 24 hours.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700737+
Saša Živkove789f2e2016-09-22 10:37:34 +0200738Default is 128 MiB per cache, except:
739+
Dave Borowitz7388e9e2016-09-23 13:20:29 +0200740* `"diff_summary"`: default is `1g` (1 GiB of disk space)
Saša Živkove789f2e2016-09-22 10:37:34 +0200741
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700742+
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700743If 0, disk storage for the cache is disabled.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700744
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800745==== [[cache_names]]Standard Caches
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700746
Shawn O. Pearce4a452712009-05-28 20:12:33 -0700747cache `"accounts"`::
748+
Shawn O. Pearce4dba9882009-08-05 19:55:15 -0700749Cache entries contain important details of an active user, including
750their display name, preferences, known email addresses, and group
751memberships. Entry information is obtained from the following
752database tables:
753+
754* `accounts`
755+
756* `account_group_members`
Shawn O. Pearce4dba9882009-08-05 19:55:15 -0700757
758+
759If direct updates are made to any of these database tables, this
760cache should be flushed.
761
Shawn O. Pearce05687e92011-04-04 17:29:03 -0400762cache `"adv_bases"`::
763+
764Used only for push over smart HTTP when branch level access controls
David Pursehouse92463562013-06-24 10:16:28 +0900765are enabled. The cache entry contains all commits that are available
Shawn O. Pearce05687e92011-04-04 17:29:03 -0400766for the client to use as potential delta bases. Push over smart HTTP
767requires two HTTP requests, and this cache tries to carry state from
768the first request into the second to ensure it can complete.
769
Gustaf Lundh47ce4e32012-05-21 11:18:42 +0200770cache `"changes"`::
771+
Gustaf Lundh3353c362013-04-24 17:25:39 +0200772The size of `memoryLimit` determines the number of projects for which
773all changes will be cached. If the cache is set to 1024, this means all
774changes for up to 1024 projects can be held in the cache.
Gustaf Lundh53493772012-11-18 18:41:15 -0800775+
Gustaf Lundh3353c362013-04-24 17:25:39 +0200776Default value is 0 (disabled). It is disabled by default due to the fact
777that change updates are not communicated between Gerrit servers. Hence
778this cache should be disabled in an multi-master/multi-slave setup.
Gustaf Lundh53493772012-11-18 18:41:15 -0800779+
780The cache should be flushed whenever the database changes table is modified
Matt Baker8ce12fc2013-11-26 21:43:12 -0700781outside of Gerrit.
Gustaf Lundh47ce4e32012-05-21 11:18:42 +0200782
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700783cache `"diff"`::
784+
Shawn O. Pearceefaf9792009-09-02 18:12:52 -0700785Each item caches the differences between two commits, at both the
786directory and file levels. Gerrit uses this cache to accelerate
787the display of affected file names, as well as file contents.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700788+
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700789Entries in this cache are relatively large, so memoryLimit is an
790estimate in bytes of memory used. Administrators should try to target
791cache.diff.memoryLimit to fit all changes users will view in a 1 or 2
792day span.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700793
Shawn O. Pearcef0cfe532011-04-11 23:40:06 -0400794cache `"diff_intraline"`::
795+
796Each item caches the intraline difference of one file, when compared
797between two commits. Gerrit uses this cache to accelerate display of
798intraline differences when viewing a file.
799+
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700800Entries in this cache are relatively large, so memoryLimit is an
801estimate in bytes of memory used. Administrators should try to target
802cache.diff.memoryLimit to fit all files users will view in a 1 or 2
803day span.
Shawn O. Pearcef0cfe532011-04-11 23:40:06 -0400804
Dave Borowitz7388e9e2016-09-23 13:20:29 +0200805cache `"diff_summary"`::
Saša Živkove789f2e2016-09-22 10:37:34 +0200806+
807Each item caches list of file paths which are different between two
808commits. Gerrit uses this cache to accelerate computing of the list
809of paths of changed files.
810+
811Ideally, disk limit of this cache is large enough to cover all changes.
812This should significantly speed up change reindexing, especially
813full offline reindexing.
814
Shawn O. Pearce2d65d292011-06-24 08:12:02 -0700815cache `"git_tags"`::
816+
817If branch or reference level READ access controls are used, this
818cache tracks which tags are reachable from the branch tips of a
819repository. Gerrit uses this information to determine the set
820of tags that a client may access, derived from which tags are
821part of the history of a visible branch.
822+
823The cache is persisted to disk across server restarts as it can
824be expensive to compute (60 or more seconds for a large history
825like the Linux kernel repository).
826
Shawn O. Pearce4a452712009-05-28 20:12:33 -0700827cache `"groups"`::
828+
Shawn O. Pearce4dba9882009-08-05 19:55:15 -0700829Caches the basic group information from the `account_groups` table,
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -0700830including the group owner, name, and description.
831+
832Gerrit group membership obtained from the `account_group_members`
833table is cached under the `"accounts"` cache, above. External group
834membership obtained from LDAP is cached under `"ldap_groups"`.
835
Matt Fischer620255a2011-03-22 14:28:23 -0500836cache `"groups_byinclude"`::
837+
838Caches group inclusions in other groups. If direct updates are made
839to the `account_group_includes` table, this cache should be flushed.
840
Bruce Zu825125a2014-11-19 17:01:42 +0900841cache `"groups_members"`::
842+
843Caches subgroups. If direct updates are made to the
844`account_group_includes` table, this cache should be flushed.
845
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -0700846cache `"ldap_groups"`::
847+
848Caches the LDAP groups that a user belongs to, if LDAP has been
849configured on this server. This cache should be configured with a
850low maxAge setting, to ensure LDAP modifications are picked up in
851a timely fashion.
Shawn O. Pearce4a452712009-05-28 20:12:33 -0700852
Gustaf Lundh0919a492012-10-19 15:29:23 +0200853cache `"ldap_groups_byinclude"`::
854+
855Caches the hierarchical structure of LDAP groups.
856
Shawn O. Pearce6d26f4a2009-08-24 15:43:52 -0700857cache `"ldap_usernames"`::
858+
859Caches a mapping of LDAP username to Gerrit account identity. The
860cache automatically updates when a user first creates their account
861within Gerrit, so the cache expire time is largely irrelevant.
862
Shawn O. Pearce0c1abdb2011-06-24 11:01:25 -0700863cache `"permission_sort"`::
864+
David Pursehouse221d4f62012-06-08 17:38:08 +0900865Caches the order in which access control sections must be applied to a
Shawn O. Pearce0c1abdb2011-06-24 11:01:25 -0700866reference. Sorting the sections can be expensive when regular
867expressions are used, so this cache remembers the ordering for
868each branch.
869
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700870cache `"plugin_resources"`::
871+
872Caches formatted plugin resources, such as plugin documentation that
873has been converted from Markdown to HTML. The memoryLimit refers to
874the bytes of memory dedicated to storing the documentation.
875
Shawn O. Pearce4a452712009-05-28 20:12:33 -0700876cache `"projects"`::
877+
878Caches the project description records, from the `projects` table
879in the database. If a project record is updated or deleted, this
880cache should be flushed. Newly inserted projects do not require
881a cache flush, as they will be read upon first reference.
882
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700883cache `"sshkeys"`::
884+
885Caches unpacked versions of user SSH keys, so the internal SSH daemon
886can match against them during authentication. The unit of storage
887is per-user, so 1024 items translates to 1024 unique user accounts.
888As each individual user account may configure multiple SSH keys,
889the total number of keys may be larger than the item count.
890
Shawn O. Pearceb09322b2009-08-15 17:49:00 -0700891cache `"web_sessions"`::
892+
893Tracks the live user sessions coming in over HTTP. Flushing this
894cache would cause all users to be signed out immediately, forcing
Shawn O. Pearce727d80f2009-08-17 07:57:54 -0700895them to sign-in again. To avoid breaking active users, this cache
896is not flushed automatically by `gerrit flush-caches --all`, but
897instead must be explicitly requested.
898+
899If no disk cache is configured (or `cache.web_sessions.diskLimit`
900is set to 0) a server restart will force all users to sign-out,
901and need to sign-in again after the restart, as the cache was
902unable to persist the session information. Enabling a disk cache
903is strongly recommended.
904+
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700905Session storage is relatively inexpensive. The average entry in
906this cache is approximately 346 bytes.
Shawn O. Pearceb09322b2009-08-15 17:49:00 -0700907
Shawn O. Pearce4016a932009-05-28 15:12:40 -0700908See also link:cmd-flush-caches.html[gerrit flush-caches].
909
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800910==== [[cache_options]]Cache Options
Shawn O. Pearce29de4362010-03-03 17:51:26 -0800911
Hugo Arès2bc86812015-03-09 15:20:28 -0400912[[cache.diff.timeout]]cache.diff.timeout::
913+
914Maximum number of milliseconds to wait for diff data before giving up and
915falling back on a simpler diff algorithm that will not be able to break down
916modified regions into smaller ones. This is a work around for an infinite loop
917bug in the default difference algorithm implementation.
918+
919Values should use common unit suffixes to express their setting:
920+
921* ms, milliseconds
922* s, sec, second, seconds
923* m, min, minute, minutes
924* h, hr, hour, hours
925
926+
Edwin Kempina09ebcf2015-04-16 14:53:23 +0200927--
Hugo Arès2bc86812015-03-09 15:20:28 -0400928If a unit suffix is not specified, `milliseconds` is assumed.
Edwin Kempina09ebcf2015-04-16 14:53:23 +0200929
Hugo Arès2bc86812015-03-09 15:20:28 -0400930Default is 5 seconds.
Edwin Kempina09ebcf2015-04-16 14:53:23 +0200931--
Hugo Arès2bc86812015-03-09 15:20:28 -0400932
Edwin Kempin42d27432013-11-24 17:06:24 +0100933[[cache.diff_intraline.timeout]]cache.diff_intraline.timeout::
Shawn O. Pearce617aa392010-11-15 14:03:28 -0800934+
935Maximum number of milliseconds to wait for intraline difference data
936before giving up and disabling it for a particular file pair. This is
937a work around for an infinite loop bug in the intraline difference
David Pursehousee8c1fb92013-04-17 17:18:43 +0900938implementation.
939+
940If computation takes longer than the timeout, the worker thread is
941terminated, an error message is shown, and no intraline difference is
942displayed for the file pair.
Shawn O. Pearce617aa392010-11-15 14:03:28 -0800943+
944Values should use common unit suffixes to express their setting:
945+
946* ms, milliseconds
947* s, sec, second, seconds
948* m, min, minute, minutes
949* h, hr, hour, hours
950
951+
Edwin Kempina09ebcf2015-04-16 14:53:23 +0200952--
Shawn O. Pearce617aa392010-11-15 14:03:28 -0800953If a unit suffix is not specified, `milliseconds` is assumed.
Edwin Kempina09ebcf2015-04-16 14:53:23 +0200954
Shawn O. Pearce617aa392010-11-15 14:03:28 -0800955Default is 5 seconds.
Edwin Kempina09ebcf2015-04-16 14:53:23 +0200956--
Shawn O. Pearce617aa392010-11-15 14:03:28 -0800957
Edwin Kempin42d27432013-11-24 17:06:24 +0100958[[cache.diff_intraline.enabled]]cache.diff_intraline.enabled::
Shawn O. Pearce29de4362010-03-03 17:51:26 -0800959+
960Boolean to enable or disable the computation of intraline differences
Shawn O. Pearce307dd4e2010-11-15 12:12:20 -0800961when populating a diff cache entry. This flag is provided primarily
962as a backdoor to disable the intraline difference feature if
David Pursehouse92463562013-06-24 10:16:28 +0900963necessary. To maintain backwards compatibility with prior versions,
Shawn O. Pearce307dd4e2010-11-15 12:12:20 -0800964this setting will fallback to `cache.diff.intraline` if not set in the
965configuration.
Shawn O. Pearce29de4362010-03-03 17:51:26 -0800966+
967Default is true, enabled.
968
Edwin Kempin42d27432013-11-24 17:06:24 +0100969[[cache.projects.checkFrequency]]cache.projects.checkFrequency::
Shawn O. Pearceb8e4e352011-05-19 18:09:01 -0700970+
971How often project configuration should be checked for update from Git.
972Gerrit Code Review caches project access rules and configuration in
973memory, checking the refs/meta/config branch every checkFrequency
974minutes to see if a new revision should be loaded and used for future
975access. Values can be specified using standard time unit abbreviations
976('ms', 'sec', 'min', etc.).
977+
978If set to 0, checks occur every time, which may slow down operations.
Shawn Pearcec825ef12013-02-20 11:29:46 -0800979If set to 'disabled' or 'off', no check will ever be done.
Shawn O. Pearceb8e4e352011-05-19 18:09:01 -0700980Administrators may force the cache to flush with
981link:cmd-flush-caches.html[gerrit flush-caches].
982+
983Default is 5 minutes.
984
Simon Leifc19ff12014-10-02 13:36:00 -0400985[[cache.projects.loadOnStartup]]cache.projects.loadOnStartup::
986+
987If the project cache should be loaded during server startup.
988+
989The cache is loaded concurrently. Admins should ensure that the cache
990size set under <<cache.name.memoryLimit,cache.projects.memoryLimit>>
991is not smaller than the number of repos.
992+
993Default is false, disabled.
994
995[[cache.projects.loadThreads]]cache.projects.loadThreads::
996+
997Only relevant if <<cache.projects.loadOnStartup,cache.projects.loadOnStartup>>
998is true.
999+
1000The number of threads to allocate for loading the cache at startup. These
1001threads will die out after the cache is loaded.
1002+
1003Default is the number of CPUs.
1004
Shawn Pearce67a33302016-08-11 11:51:59 -07001005
1006[[capability]]
1007=== Section capability
1008
1009[[capability.administrateServer]]capability.administrateServer::
1010+
1011Names of groups of users that are allowed to exercise the
Edwin Kempin53d52ba2017-06-09 10:57:43 +02001012`administrateServer` capability, in addition to those listed in
Shawn Pearce67a33302016-08-11 11:51:59 -07001013All-Projects. Configuring this option can be a useful fail-safe
1014to recover a server in the event an administrator removed all
Edwin Kempin53d52ba2017-06-09 10:57:43 +02001015groups from the `administrateServer` capability, or to ensure that
Shawn Pearce67a33302016-08-11 11:51:59 -07001016specific groups always have administration capabilities.
1017+
1018----
1019[capability]
1020 administrateServer = group Fail Safe Admins
1021----
1022+
1023The configuration file uses group names, not UUIDs. If a group is
1024renamed the gerrit.config file must be updated to reflect the new
1025name. If a group cannot be found for the configured name a warning
1026is logged and the server will continue normal startup.
1027+
1028If not specified (default), only the groups listed by All-Projects
Edwin Kempin53d52ba2017-06-09 10:57:43 +02001029may use the `administrateServer` capability.
1030
1031[[capability.makeFirstUserAdmin]]capability.makeFirstUserAdmin::
1032+
1033Whether the first user that logs in to the Gerrit server should
1034automatically be added to the administrator group and hence get the
1035`administrateServer` capability assigned. This is useful to bootstrap
1036the authentication database.
1037+
1038Default is true.
Shawn Pearce67a33302016-08-11 11:51:59 -07001039
1040
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08001041[[change]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001042=== Section change
Shawn Pearceb9ebb662013-07-19 19:45:25 -07001043
Edwin Kempin662e55f2013-11-23 12:50:29 +01001044[[change.largeChange]]change.largeChange::
1045+
1046Number of changed lines from which on a change is considered as a large
1047change. The number of changed lines of a change is the sum of the lines
1048that were inserted and deleted in the change.
1049+
David Pursehousea1d633b2014-05-02 17:21:02 +09001050The specified value is used to visualize the change sizes in the Web UI
Edwin Kempin662e55f2013-11-23 12:50:29 +01001051in change tables and user dashboards.
1052+
1053By default 500.
1054
Shawn Pearceb9ebb662013-07-19 19:45:25 -07001055[[change.updateDelay]]change.updateDelay::
1056+
1057How often in seconds the web interface should poll for updates to the
1058currently open change. The poller relies on the client's browser
1059cache to use If-Modified-Since and respect `304 Not Modified` HTTP
Matt Baker8ce12fc2013-11-26 21:43:12 -07001060responses. This allows for fast polls, often under 8 milliseconds.
Shawn Pearceb9ebb662013-07-19 19:45:25 -07001061+
1062With a configured 30 second delay a server with 4900 active users will
1063typically need to dedicate 1 CPU to the update check. 4900 users
1064divided by an average delay of 30 seconds is 163 requests arriving per
Edwin Kempin720eebe2014-07-16 13:44:04 +02001065second. If requests are served at \~6 ms response time, 1 CPU is
Shawn Pearceb9ebb662013-07-19 19:45:25 -07001066necessary to keep up with the update request traffic. On a smaller
1067user base of 500 active users, the default 30 second delay is only 17
1068requests per second and requires ~10% CPU.
1069+
1070If 0 the update polling is disabled.
1071+
Luca Milanesio6002d2f2017-04-25 10:51:30 +02001072Default is 5 minutes.
Shawn Pearceb9ebb662013-07-19 19:45:25 -07001073
Gabor Somossyb72d4c62015-10-20 23:40:07 +01001074[[change.allowBlame]]change.allowBlame::
1075+
1076Allow blame on side by side diff. If set to false, blame cannot be used.
1077+
1078Default is true.
1079
David Ostrovsky1b61dc72014-01-28 18:40:48 +01001080[[change.allowDrafts]]change.allowDrafts::
1081+
1082Allow drafts workflow. If set to false, drafts cannot be created,
1083deleted or published.
1084+
1085Default is true.
1086
Dave Borowitzf5e6e042016-04-25 13:03:42 -04001087[[change.cacheAutomerge]]change.cacheAutomerge::
1088+
1089When reviewing diff commits, the left-hand side shows the output of the
1090result of JGit's automatic merge algorithm. This option controls whether
1091this output is cached in the change repository, or if only the diff is
1092cached in the persistent `diff` cache.
1093+
1094If true, automerge results are stored in the repository under
1095`refs/cache-automerge/*`; the results of diffing the change against its
1096automerge base are stored in the diff cache. If false, no extra data is
1097stored in the repository, only the diff cache. This can result in slight
1098performance improvements by reducing the number of refs in the repo.
1099+
1100Default is true.
1101
Luca Milanesiof2a275b2017-04-10 10:59:34 +01001102[[change.showAssigneeInChangesTable]]change.showAssigneeInChangesTable::
Gustaf Lundh661d30a2016-09-19 14:41:29 +02001103+
Luca Milanesio50057ff2017-04-06 09:59:11 +01001104Show assignee field in changes table. If set to false, assignees will
1105not be visible in changes table.
Gustaf Lundh661d30a2016-09-19 14:41:29 +02001106+
Luca Milanesio50057ff2017-04-06 09:59:11 +01001107Default is false.
Gustaf Lundh661d30a2016-09-19 14:41:29 +02001108
David Ostrovsky9933eb32014-05-20 16:08:20 +02001109[[change.submitLabel]]change.submitLabel::
1110+
1111Label name for the submit button.
1112+
1113Default is "Submit".
1114
Stefan Beller7c380d512015-08-21 10:55:21 -07001115[[change.submitLabelWithParents]]change.submitLabelWithParents::
1116+
1117Label name for the submit button if the change has parents which will
1118be submitted together with this change.
1119+
1120Default is "Submit including parents".
1121
David Ostrovsky9933eb32014-05-20 16:08:20 +02001122[[change.submitTooltip]]change.submitTooltip::
1123+
1124Tooltip for the submit button. Variables available for replacement
1125include `${patchSet}` for the current patch set number (1, 2, 3),
1126`${branch}` for the branch name ("master") and `${commit}` for the
1127abbreviated commit SHA-1 (`c9c0edb`).
1128+
1129Default is "Submit patch set ${patchSet} into ${branch}".
1130
Stefan Beller0e655542015-07-20 21:14:38 -07001131[[change.submitTooltipAncestors]]change.submitTooltipAncestors::
1132+
1133Tooltip for the submit button if there are ancestors which would
1134also be submitted by submitting the change. Additionally to the variables
1135as in link:#change.submitTooltip[change.submitTooltip], there is the
1136variable `${submitSize}` indicating the number of changes which are
1137submitted.
1138+
1139Default is "Submit all ${topicSize} changes of the same topic (${submitSize}
1140changes including ancestors and other changes related by topic)".
1141
David Pursehouse2ecd0302016-04-07 19:12:00 +09001142[[change.submitWholeTopic]]change.submitWholeTopic::
Stefan Bellera038cf72015-01-13 16:25:10 -08001143+
1144Determines if the submit button submits the whole topic instead of
1145just the current change.
1146+
1147Default is false.
1148
1149[[change.submitTopicLabel]]change.submitTopicLabel::
1150+
1151If `change.submitWholeTopic` is set and a change has a topic,
1152the label name for the submit button is given here instead of
1153the configuration `change.submitLabel`.
1154+
1155Defaults to "Submit whole topic"
1156
1157[[change.submitTopicTooltip]]change.submitTopicTooltip::
1158+
David Pursehousea61ee502016-09-06 16:27:09 +09001159If `change.submitWholeTopic` is configured to true and a change has a
Stefan Bellera038cf72015-01-13 16:25:10 -08001160topic, this configuration determines the tooltip for the submit button
1161instead of `change.submitTooltip`. The variable `${topicSize}` is available
Stefan Beller7c380d512015-08-21 10:55:21 -07001162for the number of changes in the same topic to be submitted. The number of
1163all changes to be submitted is in the variable `${submitSize}`.
Stefan Bellera038cf72015-01-13 16:25:10 -08001164+
Stefan Beller7c380d512015-08-21 10:55:21 -07001165Defaults to "Submit all ${topicSize} changes of the same topic
1166(${submitSize} changes including ancestors and other
1167changes related by topic)".
Stefan Bellera038cf72015-01-13 16:25:10 -08001168
Richard Möhne4abe9a2014-11-13 20:05:13 +01001169[[change.replyLabel]]change.replyLabel::
1170+
1171Label name for the reply button. In the user interface an ellipsis (…)
1172is appended.
1173+
1174Default is "Reply". In the user interface it becomes "Reply…".
1175
1176[[change.replyTooltip]]change.replyTooltip::
1177+
1178Tooltip for the reply button. In the user interface a note about the
1179keyboard shortcut is appended.
1180+
1181Default is "Reply and score". In the user interface it becomes "Reply
1182and score (Shortcut: a)".
1183
Alice Kober-Sotzek5ccf7072017-03-21 14:19:54 +01001184[[change.robotCommentSizeLimit]]change.robotCommentSizeLimit::
1185+
1186Maximum allowed size of a robot comment that will be accepted. Robot comments
1187which exceed the indicated size will be rejected on addition. The specified
1188value is interpreted as the maximum size in bytes of the JSON representation of
1189the robot comment. Common unit suffixes of 'k', 'm', or 'g' are supported.
1190Zero or negative values allow robot comments of unlimited size.
1191+
1192The default limit is 1024kB.
1193
Edwin Kempine326a1d2015-06-03 10:27:39 +02001194[[changeCleanup]]
1195=== Section changeCleanup
1196
1197This section allows to configure change cleanups and schedules them to
1198run periodically.
1199
1200[[changeCleanup.abandonAfter]]changeCleanup.abandonAfter::
1201+
1202Period of inactivity after which open changes should be abandoned
1203automatically.
1204+
1205By default `0`, never abandon open changes.
1206+
1207[WARNING] Auto-Abandoning changes may confuse/annoy users. When
1208enabling this, make sure to choose a reasonably large grace period and
1209inform users in advance.
1210+
1211The following suffixes are supported to define the time unit:
1212+
1213* `d, day, days`
1214* `w, week, weeks` (`1 week` is treated as `7 days`)
1215* `mon, month, months` (`1 month` is treated as `30 days`)
1216* `y, year, years` (`1 year` is treated as `365 days`)
1217
Edwin Kempin7080ef12015-06-10 15:03:09 +02001218[[changeCleanup.abandonIfMergeable]]changeCleanup.abandonIfMergeable::
1219+
1220Whether changes which are mergeable should be auto-abandoned.
1221+
1222By default `true`.
1223
Edwin Kempine326a1d2015-06-03 10:27:39 +02001224[[changeCleanup.abandonMessage]]changeCleanup.abandonMessage::
1225+
1226Change message that should be posted when a change is abandoned.
1227+
1228'${URL}' can be used as a placeholder for the Gerrit web URL.
1229+
1230By default "Auto-Abandoned due to inactivity, see
1231${URL}Documentation/user-change-cleanup.html#auto-abandon\n\n
1232If this change is still wanted it should be restored.".
1233
1234[[changeCleanup.startTime]]changeCleanup.startTime::
1235+
1236Start time to define the first execution of the change cleanups.
1237If the configured `'changeCleanup.interval'` is shorter than
1238`'changeCleanup.startTime - now'` the start time will be preponed by
1239the maximum integral multiple of `'changeCleanup.interval'` so that the
1240start time is still in the future.
1241+
1242----
1243<day of week> <hours>:<minutes>
1244or
1245<hours>:<minutes>
1246
1247<day of week> : Mon, Tue, Wed, Thu, Fri, Sat, Sun
1248<hours> : 00-23
1249<minutes> : 0-59
1250----
1251
1252
1253[[changeCleanup.interval]]changeCleanup.interval::
1254+
1255Interval for periodic repetition of triggering the change cleanups.
1256The interval must be larger than zero. The following suffixes are supported
1257to define the time unit for the interval:
1258+
1259* `s, sec, second, seconds`
1260* `m, min, minute, minutes`
1261* `h, hr, hour, hours`
1262* `d, day, days`
1263* `w, week, weeks` (`1 week` is treated as `7 days`)
1264* `mon, month, months` (`1 month` is treated as `30 days`)
1265* `y, year, years` (`1 year` is treated as `365 days`)
1266
1267link:#schedule-examples[Schedule examples] can be found in the
1268link:#gc[gc] section.
1269
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08001270[[changeMerge]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001271=== Section changeMerge
carloseduardo.baldacin14246de2011-07-14 17:52:22 -03001272
Edwin Kempin42d27432013-11-24 17:06:24 +01001273[[changeMerge.checkFrequency]]changeMerge.checkFrequency::
Dave Borowitz204669c2012-10-11 11:06:08 -07001274+
1275How often the database should be rescanned for changes that have been
1276submitted but not merged due to transient errors. Values can be
1277specified using standard time unit abbreviations ('ms', 'sec', 'min',
1278etc.). Set to 0 to disable periodic rescanning, only scanning once on
1279master node startup.
1280+
1281Default is 300 seconds (5 minutes).
1282
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08001283[[commentlink]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001284=== Section commentlink
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08001285
Brad Larson991a31b2009-11-03 14:30:26 -06001286Comment links are find/replace strings applied to change descriptions,
Chris Harris63c7cdd2012-11-23 12:17:36 -05001287patch comments, in-line code comments and approval category value descriptions
1288to turn set strings into hyperlinks. One common use is for linking to
1289bug-tracking systems.
Brad Larson991a31b2009-11-03 14:30:26 -06001290
1291In the following example configuration the 'changeid' comment link
Shawn O. Pearceda866ae2009-12-16 15:46:03 -08001292will match typical Gerrit Change-Id values and create a hyperlink
1293to changes which reference it. The second configuration 'bugzilla'
1294will hyperlink terms such as 'bug 42' to an external bug tracker,
1295supplying the argument record number '42' for display. The third
David Pursehouse221d4f62012-06-08 17:38:08 +09001296configuration 'tracker' uses raw HTML to more precisely control
Shawn O. Pearceda866ae2009-12-16 15:46:03 -08001297how the replacement is displayed to the user.
Brad Larson991a31b2009-11-03 14:30:26 -06001298
Shawn O. Pearceda866ae2009-12-16 15:46:03 -08001299----
1300[commentlink "changeid"]
1301 match = (I[0-9a-f]{8,40})
David Pursehouse9f68e1a2016-01-28 09:21:03 +00001302 link = "#/q/$1"
Brad Larson991a31b2009-11-03 14:30:26 -06001303
Shawn O. Pearceda866ae2009-12-16 15:46:03 -08001304[commentlink "bugzilla"]
Shawn O. Pearcec99630a2010-02-21 19:11:56 -08001305 match = "(bug\\s+#?)(\\d+)"
Shawn O. Pearceda866ae2009-12-16 15:46:03 -08001306 link = http://bugs.example.com/show_bug.cgi?id=$2
Brad Larson991a31b2009-11-03 14:30:26 -06001307
Shawn O. Pearceda866ae2009-12-16 15:46:03 -08001308[commentlink "tracker"]
1309 match = ([Bb]ug:\\s+)(\\d+)
1310 html = $1<a href=\"http://trak.example.com/$2\">$2</a>
1311----
1312
Dave Borowitz13b38002013-04-08 12:03:29 -07001313Comment links can also be specified in `project.config` and sections in
1314children override those in parents. The only restriction is that to
1315avoid injecting arbitrary user-supplied HTML in the page, comment links
1316defined in `project.config` may only supply `link`, not `html`.
1317
Shawn O. Pearceda866ae2009-12-16 15:46:03 -08001318[[commentlink.name.match]]commentlink.<name>.match::
Brad Larson991a31b2009-11-03 14:30:26 -06001319+
Shawn O. Pearceda866ae2009-12-16 15:46:03 -08001320A JavaScript regular expression to match positions to be replaced
1321with a hyperlink. Subexpressions of the matched string can be
1322stored using groups and accessed with `$'n'` syntax, where 'n'
1323is the group number, starting from 1.
Brad Larson991a31b2009-11-03 14:30:26 -06001324+
Shawn O. Pearcec99630a2010-02-21 19:11:56 -08001325The configuration file parser eats one level of backslashes, so the
1326character class `\s` requires `\\s` in the configuration file. The
1327parser also terminates the line at the first `#`, so a match
1328expression containing # must be wrapped in double quotes.
Shawn O. Pearceda866ae2009-12-16 15:46:03 -08001329+
Shawn O. Pearce665beaa2010-02-21 22:41:03 -08001330To match case insensitive strings, a character class with both the
1331upper and lower case character for each position must be used. For
1332example, to match the string `bug` in a case insensitive way the match
1333pattern `[bB][uU][gG]` needs to be used.
1334+
Matthew Webbercd7d2bf2015-10-14 15:54:06 +01001335The regular expression pattern is applied to the HTML form of the message
1336in question, which means it needs to assume the data has been escaped.
1337So `"` needs to be matched as `&amp;quot;`, `<` as `&amp;lt;`, and `'` as
1338`&amp;#39;`.
1339+
Shawn O. Pearceda866ae2009-12-16 15:46:03 -08001340A common pattern to match is `bug\\s+(\\d+)`.
Brad Larson991a31b2009-11-03 14:30:26 -06001341
Shawn O. Pearceda866ae2009-12-16 15:46:03 -08001342[[commentlink.name.link]]commentlink.<name>.link::
Brad Larson991a31b2009-11-03 14:30:26 -06001343+
Shawn O. Pearceda866ae2009-12-16 15:46:03 -08001344The URL to direct the user to whenever the regular expression is
1345matched. Groups in the match expression may be accessed as `$'n'`.
1346+
1347The link property is used only when the html property is not present.
1348
1349[[commentlink.name.html]]commentlink.<name>.html::
1350+
1351HTML to replace the entire matched string with. If present,
1352this property overrides the link property above. Groups in the
1353match expression may be accessed as `$'n'`.
1354+
1355The configuration file eats double quotes, so escaping them as
1356`\"` is necessary to protect them from the parser.
Brad Larson991a31b2009-11-03 14:30:26 -06001357
Dave Borowitz82d79c02013-04-08 15:45:12 -07001358[[commentlink.name.enabled]]commentlink.<name>.enabled::
1359+
1360Whether the comment link is enabled. A child project may override a
1361section in a parent or the site-wide config that is disabled by
1362specifying `enabled = true`.
1363+
1364Disabling sections in `gerrit.config` can be used by site administrators
1365to create a library of comment links with `html` set that are not
1366user-supplied and thus can be verified to be XSS-free, but are only
1367enabled for a subset of projects.
1368+
David Pursehouse6f1af472013-12-11 19:23:33 +09001369By default, true.
1370+
Dave Borowitz82d79c02013-04-08 15:45:12 -07001371Note that the names and contents of disabled sections are visible even
1372to anonymous users via the
1373link:rest-api-projects.html#get-config[REST API].
1374
Brad Larson991a31b2009-11-03 14:30:26 -06001375
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08001376[[container]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001377=== Section container
Shawn O. Pearcee24c71fb2009-12-07 20:32:40 -08001378
1379These settings are applied only if Gerrit is started as the container
1380process through Gerrit's 'gerrit.sh' rc.d compatible wrapper script.
1381
1382[[container.heapLimit]]container.heapLimit::
1383+
1384Maximum heap size of the Java process running Gerrit, in bytes.
1385This property is translated into the '-Xmx' flag for the JVM.
1386+
1387Default is platform and JVM specific.
1388+
1389Common unit suffixes of 'k', 'm', or 'g' are supported.
1390
1391[[container.javaHome]]container.javaHome::
1392+
1393Path of the JRE/JDK installation to run Gerrit with. If not set, the
1394Gerrit startup script will attempt to search your system and guess
1395a suitable JRE. Overrides the environment variable 'JAVA_HOME'.
1396
1397[[container.javaOptions]]container.javaOptions::
1398+
1399Additional options to pass along to the Java runtime. If multiple
1400values are configured, they are passed in order on the command line,
1401separated by spaces. These options are appended onto 'JAVA_OPTIONS'.
1402
David Ostrovskyc772bd82013-10-03 10:37:51 +02001403For example, it is possible to overwrite Gerrit's default log4j
1404configuration:
1405
1406----
1407 javaOptions = -Dlog4j.configuration=file:///home/gerrit/site/etc/log4j.properties
1408----
1409
Hugo Arès6710f0a2014-11-04 10:28:42 -05001410[[container.daemonOpt]]container.daemonOpt::
1411+
1412Additional options to pass to the daemon (e.g. '--enable-httpd'). If
1413multiple values are configured, they are passed in that order to the command
1414line, separated by spaces.
1415+
1416Execute `java -jar gerrit.war daemon --help` to see all possible
1417options.
1418
Fredrik Luthanderb8f7d6d2010-05-18 21:11:22 +02001419[[container.slave]]container.slave::
1420+
1421Used on Gerrit slave installations. If set to true the Gerrit JVM is
1422called with the '--slave' switch, enabling slave mode. If no value is
Matt Baker8ce12fc2013-11-26 21:43:12 -07001423set (or any other value), Gerrit defaults to master mode.
Fredrik Luthanderb8f7d6d2010-05-18 21:11:22 +02001424
Khai Do6168beb2016-12-19 17:26:28 -08001425[[container.startupTimeout]]container.startupTimeout::
1426+
1427The maximum time (in seconds) to wait for a gerrit.sh start command
1428to run a new Gerrit daemon successfully. If not set, defaults to
142990 seconds.
1430
Shawn O. Pearcee24c71fb2009-12-07 20:32:40 -08001431[[container.user]]container.user::
1432+
1433Login name (or UID) of the operating system user the Gerrit JVM
1434will execute as. If not set, defaults to the user who launched
1435the 'gerrit.sh' wrapper script.
1436
1437[[container.war]]container.war::
1438+
1439Path of the JAR file to start daemon execution with. This should
1440be the path of the local 'gerrit.war' archive. Overrides the
1441environment variable 'GERRIT_WAR'.
1442+
1443If not set, defaults to '$site_path/bin/gerrit.war', or to
1444'$HOME/gerrit.war'.
1445
1446
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08001447[[core]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001448=== Section core
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -07001449
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001450[[core.packedGitWindowSize]]core.packedGitWindowSize::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -07001451+
1452Number of bytes of a pack file to load into memory in a single
1453read operation. This is the "page size" of the JGit buffer cache,
1454used for all pack access operations. All disk IO occurs as single
1455window reads. Setting this too large may cause the process to load
1456more data than is required; setting this too small may increase
1457the frequency of `read()` system calls.
1458+
1459Default on JGit is 8 KiB on all platforms.
1460+
1461Common unit suffixes of 'k', 'm', or 'g' are supported.
1462
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001463[[core.packedGitLimit]]core.packedGitLimit::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -07001464+
1465Maximum number of bytes to load and cache in memory from pack files.
1466If JGit needs to access more than this many bytes it will unload less
1467frequently used windows to reclaim memory space within the process.
1468As this buffer must be shared with the rest of the JVM heap, it
1469should be a fraction of the total memory available.
1470+
1471Default on JGit is 10 MiB on all platforms.
1472+
1473Common unit suffixes of 'k', 'm', or 'g' are supported.
1474
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001475[[core.deltaBaseCaseLimit]]core.deltaBaseCacheLimit::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -07001476+
1477Maximum number of bytes to reserve for caching base objects
1478that multiple deltafied objects reference. By storing the entire
1479decompressed base object in a cache Git is able to avoid unpacking
1480and decompressing frequently used base objects multiple times.
1481+
1482Default on JGit is 10 MiB on all platforms. You probably do not
1483need to adjust this value.
1484+
1485Common unit suffixes of 'k', 'm', or 'g' are supported.
1486
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001487[[core.packedGitOpenFiles]]core.packedGitOpenFiles::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -07001488+
1489Maximum number of pack files to have open at once. A pack file
1490must be opened in order for any of its data to be available in
1491a cached window.
1492+
1493If you increase this to a larger setting you may need to also adjust
1494the ulimit on file descriptors for the host JVM, as Gerrit needs
1495additional file descriptors available for network sockets and other
1496repository data manipulation.
1497+
1498Default on JGit is 128 file descriptors on all platforms.
1499
Shawn O. Pearce329fe792010-09-03 15:44:23 -07001500[[core.streamFileThreshold]]core.streamFileThreshold::
1501+
1502Largest object size, in bytes, that JGit will allocate as a
1503contiguous byte array. Any file revision larger than this threshold
1504will have to be streamed, typically requiring the use of temporary
David Pursehouse92463562013-06-24 10:16:28 +09001505files under '$GIT_DIR/objects' to implement pseudo-random access
Shawn O. Pearce329fe792010-09-03 15:44:23 -07001506during delta decompression.
1507+
1508Servers with very high traffic should set this to be larger than
1509the size of their common big files. For example a server managing
1510the Android platform typically has to deal with ~10-12 MiB XML
1511files, so `15 m` would be a reasonable setting in that environment.
1512Setting this too high may cause the JVM to run out of heap space
1513when handling very big binary files, such as device firmware or
1514CD-ROM ISO images.
1515+
Edwin Kempin7f5a4af2014-11-12 10:05:03 +01001516Defaults to 25% of the available JVM heap, limited to 2048m.
Shawn O. Pearce329fe792010-09-03 15:44:23 -07001517+
1518Common unit suffixes of 'k', 'm', or 'g' are supported.
1519
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001520[[core.packedGitMmap]]core.packedGitMmap::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -07001521+
1522When true, JGit will use `mmap()` rather than `malloc()+read()`
1523to load data from pack files. The use of mmap can be problematic
1524on some JVMs as the garbage collector must deduce that a memory
1525mapped segment is no longer in use before a call to `munmap()`
1526can be made by the JVM native code.
1527+
1528In server applications (such as Gerrit) that need to access many
David Pursehouse92463562013-06-24 10:16:28 +09001529pack files, setting this to true risks artificially running out
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -07001530of virtual address space, as the garbage collector cannot reclaim
1531unused mapped spaces fast enough.
1532+
1533Default on JGit is false. Although potentially slower, it yields
1534much more predictable behavior.
1535
Sasa Zivkovf69aeb12012-06-11 14:05:14 +02001536[[core.asyncLoggingBufferSize]]core.asyncLoggingBufferSize::
1537+
1538Size of the buffer to store logging events for asynchronous logging.
1539Putting a larger value can protect threads from stalling when the
1540AsyncAppender threads are not fast enough to consume the logging events
David Pursehouse1ff91c02015-05-19 15:05:26 +09001541from the buffer. It also protects from losing log entries in this case.
Sasa Zivkovf69aeb12012-06-11 14:05:14 +02001542+
1543Default is 64 entries.
1544
Dave Borowitz1bec65a2013-03-13 10:59:01 -07001545[[core.useRecursiveMerge]]core.useRecursiveMerge::
1546+
Edwin Kempin71831d22014-07-15 08:54:29 +02001547Use JGit's recursive merger for three-way merges. This only affects
Sebastian Schuberth774aac92015-04-16 13:21:04 +02001548projects that allow content merges.
Edwin Kempin71831d22014-07-15 08:54:29 +02001549+
1550As explained in this
1551link:http://codicesoftware.blogspot.com/2011/09/merge-recursive-strategy.html[
1552blog], the recursive merge produces better results if the two commits
1553that are merged have more than one common predecessor.
Dave Borowitz1bec65a2013-03-13 10:59:01 -07001554+
Edwin Kempin7853c5b2014-07-15 08:57:17 +02001555Default is true.
Dave Borowitz1bec65a2013-03-13 10:59:01 -07001556
Hugo Arès47344372016-06-27 10:23:17 -04001557[[core.repositoryCacheCleanupDelay]]core.repositoryCacheCleanupDelay::
1558+
1559Delay between each periodic cleanup of expired repositories.
1560+
1561Values can be specified using standard time unit abbreviations (`ms`, `sec`,
1562`min`, etc.).
1563+
1564Set it to 0 in order to switch off cache expiration. If cache expiration is
1565switched off, the JVM can still evict cache entries when it is running low
1566on available heap memory.
1567+
1568Set it to -1 to automatically derive cleanup delay from
1569`core.repositoryCacheExpireAfter` (lowest value between 1/10 of
1570`core.repositoryCacheExpireAfter` and 10 minutes).
1571+
1572Default is -1.
1573
1574[[core.repositoryCacheExpireAfter]]core.repositoryCacheExpireAfter::
1575+
1576Time an unused repository should expire and be evicted from the repository
1577cache.
1578+
1579Values can be specified using standard time unit abbreviations (`ms`, `sec`,
1580`min`, etc.).
1581+
1582Default is 1 hour.
1583
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08001584[[database]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001585=== Section database
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001586
1587The database section configures where Gerrit stores its metadata
1588records about user accounts and change reviews.
1589
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001590----
1591[database]
Shawn O. Pearce1be39062009-12-19 14:11:52 -08001592 type = POSTGRESQL
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001593 hostname = localhost
1594 database = reviewdb
David Pursehouse64df83a2017-07-04 21:20:47 +09001595 username = gerrit
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001596 password = s3kr3t
1597----
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001598
1599[[database.type]]database.type::
1600+
1601Type of database server to connect to. If set this value will be
1602used to automatically create correct database.driver and database.url
1603values to open the connection.
1604+
David Pursehouse227e4032016-02-26 15:47:14 +09001605* `DB2`
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001606+
David Pursehouse227e4032016-02-26 15:47:14 +09001607Connect to a DB2 database server.
1608+
1609* `DERBY`
1610+
1611Connect to an Apache Derby database server.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001612+
1613* `H2`
1614+
Shawn O. Pearce1be39062009-12-19 14:11:52 -08001615Connect to a local embedded H2 database.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001616+
David Pursehouse4f859e72016-02-26 15:44:38 +09001617* `JDBC`
1618+
1619Connect using a JDBC driver class name and URL.
1620+
David Pursehouse227e4032016-02-26 15:47:14 +09001621* `MAXDB`
1622+
David Pursehouse9166dd12016-11-15 16:02:02 -08001623Connect to an SAP MaxDB database server.
David Pursehouse227e4032016-02-26 15:47:14 +09001624+
Shawn O. Pearce1be39062009-12-19 14:11:52 -08001625* `MYSQL`
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001626+
1627Connect to a MySQL database server.
Shawn O. Pearce1be39062009-12-19 14:11:52 -08001628+
Paladox nonefd9f2e12017-01-26 21:01:15 +00001629* `MARIADB`
1630+
1631Connect to a MariaDB database server.
1632+
David Pursehouse227e4032016-02-26 15:47:14 +09001633* `ORACLE`
Shawn O. Pearce1be39062009-12-19 14:11:52 -08001634+
David Pursehouse227e4032016-02-26 15:47:14 +09001635Connect to an Oracle database server.
1636+
David Pursehouse4f859e72016-02-26 15:44:38 +09001637* `POSTGRESQL`
Shawn O. Pearce1be39062009-12-19 14:11:52 -08001638+
David Pursehouse4f859e72016-02-26 15:44:38 +09001639Connect to a PostgreSQL database server.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001640
1641+
1642If not specified, database.driver and database.url are used as-is,
1643and if they are also not specified, defaults to H2.
1644
1645[[database.hostname]]database.hostname::
1646+
1647Hostname of the database server. Defaults to 'localhost'.
1648
1649[[database.port]]database.port::
1650+
1651Port number of the database server. Defaults to the default port
1652of the server named by database.type.
1653
1654[[database.database]]database.database::
1655+
Shawn O. Pearce1be39062009-12-19 14:11:52 -08001656For POSTGRESQL or MYSQL, the name of the database on the server.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001657+
1658For H2, this is the path to the database, and if not absolute is
Shawn O. Pearce1be39062009-12-19 14:11:52 -08001659relative to `'$site_path'`.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001660
1661[[database.username]]database.username::
1662+
1663Username to connect to the database server as.
1664
1665[[database.password]]database.password::
1666+
1667Password to authenticate to the database server with.
1668
1669[[database.driver]]database.driver::
1670+
Shawn O. Pearce1be39062009-12-19 14:11:52 -08001671Name of the JDBC driver class to connect to the database with.
1672Setting this usually isn't necessary as it can be derived from
1673database.type or database.url for any supported database.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001674
1675[[database.url]]database.url::
1676+
Shawn O. Pearce1be39062009-12-19 14:11:52 -08001677'jdbc:' URL for the database. Setting this variable usually
1678isn't necessary as it can be constructed from the all of the
1679above properties.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001680
Christian Aistleitner851072a2013-05-05 15:04:09 +02001681[[database.connectionPool]]database.connectionPool::
1682+
1683If true, use connection pooling for database connections. Otherwise, a
1684new database connection is opened for each request.
1685+
1686Default is false for MySQL, and true for other database backends.
1687
Shawn O. Pearce07f35177d2010-02-23 09:47:10 -08001688[[database.poolLimit]]database.poolLimit::
1689+
1690Maximum number of open database connections. If the server needs
1691more than this number, request processing threads will wait up
1692to <<database.poolMaxWait, poolMaxWait>> seconds for a
1693connection to be released before they abort with an exception.
1694This limit must be several units higher than the total number of
1695httpd and sshd threads as some request processing code paths may
1696need multiple connections.
1697+
Dariusz Luksza2ebfc282015-11-09 20:25:25 +01001698Default is <<sshd.threads, sshd.threads>>
1699 + <<httpd.maxThreads, httpd.maxThreads>> + 2.
Christian Aistleitner851072a2013-05-05 15:04:09 +02001700+
1701This setting only applies if
1702<<database.connectionPool,database.connectionPool>> is true.
Shawn O. Pearce07f35177d2010-02-23 09:47:10 -08001703
Shawn O. Pearcef458bf62010-02-25 09:03:03 -08001704[[database.poolMinIdle]]database.poolMinIdle::
Shawn O. Pearce07f35177d2010-02-23 09:47:10 -08001705+
1706Minimum number of connections to keep idle in the pool.
1707Default is 4.
Christian Aistleitner851072a2013-05-05 15:04:09 +02001708+
1709This setting only applies if
1710<<database.connectionPool,database.connectionPool>> is true.
Shawn O. Pearce07f35177d2010-02-23 09:47:10 -08001711
Shawn O. Pearcef458bf62010-02-25 09:03:03 -08001712[[database.poolMaxIdle]]database.poolMaxIdle::
Shawn O. Pearce07f35177d2010-02-23 09:47:10 -08001713+
1714Maximum number of connections to keep idle in the pool. If there
1715are more idle connections, connections will be closed instead of
1716being returned back to the pool.
Dariusz Luksza30d70ae2015-11-09 22:19:59 +01001717Default is min(<<database.poolLimit, database.poolLimit>>, 16).
Christian Aistleitner851072a2013-05-05 15:04:09 +02001718+
1719This setting only applies if
1720<<database.connectionPool,database.connectionPool>> is true.
Shawn O. Pearce07f35177d2010-02-23 09:47:10 -08001721
1722[[database.poolMaxWait]]database.poolMaxWait::
1723+
1724Maximum amount of time a request processing thread will wait to
1725acquire a database connection from the pool. If no connection is
1726released within this time period, the processing thread will abort
1727its current operations and return an error to the client.
1728Values should use common unit suffixes to express their setting:
1729+
1730* ms, milliseconds
1731* s, sec, second, seconds
1732* m, min, minute, minutes
1733* h, hr, hour, hours
1734
1735+
Edwin Kempina09ebcf2015-04-16 14:53:23 +02001736--
Shawn O. Pearce07f35177d2010-02-23 09:47:10 -08001737If a unit suffix is not specified, `milliseconds` is assumed.
Edwin Kempina09ebcf2015-04-16 14:53:23 +02001738
Shawn O. Pearce07f35177d2010-02-23 09:47:10 -08001739Default is `30 seconds`.
Edwin Kempina09ebcf2015-04-16 14:53:23 +02001740
Christian Aistleitner851072a2013-05-05 15:04:09 +02001741This setting only applies if
1742<<database.connectionPool,database.connectionPool>> is true.
Edwin Kempina09ebcf2015-04-16 14:53:23 +02001743--
Shawn O. Pearce07f35177d2010-02-23 09:47:10 -08001744
David Ostrovsky38a6f6c2014-01-11 13:56:09 +01001745[[database.dataSourceInterceptorClass]]database.dataSourceInterceptorClass::
1746
1747Class that implements DataSourceInterceptor interface to monitor SQL activity.
1748This class must have default constructor and be available on Gerrit's bootstrap
1749classpath, e. g. in `$gerrit_site/lib` directory. Example implementation of
1750SQL monitoring can be found in javamelody-plugin.
1751
Björn Pedersen64af3ad2016-05-20 10:21:07 +02001752[[database.h2]]database.h2::
1753+
1754The settings in this section are used for the reviewdb if the
1755<<database.type,database.type>> is H2.
1756+
1757Additionally gerrit uses H2 for storing reviewed flags on changes.
1758
1759[[database.h2.cacheSize]]database.h2.cacheSize::
1760+
1761The size of the H2 internal database cache, in bytes. The H2 internal cache for
1762persistent H2-backed caches is controlled by
1763<<cache.h2CacheSize,cache.h2CacheSize>>.
1764+
1765H2 uses memory to cache its database content. The parameter `cacheSize`
1766allows to limit the memory used by H2 and thus prevent out-of-memory
1767caused by the H2 database using too much memory.
1768+
1769Technically the H2 cache size is configured using the CACHE_SIZE parameter in
1770the H2 JDBC connection URL, as described
1771link:http://www.h2database.com/html/features.html#cache_settings[here]
1772+
1773Default is unset, using up to half of the available memory.
David Pursehousee6976dc2017-06-30 16:33:44 +09001774+
Björn Pedersen64af3ad2016-05-20 10:21:07 +02001775H2 will persist this value in the database, so to unset explicitly specify 0.
1776+
1777Common unit suffixes of 'k', 'm', or 'g' are supported.
1778
1779[[database.h2.autoServer]]database.h2.autoServer::
1780+
1781If `true` enable the automatic mixed mode
1782(see link:http://www.h2database.com/html/features.html#auto_mixed_mode[Automatic Mixed Mode]).
1783This enables concurrent access to the embedded H2 database from command line
Dave Borowitzfd6ddff2017-06-16 15:02:26 -04001784utils (e.g. MigrateToNoteDb).
Björn Pedersen64af3ad2016-05-20 10:21:07 +02001785+
1786Default is `false`.
1787
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08001788[[download]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001789=== Section download
monica.dionisio3f630442010-06-29 15:42:57 -03001790
1791----
1792[download]
Edwin Kempin08b03a22012-09-14 16:32:57 +02001793 command = checkout
1794 command = cherry_pick
1795 command = pull
1796 command = format_patch
monica.dionisio3f630442010-06-29 15:42:57 -03001797 scheme = ssh
1798 scheme = http
1799 scheme = anon_http
1800 scheme = anon_git
1801 scheme = repo_download
1802----
1803
1804The download section configures the allowed download methods.
1805
Edwin Kempin08b03a22012-09-14 16:32:57 +02001806[[download.command]]download.command::
1807+
1808Commands that should be offered to download changes.
1809+
1810Multiple commands are supported:
1811+
1812* `checkout`
1813+
1814Command to fetch and checkout the patch set.
1815+
1816* `cherry_pick`
1817+
1818Command to fetch the patch set and to cherry-pick it onto the current
1819commit.
1820+
1821* `pull`
1822+
1823Command to pull the patch set.
1824+
1825* `format_patch`
1826+
1827Command to fetch the patch set and to feed it into the `format-patch`
1828command.
1829
1830+
1831If `download.command` is not specified, all download commands are
1832offered.
1833
monica.dionisio3f630442010-06-29 15:42:57 -03001834[[download.scheme]]download.scheme::
1835+
1836Schemes that should be used to download changes.
1837+
1838Multiple schemes are supported:
1839+
1840* `http`
1841+
Shawn O. Pearce5c46a072010-08-23 08:33:32 -07001842Authenticated HTTP download is allowed.
monica.dionisio3f630442010-06-29 15:42:57 -03001843+
1844* `ssh`
1845+
Shawn O. Pearce5c46a072010-08-23 08:33:32 -07001846Authenticated SSH download is allowed.
monica.dionisio3f630442010-06-29 15:42:57 -03001847+
1848* `anon_http`
1849+
1850Anonymous HTTP download is allowed.
1851+
1852* `anon_git`
1853+
Shawn O. Pearce5c46a072010-08-23 08:33:32 -07001854Anonymous Git download is allowed. This is not default, it is also
1855necessary to set <<gerrit.canonicalGitUrl,gerrit.canonicalGitUrl>>
1856variable.
monica.dionisio3f630442010-06-29 15:42:57 -03001857+
1858* `repo_download`
1859+
Shawn O. Pearce5c46a072010-08-23 08:33:32 -07001860Gerrit advertises patch set downloads with the `repo download`
1861command, assuming that all projects managed by this instance are
1862generally worked on with the repo multi-repository tool. This is
1863not default, as not all instances will deploy repo.
monica.dionisio3f630442010-06-29 15:42:57 -03001864
1865+
Edwin Kempin08b03a22012-09-14 16:32:57 +02001866If `download.scheme` is not specified, SSH, HTTP and Anonymous HTTP
Shawn O. Pearce5c46a072010-08-23 08:33:32 -07001867downloads are allowed.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001868
Edwin Kempin322db672015-07-03 08:50:46 +02001869[[download.checkForHiddenChangeRefs]]download.checkForHiddenChangeRefs::
1870+
1871Whether the download commands should be adapted when the change refs
1872are hidden.
1873+
1874Git has a configuration option to hide refs from the initial
1875advertisement (`uploadpack.hideRefs`). This option can be used to hide
1876the change refs from the client. As consequence fetching changes by
1877change ref does not work anymore. However by setting
1878`uploadpack.allowTipSha1InWant` to `true` fetching changes by commit ID
1879is possible. If `download.checkForHiddenChangeRefs` is set to `true`
1880the git download commands use the commit ID instead of the change ref
1881when a project is configured like this.
1882+
1883Example git configuration on a project:
1884+
1885----
1886[uploadpack]
1887 hideRefs = refs/changes/
1888 hideRefs = refs/cache-automerge/
1889 allowTipSha1InWant = true
1890----
1891+
1892By default `false`.
1893
David Ostrovskyfc9cdf02014-03-26 14:46:45 -07001894[[download.archive]]download.archive::
1895+
1896Specifies which archive formats, if any, should be offered on the change
Francois Ferrand1e933882014-09-25 11:19:08 +02001897screen and supported for `git-upload-archive` operation:
David Ostrovskyfc9cdf02014-03-26 14:46:45 -07001898+
1899----
1900[download]
1901 archive = tar
1902 archive = tbz2
1903 archive = tgz
1904 archive = txz
Francois Ferrand1e933882014-09-25 11:19:08 +02001905 archive = zip
David Ostrovskyfc9cdf02014-03-26 14:46:45 -07001906----
1907
Shawn Pearce6edde312014-03-26 22:00:26 -07001908If `download.archive` is not specified defaults to all archive
1909commands. Set to `off` or empty string to disable.
David Ostrovskyfc9cdf02014-03-26 14:46:45 -07001910
Francois Ferrand1e933882014-09-25 11:19:08 +02001911Zip is not supported because it may be interpreted by a Java plugin as a
1912valid JAR file, whose code would have access to cookies on the domain.
1913For this reason `zip` format is always excluded from formats offered
1914through the `Download` drop down or accessible in the REST API.
1915
Stefan Bellere1b2ad32016-11-29 14:54:13 -08001916[[download.maxBundleSize]]download.maxBundleSize::
1917+
1918Specifies the maximum size of a bundle in bytes that can be downloaded.
1919As bundles are kept in memory this setting is to protect the server
1920from a single request consuming too much heap when generating
1921a bundle and thereby impacting other users.
1922+
1923Defaults to 100MB.
1924
Matthias Sohn0fb2c992014-06-03 01:42:59 +02001925[[gc]]
1926=== Section gc
1927
1928This section allows to configure the git garbage collection and schedules it
1929to run periodically. It will be triggered and executed sequentially for all
1930projects.
1931
Christian Halstricke6c68322015-03-11 15:21:42 +01001932[[gc.aggressive]]gc.aggressive::
1933+
1934Determines if scheduled garbage collections and garbage collections triggered
1935through Web-UI should run in aggressive mode or not. Aggressive garbage
1936collections are more expensive but may lead to significantly smaller
1937repositories.
1938+
1939Valid values are "true" and "false," default is "false".
1940
Matthias Sohn0fb2c992014-06-03 01:42:59 +02001941[[gc.startTime]]gc.startTime::
1942+
1943Start time to define the first execution of the git garbage collection.
1944If the configured `'gc.interval'` is shorter than `'gc.startTime - now'`
1945the start time will be preponed by the maximum integral multiple of
1946`'gc.interval'` so that the start time is still in the future.
1947+
1948----
1949<day of week> <hours>:<minutes>
1950or
1951<hours>:<minutes>
1952
1953<day of week> : Mon, Tue, Wed, Thu, Fri, Sat, Sun
1954<hours> : 00-23
1955<minutes> : 0-59
1956----
1957
1958
1959[[gc.interval]]gc.interval::
1960+
1961Interval for periodic repetition of triggering the git garbage collection.
1962The interval must be larger than zero. The following suffixes are supported
1963to define the time unit for the interval:
1964+
1965* `s, sec, second, seconds`
1966* `m, min, minute, minutes`
1967* `h, hr, hour, hours`
1968* `d, day, days`
1969* `w, week, weeks` (`1 week` is treated as `7 days`)
1970* `mon, month, months` (`1 month` is treated as `30 days`)
1971* `y, year, years` (`1 year` is treated as `365 days`)
1972
Edwin Kempine326a1d2015-06-03 10:27:39 +02001973[[schedule-examples]]
Matthias Sohn0fb2c992014-06-03 01:42:59 +02001974Examples::
1975+
1976----
1977gc.startTime = Fri 10:30
1978gc.interval = 2 day
1979----
1980+
1981Assuming the server is started on Mon 7:00 -> `'startTime - now = 4 days 3:30 hours'`.
1982This is larger than the interval hence prepone the start time
1983by the maximum integral multiple of the interval so that start
1984time is still in the future, i.e. prepone by 4 days. This yields
1985a start time of Mon 10:30, next executions are Wed 10:30, Fri 10:30
1986etc.
1987+
1988----
1989gc.startTime = 6:00
1990gc.interval = 1 day
1991----
1992+
1993Assuming the server is started on Mon 7:00 this yields the first run on next Tuesday
1994at 6:00 and a repetition interval of 1 day.
1995
1996
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08001997[[gerrit]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001998=== Section gerrit
Shawn O. Pearceeb7f8ce2009-06-01 09:57:15 -07001999
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002000[[gerrit.basePath]]gerrit.basePath::
Shawn O. Pearce9743d0b2009-06-01 10:10:06 -07002001+
2002Local filesystem directory holding all Git repositories that
2003Gerrit knows about and can process changes for. A project
2004entity in Gerrit maps to a local Git repository by creating
Edwin Kempincdb0e002011-09-08 14:23:30 +02002005the path string `"${basePath}/${project_name}.git"`.
Shawn O. Pearce9743d0b2009-06-01 10:10:06 -07002006+
2007If relative, the path is resolved relative to `'$site_path'`.
2008
Shawn O. Pearce897d9212011-06-16 16:59:59 -07002009[[gerrit.allProjects]]gerrit.allProjects::
2010+
2011Name of the permissions-only project defining global server
2012access controls and settings. These are inherited into every
2013other project managed by the running server. The name is
2014relative to `gerrit.basePath`.
2015+
2016Defaults to `All-Projects` if not set.
2017
Edwin Kempin2bf5edd2014-03-25 22:21:23 +01002018[[gerrit.allUsers]]gerrit.allUsers::
2019+
2020Name of the project in which meta data of all users is stored.
2021The name is relative to `gerrit.basePath`.
2022+
2023Defaults to `All-Users` if not set.
2024
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002025[[gerrit.canonicalWebUrl]]gerrit.canonicalWebUrl::
Shawn O. Pearceeb7f8ce2009-06-01 09:57:15 -07002026+
2027The default URL for Gerrit to be accessed through.
2028+
Sebastian Schuberth64037132016-07-28 13:40:16 +02002029Typically this would be set to something like "http://review.example.com/"
2030or "http://example.com:8080/gerrit/" so Gerrit can output links that point
Shawn O. Pearceeb7f8ce2009-06-01 09:57:15 -07002031back to itself.
2032+
2033Setting this is highly recommended, as its necessary for the upload
2034code invoked by "git push" or "repo upload" to output hyperlinks
2035to the newly uploaded changes.
2036
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002037[[gerrit.canonicalGitUrl]]gerrit.canonicalGitUrl::
Shawn O. Pearceeb7f8ce2009-06-01 09:57:15 -07002038+
2039Optional base URL for repositories available over the anonymous git
2040protocol. For example, set this to `git://mirror.example.com/base/`
2041to have Gerrit display patch set download URLs in the UI. Gerrit
2042automatically appends the project name onto the end of the URL.
2043+
2044By default unset, as the git daemon must be configured externally
2045by the system administrator, and might not even be running on the
2046same host as Gerrit.
2047
Dave Borowitza5d3fec2015-07-09 14:24:02 -07002048[[gerrit.docUrl]]gerrit.docUrl::
2049+
2050Optional base URL for documentation, under which one can find
2051"index.html", "rest-api.html", etc. Used as the base for the fixed set
2052of links in the "Documentation" tab. A slash is implicitly appended.
2053(For finer control over the top menu, consider writing a
2054link:dev-plugins.html#top-menu-extensions[plugin].)
2055+
2056If unset or empty, the documentation tab will only be shown if
2057`/Documentation/index.html` can be reached by the browser at app load
2058time.
2059
Dave Borowitza17a9842015-09-15 09:58:17 -04002060[[gerrit.editGpgKeys]]gerrit.editGpgKeys::
2061+
2062If enabled and server-side signed push validation is also
2063link:#receive.enableSignedPush[enabled], enable the
2064link:rest-api-accounts.html#list-gpg-keys[REST API endpoints] and web UI
2065for editing GPG keys. If disabled, GPG keys can only be added by
2066administrators with direct git access to All-Users.
2067+
2068Defaults to true.
2069
Dave Borowitz76ab1a12013-05-10 17:01:29 +01002070[[gerrit.installCommitMsgHookCommand]]gerrit.installCommitMsgHookCommand::
2071+
2072Optional command to install the `commit-msg` hook. Typically of the
2073form:
David Pursehouse05588e52015-01-07 14:25:11 +09002074+
Dave Borowitz76ab1a12013-05-10 17:01:29 +01002075----
2076fetch-cmd some://url/to/commit-msg .git/hooks/commit-msg ; chmod +x .git/hooks/commit-msg
2077----
2078+
2079By default unset; falls back to using scp from the canonical SSH host,
2080or curl from the canonical HTTP URL for the server. Only necessary if a
2081proxy or other server/network configuration prevents clients from
2082fetching from the default location.
2083
Shawn O. Pearce5d6de522011-10-07 18:00:16 -07002084[[gerrit.gitHttpUrl]]gerrit.gitHttpUrl::
2085+
2086Optional base URL for repositories available over the HTTP
2087protocol. For example, set this to `http://mirror.example.com/base/`
2088to have Gerrit display URLs from this server, rather than itself.
2089+
2090By default unset, as the HTTP daemon must be configured externally
2091by the system administrator, and might not even be running on the
2092same host as Gerrit.
2093
Luca Milanesio62cc3502016-11-15 10:22:38 -08002094[[gerrit.installModule]]gerrit.installModule::
2095+
2096Repeatable list of class name of additional Guice modules to load at
2097Gerrit startup and init phases.
2098Classes are resolved using the primary Gerrit class loader, hence the
2099class needs to be either declared in Gerrit or an additional JAR
2100located under the `/lib` directory.
2101+
2102By default unset.
2103+
2104Example:
2105----
2106[gerrit]
2107 installModule = com.googlesource.gerrit.libmodule.MyModule
2108 installModule = com.example.abc.OurSpecialSauceModule
2109----
2110
Shawn O. Pearceb8bea1b2012-08-16 17:18:58 -07002111[[gerrit.reportBugUrl]]gerrit.reportBugUrl::
2112+
David Pursehouse214ab862014-12-01 11:48:26 +09002113URL to direct users to when they need to report a bug.
2114+
2115By default unset, meaning no bug report URL will be displayed. Administrators
2116should set this to the URL of their issue tracker, if necessary.
Shawn O. Pearceb8bea1b2012-08-16 17:18:58 -07002117
David Pursehouse753ca332013-12-10 15:36:29 +09002118[[gerrit.reportBugText]]gerrit.reportBugText::
2119+
2120Text to be displayed in the link to the bug report URL.
2121+
David Pursehouse214ab862014-12-01 11:48:26 +09002122Only used when `gerrit.reportBugUrl` is set.
2123+
David Pursehouse753ca332013-12-10 15:36:29 +09002124Defaults to "Report Bug".
2125
Dariusz Luksza45ee73e2014-08-20 09:38:09 +02002126[[gerrit.disableReverseDnsLookup]]gerrit.disableReverseDnsLookup::
2127+
2128Disables reverse DNS lookup during computing ref log entry for identified user.
2129+
2130Defaults to false.
2131
David Pursehouse962e1182014-12-03 17:17:52 +09002132[[gerrit.secureStoreClass]]gerrit.secureStoreClass::
2133+
2134Use the secure store implementation from a specified class.
2135+
2136If specified, must be the fully qualified class name of a class that implements
2137the `com.google.gerrit.server.securestore.SecureStore` interface, and the jar
2138file containing the class must be placed in the `$site_path/lib` folder.
2139+
2140If not specified, the default no-op implementation is used.
2141
Dariusz Luksza7a046da2014-04-03 17:05:47 +02002142[[gerrit.canLoadInIFrame]]gerrit.canLoadInIFrame::
2143+
2144For security reasons Gerrit will always jump out of iframe.
2145Setting this option to true will prevent this behavior.
2146+
2147By default false.
2148
Wyatt Allen414659c2017-03-15 09:55:31 -07002149[[gerrit.cdnPath]]gerrit.cdnPath::
2150+
2151Path prefix for PolyGerrit's static resources if using a CDN.
2152
Luca Milanesio9e6bc942017-06-01 06:37:15 +01002153[[gerrit.ui]]gerrit.ui::
2154+
2155Default UI when the user does not request a different preference via argument
2156or cookie.
2157+
2158* `GWT` for the old-style Google Web Toolkit-based interface.
2159* `POLYGERRIT` for the new Polymer-based HTML5 Web interface.
2160+
2161A sanity check during startup is performed that the value of
2162gerrit.ui is an enabled UI.
2163+
2164Defaults to GWT (if GWT is enabled) or POLYGERRIT (if POLYGERRIT is
2165enabled and GWT is disabled)
2166
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08002167[[gitweb]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002168=== Section gitweb
Shawn O. Pearced7ba11f2009-06-01 09:35:41 -07002169
Shawn O. Pearce618dae22010-03-12 19:07:43 -08002170Gerrit can forward requests to either an internally managed gitweb
2171(which allows Gerrit to enforce some access controls), or to an
2172externally managed gitweb (where the web server manages access).
Shawn O. Pearced7ba11f2009-06-01 09:35:41 -07002173See also link:config-gitweb.html[Gitweb Integration].
2174
Shawn O. Pearce618dae22010-03-12 19:07:43 -08002175[[gitweb.cgi]]gitweb.cgi::
2176+
2177Path to the locally installed `gitweb.cgi` executable. This CGI will
2178be called by Gerrit Code Review when the URL `/gitweb` is accessed.
2179Project level access controls are enforced prior to calling the CGI.
2180+
David Pursehousea89dc982016-09-15 09:35:44 +02002181Defaults to `/usr/lib/cgi-bin/gitweb.cgi` if `gitweb.url` is not set.
Shawn O. Pearce618dae22010-03-12 19:07:43 -08002182
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002183[[gitweb.url]]gitweb.url::
Shawn O. Pearced7ba11f2009-06-01 09:35:41 -07002184+
2185Optional URL of an affiliated gitweb service. Defines the
2186web location where a `gitweb.cgi` is installed to browse
David Pursehousea89dc982016-09-15 09:35:44 +02002187`gerrit.basePath` and the repositories it contains.
Shawn O. Pearced7ba11f2009-06-01 09:35:41 -07002188+
2189Gerrit appends any necessary query arguments onto the end of this URL.
David Pursehousea89dc982016-09-15 09:35:44 +02002190For example, `?p=$project.git;h=$commit`.
Shawn O. Pearced7ba11f2009-06-01 09:35:41 -07002191
Shane Mc Cormack27868a42009-12-28 04:49:39 +00002192[[gitweb.type]]gitweb.type::
2193+
2194Optional type of affiliated gitweb service. This allows using
David Pursehousea66f7ff2016-09-05 21:11:10 +09002195alternatives to gitweb, such as cgit.
Shane Mc Cormack27868a42009-12-28 04:49:39 +00002196+
Shawn O. Pearce2b11da02011-09-06 16:18:12 -07002197Valid values are `gitweb`, `cgit`, `disabled` or `custom`.
David Pursehousea66f7ff2016-09-05 21:11:10 +09002198+
2199If not set, or set to `disabled`, there is no gitweb hyperlinking
2200support.
Shane Mc Cormack27868a42009-12-28 04:49:39 +00002201
Edwin Kempind86909c2012-03-26 10:36:29 +02002202[[gitweb.revision]]gitweb.revision::
Shane Mc Cormack27868a42009-12-28 04:49:39 +00002203+
2204Optional pattern to use for constructing the gitweb URL when pointing
David Pursehousea89dc982016-09-15 09:35:44 +02002205at a specific commit when `gitweb.type` is set to `custom`.
Shane Mc Cormack27868a42009-12-28 04:49:39 +00002206+
Edwin Kempincdb0e002011-09-08 14:23:30 +02002207Valid replacements are `${project}` for the project name in Gerrit
2208and `${commit}` for the SHA1 hash for the commit.
Shane Mc Cormack27868a42009-12-28 04:49:39 +00002209
Edwin Kempind86909c2012-03-26 10:36:29 +02002210[[gitweb.project]]gitweb.project::
Shane Mc Cormack27868a42009-12-28 04:49:39 +00002211+
2212Optional pattern to use for constructing the gitweb URL when pointing
David Pursehousea89dc982016-09-15 09:35:44 +02002213at a specific project when `gitweb.type` is set to `custom`.
Shane Mc Cormack27868a42009-12-28 04:49:39 +00002214+
Edwin Kempincdb0e002011-09-08 14:23:30 +02002215Valid replacements are `${project}` for the project name in Gerrit.
Shane Mc Cormack27868a42009-12-28 04:49:39 +00002216
Edwin Kempind86909c2012-03-26 10:36:29 +02002217[[gitweb.branch]]gitweb.branch::
Shane Mc Cormack27868a42009-12-28 04:49:39 +00002218+
2219Optional pattern to use for constructing the gitweb URL when pointing
David Pursehousea89dc982016-09-15 09:35:44 +02002220at a specific branch when `gitweb.type` is set to `custom`.
Shane Mc Cormack27868a42009-12-28 04:49:39 +00002221+
Edwin Kempincdb0e002011-09-08 14:23:30 +02002222Valid replacements are `${project}` for the project name in Gerrit
2223and `${branch}` for the name of the branch.
Shane Mc Cormack27868a42009-12-28 04:49:39 +00002224
Colby Ranger79d4ebe2013-12-16 14:19:18 -08002225[[gitweb.roottree]]gitweb.roottree::
2226+
2227Optional pattern to use for constructing the gitweb URL when pointing
David Pursehousea89dc982016-09-15 09:35:44 +02002228at the contents of the root tree in a specific commit when `gitweb.type`
2229is set to `custom`.
Colby Ranger79d4ebe2013-12-16 14:19:18 -08002230+
2231Valid replacements are `${project}` for the project name in Gerrit
2232and `${commit}` for the SHA1 hash for the commit.
2233
2234[[gitweb.file]]gitweb.file::
2235+
2236Optional pattern to use for constructing the gitweb URL when pointing
David Pursehousea89dc982016-09-15 09:35:44 +02002237at the contents of a file in a specific commit when `gitweb.type` is
2238set to `custom`.
Colby Ranger79d4ebe2013-12-16 14:19:18 -08002239+
2240Valid replacements are `${project}` for the project name in Gerrit,
2241`${file}` for the file name and `${commit}` for the SHA1 hash for
2242the commit.
2243
Edwin Kempin64011562012-03-26 10:50:12 +02002244[[gitweb.filehistory]]gitweb.filehistory::
2245+
2246Optional pattern to use for constructing the gitweb URL when pointing
David Pursehousea89dc982016-09-15 09:35:44 +02002247at the history of a file in a specific branch when when `gitweb.type`
2248is set to `custom`.
Edwin Kempin64011562012-03-26 10:50:12 +02002249+
2250Valid replacements are `${project}` for the project name in Gerrit,
2251`${file}` for the file name and `${branch}` for the name of the
2252branch.
2253
Gustaf Lundha07d2e72011-10-27 15:26:35 -07002254[[gitweb.linkname]]gitweb.linkname::
2255+
2256Optional setting for modifying the link name presented to the user
2257in the Gerrit web-UI.
2258+
David Pursehousea89dc982016-09-15 09:35:44 +02002259The default linkname for custom type is `gitweb`.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002260
Adrian Goerlerf2007072011-11-10 08:39:55 +01002261[[gitweb.pathSeparator]]gitweb.pathSeparator::
2262+
2263Optional character to substitute the standard path separator (slash) in
2264project names and branch names.
2265+
2266By default, Gerrit will use hexadecimal encoding for slashes in project and
2267branch names. Some web servers, such as Tomcat, reject this hexadecimal
2268encoding in the URL.
2269+
2270Some alternative gitweb services, such as link:http://gitblit.com[Gitblit],
2271allow using an alternative path separator character. In Gitblit, this can be
2272configured through the property link:http://gitblit.com/properties.html[web.forwardSlashCharacter].
2273In Gerrit, the alternative path separator can be configured correspondingly
David Pursehousea89dc982016-09-15 09:35:44 +02002274using the property `gitweb.pathSeparator`.
Adrian Goerlerf2007072011-11-10 08:39:55 +01002275+
David Pursehousea89dc982016-09-15 09:35:44 +02002276Valid values are the characters `*`, `(` and `)`.
Adrian Goerlerf2007072011-11-10 08:39:55 +01002277
David Pursehouse5d592e82016-06-09 05:12:26 +00002278[[gitweb.urlEncode]]gitweb.urlEncode::
Luca Milanesio25312032013-10-11 11:34:39 +01002279+
2280Whether or not Gerrit should encode the generated viewer URL.
2281+
2282Gerrit composes the viewer URL using information about the project, branch, file
2283or commit of the target object to be displayed. Typically viewers such as CGit
David Pursehousea89dc982016-09-15 09:35:44 +02002284and gitweb do need those parts to be encoded, including the `/` in project's name,
Luca Milanesio25312032013-10-11 11:34:39 +01002285for being correctly parsed.
2286However other viewers could instead require an unencoded URL (e.g. GitHub web
David Pursehousea89dc982016-09-15 09:35:44 +02002287based viewer).
Luca Milanesio25312032013-10-11 11:34:39 +01002288+
David Pursehousea89dc982016-09-15 09:35:44 +02002289Valid values are `true` and `false`. The default is `true`.
Luca Milanesio25312032013-10-11 11:34:39 +01002290
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08002291[[groups]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002292=== Section groups
Edwin Kempin4bbff702013-01-11 09:59:53 +01002293
2294[[groups.newGroupsVisibleToAll]]groups.newGroupsVisibleToAll::
2295+
2296Controls whether newly created groups should be by default visible to
2297all registered users.
2298+
2299By default, false.
2300
Edwin Kempinf3eddd52017-01-20 14:05:47 +01002301[[groups.uuid.name]]groups.<uuid>.name::
2302+
2303Display name for group with the given UUID.
2304+
2305This option is only supported for system groups (scheme 'global').
2306+
2307E.g. this parameter can be used to configure another name for the
2308`Anonymous Users` group:
2309+
2310----
2311[groups "global:Anonymous-Users"]
2312 name = All Users
2313----
2314+
2315When setting this parameter it should be verified that there is no
2316existing group with the same name (case-insensitive). Configuring an
2317ambiguous name makes Gerrit fail on startup. Once set Gerrit ensures
2318that it is not possible to create a group with this name. Gerrit also
2319keeps the default name reserved so that it cannot be used for new
2320groups either. This means there is no danger of ambiguous group names
2321when this parameter is removed and the system group uses the default
2322name again.
2323
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08002324[[http]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002325=== Section http
Shawn O. Pearce309d8d32009-11-17 16:03:16 -08002326
2327[[http.proxy]]http.proxy::
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08002328+
2329URL of the proxy server when making outgoing HTTP
2330connections for OpenID login transactions. Syntax
2331should be `http://`'hostname'`:`'port'.
Shawn O. Pearce309d8d32009-11-17 16:03:16 -08002332
2333[[http.proxyUsername]]http.proxyUsername::
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08002334+
2335Optional username to authenticate to the HTTP proxy with.
Robin Rosenberg524a3032012-10-14 14:24:36 +02002336This property is honored only if the username does not
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08002337appear in the http.proxy property above.
Shawn O. Pearce309d8d32009-11-17 16:03:16 -08002338
2339[[http.proxyPassword]]http.proxyPassword::
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08002340+
2341Optional password to authenticate to the HTTP proxy with.
Robin Rosenberg524a3032012-10-14 14:24:36 +02002342This property is honored only if the password does not
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08002343appear in the http.proxy property above.
Shawn O. Pearce309d8d32009-11-17 16:03:16 -08002344
Hugo Arès88e33ac2014-03-03 13:52:45 -05002345[[http.addUserAsRequestAttribute]]http.addUserAsRequestAttribute::
2346+
2347If true, 'User' attribute will be added to the request attributes so it
2348can be accessed outside the request scope (will be set to username or id
2349if username not configured).
2350+
2351This attribute can be used by the servlet container to log user in the
2352http access log.
2353+
2354When running the embedded servlet container, this attribute is used to
2355print user in the httpd_log.
2356+
2357* `%{User}r`
2358+
2359Pattern to print user in Tomcat AccessLog.
2360
2361+
2362Default value is true.
Shawn O. Pearce309d8d32009-11-17 16:03:16 -08002363
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08002364[[httpd]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002365=== Section httpd
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08002366
2367The httpd section configures the embedded servlet container.
2368
2369[[httpd.listenUrl]]httpd.listenUrl::
2370+
2371Specifies the URLs the internal HTTP daemon should listen for
Edwin Kempincdb0e002011-09-08 14:23:30 +02002372connections on. The special hostname '*' may be used to listen
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08002373on all local addresses. A context path may optionally be included,
2374placing Gerrit Code Review's web address within a subdirectory of
2375the server.
2376+
2377Multiple protocol schemes are supported:
2378+
2379* `http://`'hostname'`:`'port'
2380+
2381Plain-text HTTP protocol. If port is not supplied, defaults to 80,
2382the standard HTTP port.
2383+
2384* `https://`'hostname'`:`'port'
2385+
2386SSL encrypted HTTP protocol. If port is not supplied, defaults to
2387443, the standard HTTPS port.
2388+
2389Externally facing production sites are encouraged to use a reverse
2390proxy configuration and `proxy-https://` (below), rather than using
2391the embedded servlet container to implement the SSL processing.
2392The proxy server with SSL support is probably easier to configure,
2393provides more configuration options to control cipher usage, and
2394is likely using natively compiled encryption algorithms, resulting
2395in higher throughput.
2396+
2397* `proxy-http://`'hostname'`:`'port'
2398+
2399Plain-text HTTP relayed from a reverse proxy. If port is not
2400supplied, defaults to 8080.
2401+
2402Like http, but additional header parsing features are
2403enabled to honor X-Forwarded-For, X-Forwarded-Host and
2404X-Forwarded-Server. These headers are typically set by Apache's
2405link:http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#x-headers[mod_proxy].
2406+
2407* `proxy-https://`'hostname'`:`'port'
2408+
2409Plain text HTTP relayed from a reverse proxy that has already
2410handled the SSL encryption/decryption. If port is not supplied,
2411defaults to 8080.
2412+
2413Behaves exactly like proxy-http, but also sets the scheme to assume
2414'https://' is the proper URL back to the server.
2415
2416+
Edwin Kempina09ebcf2015-04-16 14:53:23 +02002417--
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08002418If multiple values are supplied, the daemon will listen on all
2419of them.
Edwin Kempina09ebcf2015-04-16 14:53:23 +02002420
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08002421By default, http://*:8080.
Edwin Kempina09ebcf2015-04-16 14:53:23 +02002422--
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08002423
2424[[httpd.reuseAddress]]httpd.reuseAddress::
2425+
2426If true, permits the daemon to bind to the port even if the port
2427is already in use. If false, the daemon ensures the port is not
2428in use before starting. Busy sites may need to set this to true
2429to permit fast restarts.
2430+
2431By default, true.
2432
Thomas Meyeraa93fdf2016-10-23 10:53:48 +02002433[[httpd.inheritChannel]]httpd.inheritChannel::
2434+
2435If true, permits the daemon to inherit its server socket channel
2436from fd0/1(stdin/stdout). When set to true, the server can be socket
2437activated via systemd or xinetd.
2438+
2439By default, false.
2440
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08002441[[httpd.requestHeaderSize]]httpd.requestHeaderSize::
2442+
2443Size, in bytes, of the buffer used to parse the HTTP headers of an
2444incoming HTTP request. The entire request headers, including any
2445cookies sent by the browser, must fit within this buffer, otherwise
2446the server aborts with the response '413 Request Entity Too Large'.
2447+
2448One buffer of this size is allocated per active connection.
2449Allocating a buffer that is too large wastes memory that cannot be
2450reclaimed, allocating a buffer that is too small may cause unexpected
2451errors caused by very long Referer URLs or large cookie values.
2452+
2453By default, 16384 (16 K), which is sufficient for most OpenID and
2454other web-based single-sign-on integrations.
2455
Chulho Yangb72ff8f2013-07-04 02:35:53 -04002456[[httpd.sslCrl]]httpd.sslCrl::
2457+
2458Path of the certificate revocation list file in PEM format. This
2459crl file is optional, and available for CLIENT_SSL_CERT_LDAP
2460authentication.
2461+
2462To create and view a crl using openssl:
2463+
2464----
2465openssl ca -gencrl -out crl.pem
2466openssl crl -in crl.pem -text
2467----
2468+
2469If not absolute, the path is resolved relative to `$site_path`.
2470+
2471By default, `$site_path/etc/crl.pem`.
2472
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08002473[[httpd.sslKeyStore]]httpd.sslKeyStore::
2474+
2475Path of the Java keystore containing the server's SSL certificate
2476and private key. This keystore is required for `https://` in URL.
2477+
2478To create a self-signed certificate for simple internal usage:
2479+
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08002480----
2481keytool -keystore keystore -alias jetty -genkey -keyalg RSA
2482chmod 600 keystore
2483----
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08002484+
2485If not absolute, the path is resolved relative to `$site_path`.
2486+
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08002487By default, `$site_path/etc/keystore`.
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08002488
2489[[httpd.sslKeyPassword]]httpd.sslKeyPassword::
2490+
2491Password used to decrypt the private portion of the sslKeyStore.
David Pursehouse221d4f62012-06-08 17:38:08 +09002492Java keystores require a password, even if the administrator
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08002493doesn't want to enable one.
2494+
2495If set to the empty string the embedded server will prompt for the
2496password during startup.
2497+
2498By default, `gerrit`.
2499
Shawn O. Pearce1766f502010-01-15 10:49:46 -08002500[[httpd.requestLog]]httpd.requestLog::
2501+
2502Enable (or disable) the `'$site_path'/logs/httpd_log` request log.
2503If enabled, an NCSA combined log format request log file is written
2504out by the internal HTTP daemon.
2505+
David Ostrovsky8e4a9902013-11-19 23:57:48 +01002506`log4j.appender` with the name `httpd_log` can be configured to overwrite
2507programmatic configuration.
2508+
Shawn O. Pearce1766f502010-01-15 10:49:46 -08002509By default, true if httpd.listenUrl uses http:// or https://,
2510and false if httpd.listenUrl uses proxy-http:// or proxy-https://.
2511
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08002512[[httpd.acceptorThreads]]httpd.acceptorThreads::
2513+
2514Number of worker threads dedicated to accepting new incoming TCP
David Pursehouse221d4f62012-06-08 17:38:08 +09002515connections and allocating them connection-specific resources.
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08002516+
2517By default, 2, which should be suitable for most high-traffic sites.
2518
2519[[httpd.minThreads]]httpd.minThreads::
2520+
2521Minimum number of spare threads to keep in the worker thread pool.
2522This number must be at least 1 larger than httpd.acceptorThreads
David Pursehouse92463562013-06-24 10:16:28 +09002523multiplied by the number of httpd.listenUrls configured.
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08002524+
2525By default, 5, suitable for most lower-volume traffic sites.
2526
2527[[httpd.maxThreads]]httpd.maxThreads::
2528+
2529Maximum number of threads to permit in the worker thread pool.
2530+
2531By default 25, suitable for most lower-volume traffic sites.
2532
2533[[httpd.maxQueued]]httpd.maxQueued::
2534+
2535Maximum number of client connections which can enter the worker
2536thread pool waiting for a worker thread to become available.
David Ostrovsky14fe8bc2014-03-26 06:03:44 -070025370 sets the queue size to the Integer.MAX_VALUE.
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08002538+
Luca Milanesio0ae62fe2015-09-04 07:56:00 -07002539By default 200.
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08002540
Shawn O. Pearcee5452b72010-01-15 14:32:50 -08002541[[httpd.maxWait]]httpd.maxWait::
2542+
David Pursehouse221d4f62012-06-08 17:38:08 +09002543Maximum amount of time a client will wait for an available
Shawn O. Pearcee5452b72010-01-15 14:32:50 -08002544thread to handle a project clone, fetch or push request over the
2545smart HTTP transport.
2546+
2547Values should use common unit suffixes to express their setting:
2548+
2549* s, sec, second, seconds
2550* m, min, minute, minutes
2551* h, hr, hour, hours
2552* d, day, days
2553* w, week, weeks (`1 week` is treated as `7 days`)
2554* mon, month, months (`1 month` is treated as `30 days`)
2555* y, year, years (`1 year` is treated as `365 days`)
2556
2557+
Edwin Kempina09ebcf2015-04-16 14:53:23 +02002558--
Shawn O. Pearcee5452b72010-01-15 14:32:50 -08002559If a unit suffix is not specified, `minutes` is assumed. If 0
2560is supplied, the maximum age is infinite and connections will not
2561abort until the client disconnects.
Edwin Kempina09ebcf2015-04-16 14:53:23 +02002562
Shawn O. Pearcee5452b72010-01-15 14:32:50 -08002563By default, 5 minutes.
Edwin Kempina09ebcf2015-04-16 14:53:23 +02002564--
Shawn O. Pearcee5452b72010-01-15 14:32:50 -08002565
Luca Milanesioce7b7452013-06-18 11:40:49 +01002566[[httpd.filterClass]]httpd.filterClass::
2567+
2568Class that implements the javax.servlet.Filter interface
2569for filtering any HTTP related traffic going through the Gerrit
2570HTTP protocol.
2571Class is loaded and configured in the Gerrit Jetty container
2572and run in front of all Gerrit URL handlers, allowing the filter
2573to inspect, modify, allow or reject each request.
2574It needs to be provided as JAR library
2575under $GERRIT_SITE/lib as it is resolved using the default Gerrit class
2576loader and cannot be dynamically loaded by a plugin.
2577+
2578Failing to load the Filter class would result in a Gerrit start-up
2579failure, as this class is supposed to provide mandatory filtering
2580in front of Gerrit HTTP protocol.
2581+
David Pursehouse42f42042013-08-01 14:02:25 +09002582Typical usage is in conjunction with the `auth.type=HTTP` as replacement
Luca Milanesioce7b7452013-06-18 11:40:49 +01002583of an Apache HTTP proxy layer as security enforcement on top of Gerrit
2584by returning a trusted username as HTTP Header.
2585+
Luca Milanesiodcb4bd52017-05-03 22:20:51 +01002586Allow multiple values to install multiple servlet filters.
2587+
Luca Milanesioce7b7452013-06-18 11:40:49 +01002588Example of using a security library secure.jar under $GERRIT_SITE/lib
Luca Milanesiodcb4bd52017-05-03 22:20:51 +01002589that provides a org.anyorg.MySecureHeaderFilter Servlet Filter that enforces
2590a trusted username in the `TRUSTED_USER` HTTP Header and
2591org.anyorg.MySecureIPFilter that performs source IP security filtering:
Luca Milanesioce7b7452013-06-18 11:40:49 +01002592
2593----
2594[auth]
2595 type = HTTP
2596 httpHeader = TRUSTED_USER
2597
Dariusz Lukszaaac01132015-02-11 12:13:07 +01002598[httpd]
Luca Milanesiodcb4bd52017-05-03 22:20:51 +01002599 filterClass = org.anyorg.MySecureHeaderFilter
2600 filterClass = org.anyorg.MySecureIPFilter
Luca Milanesioce7b7452013-06-18 11:40:49 +01002601----
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08002602
Luca Milanesiodca95d52017-05-09 21:22:21 +01002603[[httpd.idleTimeout]]httpd.idleTimeout::
2604+
2605Maximum idle time for a connection, which roughly translates to the
2606TCP socket `SO_TIMEOUT`.
2607+
Luca Milanesiodca95d52017-05-09 21:22:21 +01002608This value is interpreted as the maximum time between some progress
2609being made on the connection. So if a single byte is read or written,
2610then the timeout is reset.
2611+
David Pursehouse9f0e5bc2017-06-30 16:16:53 +09002612The max idle time is applied:
2613+
2614* When waiting for a new message to be received on a connection
2615* When waiting for a new message to be sent on a connection
2616
2617+
Luca Milanesiodca95d52017-05-09 21:22:21 +01002618By default, 30 seconds.
2619
Juan Hernandezec512562013-08-06 16:30:50 +02002620[[httpd.robotsFile]]httpd.robotsFile::
2621+
2622Location of an external robots.txt file to be used instead of the one
2623bundled with the .war of the application.
2624+
2625If not absolute, the path is resolved relative to `$site_path`.
2626+
2627If the file doesn't exist or can't be read the default robots.txt file
2628bundled with the .war will be used instead.
2629
Dariusz Luksza011cfed2014-04-03 10:23:35 +02002630[[httpd.registerMBeans]]httpd.registerMBeans::
2631+
2632Enable (or disable) registration of Jetty MBeans for Java JMX.
2633+
2634By default, false.
2635
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08002636[[index]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002637=== Section index
David Pursehouse6d458432013-08-23 16:17:18 +09002638
2639The index section configures the secondary index.
2640
David Pursehouse3fc5ee32014-03-17 18:35:32 +09002641Note that after enabling the secondary index, the index must be built
2642using the link:pgm-reindex.html[reindex program] before restarting the
2643Gerrit server.
2644
David Pursehouse6d458432013-08-23 16:17:18 +09002645[[index.type]]index.type::
2646+
2647Type of secondary indexing employed by Gerrit. The supported
2648values are:
2649+
2650* `LUCENE`
2651+
2652A link:http://lucene.apache.org/[Lucene] index is used.
2653+
David Pursehouse8e72f532014-06-24 11:01:28 +09002654+
Dariusz Lukszaea529882017-04-25 15:11:31 +02002655* `ELASTICSEARCH` look into link:#elasticsearch[Elasticsearch section]
David Pursehouse8e72f532014-06-24 11:01:28 +09002656+
2657An link:http://www.elasticsearch.org/[Elasticsearch] index is used.
David Pursehouse6d458432013-08-23 16:17:18 +09002658
2659+
Shawn Pearced4ae3a162013-11-24 17:00:31 -08002660By default, `LUCENE`.
David Pursehouse6d458432013-08-23 16:17:18 +09002661
David Pursehouse904db302014-03-17 18:55:38 +09002662[[index.threads]]index.threads::
2663+
Hugo Arèsfab06702016-06-10 12:49:52 -04002664Number of threads to use for indexing in normal interactive operations. Setting
2665it to 0 disables the dedicated thread pool and indexing will be done in the same
2666thread as the operation.
David Pursehouse904db302014-03-17 18:55:38 +09002667+
Hugo Arès176cd582016-05-06 14:37:09 -04002668If not set or set to a negative value, defaults to 1 plus half of the number of
2669logical CPUs as returned by the JVM.
David Pursehouse00c82142014-01-22 17:41:09 +09002670
Dave Borowitz787af5f2014-10-22 16:26:00 -07002671[[index.batchThreads]]index.batchThreads::
2672+
2673Number of threads to use for indexing in background operations, such as
2674online schema upgrades.
2675+
Sebastian Schubertha13dc292015-05-21 15:31:28 +02002676If not set or set to a negative value, defaults to the number of logical
Hugo Arès1cf252c2016-05-06 08:38:22 -04002677CPUs as returned by the JVM.
Dave Borowitz787af5f2014-10-22 16:26:00 -07002678
Dave Borowitzd80b9342015-03-25 10:32:21 -07002679[[index.onlineUpgrade]]index.onlineUpgrade::
2680+
2681Whether to upgrade to new index schema versions while the server is
2682running. This is recommended as it prevents additional downtime during
2683Gerrit version upgrades (avoiding the need for an offline reindex step
2684using Reindex), but can add additional server load during the upgrade.
2685+
2686If set to false, there is no way to upgrade the index schema to take
2687advantage of new search features without restarting the server.
2688+
2689Defaults to true.
2690
Dave Borowitzb82fbcb2015-04-22 16:43:54 -07002691[[index.maxLimit]]index.maxLimit::
2692+
2693Maximum limit to allow for search queries. Requesting results above this
2694limit will truncate the list (but will still set `_more_changes` on
2695result lists). Set to 0 for no limit.
2696+
2697Defaults to no limit.
2698
Dave Borowitzf56d3652015-04-22 17:35:34 -07002699[[index.maxPages]]index.maxPages::
2700+
2701Maximum number of pages of search results to allow, as index
2702implementations may have to scan through large numbers of skipped
2703results when searching with an offset. Requesting results starting past
2704this threshold times the requested limit will result in an error. Set to
27050 for no limit.
2706+
2707Defaults to no limit.
2708
Dave Borowitzd034ca82015-10-15 11:20:30 -04002709[[index.maxTerms]]index.maxTerms::
2710+
2711Maximum number of leaf terms to allow in a query. Too-large queries may
2712perform poorly, so setting this option causes query parsing to fail fast
Marco Miller6da22822016-01-29 12:31:38 -05002713before attempting to send them to the secondary index. Should this limit
2714be reached, database is used instead of index as applicable.
Dave Borowitzd034ca82015-10-15 11:20:30 -04002715+
Marco Miller6da22822016-01-29 12:31:38 -05002716When the index type is `LUCENE`, also sets the maximum number of clauses
2717permitted per BooleanQuery. This is so that all enforced query limits
2718are the same.
2719+
2720Defaults to 1024.
Dave Borowitzd034ca82015-10-15 11:20:30 -04002721
Dave Borowitz61155622017-04-17 16:53:13 -04002722[[index.reindexAfterRefUpdate]]index.reindexAfterRefUpdate::
2723+
2724Whether to reindex all affected open changes after a ref is updated. This
2725includes reindexing all open changes to recompute the "mergeable" bit every time
2726the destination branch moves, as well as reindexing changes to take into account
2727new project configuration (e.g. label definitions).
2728+
2729Leaving this enabled may result in fresher results, but may cause performance
2730problems if there are lots of open changes on a project whose branches advance
2731frequently.
2732+
2733Defaults to true.
2734
Dave Borowitz3747f0f2017-06-23 14:29:31 -04002735[[index.autoReindexIfStale]]index.autoReindexIfStale::
2736+
2737Whether to automatically check if a document became stale in the index
2738immediately after indexing it. If false, there is a race condition during two
2739simultaneous writes that may cause one of the writes to not be reflected in the
2740index. The check to avoid this does consume some resources.
2741+
2742Defaults to true.
2743
David Pursehouse902b3ee2014-07-09 16:17:49 +09002744==== Lucene configuration
2745
2746Open and closed changes are indexed in separate indexes named
2747'open' and 'closed' respectively.
2748
2749The following settings are only used when the index type is `LUCENE`.
David Pursehouseac88c362014-02-06 12:01:34 +09002750
David Pursehouse00c82142014-01-22 17:41:09 +09002751[[index.name.ramBufferSize]]index.name.ramBufferSize::
2752+
David Pursehouse00c82142014-01-22 17:41:09 +09002753Determines the amount of RAM that may be used for buffering added documents
2754and deletions before they are flushed to the index. See the
2755link:http://lucene.apache.org/core/4_6_0/core/org/apache/lucene/index/LiveIndexWriterConfig.html#setRAMBufferSizeMB(double)[
2756Lucene documentation] for further details.
2757+
2758Defaults to 16M.
2759
2760[[index.name.maxBufferedDocs]]index.name.maxBufferedDocs::
2761+
David Pursehouse00c82142014-01-22 17:41:09 +09002762Determines the minimal number of documents required before the buffered
2763in-memory documents are flushed to the index. Large values generally
2764give faster indexing. See the
2765link:http://lucene.apache.org/core/4_6_0/core/org/apache/lucene/index/LiveIndexWriterConfig.html#setMaxBufferedDocs(int)[
2766Lucene documentation] for further details.
2767+
2768Defaults to -1, meaning no maximum is set and the writer will flush
2769according to RAM usage.
2770
Dave Borowitzd08b0452014-02-13 11:56:03 -08002771[[index.name.commitWithin]]index.name.commitWithin::
2772+
Dave Borowitzd08b0452014-02-13 11:56:03 -08002773Determines the period at which changes are automatically committed to
2774stable store on disk. This is a costly operation and may block
2775additional index writes, so lower with caution.
2776+
Bruce Zuaf058e62014-03-21 10:03:05 +08002777If zero, changes are committed after every write. This is very costly
2778but may be useful if offline reindexing is infeasible, or for development
2779servers.
Dave Borowitzd08b0452014-02-13 11:56:03 -08002780+
Bruce Zuaf058e62014-03-21 10:03:05 +08002781Values can be specified using standard time unit abbreviations (`ms`, `sec`,
2782`min`, etc.).
David Pursehouse9354c1a2014-03-22 12:23:43 -07002783+
Bruce Zuaf058e62014-03-21 10:03:05 +08002784If negative, `commitWithin` is disabled. Changes are flushed to disk when
2785the in-memory buffer fills, but only committed and guaranteed to be synced
2786to disk when the process finishes.
David Pursehouse902b3ee2014-07-09 16:17:49 +09002787+
Dave Borowitzd08b0452014-02-13 11:56:03 -08002788Defaults to 300000 ms (5 minutes).
2789
David Pursehouse902b3ee2014-07-09 16:17:49 +09002790Sample Lucene index configuration:
David Pursehouse00c82142014-01-22 17:41:09 +09002791----
2792[index]
2793 type = LUCENE
2794
2795[index "changes_open"]
2796 ramBufferSize = 60 m
2797 maxBufferedDocs = 3000
2798
2799[index "changes_closed"]
2800 ramBufferSize = 20 m
2801 maxBufferedDocs = 500
2802----
2803
Dariusz Lukszaea529882017-04-25 15:11:31 +02002804[[elasticsearch]]
2805=== Section elasticsearch
David Pursehouse8e72f532014-06-24 11:01:28 +09002806
Dariusz Luksza40533612016-09-22 14:44:40 +02002807WARNING: The Elasticsearch support is incomplete. Online reindexing
Dariusz Lukszaea529882017-04-25 15:11:31 +02002808is still considered as beta.
David Pursehouse8e72f532014-06-24 11:01:28 +09002809
2810Open and closed changes are indexed in a single index, separated
2811into types 'open_changes' and 'closed_changes' respectively.
2812
Dariusz Lukszaea529882017-04-25 15:11:31 +02002813[[elasticsearch.prefix]]elasticsearch.prefix::
David Pursehouse8e72f532014-06-24 11:01:28 +09002814+
Hugo Arès3ba6dfe2016-11-15 15:12:55 -08002815This setting can be used to prefix index names to allow multiple Gerrit
2816instances in a single Elasticsearch cluster. Prefix 'gerrit1_' would result in a
2817change index named 'gerrit1_changes_0001'.
David Pursehouse8e72f532014-06-24 11:01:28 +09002818+
Hugo Arès3ba6dfe2016-11-15 15:12:55 -08002819Not set by default.
David Pursehouse8e72f532014-06-24 11:01:28 +09002820
Dariusz Lukszaea529882017-04-25 15:11:31 +02002821[[elasticsearch.username]]elasticsearch.username::
2822+
2823Username used to connect to Elasticsearch.
2824+
2825Not set by default.
Dariusz Luksza4ca46be2017-04-25 11:40:29 +02002826
Dariusz Lukszaea529882017-04-25 15:11:31 +02002827[[elasticsearch.password]]elasticsearch.password::
2828+
2829Password used to connect to Elasticsearch.
2830+
2831Not set by default.
Dariusz Luksza4ca46be2017-04-25 11:40:29 +02002832
Dariusz Lukszaea529882017-04-25 15:11:31 +02002833[[elasticsearch.requestCompression]]elasticsearch.requestCompression::
2834+
2835Enable request compression.
2836+
2837Defaults to `false`.
2838
2839[[elasticsearch.connectionTimeout]]elasticsearch.connectionTimeout::
2840+
2841How long should Gerrit waits for connection.
2842+
2843The value is in the usual time-unit format like "1 m", "5 m".
2844+
2845Defaults to `5 m`
2846
2847[[elasticsearch.maxConnectionIdleTime]]elasticsearch.maxConnectionIdleTime::
2848+
2849How long connection can stay in idle.
2850+
2851The value is in the usual time-unit format like "1 m", "5 m".
2852+
2853Defaults to `5 m`
2854
2855[[elasticsearch.maxTotalConnection]]elasticsearch.maxTotalConnection::
2856+
2857How many connections can be spawn simultaneously.
2858+
2859Defaults to `1`
2860
2861[[elasticsearch.maxReadTimeout]]elasticsearch.maxReadTimeout::
2862+
2863Timeout for the read operation.
2864+
2865The value is in the usual time-unit format like "1 m", "5 m".
2866+
2867Defaults to `5 m`
2868
David Pursehousecb303df2017-04-26 16:14:56 +02002869==== Elasticsearch server(s) configuration
Dariusz Lukszaea529882017-04-25 15:11:31 +02002870
2871Each section correspond to one Elasticsearch server.
Dariusz Luksza4ca46be2017-04-25 11:40:29 +02002872
2873[[elasticsearch.name.protocol]]elasticsearch.name.protocol::
2874+
2875Elasticsearch server protocol [http|https].
2876+
2877Defaults to `http`.
2878
2879[[elasticsearch.name.hostname]]elasticsearch.name.hostname::
2880+
2881Elasticsearch server hostname.
2882
2883Defaults to `localhost`.
2884
2885[[elasticsearch.name.port]]elasticsearch.name.port::
2886+
2887Elasticsearch server port.
2888+
2889Defaults to `9200`.
2890
2891
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08002892[[ldap]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002893=== Section ldap
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002894
David Pursehouse221d4f62012-06-08 17:38:08 +09002895LDAP integration is only enabled if `auth.type` is set to
Sasa Zivkoveabc8972010-10-04 15:47:08 +02002896`HTTP_LDAP`, `LDAP` or `CLIENT_SSL_CERT_LDAP`. See above for a
David Pursehouse42f42042013-08-01 14:02:25 +09002897detailed description of the `auth.type` settings and their
Sasa Zivkoveabc8972010-10-04 15:47:08 +02002898implications.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002899
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07002900An example LDAP configuration follows, and then discussion of
2901the parameters introduced here. Suitable defaults for most
2902parameters are automatically guessed based on the type of server
Michal Pasierb3e262742017-01-23 12:50:48 +01002903detected during startup. The guessed defaults support
2904link:http://www.ietf.org/rfc/rfc2307.txt[RFC 2307], Active
2905Directory and link:https://www.freeipa.org[FreeIPA].
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002906
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08002907----
2908[ldap]
2909 server = ldap://ldap.example.com
2910
2911 accountBase = ou=people,dc=example,dc=com
2912 accountPattern = (&(objectClass=person)(uid=${username}))
2913 accountFullName = displayName
2914 accountEmailAddress = mail
2915
2916 groupBase = ou=groups,dc=example,dc=com
2917 groupMemberPattern = (&(objectClass=group)(member=${dn}))
2918----
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002919
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002920[[ldap.server]]ldap.server::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002921+
2922URL of the organization's LDAP server to query for user information
2923and group membership from. Must be of the form `ldap://host` or
2924`ldaps://host` to bind with either a plaintext or SSL connection.
Shawn O. Pearcef7e065e2009-09-26 20:01:10 -07002925+
David Pursehouse42f42042013-08-01 14:02:25 +09002926If `auth.type` is `LDAP` this setting should use `ldaps://` to
Shawn O. Pearcef7e065e2009-09-26 20:01:10 -07002927ensure the end user's plaintext password is transmitted only over
2928an encrypted connection.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002929
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07002930[[ldap.sslVerify]]ldap.sslVerify::
2931+
2932If false and ldap.server is an `ldaps://` style URL, Gerrit
2933will not verify the server certificate when it connects to
2934perform a query.
2935+
2936By default, true, requiring the certificate to be verified.
2937
Olga Grinbergcf1b06a2015-02-03 15:54:48 -05002938[[ldap.groupsVisibleToAll]]ldap.groupsVisibleToAll::
2939+
2940If true, LDAP groups are visible to all registered users.
2941+
2942By default, false, LDAP groups are visible only to administrators and
2943group members.
2944
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002945[[ldap.username]]ldap.username::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002946+
2947_(Optional)_ Username to bind to the LDAP server with. If not set,
2948an anonymous connection to the LDAP server is attempted.
2949
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002950[[ldap.password]]ldap.password::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002951+
2952_(Optional)_ Password for the user identified by `ldap.username`.
2953If not set, an anonymous (or passwordless) connection to the LDAP
2954server is attempted.
2955
Ben Wu0410a152010-06-04 16:17:24 +08002956[[ldap.referral]]ldap.referral::
2957+
2958_(Optional)_ How an LDAP referral should be handled if it is
2959encountered during directory traversal. Set to `follow` to
James Y Knight1244ed02011-01-04 02:40:32 -05002960automatically follow any referrals, or `ignore` to ignore the
2961referrals.
Ben Wu0410a152010-06-04 16:17:24 +08002962+
2963By default, `ignore`.
2964
Sasa Zivkov100bd4b2011-11-07 14:58:46 +01002965[[ldap.readTimeout]]ldap.readTimeout::
2966+
2967_(Optional)_ The read timeout for an LDAP operation. The value is
2968in the usual time-unit format like "1 s", "100 ms", etc...
2969A timeout can be used to avoid blocking all of the SSH command start
David Pursehouse221d4f62012-06-08 17:38:08 +09002970threads in case the LDAP server becomes slow.
Sasa Zivkov100bd4b2011-11-07 14:58:46 +01002971+
2972By default there is no timeout and Gerrit will wait for the LDAP
2973server to respond until the TCP connection times out.
2974
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002975[[ldap.accountBase]]ldap.accountBase::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002976+
2977Root of the tree containing all user accounts. This is typically
2978of the form `ou=people,dc=example,dc=com`.
David Pursehouse82d55632015-12-14 10:31:27 +00002979+
2980This setting may be added multiple times to specify more than
2981one root.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002982
Shawn O. Pearce304ccdb2009-08-25 12:25:27 -07002983[[ldap.accountScope]]ldap.accountScope::
2984+
2985Scope of the search performed for accounts. Must be one of:
2986+
2987* `one`: Search only one level below accountBase, but not recursive
2988* `sub` or `subtree`: Search recursively below accountBase
2989* `base` or `object`: Search exactly accountBase; probably not desired
2990
2991+
2992Default is `subtree` as many directories have several levels.
2993
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002994[[ldap.accountPattern]]ldap.accountPattern::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002995+
2996Query pattern to use when searching for a user account. This may be
2997any valid LDAP query expression, including the standard `(&...)` and
David Pursehouse42f42042013-08-01 14:02:25 +09002998`(|...)` operators. If `auth.type` is `HTTP_LDAP` then the variable
Edwin Kempincdb0e002011-09-08 14:23:30 +02002999`${username}` is replaced with a parameter set to the username
David Pursehouse42f42042013-08-01 14:02:25 +09003000that was supplied by the HTTP server. If `auth.type` is `LDAP` then
Edwin Kempincdb0e002011-09-08 14:23:30 +02003001the variable `${username}` is replaced by the string entered by
Shawn O. Pearcef7e065e2009-09-26 20:01:10 -07003002the end user.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07003003+
3004This pattern is used to search the objects contained directly under
3005the `ldap.accountBase` tree. A typical setting for this parameter
Edwin Kempincdb0e002011-09-08 14:23:30 +02003006is `(uid=${username})` or `(cn=${username})`, but the proper
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07003007setting depends on the LDAP schema used by the directory server.
3008+
Michal Pasierb3e262742017-01-23 12:50:48 +01003009Default is `(uid=${username})` for FreeIPA and RFC 2307 servers,
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07003010and `(&(objectClass=user)(sAMAccountName=${username}))`
3011for Active Directory.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07003012
Shawn O. Pearce37dc1f82009-08-19 09:49:07 -07003013[[ldap.accountFullName]]ldap.accountFullName::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07003014+
3015_(Optional)_ Name of an attribute on the user account object which
3016contains the initial value for the user's full name field in Gerrit.
3017Typically this is the `displayName` property in LDAP, but could
3018also be `legalName` or `cn`.
3019+
David Pursehouse221d4f62012-06-08 17:38:08 +09003020Attribute values may be concatenated with literal strings. For
3021example to join given name and surname together, use the pattern
Edwin Kempincdb0e002011-09-08 14:23:30 +02003022`${givenName} ${SN}`.
Shawn O. Pearceb86ae002009-09-26 16:54:05 -07003023+
Shawn O. Pearce3ca1dcf2009-08-20 08:56:23 -07003024If set, users will be unable to modify their full name field, as
3025Gerrit will populate it only from the LDAP data.
3026+
Michal Pasierb3e262742017-01-23 12:50:48 +01003027Default is `displayName` for FreeIPA and RFC 2307 servers,
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07003028and `${givenName} ${sn}` for Active Directory.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07003029
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07003030[[ldap.accountEmailAddress]]ldap.accountEmailAddress::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07003031+
3032_(Optional)_ Name of an attribute on the user account object which
3033contains the user's Internet email address, as defined by this
3034LDAP server.
3035+
Shawn O. Pearceb86ae002009-09-26 16:54:05 -07003036Attribute values may be concatenated with literal strings,
3037for example to set the email address to the lowercase form
3038of sAMAccountName followed by a constant domain name, use
Edwin Kempincdb0e002011-09-08 14:23:30 +02003039`${sAMAccountName.toLowerCase}@example.com`.
Shawn O. Pearceb86ae002009-09-26 16:54:05 -07003040+
Shawn O. Pearce3ca1dcf2009-08-20 08:56:23 -07003041If set, the preferred email address will be prefilled from LDAP,
David Pursehouse221d4f62012-06-08 17:38:08 +09003042but users may still be able to register additional email addresses,
Shawn O. Pearce3ca1dcf2009-08-20 08:56:23 -07003043and select a different preferred email address.
3044+
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07003045Default is `mail`.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07003046
Shawn O. Pearce59e09222009-08-19 09:04:49 -07003047[[ldap.accountSshUserName]]ldap.accountSshUserName::
3048+
3049_(Optional)_ Name of an attribute on the user account object which
3050contains the initial value for the user's SSH username field in
3051Gerrit. Typically this is the `uid` property in LDAP, but could
3052also be `cn`. Administrators should prefer to match the attribute
3053corresponding to the user's workstation username, as this is what
3054SSH clients will default to.
3055+
Shawn O. Pearceb86ae002009-09-26 16:54:05 -07003056Attribute values may also be forced to lowercase, or to uppercase in
Edwin Kempincdb0e002011-09-08 14:23:30 +02003057an expression. For example, `${sAMAccountName.toLowerCase}` will
Shawn O. Pearceb86ae002009-09-26 16:54:05 -07003058force the value of sAMAccountName, if defined, to be all lowercase.
3059The suffix `.toUpperCase` can be used for the other direction.
3060The suffix `.localPart` can be used to split attribute values of
3061the form 'user@example.com' and return only the left hand side, for
Edwin Kempincdb0e002011-09-08 14:23:30 +02003062example `${userPrincipalName.localPart}` would provide only 'user'.
Shawn O. Pearceb86ae002009-09-26 16:54:05 -07003063+
Shawn O. Pearce3ca1dcf2009-08-20 08:56:23 -07003064If set, users will be unable to modify their SSH username field, as
David Pursehousec12da502016-08-11 20:45:03 +09003065Gerrit will populate it only from the LDAP data. Note that once the
3066username has been set it cannot be changed, therefore it is
3067recommended not to make changes to this setting that would cause the
3068value to differ, as this will prevent users from logging in.
Shawn O. Pearce3ca1dcf2009-08-20 08:56:23 -07003069+
Michal Pasierb3e262742017-01-23 12:50:48 +01003070Default is `uid` for FreeIPA and RFC 2307 servers,
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07003071and `${sAMAccountName.toLowerCase}` for Active Directory.
Shawn O. Pearce59e09222009-08-19 09:04:49 -07003072
Shawn O. Pearce7d25f782009-10-30 08:01:03 -07003073[[ldap.accountMemberField]]ldap.accountMemberField::
Anthony93de7db2009-10-03 10:01:50 -04003074+
3075_(Optional)_ Name of an attribute on the user account object which
Shawn O. Pearce7d25f782009-10-30 08:01:03 -07003076contains the groups the user is part of. Typically used for Active
Michal Pasierb3e262742017-01-23 12:50:48 +01003077Directory and FreeIPA servers.
Anthony93de7db2009-10-03 10:01:50 -04003078+
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07003079Default is unset for RFC 2307 servers (disabled)
Michal Pasierb3e262742017-01-23 12:50:48 +01003080and `memberOf` for Active Directory and FreeIPA.
3081
3082[[ldap.accountMemberExpandGroups]]ldap.accountMemberExpandGroups::
3083+
3084_(Optional)_ Whether to expand nested groups recursively. This
3085setting is used only if `ldap.accountMemberField` is set.
3086+
3087Default is unset for FreeIPA and `true` for RFC 2307 servers
3088and Active Directory.
Anthony93de7db2009-10-03 10:01:50 -04003089
Saša Živkovc81291f2015-02-04 17:19:20 +01003090[[ldap.fetchMemberOfEagerly]]ldap.fetchMemberOfEagerly::
3091+
3092_(Optional)_ Whether to fetch the `memberOf` account attribute on
3093login. Setups which use LDAP for user authentication but don't make
3094use of the LDAP groups may benefit from setting this option to `false`
3095as this will result in a much faster LDAP login.
3096+
3097Default is unset for RFC 2307 servers (disabled) and `true` for
Michal Pasierb3e262742017-01-23 12:50:48 +01003098Active Directory and FreeIPA.
Saša Živkovc81291f2015-02-04 17:19:20 +01003099
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07003100[[ldap.groupBase]]ldap.groupBase::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07003101+
3102Root of the tree containing all group objects. This is typically
3103of the form `ou=groups,dc=example,dc=com`.
David Pursehouse82d55632015-12-14 10:31:27 +00003104+
3105This setting may be added multiple times to specify more than
3106one root.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07003107
Shawn O. Pearce304ccdb2009-08-25 12:25:27 -07003108[[ldap.groupScope]]ldap.groupScope::
3109+
3110Scope of the search performed for group objects. Must be one of:
3111+
3112* `one`: Search only one level below groupBase, but not recursive
3113* `sub` or `subtree`: Search recursively below groupBase
3114* `base` or `object`: Search exactly groupBase; probably not desired
3115
3116+
3117Default is `subtree` as many directories have several levels.
3118
Shawn O. Pearce7d25f782009-10-30 08:01:03 -07003119[[ldap.groupPattern]]ldap.groupPattern::
3120+
3121Query pattern used when searching for an LDAP group to connect
3122to a Gerrit group. This may be any valid LDAP query expression,
3123including the standard `(&...)` and `(|...)` operators. The variable
Edwin Kempincdb0e002011-09-08 14:23:30 +02003124`${groupname}` is replaced with the search term supplied by the
Shawn O. Pearce7d25f782009-10-30 08:01:03 -07003125group owner.
3126+
Michal Pasierb3e262742017-01-23 12:50:48 +01003127Default is `(cn=${groupname})` for FreeIPA and RFC 2307 servers,
Edwin Kempincdb0e002011-09-08 14:23:30 +02003128and `(&(objectClass=group)(cn=${groupname}))` for Active Directory.
Shawn O. Pearce7d25f782009-10-30 08:01:03 -07003129
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07003130[[ldap.groupMemberPattern]]ldap.groupMemberPattern::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07003131+
3132Query pattern to use when searching for the groups that a user
3133account is currently a member of. This may be any valid LDAP query
3134expression, including the standard `(&...)` and `(|...)` operators.
3135+
David Pursehouse42f42042013-08-01 14:02:25 +09003136If `auth.type` is `HTTP_LDAP` then the variable `${username}` is
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07003137replaced with a parameter set to the username that was supplied
3138by the HTTP server. Other variables appearing in the pattern,
Edwin Kempincdb0e002011-09-08 14:23:30 +02003139such as `${fooBarAttribute}`, are replaced with the value of the
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07003140corresponding attribute (in this case, `fooBarAttribute`) as read
3141from the user's account object matched under `ldap.accountBase`.
Edwin Kempincdb0e002011-09-08 14:23:30 +02003142Attributes such as `${dn}` or `${uidNumber}` may be useful.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07003143+
Scott Dial50457502013-08-11 16:52:51 -04003144Default is `(|(memberUid=${username})(gidNumber=${gidNumber}))` for
Michal Pasierb3e262742017-01-23 12:50:48 +01003145RFC 2307, and unset (disabled) for Active Directory and FreeIPA.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07003146
Auke Schrijnen57809132012-09-26 21:05:39 +02003147[[ldap.groupName]]ldap.groupName::
3148+
David Pursehouse39489ae2012-10-12 13:50:04 +09003149_(Optional)_ Name of the attribute on the group object which contains
3150the value to use as the group name in Gerrit.
Auke Schrijnen57809132012-09-26 21:05:39 +02003151+
David Pursehouse39489ae2012-10-12 13:50:04 +09003152Typically the attribute name is `cn` for RFC 2307 and Active Directory
3153servers. For other servers the attribute name may differ, for example
3154`apple-group-realname` on Apple MacOS X Server.
Auke Schrijnen57809132012-09-26 21:05:39 +02003155+
David Pursehouse39489ae2012-10-12 13:50:04 +09003156It is also possible to specify a literal string containing a pattern of
3157attribute values. For example to create a Gerrit group name consisting of
3158LDAP group name and group ID, use the pattern `${cn} (${gidNumber})`.
3159+
3160Default is `cn`.
Auke Schrijnen57809132012-09-26 21:05:39 +02003161
Gustaf Lundhdaf41af2016-12-05 19:05:09 +01003162[[ldap.mandatoryGroup]]ldap.mandatoryGroup::
3163+
3164All users must be a member of this group to allow account creation or
3165authentication.
3166+
3167Setting mandatoryGroup implies enabling of `ldap.fetchMemberOfEagerly`
3168+
3169By default, unset.
3170
Edwin Kempinb3b0d292011-09-14 14:17:34 +02003171[[ldap.localUsernameToLowerCase]]ldap.localUsernameToLowerCase::
3172+
3173Converts the local username, that is used to login into the Gerrit
David Pursehousea1d633b2014-05-02 17:21:02 +09003174Web UI, to lower case before doing the LDAP authentication. By setting
3175this parameter to true, a case insensitive login to the Gerrit Web UI
Edwin Kempinb3b0d292011-09-14 14:17:34 +02003176can be achieved.
3177+
3178If set, it must be ensured that the local usernames for all existing
3179accounts are converted to lower case, otherwise a user that has a
David Pursehouse221d4f62012-06-08 17:38:08 +09003180local username that contains upper case characters will not be able to login
Edwin Kempinb3b0d292011-09-14 14:17:34 +02003181anymore. The local usernames for the existing accounts can be
3182converted to lower case by running the server program
3183link:pgm-LocalUsernamesToLowerCase.html[LocalUsernamesToLowerCase].
3184Please be aware that the conversion of the local usernames to lower
3185case can't be undone. For newly created accounts the local username
3186will be directly stored in lower case.
3187+
3188By default, unset/false.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07003189
Robin Rosenberga3baed02012-10-14 14:09:32 +02003190[[ldap.authentication]]ldap.authentication::
3191+
3192Defines how Gerrit authenticates with the server. When set to `GSSAPI`
3193Gerrit will use Kerberos. To use kerberos the
3194`java.security.auth.login.config` system property must point to a
3195login to a JAAS configuration file and, if Java 6 is used, the system
3196property `java.security.krb5.conf` must point to the appropriate
3197krb5.ini file with references to the KDC.
3198
3199Typical jaas.conf.
3200
3201----
3202KerberosLogin {
3203 com.sun.security.auth.module.Krb5LoginModule
3204 required
3205 useTicketCache=true
3206 doNotPrompt=true
3207 renewTGT=true;
3208};
3209----
3210
3211See Java documentation on how to create the krb5.ini file.
3212
3213Note the `renewTGT` property to make sure the TGT does not expire,
3214and `useTicketCache` to use the TGT supplied by the operating system. As
3215the whole point of using GSSAPI is to have passwordless authentication
David Pursehouse92463562013-06-24 10:16:28 +09003216to the LDAP service, this option does not acquire a new TGT on its own.
Robin Rosenberga3baed02012-10-14 14:09:32 +02003217
3218On Windows servers the registry key `HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\Kerberos\Parameters`
3219must have the DWORD value `allowtgtsessionkey` set to 1 and the account must not
3220have local administrator privileges.
3221
Bruce Zucd04bbc2014-07-25 15:48:09 +08003222[[ldap.useConnectionPooling]]ldap.useConnectionPooling::
3223+
3224_(Optional)_ Enable the LDAP connection pooling or not.
3225+
3226If it is true, the LDAP service provider maintains a pool of (possibly)
3227previously used connections and assigns them to a Context instance as
3228needed. When a Context instance is done with a connection (closed or
3229garbage collected), the connection is returned to the pool for future use.
3230+
3231For details, see link:http://docs.oracle.com/javase/tutorial/jndi/ldap/pool.html[
3232LDAP connection management (Pool)] and link:http://docs.oracle.com/javase/tutorial/jndi/ldap/config.html[
3233LDAP connection management (Configuration)]
3234+
3235By default, false.
3236
3237[[ldap.connectTimeout]]ldap.connectTimeout::
3238+
Saša Živkov303701a2015-01-19 16:24:44 +01003239_(Optional)_ Timeout period for establishment of an LDAP connection.
Bruce Zucd04bbc2014-07-25 15:48:09 +08003240+
3241The value is in the usual time-unit format like "1 s", "100 ms",
3242etc...
3243+
3244By default there is no timeout and Gerrit will wait indefinitely.
3245
Saša Živkov5049f512015-01-19 17:04:43 +01003246[[ldap-connection-pooling]]
3247==== LDAP Connection Pooling
3248Once LDAP connection pooling is enabled by setting the link:#ldap.useConnectionPooling[
3249ldap.useConnectionPooling] configuration property to `true`, the connection pool
3250can be configured using JVM system properties as explained in the
3251link:http://docs.oracle.com/javase/7/docs/technotes/guides/jndi/jndi-ldap.html#POOL[
3252Java SE Documentation].
Bruce Zucd04bbc2014-07-25 15:48:09 +08003253
Saša Živkov5049f512015-01-19 17:04:43 +01003254For standalone Gerrit (running with the embedded Jetty), JVM system properties
3255are specified in the link:#container[container section]:
Bruce Zucd04bbc2014-07-25 15:48:09 +08003256
Saša Živkov5049f512015-01-19 17:04:43 +01003257----
3258 javaOptions = -Dcom.sun.jndi.ldap.connect.pool.maxsize=20
3259 javaOptions = -Dcom.sun.jndi.ldap.connect.pool.prefsize=10
3260 javaOptions = -Dcom.sun.jndi.ldap.connect.pool.timeout=300000
3261----
Bruce Zucd04bbc2014-07-25 15:48:09 +08003262
Saša Živkovca7a67e2015-12-01 14:25:10 +01003263[[lfs]]
3264=== Section lfs
3265
3266[[lfs.plugin]]lfs.plugin::
3267+
David Pursehouse2463c542016-08-02 16:04:58 +09003268The name of a plugin which serves the
3269link:https://github.com/github/git-lfs/blob/master/docs/api/v1/http-v1-batch.md[
3270LFS protocol] on the `<project-name>/info/lfs/objects/batch` endpoint. When
3271not configured Gerrit will respond with `501 Not Implemented` on LFS protocol
3272requests.
Saša Živkovca7a67e2015-12-01 14:25:10 +01003273+
3274By default unset.
3275
Gustaf Lundhaef90122015-04-27 16:48:19 +02003276[[log]]
3277=== Section log
3278
3279[[log.jsonLogging]]log.jsonLogging::
3280+
3281If set to true, enables error logging in JSON format (file name: "logs/error_log.json").
3282+
3283Defaults to false.
3284
3285[[log.textLogging]]log.textLogging::
3286+
3287If set to true, enables error logging in regular plain text format. Can only be disabled
3288if `jsonLogging` is enabled.
3289+
3290Defaults to true.
3291
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08003292[[mimetype]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08003293=== Section mimetype
Shawn O. Pearce01cb11902009-07-15 08:19:01 -07003294
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07003295[[mimetype.name.safe]]mimetype.<name>.safe::
Shawn O. Pearce01cb11902009-07-15 08:19:01 -07003296+
3297If set to true, files with the MIME type `<name>` will be sent as
3298direct downloads to the user's browser, rather than being wrapped up
3299inside of zipped archives. The type name may be a complete type
Jonathan Nieder5758f182015-03-30 11:28:55 -07003300name, e.g. `image/gif`, a generic media type, e.g. `+image/*+`,
3301or the wildcard `+*/*+` to match all types.
Shawn O. Pearce01cb11902009-07-15 08:19:01 -07003302+
3303By default, false for all MIME types.
3304
3305Common examples:
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08003306----
3307[mimetype "image/*"]
3308 safe = true
3309
3310[mimetype "application/pdf"]
3311 safe = true
3312
3313[mimetype "application/msword"]
3314 safe = true
3315
3316[mimetype "application/vnd.ms-excel"]
3317 safe = true
3318----
Shawn O. Pearce01cb11902009-07-15 08:19:01 -07003319
Dave Borowitzbc314912017-03-21 14:23:35 -07003320[[note-db]]
3321=== Section noteDb
3322
3323NoteDb is the next generation of Gerrit storage backend, currently powering
Dave Borowitzcd9edda2017-08-15 14:48:37 -04003324`googlesource.com`. For more information, including how to migrate your data,
Dave Borowitzebde3282017-08-16 10:00:44 -04003325see the link:note-db.html[documentation].
Dave Borowitzbc314912017-03-21 14:23:35 -07003326
Edwin Kempin5be9c312017-07-07 10:40:55 +02003327[[notedb.accounts.sequenceBatchSize]]notedb.accounts.sequenceBatchSize::
3328+
Edwin Kempin311d5702017-07-28 15:10:24 +02003329The next available account sequence number is stored as UTF-8 text in a
3330blob pointed to by the `refs/sequences/accounts` ref in the `All-Users`
Edwin Kempin5be9c312017-07-07 10:40:55 +02003331repository. Multiple processes share the same sequence by incrementing
3332the counter using normal git ref updates. To amortize the cost of these
3333ref updates, processes increment the counter by a larger number and
3334hand out numbers from that range in memory until they run out. This
3335configuration parameter controls the size of the account ID batch that
3336each process retrieves at once.
3337+
Edwin Kempin5be9c312017-07-07 10:40:55 +02003338By default, 1.
3339
Dave Borowitzcd9edda2017-08-15 14:48:37 -04003340[[noteDb.retryMaxWait]]noteDb.retryMaxWait::
3341+
3342Maximum time to wait between attempts to retry update operations when one
3343attempt fails due to contention (aka lock failure) on the underlying ref
3344storage. Operations are retried with exponential backoff, plus some random
3345jitter, until the interval reaches this limit. After that, retries continue to
3346occur after a fixed timeout (plus jitter), up to
3347link:#noteDb.retryTimeout[`noteDb.retryTimeout`].
3348+
3349Defaults to 5 seconds; unit suffixes are supported, and assumes milliseconds if
3350not specified.
3351
3352[[noteDb.retryTimeout]]noteDb.retryTimeout::
3353+
3354Total timeout for retrying update operations when one attempt fails due to
3355contention (aka lock failure) on the underlying ref storage.
3356+
3357Defaults to 20 seconds; unit suffixes are supported, and assumes milliseconds if
3358not specified.
3359
Michael Ochmann69813262016-01-27 17:53:55 +01003360[[oauth]]
3361=== Section oauth
3362
3363OAuth integration is only enabled if `auth.type` is set to `OAUTH`. See
3364link:#auth.type[above] for a detailed description of the `auth.type` settings
3365and their implications.
3366
3367By default, contact information, like the full name and email address,
3368is retrieved from the selected OAuth provider when a user account is created,
3369or when a user requests to reload that information in the settings UI. If
3370that is not supported by the OAuth provider, users can be allowed to edit
3371their contact information manually.
3372
3373[[oauth.allowEditFullName]]oauth.allowEditFullName::
3374+
3375If true, the full name can be edited in the contact information.
3376+
3377Default is false.
3378
3379[[oauth.allowRegisterNewEmail]]oauth.allowRegisterNewEmail::
3380+
3381If true, additional email addresses can be registered in the contact
3382information.
3383+
3384Default is false.
Shawn O. Pearce5f11b292010-08-05 17:57:35 -07003385
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08003386[[pack]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08003387=== Section pack
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08003388
Shawn O. Pearce5f11b292010-08-05 17:57:35 -07003389Global settings controlling how Gerrit Code Review creates pack
3390streams for Git clients running clone, fetch, or pull. Most of these
3391variables are per-client request, and thus should be carefully set
3392given the expected concurrent request load and available CPU and
3393memory resources.
3394
3395[[pack.deltacompression]]pack.deltacompression::
3396+
3397If true, delta compression between objects is enabled. This may
3398result in a smaller overall transfer for the client, but requires
3399more server memory and CPU time.
3400+
3401False (off) by default, matching Gerrit Code Review 2.1.4.
3402
3403[[pack.threads]]pack.threads::
3404+
3405Maximum number of threads to use for delta compression (if enabled).
3406This is per-client request. If set to 0 then the number of CPUs is
3407auto-detected and one thread per CPU is used, per client request.
3408+
3409By default, 1.
3410
3411
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08003412[[plugins]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08003413=== Section plugins
Shawn O. Pearce5ad16ea2012-05-09 14:24:25 -07003414
3415[[plugins.checkFrequency]]plugins.checkFrequency::
3416+
3417How often plugins should be examined for new plugins to load, removed
3418plugins to be unloaded, or updated plugins to be reloaded. Values can
3419be specified using standard time unit abbreviations ('ms', 'sec',
3420'min', etc.).
3421+
3422If set to 0, automatic plugin reloading is disabled. Administrators
Christian Aistleitner8ce1a4e2015-06-05 01:54:15 +02003423may force reloading with link:cmd-plugin-reload.html[gerrit plugin reload].
Shawn O. Pearce5ad16ea2012-05-09 14:24:25 -07003424+
3425Default is 1 minute.
3426
Shawn Pearcefd033502014-02-14 16:42:35 -08003427[[plugins.allowRemoteAdmin]]plugins.allowRemoteAdmin::
3428+
3429Enable remote installation, enable and disable of plugins over HTTP
3430and SSH. If set to true Administrators can install new plugins
3431remotely, or disable existing plugins. Defaults to false.
3432
Dariusz Luksza98f23522015-03-11 11:41:41 +01003433[[plugins.jsLoadTimeout]]plugins.jsLoadTimeout::
3434+
3435Set the timeout value for loading JavaScript plugins in Gerrit UI.
3436Values can be specified using standard time unit abbreviations ('ms',
3437'sec', 'min', etc.).
3438+
3439Default is 5 seconds. Negative values will be converted to 0.
Shawn O. Pearce5ad16ea2012-05-09 14:24:25 -07003440
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08003441[[receive]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08003442=== Section receive
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08003443
Dave Borowitzff243892015-08-31 15:35:28 -04003444This section is used to configure behavior of the 'receive-pack'
3445handler, which responds to 'git push' requests.
lincoln2be11602010-07-05 10:53:25 -03003446
Dave Borowitzff243892015-08-31 15:35:28 -04003447[[receive.allowGroup]]receive.allowGroup::
Dave Borowitz532342bf2015-06-18 20:28:22 -04003448+
Dave Borowitzff243892015-08-31 15:35:28 -04003449Name of the groups of users that are allowed to execute
3450'receive-pack' on the server. One or more groups can be set.
Dave Borowitz532342bf2015-06-18 20:28:22 -04003451+
Dave Borowitzff243892015-08-31 15:35:28 -04003452If no groups are added, any user will be allowed to execute
3453'receive-pack' on the server.
Dave Borowitz532342bf2015-06-18 20:28:22 -04003454
3455[[receive.certNonceSeed]]receive.certNonceSeed::
3456+
3457If set to a non-empty value and server-side signed push validation is
3458link:#receive.enableSignedPush[enabled], use this value as the seed to
3459the HMAC SHA-1 nonce generator. If unset, a 64-byte random seed will be
3460generated at server startup.
3461+
3462As this is used as the seed of a cryptographic algorithm, it is
3463recommended to be placed in link:#secure-config[`secure.config`].
3464+
3465Defaults to unset.
3466
3467[[receive.certNonceSlop]]receive.certNonceSlop::
3468+
3469When validating the nonce passed as part of the signed push protocol,
3470accept valid nonces up to this many seconds old. This allows
3471certificate verification to work over HTTP where there is a lag between
3472the HTTP response providing the nonce to sign and the next request
3473containing the signed nonce. This can be significant on large
3474repositories, since the lag also includes the time to count objects on
3475the client.
3476+
3477Default is 5 minutes.
3478
Dave Borowitzff243892015-08-31 15:35:28 -04003479[[receive.changeUpdateThreads]]receive.changeUpdateThreads::
3480+
3481Number of threads to perform change creation or patch set updates
3482concurrently. Each thread uses its own database connection from
3483the database connection pool, and if all threads are busy then
3484main receive thread will also perform a change creation or patch
3485set update.
3486+
3487Defaults to 1, using only the main receive thread. This feature is for
3488databases with very high latency that can benefit from concurrent
3489operations when multiple changes are impacted at once.
3490
Shawn Pearce5cb31bf2013-02-27 16:20:26 -08003491[[receive.checkMagicRefs]]receive.checkMagicRefs::
3492+
3493If true, Gerrit will verify the destination repository has
3494no references under the magic 'refs/drafts', 'refs/for', or
3495'refs/publish' branch namespaces. Names under these locations
3496confuse clients when trying to upload code reviews so Gerrit
3497requires them to be empty.
3498+
3499If false Gerrit skips the sanity check and assumes administrators
3500have ensured the repository does not contain any magic references.
3501Setting to false to skip the check can decrease latency during push.
3502+
3503Default is true.
3504
Gustaf Lundh9062fd62013-02-14 17:23:11 +01003505[[receive.checkReferencedObjectsAreReachable]]receive.checkReferencedObjectsAreReachable::
3506+
3507If set to true, Gerrit will validate that all referenced objects that
3508are not included in the received pack are reachable by the user.
3509+
3510Carrying out this check on gits with many refs and commits can be a
3511very CPU-heavy operation. For non public Gerrit-servers this check may
3512be overkill.
3513+
3514Only disable this check if you trust the clients not to forge SHA1
3515references to access commits intended to be hidden from the user.
3516+
3517Default is true.
3518
Dave Borowitzff243892015-08-31 15:35:28 -04003519[[receive.enableSignedPush]]receive.enableSignedPush::
lincoln2be11602010-07-05 10:53:25 -03003520+
Dave Borowitzff243892015-08-31 15:35:28 -04003521If true, server-side signed push validation is enabled.
lincoln2be11602010-07-05 10:53:25 -03003522+
Dave Borowitzff243892015-08-31 15:35:28 -04003523When a client pushes with `git push --signed`, this ensures that the
3524push certificate is valid and signed with a valid public key stored in
David Pursehouse6117a472016-07-26 08:02:49 +00003525the `refs/meta/gpg-keys` branch of `All-Users`.
Dave Borowitzff243892015-08-31 15:35:28 -04003526+
3527Defaults to false.
3528
3529[[receive.maxBatchChanges]]receive.maxBatchChanges::
3530+
3531The maximum number of changes that Gerrit allows to be pushed
3532in a batch for review. When this number is exceeded Gerrit rejects
3533the push with an error message.
3534+
3535May be overridden for certain groups by specifying a limit in the
3536link:access-control.html#capability_batchChangesLimit['Batch Changes Limit']
3537global capability.
3538+
3539This setting can be used to prevent users from uploading large
3540number of changes for review by mistake.
3541+
3542Default is zero, no limit.
lincoln2be11602010-07-05 10:53:25 -03003543
Dave Borowitz78542192017-08-31 10:45:47 -04003544[[receive.maxBatchCommits]]receive.maxBatchCommits::
3545+
3546The maximum number of commits that Gerrit allows to be pushed in a batch
3547directly to a branch when link:user-upload.html#bypass_review[bypassing review].
3548This limit can be bypassed if a user link:user-upload.html#skip_validation[skips
3549validation].
3550+
3551Default is 10000.
3552
Sasa Zivkov59d89c32011-11-18 15:32:35 +01003553[[receive.maxObjectSizeLimit]]receive.maxObjectSizeLimit::
3554+
3555Maximum allowed Git object size that 'receive-pack' will accept.
3556If an object is larger than the given size the pack-parsing will abort
3557and the push operation will fail. If set to zero then there is no
3558limit.
3559+
David Pursehouse221d4f62012-06-08 17:38:08 +09003560Gerrit administrators can use this setting to prevent developers
Sasa Zivkov59d89c32011-11-18 15:32:35 +01003561from pushing objects which are too large to Gerrit.
3562+
Fredrik Luthandera3cf3542012-07-04 16:55:35 -07003563This setting can also be set in the `project.config`
3564link:config-project-config.html[receive.maxObjectSizeLimit] in order
3565to further reduce the global setting. The project specific setting is
3566only honored when it further reduces the global limit.
Sasa Zivkov5a708a82013-06-28 17:07:55 +02003567+
Sasa Zivkov59d89c32011-11-18 15:32:35 +01003568Default is zero.
3569+
3570Common unit suffixes of 'k', 'm', or 'g' are supported.
3571
Dave Borowitz1bb49492015-08-31 15:36:59 -04003572[[receive.maxTrustDepth]]receive.maxTrustDepth::
3573+
3574If signed push validation is link:#receive.enableSignedPush[enabled],
3575set to the maximum depth to search when checking if a key is
3576link:#receive.trustedKey[trusted].
3577+
3578Default is 0, meaning only explicitly trusted keys are allowed.
3579
Dave Borowitz234734a2012-03-01 14:22:29 -08003580[[receive.threadPoolSize]]receive.threadPoolSize::
3581+
3582Maximum size of the thread pool in which the change data in received packs is
3583processed.
3584+
3585Defaults to the number of available CPUs according to the Java runtime.
3586
Dave Borowitz1c401362012-03-02 17:39:17 -08003587[[receive.timeout]]receive.timeout::
3588+
Shawn O. Pearce00dd12d2012-03-12 15:52:11 -07003589Overall timeout on the time taken to process the change data in
3590received packs. Only includes the time processing Gerrit changes
3591and updating references, not the time to index the pack. Values can
3592be specified using standard time unit abbreviations ('ms', 'sec',
3593'min', etc.).
Dave Borowitz1c401362012-03-02 17:39:17 -08003594+
Dariusz Lukszade482b02015-11-09 18:25:04 +01003595Default is 4 minutes. If no unit is specified, milliseconds
Shawn O. Pearce00dd12d2012-03-12 15:52:11 -07003596is assumed.
Dave Borowitz1c401362012-03-02 17:39:17 -08003597
Dave Borowitz1bb49492015-08-31 15:36:59 -04003598[[receive.trustedKey]]receive.trustedKey::
3599+
3600List of GPG key fingerprints that should be considered trust roots by
3601the server when signed push validation is
3602link:#receive.enableSignedPush[enabled]. A key is trusted by the server
3603if it is either in this list, or a path of trust signatures leads from
3604the key to a configured trust root. The maximum length of the path is
3605determined by link:#receive.maxTrustDepth[`receive.maxTrustDepth`].
3606+
3607Key fingerprints can be displayed with `gpg --list-keys
3608--with-fingerprint`.
3609+
3610Trust signatures can be added to a key using the `tsign` command to
3611link:https://www.gnupg.org/documentation/manuals/gnupg/OpenPGP-Key-Management.html[
3612`gpg --edit-key`], after which the signed key should be re-uploaded.
3613+
3614If no keys are specified, web-of-trust checks are disabled. This is the
3615default behavior.
3616
lincoln2be11602010-07-05 10:53:25 -03003617
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08003618[[repository]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08003619=== Section repository
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08003620
Hugo Josefson072b4702010-04-21 19:27:11 +02003621Repositories in this sense are the same as projects.
3622
Shawn O. Pearce897d9212011-06-16 16:59:59 -07003623In the following example configuration `Registered Users` is set
3624to be the default owner of new projects.
Hugo Josefson072b4702010-04-21 19:27:11 +02003625
3626----
3627[repository "*"]
Hugo Josefson072b4702010-04-21 19:27:11 +02003628 ownerGroup = Registered Users
3629----
3630
Hugo Arès7d2b9422014-11-25 15:33:42 -05003631The only matching patterns supported are exact match or wildcard matching which
3632can be specified by ending the name with a `*`. If a project matches more than one
3633repository configuration, then the configuration from the more precise match
3634will be used. In the following example, the default submit type for a project
3635named `project/plugins/a` would be `CHERRY_PICK`.
3636
3637----
3638[repository "project/*"]
3639 defaultSubmitType = MERGE_IF_NECESSARY
3640[repository "project/plugins/*"]
3641 defaultSubmitType = CHERRY_PICK
3642----
3643
Michael Ochmann8129ece2016-07-08 11:25:25 +02003644[NOTE]
3645All properties are used from the matching repository configuration. In
Hugo Arès7d2b9422014-11-25 15:33:42 -05003646the previous example, all properties will be used from `project/plugins/\*`
3647section and no properties will be inherited nor overridden from `project/*`.
Hugo Josefson072b4702010-04-21 19:27:11 +02003648
Hugo Arès218bb3b2015-04-22 15:05:14 -04003649[[repository.name.basePath]]repository.<name>.basePath::
3650+
3651Alternate to <<gerrit.basePath,gerrit.basePath>>. The repository will be created
3652and used from this location instead: ${alternateBasePath}/${projectName}.git.
3653+
3654If configuring the basePath for an existing project in gerrit, make sure to stop
3655gerrit, move the repository in the alternate basePath, configure basePath for
3656this repository and then start Gerrit.
3657+
3658Path must be absolute.
3659
Edwin Kempina79ea552013-11-19 11:24:37 +01003660[[repository.name.defaultSubmitType]]repository.<name>.defaultSubmitType::
3661+
3662The default submit type for newly created projects. Supported values
3663are `MERGE_IF_NECESSARY`, `FAST_FORWARD_ONLY`, `REBASE_IF_NECESSARY`,
Gert van Dijka4e49d02017-08-27 22:50:40 +02003664`REBASE_ALWAYS`, `MERGE_ALWAYS` and `CHERRY_PICK`.
3665+
3666For more details see link:project-configuration.html#submit_type[Submit Types].
Edwin Kempina79ea552013-11-19 11:24:37 +01003667+
3668By default, `MERGE_IF_NECESSARY`.
3669
Hugo Josefson072b4702010-04-21 19:27:11 +02003670[[repository.name.ownerGroup]]repository.<name>.ownerGroup::
3671+
3672A name of a group which exists in the database. Zero, one or many
3673groups are allowed. Each on its own line. Groups which don't exist
3674in the database are ignored.
Hugo Josefson072b4702010-04-21 19:27:11 +02003675
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08003676[[rules]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08003677=== Section rules
Shawn O. Pearce94860ee2011-09-29 13:11:08 -07003678
3679[[rules.enable]]rules.enable::
3680+
Matt Baker8ce12fc2013-11-26 21:43:12 -07003681If true, Gerrit will load and execute 'rules.pl' files in each
Shawn O. Pearce94860ee2011-09-29 13:11:08 -07003682project's refs/meta/config branch, if present. When set to false,
3683only the default internal rules will be used.
3684+
3685Default is true, to execute project specific rules.
3686
Shawn Pearceed001d72014-12-17 14:25:55 -08003687[[rules.reductionLimit]]rules.reductionLimit::
3688+
3689Maximum number of Prolog reductions that can be performed when
3690evaluating rules for a single change. Each function call made
3691in user rule code, internal Gerrit Prolog code, or the Prolog
3692interpreter counts against this limit.
3693+
3694Sites using very complex rules that need many reductions should
3695compile Prolog to Java bytecode with link:pgm-rulec.html[rulec].
3696This eliminates the dynamic Prolog interpreter from charging its
3697own reductions against the limit, enabling more logic to execute
3698within the same bounds.
3699+
3700A reductionLimit of 0 is nearly infinite, implemented by setting
3701the internal limit to 2^31-1.
3702+
3703Default is 100,000 reductions (about 14 ms on Intel Core i7 CPU).
3704
3705[[rules.compileReductionLimit]]rules.compileReductionLimit::
3706+
3707Maximum number of Prolog reductions that can be performed when
3708compiling source code to internal Prolog machine code.
3709+
3710Default is 10x reductionLimit (1,000,000).
3711
Shawn Pearcea2b98522015-11-21 09:47:32 -08003712[[rules.maxSourceBytes]]rules.maxSourceBytes::
3713+
3714Maximum input size (in bytes) of a Prolog rules.pl file. Larger
3715source files may need a larger rules.compileReductionLimit. Consider
3716using link:pgm-rulec.html[rulec] to precompile larger rule files.
3717+
3718A size of 0 bytes disables rules, same as rules.enable = false.
3719+
David Pursehouse0c1dadf2015-11-24 09:14:21 +00003720Common unit suffixes of 'k', 'm', or 'g' are supported.
3721+
Shawn Pearcea2b98522015-11-21 09:47:32 -08003722Default is 128 KiB.
3723
3724[[rules.maxPrologDatabaseSize]]rules.maxPrologDatabaseSize::
3725+
3726Number of predicate clauses allowed to be defined in the Prolog
3727database by project rules. Very complex rules may need more than the
3728default 256 limit, but cost more memory and may need more time to
3729evaluate. Consider using link:pgm-rulec.html[rulec] to precompile
3730larger rule files.
3731+
3732Default is 256.
3733
David Pursehouse511a35b2014-04-04 10:27:13 +09003734[[execution]]
3735=== Section execution
Bruce Zua7e34312014-04-01 17:35:41 +08003736
3737[[execution.defaultThreadPoolSize]]execution.defaultThreadPoolSize::
3738+
3739The default size of the background execution thread pool in
3740which miscellaneous tasks are handled.
3741+
3742Default is 1.
3743
Patrick Hiesel328b7612016-10-21 16:43:13 +02003744[[receiveemail]]
3745=== Section receiveemail
3746
3747[[receiveemail.protocol]]receiveemail.protocol::
3748+
3749Specifies the protocol used for receiving emails. Valid options are
3750'POP3', 'IMAP' and 'NONE'. Note that Gerrit will automatically switch between
3751POP3 and POP3s as well as IMAP and IMAPS depending on the specified
3752link:#receiveemail.encryption[encryption].
3753+
3754Defaults to 'NONE' which means that receiving emails is disabled.
3755
3756[[receiveemail.host]]receiveemail.host::
3757+
3758The hostname of the mailserver. Example: 'imap.gmail.com'.
3759+
3760Defaults to an empty string which means that receiving emails is disabled.
3761
3762[[receiveemail.port]]receiveemail.port::
3763+
David Pursehouse4b067752017-03-03 15:54:53 +09003764The port the email server exposes for receiving emails.
Patrick Hiesel328b7612016-10-21 16:43:13 +02003765+
3766Defaults to the industry standard for a given protocol and encryption:
David Pursehouse34907442017-04-04 09:55:38 +09003767POP3: 110; POP3S: 995; IMAP: 143; IMAPS: 993.
Patrick Hiesel328b7612016-10-21 16:43:13 +02003768
3769[[receiveemail.username]]receiveemail.username::
3770+
3771Username used for authenticating with the email server.
3772+
3773Defaults to an empty string.
3774
3775[[receiveemail.password]]receiveemail.password::
3776+
3777Password used for authenticating with the email server.
3778+
3779Defaults to an empty string.
3780
3781[[receiveemail.encryption]]receiveemail.encryption::
3782+
3783Encryption standard used for transport layer security between Gerrit and the
3784email server. Possible values include 'NONE', 'SSL' and 'TLS'.
3785+
3786Defaults to 'NONE'.
3787
3788[[receiveemail.fetchInterval]]receiveemail.fetchInterval::
3789+
3790Time between two consecutive fetches from the email server. Communication with
3791the email server is not kept alive. Examples: 60s, 10m, 1h.
3792+
3793Defaults to 60 seconds.
3794
3795[[receiveemail.enableImapIdle]]receiveemail.enableImapIdle::
3796+
3797If the IMAP protocol is used for retrieving emails, IMAPv4 IDLE can be used to
3798keep the connection with the email server alive and receive a push when a new
3799email is delivered to the inbox. In this case, Gerrit will process the email
3800immediately and will not have a fetch delay.
Patrick Hiesel328b7612016-10-21 16:43:13 +02003801+
3802Defaults to false.
3803
Patrick Hiesel4266cf72017-02-03 08:18:19 +01003804[[receiveemail.filter.mode]]receiveemail.filter.mode::
3805+
3806A black- and whitelist filter to filter incoming emails.
3807+
3808If `OFF`, emails are not filtered by the list filter.
3809+
3810If `WHITELIST`, only emails where a pattern from
3811<<receiveemail.filter.patterns,receiveemail.filter.patterns>>
3812matches 'From' will be processed.
3813+
3814If `BLACKLIST`, only emails where no pattern from
3815<<receiveemail.filter.patterns,receiveemail.filter.patterns>>
3816matches 'From' will be processed.
3817+
3818Defaults to `OFF`.
3819
3820[[receiveemail.filter.patterns]]receiveemail.filter.patterns::
3821+
3822A list of regular expressions to match the email sender against. This can also
3823be a list of addresses when regular expression characters are escaped.
3824
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08003825[[sendemail]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08003826=== Section sendemail
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07003827
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07003828[[sendemail.enable]]sendemail.enable::
Shawn O. Pearce2e4573b2009-06-02 09:09:50 -07003829+
3830If false Gerrit will not send email messages, for any reason,
3831and all other properties of section sendemail are ignored.
3832+
3833By default, true, allowing notifications to be sent.
3834
Jonathan Niederdabd8c22016-09-20 14:10:11 -07003835[[sendemail.html]]sendemail.html::
3836+
3837If false, Gerrit will only send plain-text emails.
3838If true, Gerrit will send multi-part emails with an HTML and
3839plain text part.
3840+
3841By default, true, allowing HTML in the emails Gerrit sends.
3842
Bruce Zua7e34312014-04-01 17:35:41 +08003843[[sendemail.connectTimeout]]sendemail.connectTimeout::
3844+
3845The connection timeout of opening a socket connected to a
3846remote SMTP server.
3847+
3848Values can be specified using standard time unit abbreviations
3849('ms', 'sec', 'min', etc.).
3850If no unit is specified, milliseconds is assumed.
3851+
3852Default is 0. A timeout of zero is interpreted as an infinite
3853timeout. The connection will then block until established or
3854an error occurs.
3855
3856[[sendemail.threadPoolSize]]sendemail.threadPoolSize::
3857+
3858Maximum size of thread pool in which the review comments
3859notifications are sent out asynchronously.
3860+
3861By default, 1.
3862
Shawn O. Pearce5c31bd72009-09-10 18:13:33 -07003863[[sendemail.from]]sendemail.from::
3864+
3865Designates what name and address Gerrit will place in the From
3866field of any generated email messages. The supported values are:
3867+
3868* `USER`
3869+
3870Gerrit will set the From header to use the current user's
David Pursehouse92463562013-06-24 10:16:28 +09003871Full Name and Preferred Email. This may cause messages to be
Shawn O. Pearce5c31bd72009-09-10 18:13:33 -07003872classified as spam if the user's domain has SPF or DKIM enabled
3873and <<sendemail.smtpServer,sendemail.smtpServer>> is not a trusted
Zhen Chenae765aa2016-08-08 15:49:44 -07003874relay for that domain. You can specify
3875<<sendemail.allowedDomain,sendemail.allowedDomain>> to instruct Gerrit to only
3876send as USER if USER is from those domains.
Shawn O. Pearce5c31bd72009-09-10 18:13:33 -07003877+
3878* `MIXED`
3879+
Edwin Kempincdb0e002011-09-08 14:23:30 +02003880Shorthand for `${user} (Code Review) <review@example.com>` where
Shawn O. Pearce5c31bd72009-09-10 18:13:33 -07003881`review@example.com` is the same as <<user.email,user.email>>.
3882See below for a description of how the replacement is handled.
3883+
3884* `SERVER`
3885+
3886Gerrit will set the From header to the same name and address
3887it records in any commits Gerrit creates. This is set by
3888<<user.name,user.name>> and <<user.email,user.email>>, or guessed
3889from the local operating system.
3890+
Edwin Kempinebfbbac2015-07-01 16:02:39 +02003891* `Code Review <review@example.com>`
Shawn O. Pearce5c31bd72009-09-10 18:13:33 -07003892+
3893If set to a name and email address in brackets, Gerrit will use
3894this name and email address for any messages, overriding the name
3895that may have been selected for commits by user.name and user.email.
Edwin Kempincdb0e002011-09-08 14:23:30 +02003896Optionally, the name portion may contain the placeholder `${user}`,
Shawn O. Pearce5c31bd72009-09-10 18:13:33 -07003897which is replaced by the Full Name of the current user.
3898
3899+
3900By default, MIXED.
3901
Zhen Chenae765aa2016-08-08 15:49:44 -07003902[[sendemail.allowedDomain]]sendemail.allowedDomain::
3903+
3904Only used when `sendemail.from` is set to `USER`.
3905List of allowed domains. If user's email matches one of the domains, emails will
3906be sent as USER, otherwise as MIXED mode. Wildcards may be specified by
3907including `*` to match any number of characters, for example `*.example.com`
3908matches any subdomain of `example.com`.
3909+
3910By default, `*`.
3911
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07003912[[sendemail.smtpServer]]sendemail.smtpServer::
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07003913+
3914Hostname (or IP address) of a SMTP server that will relay
3915messages generated by Gerrit to end users.
3916+
3917By default, 127.0.0.1 (aka localhost).
3918
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07003919[[sendemail.smtpServerPort]]sendemail.smtpServerPort::
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07003920+
3921Port number of the SMTP server in sendemail.smtpserver.
3922+
Shawn O. Pearce6e9a83f2009-11-02 10:30:48 -08003923By default, 25, or 465 if smtpEncryption is 'ssl'.
3924
3925[[sendemail.smtpEncryption]]sendemail.smtpEncryption::
3926+
3927Specify the encryption to use, either 'ssl' or 'tls'.
3928+
3929By default, 'none', indicating no encryption is used.
3930
3931[[sendemail.sslVerify]]sendemail.sslVerify::
3932+
3933If false and sendemail.smtpEncryption is 'ssl' or 'tls', Gerrit
3934will not verify the server certificate when it connects to send
3935an email message.
3936+
3937By default, true, requiring the certificate to be verified.
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07003938
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07003939[[sendemail.smtpUser]]sendemail.smtpUser::
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07003940+
3941User name to authenticate with, if required for relay.
3942
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07003943[[sendemail.smtpPass]]sendemail.smtpPass::
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07003944+
3945Password for the account named by sendemail.smtpUser.
3946
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07003947[[sendemail.allowrcpt]]sendemail.allowrcpt::
Shawn O. Pearce219a8ee2009-06-01 18:13:57 -07003948+
3949If present, each value adds one entry to the whitelist of email
3950addresses that Gerrit can send email to. If set to a complete
3951email address, that one address is added to the white list.
3952If set to a domain name, any address at that domain can receive
3953email from Gerrit.
3954+
3955By default, unset, permitting delivery to any email address.
3956
Shawn O. Pearce02aacbc2012-06-12 13:44:22 -07003957[[sendemail.includeDiff]]sendemail.includeDiff::
3958+
Bruce Zueb00ff32012-11-27 17:38:10 +08003959If true, new change emails and merged change emails from Gerrit
3960will include the complete unified diff of the change.
3961Variable maxmimumDiffSize places an upper limit on how large the
3962email can get when this option is enabled.
Shawn O. Pearce02aacbc2012-06-12 13:44:22 -07003963+
3964By default, false.
3965
Shawn O. Pearce28a950b2012-06-12 14:36:34 -07003966[[sendemail.maximumDiffSize]]sendemail.maximumDiffSize::
3967+
3968Largest size of unified diff output to include in an email. When
3969the diff exceeds this size the file paths will be listed instead.
3970Standard byte unit suffixes are supported.
3971+
3972By default, 256 KiB.
3973
Alex Blewitt9cca7402011-02-11 01:39:30 +00003974[[sendemail.importance]]sendemail.importance::
3975+
3976If present, emails sent from Gerrit will have the given level
3977of importance. Valid values include 'high' and 'low', which
3978email clients will render in different ways.
3979+
3980By default, unset, so no Importance header is generated.
3981
3982[[sendemail.expiryDays]]sendemail.expiryDays::
3983+
3984If present, emails sent from Gerrit will expire after the given
3985number of days. This will add the Expiry-Date header and
3986email clients may expire or expunge mails whose Expiry-Date
3987header is in the past. This should be a positive non-zero
3988number indicating how many days in the future the mails
3989should expire.
3990+
3991By default, unset, so no Expiry-Date header is generated.
3992
Patrick Hiesel31d60f02017-02-09 17:38:40 +01003993[[sendemail.replyToAddress]]sendemail.replyToAddress::
3994+
3995A custom Reply-To address should only be provided if Gerrit is set up to
3996receive emails and the inbound address differs from
3997<<sendemail.from,sendemail.from>>.
3998It will be set as Reply-To header on all types of outgoing email where
3999Gerrit can parse back a user's reply.
4000+
4001Defaults to an empty string which adds <<sendemail.from,sendemail.from>> as
4002Reply-To if inbound email is enabled and the review's author otherwise.
Shawn O. Pearcedba97642011-09-07 20:12:31 -07004003
David Pursehouse917b7262017-04-21 18:18:52 +02004004[[sendemail.allowTLD]]sendemail.allowTLD::
4005+
4006List of custom TLDs to allow sending emails to in addition to those specified
4007in the link:http://data.iana.org/TLD/[IANA list].
4008+
4009Defaults to an empty list, meaning no additional TLDs are allowed.
4010
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08004011[[site]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08004012=== Section site
Shawn O. Pearcedba97642011-09-07 20:12:31 -07004013
Shawn Pearcec896eaa2016-08-23 19:38:58 -07004014[[site.allowOriginRegex]]site.allowOriginRegex::
4015+
4016List of regular expressions matching origins that should be permitted
Shawn Pearce53ebad42017-06-10 11:14:20 -07004017to use the full Gerrit REST API. These should be trusted applications,
4018as the sites may be able to use the user's credentials. Applies to
4019all requests, including state changing methods (PUT, DELETE, POST).
4020+
4021Expressions should not require trailing slash. For example a valid
4022pattern might be `https://build-status[.]example[.]com`.
Shawn Pearcec896eaa2016-08-23 19:38:58 -07004023+
4024By default, unset, denying all cross-origin requests.
4025
Shawn O. Pearcedba97642011-09-07 20:12:31 -07004026[[site.refreshHeaderFooter]]site.refreshHeaderFooter::
4027+
4028If true the server checks the site header, footer and CSS files for
4029updated versions. If false, a server restart is required to change
4030any of these resources. Default is true, allowing automatic reloads.
4031
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08004032[[ssh-alias]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08004033=== Section ssh-alias
Shawn O. Pearce521380a2012-05-11 14:57:56 -07004034
4035Variables in section ssh-alias permit the site administrator to alias
4036another command from Gerrit or a plugin into the `gerrit` command
4037namespace. To alias `replication start` to `gerrit replicate`:
4038
4039----
4040[ssh-alias]
4041 replicate = replication start
4042----
Shawn O. Pearcedba97642011-09-07 20:12:31 -07004043
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08004044[[sshd]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08004045=== Section sshd
Shawn O. Pearce9410f2c2009-05-14 10:26:47 -07004046
Gustaf Lundhd60e90f2015-08-03 16:18:33 +02004047[[sshd.enableCompression]]sshd.enableCompression::
4048+
4049In the general case, we want to disable transparent compression, since
4050the majority of our data transfer is highly compressed Git pack files
4051and we cannot make them any smaller than they already are.
4052+
4053However, if there are CPU in abundance and the server is reachable
4054through slow networks, gits with huge amount of refs can benefit from
4055SSH-compression since git does not compress the ref announcement during
4056handshake.
4057+
4058Compression can be especially useful when Gerrit slaves are being used
4059for the larger clones and fetches and the master server mostly takes
4060small receive-packs.
4061+
4062By default, `false`.
4063
David Ostrovskye2921b62015-03-04 22:36:10 +01004064[[sshd.backend]]sshd.backend::
4065+
4066Starting from version 0.9.0 Apache SSHD project added support for NIO2
4067IoSession. To use the new NIO2 session the `backend` option must be set
Marco Miller4eba49e2016-04-06 08:23:01 -04004068to `NIO2`. Otherwise, this option must be set to `MINA`.
David Ostrovskye2921b62015-03-04 22:36:10 +01004069+
Luca Milanesiofc1ed9c2016-03-01 18:28:36 +00004070By default, `NIO2`.
David Ostrovskye2921b62015-03-04 22:36:10 +01004071
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07004072[[sshd.listenAddress]]sshd.listenAddress::
Shawn O. Pearce1d3cb4442009-05-30 14:03:31 -07004073+
4074Specifies the local addresses the internal SSHD should listen
4075for connections on. The following forms may be used to specify
4076an address. In any form, `:'port'` may be omitted to use the
David Pursehousea3af2552016-08-02 14:04:44 +09004077default of `29418`.
Shawn O. Pearce1d3cb4442009-05-30 14:03:31 -07004078+
David Pursehousea3af2552016-08-02 14:04:44 +09004079* `'hostname':'port'` (for example `review.example.com:29418`)
4080* `'IPv4':'port'` (for example `10.0.0.1:29418`)
4081* `['IPv6']:'port'` (for example `[ff02::1]:29418`)
4082* `+*:'port'+` (for example `+*:29418+`)
Shawn O. Pearce1d3cb4442009-05-30 14:03:31 -07004083
4084+
Edwin Kempina09ebcf2015-04-16 14:53:23 +02004085--
Shawn O. Pearce1d3cb4442009-05-30 14:03:31 -07004086If multiple values are supplied, the daemon will listen on all
4087of them.
Edwin Kempina09ebcf2015-04-16 14:53:23 +02004088
Shawn O. Pearce6af6f5f2010-06-08 17:38:43 -07004089To disable the internal SSHD, set listenAddress to `off`.
Edwin Kempina09ebcf2015-04-16 14:53:23 +02004090
David Pursehousea3af2552016-08-02 14:04:44 +09004091By default, `*:29418`.
Edwin Kempina09ebcf2015-04-16 14:53:23 +02004092--
Shawn O. Pearce1d3cb4442009-05-30 14:03:31 -07004093
James Y Knight910bd862011-01-11 20:05:56 -05004094[[sshd.advertisedAddress]]sshd.advertisedAddress::
4095+
4096Specifies the addresses clients should be told to connect to.
4097This may differ from sshd.listenAddress if a firewall based port
4098redirector is being used, making Gerrit appear to answer on port
409922. The following forms may be used to specify an address. In any
4100form, `:'port'` may be omitted to use the default SSH port of 22.
Edwin Kempina09ebcf2015-04-16 14:53:23 +02004101
David Pursehousea3af2552016-08-02 14:04:44 +09004102* `'hostname':'port'` (for example `review.example.com:22`)
4103* `'IPv4':'port'` (for example `10.0.0.1:29418`)
4104* `['IPv6']:'port'` (for example `[ff02::1]:29418`)
James Y Knight910bd862011-01-11 20:05:56 -05004105
4106+
Edwin Kempina09ebcf2015-04-16 14:53:23 +02004107--
James Y Knight910bd862011-01-11 20:05:56 -05004108If multiple values are supplied, the daemon will advertise all
4109of them.
Edwin Kempina09ebcf2015-04-16 14:53:23 +02004110
David Pursehousea3af2552016-08-02 14:04:44 +09004111By default uses the value of `sshd.listenAddress`.
Edwin Kempina09ebcf2015-04-16 14:53:23 +02004112--
James Y Knight910bd862011-01-11 20:05:56 -05004113
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07004114[[sshd.tcpKeepAlive]]sshd.tcpKeepAlive::
Shawn O. Pearcefc9081f2009-05-14 10:26:59 -07004115+
4116If true, enables TCP keepalive messages to the other side, so
4117the daemon can terminate connections if the peer disappears.
4118+
David Ostrovskye5b7f1a2013-10-23 21:10:39 +02004119Only effective when `sshd.backend` is set to `MINA`.
4120+
David Pursehousea3af2552016-08-02 14:04:44 +09004121By default, `true`.
Shawn O. Pearcefc9081f2009-05-14 10:26:59 -07004122
Shawn O. Pearce1a4580b2009-11-19 17:37:10 -08004123[[sshd.threads]]sshd.threads::
4124+
4125Number of threads to use when executing SSH command requests.
4126If additional requests are received while all threads are busy they
David Pursehouse221d4f62012-06-08 17:38:08 +09004127are queued and serviced in a first-come-first-served order.
Shawn O. Pearce1a4580b2009-11-19 17:37:10 -08004128+
Dariusz Luksza4b5a4162015-11-09 21:53:29 +01004129By default, 2x the number of CPUs available to the JVM.
Shawn O. Pearce1a4580b2009-11-19 17:37:10 -08004130
Nico Sallembienfc53f7f2010-05-18 16:40:10 -07004131[[sshd.batchThreads]]sshd.batchThreads::
4132+
4133Number of threads to allocate for SSH command requests from
Fredrik Luthander46843022012-03-13 16:11:02 +01004134link:access-control.html#non-interactive_users[non-interactive users].
4135If equals to 0, then all non-interactive requests are executed in the same
4136queue as interactive requests.
Nico Sallembienfc53f7f2010-05-18 16:40:10 -07004137+
4138Any other value will remove the number of threads from the queue
4139allocated to interactive users, and create a separate thread pool
4140of the requested size, which will be used to run commands from
4141non-interactive users.
4142+
4143If the number of threads requested for non-interactive users is larger
4144than the total number of threads allocated in sshd.threads, then the
David Pursehouse92463562013-06-24 10:16:28 +09004145value of sshd.threads is increased to accommodate the requested value.
Nico Sallembienfc53f7f2010-05-18 16:40:10 -07004146+
Dariusz Luksza145de472015-11-09 18:44:35 +01004147By default is 1 on single core node, 2 otherwise.
Nico Sallembienfc53f7f2010-05-18 16:40:10 -07004148
Kenny Root15ac1b82010-02-24 00:29:20 -08004149[[sshd.streamThreads]]sshd.streamThreads::
4150+
4151Number of threads to use when formatting events to asynchronous
4152streaming clients. Event formatting is multiplexed onto this thread
4153pool by a simple FIFO scheduling system.
4154+
4155By default, 1 plus the number of CPUs available to the JVM.
4156
Edwin Kempinb5df3b82011-10-10 11:31:14 +02004157[[sshd.commandStartThreads]]sshd.commandStartThreads::
Shawn O. Pearced6296552011-05-15 13:56:30 -07004158+
4159Number of threads used to parse a command line submitted by a client
4160over SSH for execution, create the internal data structures used by
4161that command, and schedule it for execution on another thread.
4162+
4163By default, 2.
4164
Shawn O. Pearce8a0bf362010-11-05 17:49:41 -07004165[[sshd.maxAuthTries]]sshd.maxAuthTries::
4166+
4167Maximum number of authentication attempts before the server
4168disconnects the client. Each public key that a client has loaded
4169into its local agent counts as one auth request. Users can work
4170around the server's limit by loading less keys into their agent,
4171or selecting a specific key in their `~/.ssh/config` file with
4172the `IdentityFile` option.
4173+
4174By default, 6.
4175
4176[[sshd.loginGraceTime]]sshd.loginGraceTime::
4177+
4178Time in seconds that a client has to authenticate before the server
4179automatically terminates their connection. Values should use common
4180unit suffixes to express their setting:
4181+
4182* s, sec, second, seconds
4183* m, min, minute, minutes
4184* h, hr, hour, hours
4185* d, day, days
4186
4187+
4188By default, 2 minutes.
4189
Christian Aistleitner3d794592013-04-08 00:19:40 +02004190[[sshd.idleTimeout]]sshd.idleTimeout::
4191+
4192Time in seconds after which the server automatically terminates idle
4193connections (or 0 to disable closing of idle connections). Values
4194should use common unit suffixes to express their setting:
4195+
4196* s, sec, second, seconds
4197* m, min, minute, minutes
4198* h, hr, hour, hours
4199* d, day, days
4200
4201+
4202By default, 0.
4203
Shawn O. Pearce8a0bf362010-11-05 17:49:41 -07004204[[sshd.maxConnectionsPerUser]]sshd.maxConnectionsPerUser::
4205+
4206Maximum number of concurrent SSH sessions that a user account
4207may open at one time. This is the number of distinct SSH logins
David Pursehouse221d4f62012-06-08 17:38:08 +09004208that each user may have active at one time, and is not related to
Shawn O. Pearce8a0bf362010-11-05 17:49:41 -07004209the number of commands a user may issue over a single connection.
4210If set to 0, there is no limit.
4211+
4212By default, 64.
4213
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07004214[[sshd.cipher]]sshd.cipher::
Shawn O. Pearce0bf2f522009-05-14 11:02:03 -07004215+
4216Available ciphers. To permit multiple ciphers, specify multiple
4217`sshd.cipher` keys in the configuration file, one cipher name
4218per key. Cipher names starting with `+` are enabled in addition
4219to the default ciphers, cipher names starting with `-` are removed
4220from the default cipher set.
4221+
David Pursehousea3af2552016-08-02 14:04:44 +09004222Supported ciphers: `aes128-cbc`, `aes128-cbc`, `aes256-cbc`, `blowfish-cbc`,
4223`3des-cbc`, `none`.
Shawn O. Pearce0bf2f522009-05-14 11:02:03 -07004224+
4225By default, all supported ciphers except `none` are available.
4226
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07004227[[sshd.mac]]sshd.mac::
Shawn O. Pearce0bf2f522009-05-14 11:02:03 -07004228+
4229Available MAC (message authentication code) algorithms. To permit
4230multiple algorithms, specify multiple `sshd.mac` keys in the
4231configuration file, one MAC per key. MAC names starting with `+`
4232are enabled in addition to the default MACs, MAC names starting with
4233`-` are removed from the default MACs.
4234+
David Pursehousea3af2552016-08-02 14:04:44 +09004235Supported MACs: `hmac-md5`, `hmac-md5-96`, `hmac-sha1`, `hmac-sha1-96`,
4236`hmac-sha2-256`, `hmac-sha2-512`.
Shawn O. Pearce0bf2f522009-05-14 11:02:03 -07004237+
4238By default, all supported MACs are available.
4239
Scott Dialb4a04fa2016-03-15 09:44:11 -04004240[[sshd.kex]]sshd.kex::
4241+
4242--
4243Available key exchange algorithms. To permit multiple algorithms,
4244specify multiple `sshd.kex` keys in the configuration file, one key
4245exchange algorithm per key. Key exchange algorithm names starting
4246with `+` are enabled in addition to the default key exchange
4247algorithms, key exchange algorithm names starting with `-` are
4248removed from the default key exchange algorithms.
4249
4250In the following example configuration, support for the 1024-bit
4251`diffie-hellman-group1-sha1` key exchange is disabled while leaving
4252all of the other default algorithms enabled:
4253
4254----
4255[sshd]
4256 kex = -diffie-hellman-group1-sha1
4257----
4258
4259Supported key exchange algorithms:
4260
4261* `ecdh-sha2-nistp521`
4262* `ecdh-sha2-nistp384`
4263* `ecdh-sha2-nistp256`
4264* `diffie-hellman-group-exchange-sha256`
4265* `diffie-hellman-group-exchange-sha1`
4266* `diffie-hellman-group14-sha1`
4267* `diffie-hellman-group1-sha1`
4268
4269By default, all supported key exchange algorithms are available.
4270Without Bouncy Castle, `diffie-hellman-group1-sha1` is the only
4271available algorithm.
4272--
4273
Alex Blewitt7efb06f2013-04-01 12:46:48 -04004274[[sshd.kerberosKeytab]]sshd.kerberosKeytab::
4275+
4276Enable kerberos authentication for SSH connections. To permit
4277kerberos authentication, the server must have a host principal
4278(see `sshd.kerberosPrincipal`) which is acquired from a keytab.
4279This must be provisioned by the kerberos administrators, and is
4280typically installed into `/etc/krb5.keytab` on host machines.
4281+
4282The keytab must contain at least one `host/` principal, typically
4283using the host's canonical name. If it does not use the
4284canonical name, the `sshd.kerberosPrincipal` should be configured
4285with the correct name.
4286+
4287By default, not set and so kerberos authentication is not enabled.
4288
4289[[sshd.kerberosPrincipal]]sshd.kerberosPrincipal::
4290+
4291If kerberos authentication is enabled with `sshd.kerberosKeytab`,
4292instead use the given principal name instead of the default.
4293If the principal does not begin with `host/` a warning message is
4294printed and may prevent successful authentication.
4295+
4296This may be useful if the host is behind an IP load balancer or
4297other SSH forwarding systems, since the principal name is constructed
4298by the client and must match for kerberos authentication to work.
4299+
4300By default, `host/canonical.host.name`
4301
Shawn Pearce318bfca2013-10-17 22:15:38 -07004302[[sshd.requestLog]]sshd.requestLog::
4303+
4304Enable (or disable) the `'$site_path'/logs/sshd_log` request log.
4305If enabled, a request log file is written out by the SSH daemon.
4306+
David Ostrovsky8e4a9902013-11-19 23:57:48 +01004307`log4j.appender` with the name `sshd_log` can be configured to overwrite
4308programmatic configuration.
4309+
David Pursehousea3af2552016-08-02 14:04:44 +09004310By default, `true`.
Shawn Pearce318bfca2013-10-17 22:15:38 -07004311
David Ostrovsky985201b2015-03-04 22:37:33 +01004312[[sshd.rekeyBytesLimit]]sshd.rekeyBytesLimit::
4313+
4314The SSH daemon will issue a rekeying after a certain amount of data.
4315This configuration option allows you to tweak that setting.
4316+
4317By default, 1073741824 (bytes, 1GB).
4318+
David Pursehousea3af2552016-08-02 14:04:44 +09004319The `rekeyBytesLimit` cannot be set to lower than 32.
David Ostrovsky985201b2015-03-04 22:37:33 +01004320
4321[[sshd.rekeyTimeLimit]]sshd.rekeyTimeLimit::
4322+
4323The SSH daemon will issue a rekeying after a certain amount of time.
4324This configuration option allows you to tweak that setting.
4325+
4326By default, 1h.
4327+
4328Set to 0 to disable this check.
4329
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08004330[[suggest]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08004331=== Section suggest
Shawn O. Pearce07bd6fb2011-04-29 19:15:47 -07004332
Sven Selberg42d9d292014-08-13 11:20:11 +02004333[[suggest.maxSuggestedReviewers]]suggest.maxSuggestedReviewers::
4334+
4335The maximum numbers of reviewers suggested.
4336+
4337By default 10.
4338
Edwin Kempinf957dc22012-10-19 20:41:18 +02004339[[suggest.from]]suggest.from::
4340+
4341The number of characters that a user must have typed before suggestions
Patrick Hiesel87880b02016-05-03 18:15:08 +02004342are provided. If set to 0, suggestions are always provided. This is only
4343used for suggesting accounts when adding members to a group.
Edwin Kempinf957dc22012-10-19 20:41:18 +02004344+
4345By default 0.
4346
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08004347[[theme]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08004348=== Section theme
Shawn O. Pearce2ba3ab42010-02-25 12:10:10 -08004349
4350[[theme.backgroundColor]]theme.backgroundColor::
4351+
4352Background color for the page, and major data tables like the all
4353open changes table or the account dashboard. The value must be a
4354valid HTML hex color code, or standard color name.
4355+
Chad Horohoebbdf7482012-11-13 18:23:15 -08004356By default white, `FFFFFF`.
Shawn O. Pearce2ba3ab42010-02-25 12:10:10 -08004357
4358[[theme.topMenuColor]]theme.topMenuColor::
4359+
4360This is the color of the main menu bar at the top of the page.
4361The value must be a valid HTML hex color code, or standard color
Chad Horohoebbdf7482012-11-13 18:23:15 -08004362name.
4363+
4364By default white, `FFFFFF`.
Shawn O. Pearce2ba3ab42010-02-25 12:10:10 -08004365
4366[[theme.textColor]]theme.textColor::
4367+
4368Text color for the page, and major data tables like the all
4369open changes table or the account dashboard. The value must be a
4370valid HTML hex color code, or standard color name.
4371+
Chad Horohoebbdf7482012-11-13 18:23:15 -08004372By default dark grey, `353535`.
Shawn O. Pearce2ba3ab42010-02-25 12:10:10 -08004373
4374[[theme.trimColor]]theme.trimColor::
4375+
4376Primary color used as a background color behind text. This is
4377the color of the main menu bar at the top, of table headers,
4378and of major UI areas that we want to offset from other portions
4379of the page. The value must be a valid HTML hex color code, or
4380standard color name.
4381+
Chad Horohoebbdf7482012-11-13 18:23:15 -08004382By default a light grey, `EEEEEE`.
Shawn O. Pearce2ba3ab42010-02-25 12:10:10 -08004383
4384[[theme.selectionColor]]theme.selectionColor::
4385+
4386Background color used within a trimColor area to denote the currently
4387selected tab, or the background color used in a table to denote the
4388currently selected row. The value must be a valid HTML hex color
4389code, or standard color name.
4390+
Chad Horohoebbdf7482012-11-13 18:23:15 -08004391By default a pale blue, `D8EDF9`.
Shawn O. Pearce2ba3ab42010-02-25 12:10:10 -08004392
Andrew Hutchingscfd7abb2012-06-29 10:57:05 +01004393[[theme.changeTableOutdatedColor]]theme.changeTableOutdatedColor::
4394+
4395Background color used for patch outdated messages. The value must be
4396a valid HTML hex color code, or standard color name.
4397+
Edwin Kempinb0347332012-07-17 10:14:32 +02004398By default a shade of red, `F08080`.
Andrew Hutchingscfd7abb2012-06-29 10:57:05 +01004399
4400[[theme.tableOddRowColor]]theme.tableOddRowColor::
4401+
4402Background color for tables such as lists of open reviews for odd
4403rows. This is so you can have a different color for odd and even
4404rows of the table. The value must be a valid HTML hex color code,
4405or standard color name.
4406+
4407By default transparent.
4408
4409[[theme.tableEvenRowColor]]theme.tableEvenRowColor::
4410+
4411Background color for tables such as lists of open reviews for even
4412rows. This is so you can have a different color for odd and even
4413rows of the table. The value must be a valid HTML hex color code,
4414or standard color name.
4415+
4416By default transparent.
4417
Shawn O. Pearcea83bb1c2011-05-20 08:46:48 -07004418A different theme may be used for signed-in vs. signed-out user status
4419by using the "signed-in" and "signed-out" theme sections. Variables
4420not specified in a section are inherited from the default theme.
4421
4422----
4423[theme]
4424 backgroundColor = FFFFFF
4425[theme "signed-in"]
4426 backgroundColor = C0C0C0
4427[theme "signed-out"]
4428 backgroundColor = 00FFFF
4429----
4430
David Ostrovsky117c6032013-08-09 00:44:56 +02004431As example, here is the theme configuration to have the old green look:
4432
4433----
4434[theme]
4435 backgroundColor = FCFEEF
4436 textColor = 000000
4437 trimColor = D4E9A9
4438 selectionColor = FFFFCC
4439 topMenuColor = D4E9A9
4440 changeTableOutdatedColor = F08080
4441[theme "signed-in"]
4442 backgroundColor = FFFFFF
4443----
4444
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08004445[[trackingid]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08004446=== Section trackingid
Goran Lungberg04132a12010-06-15 17:20:37 -07004447
Shawn O. Pearcee800b1e2010-06-16 17:33:43 -07004448Tagged footer lines containing references to external
4449tracking systems, parsed out of the commit message and
David Pursehoused55a6b62015-02-27 17:39:38 +09004450saved in Gerrit's secondary index.
Shawn Pearceff61c8a2013-10-07 19:35:53 -07004451
4452After making changes to this section, existing changes
Shawn Pearce9f4de522013-11-29 11:57:53 -08004453must be reindexed with link:pgm-reindex.html[reindex].
Goran Lungberg04132a12010-06-15 17:20:37 -07004454
Edwin Kempinbb421f12011-08-25 11:19:00 +02004455The tracking ids are searchable using tr:<tracking id> or
Shawn O. Pearce91763a02010-06-16 15:39:33 -07004456bug:<tracking id>.
Goran Lungberg04132a12010-06-15 17:20:37 -07004457
4458----
4459[trackingid "jira-bug"]
4460 footer = Bugfix:
David Pursehousece7f6862015-02-19 14:52:45 +09004461 footer = Bug:
Goran Lungberg04132a12010-06-15 17:20:37 -07004462 match = JRA\\d{2,8}
4463 system = JIRA
4464
4465[trackingid "jira-feature"]
4466 footer = Feature
4467 match = JRA(\\d{2,8})
4468 system = JIRA
4469----
4470
4471[[trackingid.name.footer]]trackingid.<name>.footer::
4472+
David Pursehousece7f6862015-02-19 14:52:45 +09004473A prefix tag that identifies the footer line to parse for tracking ids.
4474+
4475Several trackingid entries can have the same footer tag, and a single trackingid
4476entry can have multiple footer tags.
4477+
4478If multiple footer tags are specified, each tag will be parsed separately and
4479duplicates will be ignored.
4480+
4481The trailing ":" is optional.
Goran Lungberg04132a12010-06-15 17:20:37 -07004482
4483[[trackingid.name.match]]trackingid.<name>.match::
4484+
Magnus Bäcke5611832011-02-02 08:57:15 +01004485A link:http://download.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html[standard
4486Java regular expression (java.util.regex)] used to match the
4487external tracking id part of the footer line. The match can
4488result in several entries in the DB. If grouping is used in the
4489regex the first group will be interpreted as the tracking id.
Christian Aistleitner5cec3682013-03-16 23:02:37 +01004490Tracking ids longer than 32 characters will be ignored.
Goran Lungberg04132a12010-06-15 17:20:37 -07004491+
4492The configuration file parser eats one level of backslashes, so the
4493character class `\s` requires `\\s` in the configuration file. The
4494parser also terminates the line at the first `#`, so a match
4495expression containing # must be wrapped in double quotes.
4496
4497[[trackingid.name.system]]trackingid.<name>.system::
4498+
David Pursehouse221d4f62012-06-08 17:38:08 +09004499The name of the external tracking system (maximum 10 characters).
Goran Lungberg04132a12010-06-15 17:20:37 -07004500It is possible to have several trackingid entries for the same
4501tracking system.
4502
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08004503[[transfer]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08004504=== Section transfer
Shawn O. Pearce6e4dfdd2010-05-12 17:26:08 -07004505
4506[[transfer.timeout]]transfer.timeout::
4507+
4508Number of seconds to wait for a single network read or write
4509to complete before giving up and declaring the remote side is
4510not responding. If 0, there is no timeout, and this server will
4511wait indefinitely for a transfer to finish.
4512+
4513A timeout should be large enough to mostly transfer the objects to
4514the other side. 1 second may be too small for larger projects,
4515especially over a WAN link, while 10-30 seconds is a much more
4516reasonable timeout value.
4517+
4518Defaults to 0 seconds, wait indefinitely.
4519
lincoln2be11602010-07-05 10:53:25 -03004520
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08004521[[upload]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08004522=== Section upload
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08004523
lincoln2be11602010-07-05 10:53:25 -03004524Sets the group of users allowed to execute 'upload-pack' on the
4525server, 'upload-pack' is what runs on the server during a user's
4526fetch, clone or repo sync command.
4527
4528----
4529[upload]
4530 allowGroup = GROUP_ALLOWED_TO_EXECUTE
4531 allowGroup = YET_ANOTHER_GROUP_ALLOWED_TO_EXECUTE
4532----
4533
4534[[upload.allowGroup]]upload.allowGroup::
4535+
4536Name of the groups of users that are allowed to execute 'upload-pack'
4537on the server. One or more groups can be set.
4538+
4539If no groups are added, any user will be allowed to execute
4540'upload-pack' on the server.
4541
Edwin Kempinfa0d4942015-07-16 12:38:52 +02004542[[urlAlias]]
4543=== Section urlAlias
4544
4545URL aliases define regular expressions for URL tokens that are mapped
4546to target URL tokens.
4547
4548Each URL alias must be specified in its own subsection. The subsection
4549name should be a descriptive name. It must be unique, but is not
4550interpreted in any way.
4551
4552The URL aliases are applied in no particular order. The first matching
4553URL alias is used and further matches are ignored.
4554
4555URL aliases can be used to map plugin screens into the Gerrit URL
4556namespace, or to replace Gerrit screens by plugin screens.
4557
4558Example:
4559
4560----
4561[urlAlias "MyPluginScreen"]
4562 match = /myscreen/(.*)
4563 token = /x/myplugin/myscreen/$1
4564[urlAlias "MyChangeScreen"]
4565 match = /c/(.*)
4566 token = /x/myplugin/c/$1
4567----
4568
4569[[urlAlias.match]]urlAlias.match::
4570+
4571A regular expression for a URL token.
4572+
4573The matched URL token is replaced by `urlAlias.token`.
4574
4575[[urlAlias.token]]urlAlias.token::
4576+
4577The target URL token.
4578+
4579It can contain placeholders for the groups matched by the
4580`urlAlias.match` regular expression: `$1` for the first matched group,
4581`$2` for the second matched group, etc.
lincoln2be11602010-07-05 10:53:25 -03004582
Stefan Beller0f724ff2015-07-17 10:17:51 -07004583[[submodule]]
4584=== Section submodule
4585
Shawn Pearcedc477cd2016-03-24 19:56:18 -07004586[[submodule.verbosesuperprojectupdate]]submodule.verboseSuperprojectUpdate::
Stefan Beller0f724ff2015-07-17 10:17:51 -07004587+
4588When using link:user-submodules.html#automatic_update[automatic superproject updates]
Zhen Chenc877ca92016-07-27 14:22:37 -07004589this option will determine how the submodule commit messages are included into
Stefan Beller0f724ff2015-07-17 10:17:51 -07004590the commit message of the superproject update.
4591+
Zhen Chenc877ca92016-07-27 14:22:37 -07004592If `FALSE`, will not include any commit messages for the gitlink update.
4593+
4594If `SUBJECT_ONLY`, will include only the commit subjects.
4595+
4596If `TRUE`, will include full commit messages.
4597+
4598By default this is `TRUE`.
Stefan Beller0f724ff2015-07-17 10:17:51 -07004599
Shawn Pearcedc477cd2016-03-24 19:56:18 -07004600[[submodule.enableSuperProjectSubscriptions]]submodule.enableSuperProjectSubscriptions::
Stefan Beller8cc252e2016-03-10 10:06:53 -08004601+
4602This allows to enable the superproject subscription mechanism.
4603+
4604By default this is true.
Stefan Beller0f724ff2015-07-17 10:17:51 -07004605
Patrick Hiesel44e5d6e2017-08-24 16:07:26 +02004606[[submodule.maxCombinedCommitMessageSize]]submodule.maxCombinedCommitMessageSize::
4607+
4608This allows to limit the length of the commit message for a submodule.
4609+
4610By default this is 262144 (256 KiB).
4611+
4612Common unit suffixes of k, m, or g are supported.
4613
4614[[submodule.maxCommitMessages]]submodule.maxCommitMessages::
4615+
4616This allows to limit the number of commit messages that should be combined when creating
4617a commit message for a submodule.
4618+
4619By default this is 1000.
4620
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08004621[[user]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08004622=== Section user
Shawn O. Pearce0a351912009-06-01 08:14:46 -07004623
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07004624[[user.name]]user.name::
Shawn O. Pearce0a351912009-06-01 08:14:46 -07004625+
4626Name that Gerrit calls itself in Git when it creates a new Git
4627commit, such as a merge during change submission.
4628+
4629By default this is "Gerrit Code Review".
4630
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07004631[[user.email]]user.email::
Shawn O. Pearce0a351912009-06-01 08:14:46 -07004632+
4633Email address that Gerrit refers to itself as when it creates a
4634new Git commit, such as a merge commit during change submission.
4635+
4636If not set, Gerrit generates this as "gerrit@`hostname`", where
4637`hostname` is the hostname of the system Gerrit is running on.
4638+
4639By default, not set, generating the value at startup.
4640
Edwin Kempin0e02ded2011-09-16 15:10:14 +02004641[[user.anonymousCoward]]user.anonymousCoward::
4642+
David Pursehousea1d633b2014-05-02 17:21:02 +09004643Username that is displayed in the Gerrit Web UI and in e-mail
Edwin Kempin0e02ded2011-09-16 15:10:14 +02004644notifications if the full name of the user is not set.
4645+
4646By default "Anonymous Coward" is used.
4647
Hector Oswaldo Caballero98952b02017-08-24 06:31:28 -04004648[[secure.config]]
4649== File `etc/secure.config`
Shawn O. Pearce0bf2f522009-05-14 11:02:03 -07004650
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08004651The optional file `'$site_path'/etc/secure.config` overrides (or
4652supplements) the settings supplied by `'$site_path'/etc/gerrit.config`.
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08004653The file should be readable only by the daemon process and can be
4654used to contain private configuration entries that wouldn't normally
4655be exposed to everyone.
4656
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08004657Sample `etc/secure.config`:
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08004658----
Shawn O. Pearce34f38cf2011-06-16 19:18:54 -07004659[auth]
4660 registerEmailPrivateKey = 2zHNrXE2bsoylzUqDxZp0H1cqUmjgWb6
4661
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08004662[database]
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08004663 username = webuser
4664 password = s3kr3t
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08004665
4666[ldap]
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08004667 password = l3tm3srch
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08004668
4669[httpd]
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08004670 sslKeyPassword = g3rr1t
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08004671
4672[sendemail]
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08004673 smtpPass = sp@m
Shawn O. Pearce7929d872011-05-15 13:33:15 -07004674
4675[remote "bar"]
4676 password = s3kr3t
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08004677----
4678
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08004679== File `etc/peer_keys`
Johan Bjork3e5ee302012-01-27 17:59:54 +01004680
4681The optional file `'$site_path'/etc/peer_keys` controls who can
4682login as the 'Gerrit Code Review' user, required for the link:cmd-suexec.html[suexec]
4683command.
4684
4685The format is one Base-64 encoded public key per line.
4686
4687
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08004688== Database system_config
Shawn O. Pearce7b405712009-05-08 18:27:53 -07004689
4690Several columns in the `system_config` table within the metadata
4691database may be set to control how Gerrit behaves.
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08004692
4693[NOTE]
4694The contents of the `system_config` table are cached at startup
4695by Gerrit. If you modify any columns in this table, Gerrit needs
4696to be restarted before it will use the new values.
4697
Paladox nonee104b532017-03-16 21:19:10 +00004698== Configuring the Polygerrit UI
4699
4700Please see link:dev-polygerrit.html[UI] on configuring the Polygerrit UI.
4701
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08004702=== Configurable Parameters
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08004703
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07004704site_path::
4705+
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08004706Local filesystem directory holding the site customization assets.
4707Placing this directory under version control and/or backup is a
4708good idea.
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07004709+
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08004710Files in this directory provide additional configuration.
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07004711+
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08004712Other files support site customization.
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07004713+
Dave Borowitz1e49e142013-04-09 12:14:57 -07004714* link:config-themes.html[Themes]
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08004715
Shawn O. Pearce5500e692009-05-28 15:55:01 -07004716GERRIT
4717------
4718Part of link:index.html[Gerrit Code Review]
Yuxuan 'fishy' Wang99cb68d2013-10-31 17:26:00 -07004719
4720SEARCHBOX
4721---------