blob: 3d391877a81251e2aceeb107415bbc0fb0f5b45c [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]
Shawn O. Pearce9d342a42009-12-16 15:49:05 -080019 directory = /var/cache/gerrit2
Shawn O. Pearce51967cd2009-05-08 19:46:57 -070020----
21
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -080022[[accounts]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080023=== Section accounts
Dave Borowitz45baa892012-02-23 16:43:05 -080024
Matthias Sohnf3360662012-04-05 15:42:52 +020025[[accounts.visibility]]accounts.visibility::
Dave Borowitz45baa892012-02-23 16:43:05 -080026+
27Controls visibility of other users' dashboard pages and
28completion suggestions to web users.
29+
30If `ALL`, all users are visible to all other users, even
31anonymous users.
32+
33If `SAME_GROUP`, only users who are also members of a group the
34current user is a member of are visible.
35+
36If `VISIBLE_GROUP`, only users who are members of at least one group
37that is visible to the current user are visible.
38+
39If `NONE`, no users other than the current user are visible.
40+
41Default is `ALL`.
42
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -080043[[addreviewer]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080044=== Section addreviewer
Edwin Kempin49cb3e12011-06-29 14:35:14 +020045
46[[addreviewer.maxWithoutConfirmation]]addreviewer.maxWithoutConfirmation::
47+
48The maximum number of reviewers a user can add at once by adding a
49group as reviewer without being asked to confirm the operation.
50+
51If set to 0, the user will never be asked to confirm adding a group
52as reviewer.
53+
54Default is 10.
Edwin Kempin5e65d9b2011-07-08 07:35:48 +020055+
David Pursehousea1d633b2014-05-02 17:21:02 +090056This setting only applies for adding reviewers in the Gerrit Web UI,
Edwin Kempin5e65d9b2011-07-08 07:35:48 +020057but is ignored when adding reviewers with the
Edwin Kempin33e92d02011-07-11 22:00:57 +020058link:cmd-set-reviewers.html[set-reviewers] command.
Edwin Kempin49cb3e12011-06-29 14:35:14 +020059
60[[addreviewer.maxAllowed]]addreviewer.maxAllowed::
61+
62The maximum number of reviewers a user can add at once by adding a
63group as reviewer.
64+
65If set to 0, there is no limit for the number of reviewers that can
66be added at once by adding a group as reviewer.
67+
68Default is 20.
69
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -080070[[auth]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080071=== Section auth
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -070072
73See also link:config-sso.html[SSO configuration].
74
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -070075[[auth.type]]auth.type::
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -070076+
Shawn O. Pearce2920ef32009-08-03 08:03:34 -070077Type of user authentication employed by Gerrit. The supported
78values are:
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -070079+
80* `OpenID`
81+
82The default setting. Gerrit uses any valid OpenID
83provider chosen by the end-user. For more information see
Shawn O. Pearce2920ef32009-08-03 08:03:34 -070084http://openid.net/[openid.net].
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -070085+
James E. Blairca8bc3b2011-12-21 18:12:26 +000086* `OpenID_SSO`
87+
88Supports OpenID from a single provider. There is no registration
89link, and the "Sign In" link sends the user directly to the provider's
90SSO entry point.
91+
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -070092* `HTTP`
93+
Shawn O. Pearce2920ef32009-08-03 08:03:34 -070094Gerrit relies upon data presented in the HTTP request. This includes
Edwin Kempinf1acbb82011-09-15 12:49:42 +020095HTTP basic authentication, or some types of commercial single-sign-on
Shawn O. Pearce2920ef32009-08-03 08:03:34 -070096solutions. With this setting enabled the authentication must
97take place in the web server or servlet container, and not from
98within Gerrit.
99+
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -0700100* `HTTP_LDAP`
101+
102Exactly like `HTTP` (above), but additionally Gerrit pre-populates
103a user's full name and email address based on information obtained
104from the user's account object in LDAP. The user's group membership
105is also pulled from LDAP, making any LDAP groups that a user is a
106member of available as groups in Gerrit.
107+
Sasa Zivkoveabc8972010-10-04 15:47:08 +0200108* `CLIENT_SSL_CERT_LDAP`
109+
110This authentication type is actually kind of SSO. Gerrit will configure
David Pursehouse221d4f62012-06-08 17:38:08 +0900111Jetty's SSL channel to request the client's SSL certificate. For this
Sasa Zivkoveabc8972010-10-04 15:47:08 +0200112authentication to work a Gerrit administrator has to import the root
113certificate of the trust chain used to issue the client's certificate
114into the <review-site>/etc/keystore.
115After the authentication is done Gerrit will obtain basic user
116registration (name and email) from LDAP, and some group memberships.
117Therefore, the "_LDAP" suffix in the name of this authentication type.
118This authentication type can only be used under hosted daemon mode, and
119the httpd.listenUrl must use https:// as the protocol.
Chulho Yangb72ff8f2013-07-04 02:35:53 -0400120Optionally, certificate revocation list file can be used
121at <review-site>/etc/crl.pem. For details, see httpd.sslCrl.
Sasa Zivkoveabc8972010-10-04 15:47:08 +0200122+
Shawn O. Pearcef7e065e2009-09-26 20:01:10 -0700123* `LDAP`
124+
125Gerrit prompts the user to enter a username and a password, which
126it then verifies by performing a simple bind against the configured
127<<ldap.server,ldap.server>>. In this configuration the web server
128is not involved in the user authentication process.
129+
Shawn O. Pearcec892d342010-02-17 17:00:50 -0800130The actual username used in the LDAP simple bind request is the
131account's full DN, which is discovered by first querying the
132directory using either an anonymous request, or the configured
Robin Rosenberga3baed02012-10-14 14:09:32 +0200133<<ldap.username,ldap.username>> identity. Gerrit can also use kerberos if
134<<ldap.authentication,ldap.authentication>> is set to `GSSAPI`.
Shawn O. Pearcec892d342010-02-17 17:00:50 -0800135
136* `LDAP_BIND`
137+
138Gerrit prompts the user to enter a username and a password, which
139it then verifies by performing a simple bind against the configured
140<<ldap.server,ldap.server>>. In this configuration the web server
141is not involved in the user authentication process.
142+
David Pursehouse42f42042013-08-01 14:02:25 +0900143Unlike `LDAP` above, the username used to perform the LDAP simple bind
David Pursehouse1344f5b2013-08-09 17:35:47 +0900144request is the exact string supplied in the dialog by the user.
Robin Rosenberg524a3032012-10-14 14:24:36 +0200145The configured <<ldap.username,ldap.username>> identity is not used to obtain
Shawn O. Pearcec892d342010-02-17 17:00:50 -0800146account information.
147+
Michael Ochmanne9e046a2015-10-20 15:34:29 +0200148* `OAUTH`
David Ostrovskye9707d82015-02-22 01:14:02 +0100149+
150OAuth is a protocol that lets external apps request authorization to private
151details in a user's account without getting their password. This is
152preferred over Basic Authentication because tokens can be limited to specific
153types of data, and can be revoked by users at any time.
154+
155Site owners have to register their application before getting started. Note
156that provider specific plugins must be used with this authentication scheme.
157+
Shawn O. Pearce2920ef32009-08-03 08:03:34 -0700158* `DEVELOPMENT_BECOME_ANY_ACCOUNT`
159+
160*DO NOT USE*. Only for use in a development environment.
161+
162When this is the configured authentication method a hyperlink titled
163`Become` appears in the top right corner of the page, taking the
164user to a form where they can enter the username of any existing
165user account, and immediately login as that account, without any
166authentication taking place. This form of authentication is only
167useful for the GWT hosted mode shell, where OpenID authentication
168redirects might be risky to the developer's host computer, and HTTP
169authentication is not possible.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700170
171+
172By default, OpenID.
173
Shawn O. Pearce533cafc2010-05-11 16:05:27 -0700174[[auth.allowedOpenID]]auth.allowedOpenID::
175+
176List of permitted OpenID providers. A user may only authenticate
177with an OpenID that matches this list. Only used if `auth.type`
David Pursehouse42f42042013-08-01 14:02:25 +0900178is set to `OpenID` (the default).
Shawn O. Pearce533cafc2010-05-11 16:05:27 -0700179+
Magnus Bäcke5611832011-02-02 08:57:15 +0100180Patterns may be either a
181link:http://download.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html[standard
182Java regular expression (java.util.regex)] (start with `^` and
Shawn O. Pearce533cafc2010-05-11 16:05:27 -0700183end with `$`) or be a simple prefix (any other string).
184+
185By default, the list contains two values, `http://` and `https://`,
186allowing users to authenticate with any OpenID provider.
187
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700188[[auth.trustedOpenID]]auth.trustedOpenID::
Shawn O. Pearced7c026d2009-08-05 20:11:22 -0700189+
David Pursehouse221d4f62012-06-08 17:38:08 +0900190List of trusted OpenID providers. Only used if `auth.type` is
David Pursehouse42f42042013-08-01 14:02:25 +0900191set to `OpenID` (the default).
Shawn O. Pearced7c026d2009-08-05 20:11:22 -0700192+
193In order for a user to take advantage of permissions beyond those
194granted to the `Anonymous Users` and `Registered Users` groups,
195the user account must only have OpenIDs which match at least one
196pattern from this list.
197+
Magnus Bäcke5611832011-02-02 08:57:15 +0100198Patterns may be either a
199link:http://download.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html[standard
200Java regular expression (java.util.regex)] (start with `^` and
Shawn O. Pearced7c026d2009-08-05 20:11:22 -0700201end with `$`) or be a simple prefix (any other string).
202+
203By default, the list contains two values, `http://` and `https://`,
204allowing Gerrit to trust any OpenID it receives.
205
Mike Goulined2ab0cd2012-12-18 11:20:53 +1100206[[auth.openIdDomain]]auth.openIdDomain::
207+
208List of allowed OpenID email address domains. Only used if
David Pursehouse42f42042013-08-01 14:02:25 +0900209`auth.type` is set to `OPENID` or `OPENID_SSO`.
Mike Goulined2ab0cd2012-12-18 11:20:53 +1100210+
211Domain is case insensitive and must be in the same form as it
212appears in the email address, for example, "example.com".
213+
214By default, any domain is accepted.
215
Shawn O. Pearce89030bc2010-04-24 17:25:29 -0700216[[auth.maxOpenIdSessionAge]]auth.maxOpenIdSessionAge::
217+
218Time in seconds before an OpenID provider must force the user
219to authenticate themselves again before authentication to this
220Gerrit server. Currently this is only a polite request, and users
221coming from providers that don't support the PAPE extension will
222be accepted anyway. In the future it may be enforced, rejecting
223users coming from providers that don't honor the max session age.
224+
225If set to 0, the provider will always force the user to authenticate
226(e.g. supply their password). Values should use common unit suffixes
227to express their setting:
228+
229* s, sec, second, seconds
230* m, min, minute, minutes
231* h, hr, hour, hours
232* d, day, days
233* w, week, weeks (`1 week` is treated as `7 days`)
234* mon, month, months (`1 month` is treated as `30 days`)
235* y, year, years (`1 year` is treated as `365 days`)
236
237+
238Default is -1, permitting infinite time between authentications.
239
David Pursehouse5be35a32015-09-09 17:35:32 +0900240[[auth.registerEmailPrivateKey]]auth.registerEmailPrivateKey::
241+
242Private key to use when generating an email verification token.
243+
244If not set, a random key is generated when running the
245link:pgm-init.html[site initialization].
246
Shawn O. Pearce34f38cf2011-06-16 19:18:54 -0700247[[auth.maxRegisterEmailTokenAge]]auth.maxRegisterEmailTokenAge::
248+
249Time in seconds before an email verification token sent to a user in
250order to validate their email address expires.
251+
252* s, sec, second, seconds
253* m, min, minute, minutes
254* h, hr, hour, hours
255* d, day, days
256* w, week, weeks (`1 week` is treated as `7 days`)
257* mon, month, months (`1 month` is treated as `30 days`)
258* y, year, years (`1 year` is treated as `365 days`)
259
260+
Shawn O. Pearced6bd00b2012-01-20 12:40:51 -0800261Default is 12 hours.
Shawn O. Pearce34f38cf2011-06-16 19:18:54 -0700262
James E. Blairca8bc3b2011-12-21 18:12:26 +0000263[[auth.openIdSsoUrl]]auth.openIdSsoUrl::
264+
David Pursehouse42f42042013-08-01 14:02:25 +0900265The SSO entry point URL. Only used if `auth.type` is set to
266`OpenID_SSO`.
James E. Blairca8bc3b2011-12-21 18:12:26 +0000267+
268The "Sign In" link will send users directly to this URL.
269
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700270[[auth.httpHeader]]auth.httpHeader::
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700271+
272HTTP header to trust the username from, or unset to select HTTP basic
David Pursehouse42f42042013-08-01 14:02:25 +0900273or digest authentication. Only used if `auth.type` is set to `HTTP`.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700274
Luca Milanesio384ed6c2013-07-30 09:10:07 +0100275[[auth.httpDisplaynameHeader]]auth.httpDisplaynameHeader::
276+
277HTTP header to retrieve the user's display name from. Only used if `auth.type`
278is set to `HTTP`.
279+
280If set, Gerrit trusts and enforces the user's full name using the HTTP header
281and disables the ability to manually modify the user's full name
282from the contact information page.
283
284[[auth.httpEmailHeader]]auth.httpEmailHeader::
285+
286HTTP header to retrieve the user's e-mail from. Only used if `auth.type`
287is set to `HTTP`.
288+
289If set, Gerrit trusts and enforces the user's e-mail using the HTTP header
290and disables the ability to manually modify or register other e-mails
291from the contact information page.
292
Luca Milanesio97d07352014-07-17 08:31:06 +0100293[[auth.httpExternalIdHeader]]auth.httpExternalIdHeader::
294+
295HTTP header to retrieve the user's external identification token.
296Only used if `auth.type` is set to `HTTP`.
297+
298If set, Gerrit adds the value contained in the HTTP header to the
299user's identity. Typical use is with a federated identity token from
300an external system (e.g. GitHub OAuth 2.0 authentication) where
301the user's auth token exchanged during authentication handshake
302needs to be used for authenticated communication to the external
303system later on.
304+
305Example: `auth.httpExternalIdHeader: X-GitHub-OTP`
306
Luca Milanesio5185b042013-07-27 22:03:06 +0100307[[auth.loginUrl]]auth.loginUrl::
308+
309URL to redirect a browser to after the end-user has clicked on the
David Pursehouse42f42042013-08-01 14:02:25 +0900310login link in the upper right corner. Only used if `auth.type` is set
311to `HTTP` or `HTTP_LDAP`.
Luca Milanesio5185b042013-07-27 22:03:06 +0100312Organizations using an enterprise single-sign-on solution may want to
313redirect the browser to the SSO product's sign-in page for completing the
314login process and validate their credentials.
315+
David Pursehouse42f42042013-08-01 14:02:25 +0900316If set, Gerrit allows anonymous access until the end-user performs the login
317and provides a trusted identity through the HTTP header.
Luca Milanesio5185b042013-07-27 22:03:06 +0100318If not set, Gerrit requires the HTTP header with a trusted identity
David Pursehouse42f42042013-08-01 14:02:25 +0900319and returns the error page 'LoginRedirect.html' if such a header is not
320present.
Luca Milanesio5185b042013-07-27 22:03:06 +0100321
322[[auth.loginText]]auth.loginText::
323+
David Pursehouse42f42042013-08-01 14:02:25 +0900324Text displayed in the loginUrl link. Only used if `auth.loginUrl` is set.
Luca Milanesio5185b042013-07-27 22:03:06 +0100325+
David Pursehouse42f42042013-08-01 14:02:25 +0900326If not set, the "Sign In" text is used.
Luca Milanesio5185b042013-07-27 22:03:06 +0100327
Luca Milanesio111e0b72013-08-15 18:56:42 +0100328[[auth.registerPageUrl]]auth.registerPageUrl::
329+
David Pursehouse268744b2013-08-17 15:32:11 +0900330URL of the registration page to use when a new user logs in to Gerrit for
331the first time. Used only when `auth.type` is set to `HTTP`.
Luca Milanesio111e0b72013-08-15 18:56:42 +0100332+
333If not set, the standard Gerrit registration page `/#/register/` is displayed.
334
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700335[[auth.logoutUrl]]auth.logoutUrl::
Shawn O. Pearce12b5d842009-08-15 15:11:10 -0700336+
337URL to redirect a browser to after the end-user has clicked on the
338"Sign Out" link in the upper right corner. Organizations using an
339enterprise single-sign-on solution may want to redirect the browser
340to the SSO product's sign-out page.
341+
342If not set, the redirect returns to the list of all open changes.
343
Shawn O. Pearcec9d26b52009-12-16 08:05:27 -0800344[[auth.registerUrl]]auth.registerUrl::
345+
346Target for the "Register" link in the upper right corner. Used only
Edwin Kempin54093152015-05-08 10:50:35 +0200347when `auth.type` is `LDAP`, `LDAP_BIND` or `CUSTOM_EXTENSION`.
Shawn O. Pearcec9d26b52009-12-16 08:05:27 -0800348+
349If not set, no "Register" link is displayed.
350
Chad Horohoe65897082012-11-10 10:26:25 -0800351[[auth.registerText]]auth.registerText::
352+
353Text for the "Register" link in the upper right corner. Used only
Edwin Kempin54093152015-05-08 10:50:35 +0200354when `auth.type` is `LDAP`, `LDAP_BIND` or `CUSTOM_EXTENSION`.
Chad Horohoe65897082012-11-10 10:26:25 -0800355+
356If not set, defaults to "Register".
357
David Pursehouse3d604492013-01-25 17:41:53 +0900358[[auth.editFullNameUrl]]auth.editFullNameUrl::
359+
360Target for the "Edit" button when the user is allowed to edit their
Edwin Kempin54093152015-05-08 10:50:35 +0200361full name. Used only when `auth.type` is `LDAP`, `LDAP_BIND` or
362`CUSTOM_EXTENSION`.
David Pursehouse3d604492013-01-25 17:41:53 +0900363
364[[auth.httpPasswordUrl]]auth.httpPasswordUrl::
365+
David Pursehouse42f42042013-08-01 14:02:25 +0900366Target for the "Obtain Password" link. Used only when `auth.type` is
Edwin Kempin54093152015-05-08 10:50:35 +0200367`CUSTOM_EXTENSION`.
Shawn Pearcee0cafe42013-08-29 23:28:13 -0700368
369[[auth.switchAccountUrl]]auth.switchAccountUrl::
David Pursehouse3d604492013-01-25 17:41:53 +0900370+
Shawn Pearcee0cafe42013-08-29 23:28:13 -0700371URL to switch user identities and login as a different account than
372the currently active account. This is disabled by default except when
373`auth.type` is `OPENID` and `DEVELOPMENT_BECOME_ANY_ACCOUNT`. If set
374the "Switch Account" link is displayed next to "Sign Out".
375+
376When `auth.type` does not normally enable this URL administrators may
377set this to `login/` or `$canonicalWebUrl/login`, allowing users to
378begin a new web session.
David Pursehouse3d604492013-01-25 17:41:53 +0900379
Piotr Sikora7cec2f82011-02-26 12:57:30 +0000380[[auth.cookiePath]]auth.cookiePath::
381+
382Sets "path" attribute of the authentication cookie.
383+
384If not set, HTTP request's path is used.
385
Sammy Gillespie26873c02016-02-11 14:39:43 +0000386[[auth.cookieDomain]]auth.cookieDomain::
387+
388Sets "domain" attribute of the authentication cookie.
389+
390If not set, HTTP request's domain is used.
391
Piotr Sikora7cec2f82011-02-26 12:57:30 +0000392[[auth.cookieSecure]]auth.cookieSecure::
393+
394Sets "secure" flag of the authentication cookie. If true, cookies
395will be transmitted only over HTTPS protocol.
396+
397By default, false.
398
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700399[[auth.emailFormat]]auth.emailFormat::
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700400+
401Optional format string to construct user email addresses out of
David Pursehouse42f42042013-08-01 14:02:25 +0900402user login names. Only used if `auth.type` is `HTTP`, `HTTP_LDAP`
Shawn O. Pearcef7e065e2009-09-26 20:01:10 -0700403or `LDAP`.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700404+
Shawn O. Pearce44221bf2011-06-27 10:37:30 -0700405This value can be set to a format string, where `{0}` is replaced
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700406with the login name. E.g. "\{0\}+gerrit@example.com" with a user
407login name of "foo" will produce "foo+gerrit@example.com" during
408the first time user "foo" registers.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -0700409+
Shawn O. Pearcef7e065e2009-09-26 20:01:10 -0700410If the site is using `HTTP_LDAP` or `LDAP`, using this option is
411discouraged. Setting `ldap.accountEmailAddress` and importing the
412email address from the LDAP directory is generally preferred.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700413
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700414[[auth.contributorAgreements]]auth.contributorAgreements::
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700415+
416Controls whether or not the contributor agreement features are
417enabled for the Gerrit site. If enabled a user must complete a
418contributor agreement before they can upload changes.
419+
Marc Petit-Hugueninbbb85492012-12-03 11:11:00 -0800420If enabled, the admin must also add one or more
421link:config-cla.html[contributor-agreement sections]
422in project.config and create agreement files under
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700423`'$site_path'/static`, so users can actually complete one or
Grzegorz Kossakowski28e4e1b2009-09-23 11:33:34 -0700424more agreements.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700425+
426By default this is false (no agreements are used).
Fredrik Luthandera3cf3542012-07-04 16:55:35 -0700427+
428To enable the actual usage of contributor agreement the project
429specific config option in the `project.config` must be set:
430link:config-project-config.html[receive.requireContributorAgreement].
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700431
Christian Halstricka3d88a52011-08-31 09:21:41 +0200432[[auth.trustContainerAuth]]auth.trustContainerAuth::
433+
434If true then it is the responsibility of the container hosting
435Gerrit to authenticate users. In this case Gerrit will blindly trust
436the container.
437+
438This parameter only affects git over http traffic. If set to false
439then Gerrit will do the authentication (using DIGEST authentication).
440+
441By default this is set to false.
442
Luca Milanesio42058842012-01-05 21:25:38 +0000443[[auth.gitBasicAuth]]auth.gitBasicAuth::
444+
445If true then Git over HTTP and HTTP/S traffic is authenticated using
Michael Ochmanne9e046a2015-10-20 15:34:29 +0200446standard BasicAuth. Depending on the configured `auth.type` credentials
447are validated against the randomly generated HTTP password, against LDAP
448(`auth.type = LDAP`) or against an OAuth 2 provider (`auth.type = OAUTH`).
Luca Milanesio42058842012-01-05 21:25:38 +0000449+
Edwin Kempin4b9d9982014-04-16 11:27:46 +0200450This parameter affects git over HTTP traffic and access to the REST
451API. If set to false then Gerrit will authenticate through DIGEST
452authentication and the randomly generated HTTP password in the Gerrit
453database.
Luca Milanesio42058842012-01-05 21:25:38 +0000454+
Edwin Kempinc5eb0032014-04-16 11:09:58 +0200455When `auth.type` is `LDAP`, service users that only exist in the Gerrit
456database are still authenticated by their HTTP passwords.
Luca Milanesio42058842012-01-05 21:25:38 +0000457+
Michael Ochmanne9e046a2015-10-20 15:34:29 +0200458When `auth.type` is `OAUTH`, Git clients may send OAuth 2 access tokens
459instead of passwords in the Basic authentication header. Note that provider
460specific plugins must be installed to facilitate this authentication scheme.
461If multiple OAuth 2 provider plugins are installed one of them must be
462selected as default with the `auth.gitOAuthProvider` option.
463+
Luca Milanesio42058842012-01-05 21:25:38 +0000464By default this is set to false.
465
Michael Ochmanne9e046a2015-10-20 15:34:29 +0200466[[auth.gitOAuthProvider]]auth.gitOAuthProvider::
467+
468Selects the OAuth 2 provider to authenticate git over HTTP traffic with.
469+
470In general there is no way to determine from an access token alone, which
471OAuth 2 provider to address to verify that token, and the BasicAuth
472scheme does not support amending such details. If multiple OAuth provider
473plugins in a system offer support for git over HTTP authentication site
474administrators must configure, which one to use as default provider.
475In case the provider cannot be determined from a request the access token
476will be sent to the default provider for verification.
477+
478The value of this parameter must be the identifier of an OAuth 2 provider
479in the form `plugin-name:provider-name`. Consult the respective plugin
480documentation for details.
481
Edwin Kempin4b9e5e72011-09-22 15:06:14 +0200482[[auth.userNameToLowerCase]]auth.userNameToLowerCase::
483+
484If set the username that is received to authenticate a git operation
485is converted to lower case for looking up the user account in Gerrit.
486+
487By setting this parameter a case insensitive authentication for the
488git operations can be achieved, if it is ensured that the usernames in
489Gerrit (scheme `username`) are stored in lower case (e.g. if the
490parameter link:#ldap.accountSshUserName[ldap.accountSshUserName] is
491set to `${sAMAccountName.toLowerCase}`). It is important that for all
492existing accounts this username is already in lower case. It is not
493possible to convert the usernames of the existing accounts to lower
494case because this would break the access to existing per-user
495branches.
496+
497This parameter only affects git over http and git over SSH traffic.
498+
499By default this is set to false.
500
Shawn Pearcea931fe12013-06-11 12:29:17 -0700501[[auth.enableRunAs]]auth.enableRunAs::
502+
503If true HTTP REST APIs will accept the `X-Gerrit-RunAs` HTTP request
504header from any users granted the link:access-control.html#capability_runAs[Run As]
505capability. The header and capability permit the authenticated user
506to impersonate another account.
507+
508If false the feature is disabled and cannot be re-enabled without
509editing gerrit.config and restarting the server.
510+
511Default is true.
512
David Pursehouse21bd07b2015-11-27 00:15:42 +0900513[[auth.allowRegisterNewEmail]]auth.allowRegisterNewEmail::
514+
515Whether users are allowed to register new email addresses.
516+
517In addition for the HTTP authentication type
518link:#auth.httpemailheader[auth.httpemailheader] must *not* be set to
519enable registration of new email addresses.
520+
521By default, true.
522
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -0800523[[cache]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800524=== Section cache
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700525
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700526[[cache.directory]]cache.directory::
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700527+
528Path to a local directory where Gerrit can write cached entities for
Shawn O. Pearce4b212282009-08-05 19:45:56 -0700529future lookup. This local disk cache is used to retain potentially
530expensive to compute information across restarts. If the location
531does not exist, Gerrit will try to create it.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700532+
David Pursehousea61ee502016-09-06 16:27:09 +0900533Technically, cached entities are persisted as a set of H2 databases
Saša Živkove607d6c2016-02-24 10:46:46 +0000534inside this directory.
535+
Shawn O. Pearce4b212282009-08-05 19:45:56 -0700536If not absolute, the path is resolved relative to `$site_path`.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700537+
Shawn O. Pearce4b212282009-08-05 19:45:56 -0700538Default is unset, no disk cache.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700539
Saša Živkovf3134572016-02-09 11:42:46 +0100540[[cache.h2CacheSize]]cache.h2CacheSize::
541+
Björn Pedersen64af3ad2016-05-20 10:21:07 +0200542The size of the in-memory cache for each opened H2 cache database, in bytes.
Saša Živkove607d6c2016-02-24 10:46:46 +0000543+
Björn Pedersen64af3ad2016-05-20 10:21:07 +0200544Some caches of Gerrit are persistent and are backed by an H2 database.
Saša Živkove607d6c2016-02-24 10:46:46 +0000545H2 uses memory to cache its database content. The parameter `h2CacheSize`
546allows to limit the memory used by H2 and thus prevent out-of-memory
Saša Živkovf3134572016-02-09 11:42:46 +0100547caused by the H2 database using too much memory.
548+
Björn Pedersen64af3ad2016-05-20 10:21:07 +0200549See <<database.h2.cachesize,database.h2.cachesize>> for a detailed discussion.
Saša Živkovf3134572016-02-09 11:42:46 +0100550+
Björn Pedersen64af3ad2016-05-20 10:21:07 +0200551Default is unset, using up to half of the available memory.
552
553H2 will persist this value in the database, so to unset explicitly specify 0.
Saša Živkovf3134572016-02-09 11:42:46 +0100554+
555Common unit suffixes of 'k', 'm', or 'g' are supported.
556
Björn Pedersen64af3ad2016-05-20 10:21:07 +0200557[[cache.h2AutoServer]]cache.h2AutoServer::
558+
559If set to true, enable H2 autoserver mode for the H2-backed persistent cache
560databases.
561+
562See link:http://www.h2database.com/html/features.html#auto_mixed_mode[here]
563for detail.
564+
565Default is false.
566
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700567[[cache.name.maxAge]]cache.<name>.maxAge::
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700568+
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700569Maximum age to keep an entry in the cache. Entries are removed from
570the cache and refreshed from source data every maxAge interval.
Shawn O. Pearced9c403e2009-08-19 08:35:41 -0700571Values should use common unit suffixes to express their setting:
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700572+
Shawn O. Pearced9c403e2009-08-19 08:35:41 -0700573* s, sec, second, seconds
574* m, min, minute, minutes
575* h, hr, hour, hours
576* d, day, days
577* w, week, weeks (`1 week` is treated as `7 days`)
578* mon, month, months (`1 month` is treated as `30 days`)
579* y, year, years (`1 year` is treated as `365 days`)
580
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -0700581+
Edwin Kempina09ebcf2015-04-16 14:53:23 +0200582--
Edwin Kempinabcd5042013-03-12 16:04:37 +0100583If a unit suffix is not specified, `seconds` is assumed. If 0 is
Shawn O. Pearce3fdbf392009-09-04 18:08:26 -0700584supplied, the maximum age is infinite and items are never purged
585except when the cache is full.
Edwin Kempina09ebcf2015-04-16 14:53:23 +0200586
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700587Default is `0`, meaning store forever with no expire, except:
Edwin Kempina09ebcf2015-04-16 14:53:23 +0200588
Shawn O. Pearce05687e92011-04-04 17:29:03 -0400589* `"adv_bases"`: default is `10 minutes`
Shawn O. Pearced9c403e2009-08-19 08:35:41 -0700590* `"ldap_groups"`: default is `1 hour`
Shawn O. Pearced9c403e2009-08-19 08:35:41 -0700591* `"web_sessions"`: default is `12 hours`
Edwin Kempina09ebcf2015-04-16 14:53:23 +0200592--
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700593
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700594[[cache.name.memoryLimit]]cache.<name>.memoryLimit::
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700595+
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700596The total cost of entries to retain in memory. The cost computation
597varies by the cache. For most caches where the in-memory size of each
598entry is relatively the same, memoryLimit is currently defined to be
599the number of entries held by the cache (each entry costs 1).
600+
601For caches where the size of an entry can vary significantly between
602individual entries (notably `"diff"`, `"diff_intraline"`), memoryLimit
603is an approximation of the total number of bytes stored by the cache.
604Larger entries that represent bigger patch sets or longer source files
605will consume a bigger portion of the memoryLimit. For these caches the
606memoryLimit should be set to roughly the amount of RAM (in bytes) the
607administrator can dedicate to the cache.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700608+
Shawn O. Pearceefaf9792009-09-02 18:12:52 -0700609Default is 1024 for most caches, except:
610+
Shawn O. Pearce05687e92011-04-04 17:29:03 -0400611* `"adv_bases"`: default is `4096`
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700612* `"diff"`: default is `10m` (10 MiB of memory)
613* `"diff_intraline"`: default is `10m` (10 MiB of memory)
Saša Živkove789f2e2016-09-22 10:37:34 +0200614* `"diff_file_list"`: default is `10m` (10 MiB of memory)
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700615* `"plugin_resources"`: default is 2m (2 MiB of memory)
616
617+
618If set to 0 the cache is disabled. Entries are removed immediately
619after being stored by the cache. This is primarily useful for testing.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700620
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700621[[cache.name.diskLimit]]cache.<name>.diskLimit::
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700622+
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700623Total size in bytes of the keys and values stored on disk. Caches that
624have grown bigger than this size are scanned daily at 1 AM local
625server time to trim the cache. Entries are removed in least recently
626accessed order until the cache fits within this limit. Caches may
627grow larger than this during the day, as the size check is only
628performed once every 24 hours.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700629+
Saša Živkove789f2e2016-09-22 10:37:34 +0200630Default is 128 MiB per cache, except:
631+
632* `"diff_file_list"`: default is `1g` (1 GiB of disk space)
633
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700634+
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700635If 0, disk storage for the cache is disabled.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700636
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800637==== [[cache_names]]Standard Caches
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700638
Shawn O. Pearce4a452712009-05-28 20:12:33 -0700639cache `"accounts"`::
640+
Shawn O. Pearce4dba9882009-08-05 19:55:15 -0700641Cache entries contain important details of an active user, including
642their display name, preferences, known email addresses, and group
643memberships. Entry information is obtained from the following
644database tables:
645+
646* `accounts`
647+
648* `account_group_members`
649+
650* `account_external_ids`
651
652+
653If direct updates are made to any of these database tables, this
654cache should be flushed.
655
656cache `"accounts_byemail"`::
657+
658Caches account identities keyed by email address, which is scanned
659from the `account_external_ids` database table. If updates are
660made to this table, this cache should be flushed.
Shawn O. Pearce4a452712009-05-28 20:12:33 -0700661
Shawn O. Pearce05687e92011-04-04 17:29:03 -0400662cache `"adv_bases"`::
663+
664Used only for push over smart HTTP when branch level access controls
David Pursehouse92463562013-06-24 10:16:28 +0900665are enabled. The cache entry contains all commits that are available
Shawn O. Pearce05687e92011-04-04 17:29:03 -0400666for the client to use as potential delta bases. Push over smart HTTP
667requires two HTTP requests, and this cache tries to carry state from
668the first request into the second to ensure it can complete.
669
Gustaf Lundh47ce4e32012-05-21 11:18:42 +0200670cache `"changes"`::
671+
Gustaf Lundh3353c362013-04-24 17:25:39 +0200672The size of `memoryLimit` determines the number of projects for which
673all changes will be cached. If the cache is set to 1024, this means all
674changes for up to 1024 projects can be held in the cache.
Gustaf Lundh53493772012-11-18 18:41:15 -0800675+
Gustaf Lundh3353c362013-04-24 17:25:39 +0200676Default value is 0 (disabled). It is disabled by default due to the fact
677that change updates are not communicated between Gerrit servers. Hence
678this cache should be disabled in an multi-master/multi-slave setup.
Gustaf Lundh53493772012-11-18 18:41:15 -0800679+
680The cache should be flushed whenever the database changes table is modified
Matt Baker8ce12fc2013-11-26 21:43:12 -0700681outside of Gerrit.
Gustaf Lundh47ce4e32012-05-21 11:18:42 +0200682
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700683cache `"diff"`::
684+
Shawn O. Pearceefaf9792009-09-02 18:12:52 -0700685Each item caches the differences between two commits, at both the
686directory and file levels. Gerrit uses this cache to accelerate
687the display of affected file names, as well as file contents.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700688+
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700689Entries in this cache are relatively large, so memoryLimit is an
690estimate in bytes of memory used. Administrators should try to target
691cache.diff.memoryLimit to fit all changes users will view in a 1 or 2
692day span.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700693
Shawn O. Pearcef0cfe532011-04-11 23:40:06 -0400694cache `"diff_intraline"`::
695+
696Each item caches the intraline difference of one file, when compared
697between two commits. Gerrit uses this cache to accelerate display of
698intraline differences when viewing a file.
699+
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700700Entries in this cache are relatively large, so memoryLimit is an
701estimate in bytes of memory used. Administrators should try to target
702cache.diff.memoryLimit to fit all files users will view in a 1 or 2
703day span.
Shawn O. Pearcef0cfe532011-04-11 23:40:06 -0400704
Saša Živkove789f2e2016-09-22 10:37:34 +0200705cache `"diff_file_list"`::
706+
707Each item caches list of file paths which are different between two
708commits. Gerrit uses this cache to accelerate computing of the list
709of paths of changed files.
710+
711Ideally, disk limit of this cache is large enough to cover all changes.
712This should significantly speed up change reindexing, especially
713full offline reindexing.
714
Shawn O. Pearce2d65d292011-06-24 08:12:02 -0700715cache `"git_tags"`::
716+
717If branch or reference level READ access controls are used, this
718cache tracks which tags are reachable from the branch tips of a
719repository. Gerrit uses this information to determine the set
720of tags that a client may access, derived from which tags are
721part of the history of a visible branch.
722+
723The cache is persisted to disk across server restarts as it can
724be expensive to compute (60 or more seconds for a large history
725like the Linux kernel repository).
726
Shawn O. Pearce4a452712009-05-28 20:12:33 -0700727cache `"groups"`::
728+
Shawn O. Pearce4dba9882009-08-05 19:55:15 -0700729Caches the basic group information from the `account_groups` table,
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -0700730including the group owner, name, and description.
731+
732Gerrit group membership obtained from the `account_group_members`
733table is cached under the `"accounts"` cache, above. External group
734membership obtained from LDAP is cached under `"ldap_groups"`.
735
Matt Fischer620255a2011-03-22 14:28:23 -0500736cache `"groups_byinclude"`::
737+
738Caches group inclusions in other groups. If direct updates are made
739to the `account_group_includes` table, this cache should be flushed.
740
Bruce Zu825125a2014-11-19 17:01:42 +0900741cache `"groups_members"`::
742+
743Caches subgroups. If direct updates are made to the
744`account_group_includes` table, this cache should be flushed.
745
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -0700746cache `"ldap_groups"`::
747+
748Caches the LDAP groups that a user belongs to, if LDAP has been
749configured on this server. This cache should be configured with a
750low maxAge setting, to ensure LDAP modifications are picked up in
751a timely fashion.
Shawn O. Pearce4a452712009-05-28 20:12:33 -0700752
Gustaf Lundh0919a492012-10-19 15:29:23 +0200753cache `"ldap_groups_byinclude"`::
754+
755Caches the hierarchical structure of LDAP groups.
756
Shawn O. Pearce6d26f4a2009-08-24 15:43:52 -0700757cache `"ldap_usernames"`::
758+
759Caches a mapping of LDAP username to Gerrit account identity. The
760cache automatically updates when a user first creates their account
761within Gerrit, so the cache expire time is largely irrelevant.
762
Shawn O. Pearce0c1abdb2011-06-24 11:01:25 -0700763cache `"permission_sort"`::
764+
David Pursehouse221d4f62012-06-08 17:38:08 +0900765Caches the order in which access control sections must be applied to a
Shawn O. Pearce0c1abdb2011-06-24 11:01:25 -0700766reference. Sorting the sections can be expensive when regular
767expressions are used, so this cache remembers the ordering for
768each branch.
769
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700770cache `"plugin_resources"`::
771+
772Caches formatted plugin resources, such as plugin documentation that
773has been converted from Markdown to HTML. The memoryLimit refers to
774the bytes of memory dedicated to storing the documentation.
775
Shawn O. Pearce4a452712009-05-28 20:12:33 -0700776cache `"projects"`::
777+
778Caches the project description records, from the `projects` table
779in the database. If a project record is updated or deleted, this
780cache should be flushed. Newly inserted projects do not require
781a cache flush, as they will be read upon first reference.
782
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700783cache `"sshkeys"`::
784+
785Caches unpacked versions of user SSH keys, so the internal SSH daemon
786can match against them during authentication. The unit of storage
787is per-user, so 1024 items translates to 1024 unique user accounts.
788As each individual user account may configure multiple SSH keys,
789the total number of keys may be larger than the item count.
Shawn O. Pearce4a452712009-05-28 20:12:33 -0700790+
791This cache is based off the `account_ssh_keys` table and the
792`accounts.ssh_user_name` column in the database. If either is
793modified directly, this cache should be flushed.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700794
Shawn O. Pearceb09322b2009-08-15 17:49:00 -0700795cache `"web_sessions"`::
796+
797Tracks the live user sessions coming in over HTTP. Flushing this
798cache would cause all users to be signed out immediately, forcing
Shawn O. Pearce727d80f2009-08-17 07:57:54 -0700799them to sign-in again. To avoid breaking active users, this cache
800is not flushed automatically by `gerrit flush-caches --all`, but
801instead must be explicitly requested.
802+
803If no disk cache is configured (or `cache.web_sessions.diskLimit`
804is set to 0) a server restart will force all users to sign-out,
805and need to sign-in again after the restart, as the cache was
806unable to persist the session information. Enabling a disk cache
807is strongly recommended.
808+
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700809Session storage is relatively inexpensive. The average entry in
810this cache is approximately 346 bytes.
Shawn O. Pearceb09322b2009-08-15 17:49:00 -0700811
Shawn O. Pearce4016a932009-05-28 15:12:40 -0700812See also link:cmd-flush-caches.html[gerrit flush-caches].
813
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800814==== [[cache_options]]Cache Options
Shawn O. Pearce29de4362010-03-03 17:51:26 -0800815
Hugo Arès2bc86812015-03-09 15:20:28 -0400816[[cache.diff.timeout]]cache.diff.timeout::
817+
818Maximum number of milliseconds to wait for diff data before giving up and
819falling back on a simpler diff algorithm that will not be able to break down
820modified regions into smaller ones. This is a work around for an infinite loop
821bug in the default difference algorithm implementation.
822+
823Values should use common unit suffixes to express their setting:
824+
825* ms, milliseconds
826* s, sec, second, seconds
827* m, min, minute, minutes
828* h, hr, hour, hours
829
830+
Edwin Kempina09ebcf2015-04-16 14:53:23 +0200831--
Hugo Arès2bc86812015-03-09 15:20:28 -0400832If a unit suffix is not specified, `milliseconds` is assumed.
Edwin Kempina09ebcf2015-04-16 14:53:23 +0200833
Hugo Arès2bc86812015-03-09 15:20:28 -0400834Default is 5 seconds.
Edwin Kempina09ebcf2015-04-16 14:53:23 +0200835--
Hugo Arès2bc86812015-03-09 15:20:28 -0400836
Edwin Kempin42d27432013-11-24 17:06:24 +0100837[[cache.diff_intraline.timeout]]cache.diff_intraline.timeout::
Shawn O. Pearce617aa392010-11-15 14:03:28 -0800838+
839Maximum number of milliseconds to wait for intraline difference data
840before giving up and disabling it for a particular file pair. This is
841a work around for an infinite loop bug in the intraline difference
David Pursehousee8c1fb92013-04-17 17:18:43 +0900842implementation.
843+
844If computation takes longer than the timeout, the worker thread is
845terminated, an error message is shown, and no intraline difference is
846displayed for the file pair.
Shawn O. Pearce617aa392010-11-15 14:03:28 -0800847+
848Values should use common unit suffixes to express their setting:
849+
850* ms, milliseconds
851* s, sec, second, seconds
852* m, min, minute, minutes
853* h, hr, hour, hours
854
855+
Edwin Kempina09ebcf2015-04-16 14:53:23 +0200856--
Shawn O. Pearce617aa392010-11-15 14:03:28 -0800857If a unit suffix is not specified, `milliseconds` is assumed.
Edwin Kempina09ebcf2015-04-16 14:53:23 +0200858
Shawn O. Pearce617aa392010-11-15 14:03:28 -0800859Default is 5 seconds.
Edwin Kempina09ebcf2015-04-16 14:53:23 +0200860--
Shawn O. Pearce617aa392010-11-15 14:03:28 -0800861
Edwin Kempin42d27432013-11-24 17:06:24 +0100862[[cache.diff_intraline.enabled]]cache.diff_intraline.enabled::
Shawn O. Pearce29de4362010-03-03 17:51:26 -0800863+
864Boolean to enable or disable the computation of intraline differences
Shawn O. Pearce307dd4e2010-11-15 12:12:20 -0800865when populating a diff cache entry. This flag is provided primarily
866as a backdoor to disable the intraline difference feature if
David Pursehouse92463562013-06-24 10:16:28 +0900867necessary. To maintain backwards compatibility with prior versions,
Shawn O. Pearce307dd4e2010-11-15 12:12:20 -0800868this setting will fallback to `cache.diff.intraline` if not set in the
869configuration.
Shawn O. Pearce29de4362010-03-03 17:51:26 -0800870+
871Default is true, enabled.
872
Edwin Kempin42d27432013-11-24 17:06:24 +0100873[[cache.projects.checkFrequency]]cache.projects.checkFrequency::
Shawn O. Pearceb8e4e352011-05-19 18:09:01 -0700874+
875How often project configuration should be checked for update from Git.
876Gerrit Code Review caches project access rules and configuration in
877memory, checking the refs/meta/config branch every checkFrequency
878minutes to see if a new revision should be loaded and used for future
879access. Values can be specified using standard time unit abbreviations
880('ms', 'sec', 'min', etc.).
881+
882If set to 0, checks occur every time, which may slow down operations.
Shawn Pearcec825ef12013-02-20 11:29:46 -0800883If set to 'disabled' or 'off', no check will ever be done.
Shawn O. Pearceb8e4e352011-05-19 18:09:01 -0700884Administrators may force the cache to flush with
885link:cmd-flush-caches.html[gerrit flush-caches].
886+
887Default is 5 minutes.
888
Simon Leifc19ff12014-10-02 13:36:00 -0400889[[cache.projects.loadOnStartup]]cache.projects.loadOnStartup::
890+
891If the project cache should be loaded during server startup.
892+
893The cache is loaded concurrently. Admins should ensure that the cache
894size set under <<cache.name.memoryLimit,cache.projects.memoryLimit>>
895is not smaller than the number of repos.
896+
897Default is false, disabled.
898
899[[cache.projects.loadThreads]]cache.projects.loadThreads::
900+
901Only relevant if <<cache.projects.loadOnStartup,cache.projects.loadOnStartup>>
902is true.
903+
904The number of threads to allocate for loading the cache at startup. These
905threads will die out after the cache is loaded.
906+
907Default is the number of CPUs.
908
Shawn Pearce67a33302016-08-11 11:51:59 -0700909
910[[capability]]
911=== Section capability
912
913[[capability.administrateServer]]capability.administrateServer::
914+
915Names of groups of users that are allowed to exercise the
916administrateServer capability, in addition to those listed in
917All-Projects. Configuring this option can be a useful fail-safe
918to recover a server in the event an administrator removed all
919groups from the administrateServer capability, or to ensure that
920specific groups always have administration capabilities.
921+
922----
923[capability]
924 administrateServer = group Fail Safe Admins
925----
926+
927The configuration file uses group names, not UUIDs. If a group is
928renamed the gerrit.config file must be updated to reflect the new
929name. If a group cannot be found for the configured name a warning
930is logged and the server will continue normal startup.
931+
932If not specified (default), only the groups listed by All-Projects
933may use the administrateServer capability.
934
935
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -0800936[[change]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800937=== Section change
Shawn Pearceb9ebb662013-07-19 19:45:25 -0700938
Edwin Kempin662e55f2013-11-23 12:50:29 +0100939[[change.largeChange]]change.largeChange::
940+
941Number of changed lines from which on a change is considered as a large
942change. The number of changed lines of a change is the sum of the lines
943that were inserted and deleted in the change.
944+
David Pursehousea1d633b2014-05-02 17:21:02 +0900945The specified value is used to visualize the change sizes in the Web UI
Edwin Kempin662e55f2013-11-23 12:50:29 +0100946in change tables and user dashboards.
947+
948By default 500.
949
Shawn Pearceb9ebb662013-07-19 19:45:25 -0700950[[change.updateDelay]]change.updateDelay::
951+
952How often in seconds the web interface should poll for updates to the
953currently open change. The poller relies on the client's browser
954cache to use If-Modified-Since and respect `304 Not Modified` HTTP
Matt Baker8ce12fc2013-11-26 21:43:12 -0700955responses. This allows for fast polls, often under 8 milliseconds.
Shawn Pearceb9ebb662013-07-19 19:45:25 -0700956+
957With a configured 30 second delay a server with 4900 active users will
958typically need to dedicate 1 CPU to the update check. 4900 users
959divided by an average delay of 30 seconds is 163 requests arriving per
Edwin Kempin720eebe2014-07-16 13:44:04 +0200960second. If requests are served at \~6 ms response time, 1 CPU is
Shawn Pearceb9ebb662013-07-19 19:45:25 -0700961necessary to keep up with the update request traffic. On a smaller
962user base of 500 active users, the default 30 second delay is only 17
963requests per second and requires ~10% CPU.
964+
965If 0 the update polling is disabled.
966+
967Default is 30 seconds.
968
Gabor Somossyb72d4c62015-10-20 23:40:07 +0100969[[change.allowBlame]]change.allowBlame::
970+
971Allow blame on side by side diff. If set to false, blame cannot be used.
972+
973Default is true.
974
David Ostrovsky1b61dc72014-01-28 18:40:48 +0100975[[change.allowDrafts]]change.allowDrafts::
976+
977Allow drafts workflow. If set to false, drafts cannot be created,
978deleted or published.
979+
980Default is true.
981
Dave Borowitzf5e6e042016-04-25 13:03:42 -0400982[[change.cacheAutomerge]]change.cacheAutomerge::
983+
984When reviewing diff commits, the left-hand side shows the output of the
985result of JGit's automatic merge algorithm. This option controls whether
986this output is cached in the change repository, or if only the diff is
987cached in the persistent `diff` cache.
988+
989If true, automerge results are stored in the repository under
990`refs/cache-automerge/*`; the results of diffing the change against its
991automerge base are stored in the diff cache. If false, no extra data is
992stored in the repository, only the diff cache. This can result in slight
993performance improvements by reducing the number of refs in the repo.
994+
995Default is true.
996
Gustaf Lundh661d30a2016-09-19 14:41:29 +0200997[[change.showAssignee]]change.showAssignee::
998+
999Allow assignee workflow. If set to false, assignees will not be visible anywhere
1000in UI.
1001+
1002Default is true.
1003
David Ostrovsky9933eb32014-05-20 16:08:20 +02001004[[change.submitLabel]]change.submitLabel::
1005+
1006Label name for the submit button.
1007+
1008Default is "Submit".
1009
Stefan Beller7c380d512015-08-21 10:55:21 -07001010[[change.submitLabelWithParents]]change.submitLabelWithParents::
1011+
1012Label name for the submit button if the change has parents which will
1013be submitted together with this change.
1014+
1015Default is "Submit including parents".
1016
David Ostrovsky9933eb32014-05-20 16:08:20 +02001017[[change.submitTooltip]]change.submitTooltip::
1018+
1019Tooltip for the submit button. Variables available for replacement
1020include `${patchSet}` for the current patch set number (1, 2, 3),
1021`${branch}` for the branch name ("master") and `${commit}` for the
1022abbreviated commit SHA-1 (`c9c0edb`).
1023+
1024Default is "Submit patch set ${patchSet} into ${branch}".
1025
Stefan Beller0e655542015-07-20 21:14:38 -07001026[[change.submitTooltipAncestors]]change.submitTooltipAncestors::
1027+
1028Tooltip for the submit button if there are ancestors which would
1029also be submitted by submitting the change. Additionally to the variables
1030as in link:#change.submitTooltip[change.submitTooltip], there is the
1031variable `${submitSize}` indicating the number of changes which are
1032submitted.
1033+
1034Default is "Submit all ${topicSize} changes of the same topic (${submitSize}
1035changes including ancestors and other changes related by topic)".
1036
David Pursehouse2ecd0302016-04-07 19:12:00 +09001037[[change.submitWholeTopic]]change.submitWholeTopic::
Stefan Bellera038cf72015-01-13 16:25:10 -08001038+
1039Determines if the submit button submits the whole topic instead of
1040just the current change.
1041+
1042Default is false.
1043
1044[[change.submitTopicLabel]]change.submitTopicLabel::
1045+
1046If `change.submitWholeTopic` is set and a change has a topic,
1047the label name for the submit button is given here instead of
1048the configuration `change.submitLabel`.
1049+
1050Defaults to "Submit whole topic"
1051
1052[[change.submitTopicTooltip]]change.submitTopicTooltip::
1053+
David Pursehousea61ee502016-09-06 16:27:09 +09001054If `change.submitWholeTopic` is configured to true and a change has a
Stefan Bellera038cf72015-01-13 16:25:10 -08001055topic, this configuration determines the tooltip for the submit button
1056instead of `change.submitTooltip`. The variable `${topicSize}` is available
Stefan Beller7c380d512015-08-21 10:55:21 -07001057for the number of changes in the same topic to be submitted. The number of
1058all changes to be submitted is in the variable `${submitSize}`.
Stefan Bellera038cf72015-01-13 16:25:10 -08001059+
Stefan Beller7c380d512015-08-21 10:55:21 -07001060Defaults to "Submit all ${topicSize} changes of the same topic
1061(${submitSize} changes including ancestors and other
1062changes related by topic)".
Stefan Bellera038cf72015-01-13 16:25:10 -08001063
Richard Möhne4abe9a2014-11-13 20:05:13 +01001064[[change.replyLabel]]change.replyLabel::
1065+
1066Label name for the reply button. In the user interface an ellipsis (…)
1067is appended.
1068+
1069Default is "Reply". In the user interface it becomes "Reply…".
1070
1071[[change.replyTooltip]]change.replyTooltip::
1072+
1073Tooltip for the reply button. In the user interface a note about the
1074keyboard shortcut is appended.
1075+
1076Default is "Reply and score". In the user interface it becomes "Reply
1077and score (Shortcut: a)".
1078
Edwin Kempine326a1d2015-06-03 10:27:39 +02001079[[changeCleanup]]
1080=== Section changeCleanup
1081
1082This section allows to configure change cleanups and schedules them to
1083run periodically.
1084
1085[[changeCleanup.abandonAfter]]changeCleanup.abandonAfter::
1086+
1087Period of inactivity after which open changes should be abandoned
1088automatically.
1089+
1090By default `0`, never abandon open changes.
1091+
1092[WARNING] Auto-Abandoning changes may confuse/annoy users. When
1093enabling this, make sure to choose a reasonably large grace period and
1094inform users in advance.
1095+
1096The following suffixes are supported to define the time unit:
1097+
1098* `d, day, days`
1099* `w, week, weeks` (`1 week` is treated as `7 days`)
1100* `mon, month, months` (`1 month` is treated as `30 days`)
1101* `y, year, years` (`1 year` is treated as `365 days`)
1102
Edwin Kempin7080ef12015-06-10 15:03:09 +02001103[[changeCleanup.abandonIfMergeable]]changeCleanup.abandonIfMergeable::
1104+
1105Whether changes which are mergeable should be auto-abandoned.
1106+
1107By default `true`.
1108
Edwin Kempine326a1d2015-06-03 10:27:39 +02001109[[changeCleanup.abandonMessage]]changeCleanup.abandonMessage::
1110+
1111Change message that should be posted when a change is abandoned.
1112+
1113'${URL}' can be used as a placeholder for the Gerrit web URL.
1114+
1115By default "Auto-Abandoned due to inactivity, see
1116${URL}Documentation/user-change-cleanup.html#auto-abandon\n\n
1117If this change is still wanted it should be restored.".
1118
1119[[changeCleanup.startTime]]changeCleanup.startTime::
1120+
1121Start time to define the first execution of the change cleanups.
1122If the configured `'changeCleanup.interval'` is shorter than
1123`'changeCleanup.startTime - now'` the start time will be preponed by
1124the maximum integral multiple of `'changeCleanup.interval'` so that the
1125start time is still in the future.
1126+
1127----
1128<day of week> <hours>:<minutes>
1129or
1130<hours>:<minutes>
1131
1132<day of week> : Mon, Tue, Wed, Thu, Fri, Sat, Sun
1133<hours> : 00-23
1134<minutes> : 0-59
1135----
1136
1137
1138[[changeCleanup.interval]]changeCleanup.interval::
1139+
1140Interval for periodic repetition of triggering the change cleanups.
1141The interval must be larger than zero. The following suffixes are supported
1142to define the time unit for the interval:
1143+
1144* `s, sec, second, seconds`
1145* `m, min, minute, minutes`
1146* `h, hr, hour, hours`
1147* `d, day, days`
1148* `w, week, weeks` (`1 week` is treated as `7 days`)
1149* `mon, month, months` (`1 month` is treated as `30 days`)
1150* `y, year, years` (`1 year` is treated as `365 days`)
1151
1152link:#schedule-examples[Schedule examples] can be found in the
1153link:#gc[gc] section.
1154
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08001155[[changeMerge]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001156=== Section changeMerge
carloseduardo.baldacin14246de2011-07-14 17:52:22 -03001157
Edwin Kempin42d27432013-11-24 17:06:24 +01001158[[changeMerge.checkFrequency]]changeMerge.checkFrequency::
Dave Borowitz204669c2012-10-11 11:06:08 -07001159+
1160How often the database should be rescanned for changes that have been
1161submitted but not merged due to transient errors. Values can be
1162specified using standard time unit abbreviations ('ms', 'sec', 'min',
1163etc.). Set to 0 to disable periodic rescanning, only scanning once on
1164master node startup.
1165+
1166Default is 300 seconds (5 minutes).
1167
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08001168[[commentlink]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001169=== Section commentlink
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08001170
Brad Larson991a31b2009-11-03 14:30:26 -06001171Comment links are find/replace strings applied to change descriptions,
Chris Harris63c7cdd2012-11-23 12:17:36 -05001172patch comments, in-line code comments and approval category value descriptions
1173to turn set strings into hyperlinks. One common use is for linking to
1174bug-tracking systems.
Brad Larson991a31b2009-11-03 14:30:26 -06001175
1176In the following example configuration the 'changeid' comment link
Shawn O. Pearceda866ae2009-12-16 15:46:03 -08001177will match typical Gerrit Change-Id values and create a hyperlink
1178to changes which reference it. The second configuration 'bugzilla'
1179will hyperlink terms such as 'bug 42' to an external bug tracker,
1180supplying the argument record number '42' for display. The third
David Pursehouse221d4f62012-06-08 17:38:08 +09001181configuration 'tracker' uses raw HTML to more precisely control
Shawn O. Pearceda866ae2009-12-16 15:46:03 -08001182how the replacement is displayed to the user.
Brad Larson991a31b2009-11-03 14:30:26 -06001183
Shawn O. Pearceda866ae2009-12-16 15:46:03 -08001184----
1185[commentlink "changeid"]
1186 match = (I[0-9a-f]{8,40})
David Pursehouse9f68e1a2016-01-28 09:21:03 +00001187 link = "#/q/$1"
Brad Larson991a31b2009-11-03 14:30:26 -06001188
Shawn O. Pearceda866ae2009-12-16 15:46:03 -08001189[commentlink "bugzilla"]
Shawn O. Pearcec99630a2010-02-21 19:11:56 -08001190 match = "(bug\\s+#?)(\\d+)"
Shawn O. Pearceda866ae2009-12-16 15:46:03 -08001191 link = http://bugs.example.com/show_bug.cgi?id=$2
Brad Larson991a31b2009-11-03 14:30:26 -06001192
Shawn O. Pearceda866ae2009-12-16 15:46:03 -08001193[commentlink "tracker"]
1194 match = ([Bb]ug:\\s+)(\\d+)
1195 html = $1<a href=\"http://trak.example.com/$2\">$2</a>
1196----
1197
Dave Borowitz13b38002013-04-08 12:03:29 -07001198Comment links can also be specified in `project.config` and sections in
1199children override those in parents. The only restriction is that to
1200avoid injecting arbitrary user-supplied HTML in the page, comment links
1201defined in `project.config` may only supply `link`, not `html`.
1202
Shawn O. Pearceda866ae2009-12-16 15:46:03 -08001203[[commentlink.name.match]]commentlink.<name>.match::
Brad Larson991a31b2009-11-03 14:30:26 -06001204+
Shawn O. Pearceda866ae2009-12-16 15:46:03 -08001205A JavaScript regular expression to match positions to be replaced
1206with a hyperlink. Subexpressions of the matched string can be
1207stored using groups and accessed with `$'n'` syntax, where 'n'
1208is the group number, starting from 1.
Brad Larson991a31b2009-11-03 14:30:26 -06001209+
Shawn O. Pearcec99630a2010-02-21 19:11:56 -08001210The configuration file parser eats one level of backslashes, so the
1211character class `\s` requires `\\s` in the configuration file. The
1212parser also terminates the line at the first `#`, so a match
1213expression containing # must be wrapped in double quotes.
Shawn O. Pearceda866ae2009-12-16 15:46:03 -08001214+
Shawn O. Pearce665beaa2010-02-21 22:41:03 -08001215To match case insensitive strings, a character class with both the
1216upper and lower case character for each position must be used. For
1217example, to match the string `bug` in a case insensitive way the match
1218pattern `[bB][uU][gG]` needs to be used.
1219+
Matthew Webbercd7d2bf2015-10-14 15:54:06 +01001220The regular expression pattern is applied to the HTML form of the message
1221in question, which means it needs to assume the data has been escaped.
1222So `"` needs to be matched as `&amp;quot;`, `<` as `&amp;lt;`, and `'` as
1223`&amp;#39;`.
1224+
Shawn O. Pearceda866ae2009-12-16 15:46:03 -08001225A common pattern to match is `bug\\s+(\\d+)`.
Brad Larson991a31b2009-11-03 14:30:26 -06001226
Shawn O. Pearceda866ae2009-12-16 15:46:03 -08001227[[commentlink.name.link]]commentlink.<name>.link::
Brad Larson991a31b2009-11-03 14:30:26 -06001228+
Shawn O. Pearceda866ae2009-12-16 15:46:03 -08001229The URL to direct the user to whenever the regular expression is
1230matched. Groups in the match expression may be accessed as `$'n'`.
1231+
1232The link property is used only when the html property is not present.
1233
1234[[commentlink.name.html]]commentlink.<name>.html::
1235+
1236HTML to replace the entire matched string with. If present,
1237this property overrides the link property above. Groups in the
1238match expression may be accessed as `$'n'`.
1239+
1240The configuration file eats double quotes, so escaping them as
1241`\"` is necessary to protect them from the parser.
Brad Larson991a31b2009-11-03 14:30:26 -06001242
Dave Borowitz82d79c02013-04-08 15:45:12 -07001243[[commentlink.name.enabled]]commentlink.<name>.enabled::
1244+
1245Whether the comment link is enabled. A child project may override a
1246section in a parent or the site-wide config that is disabled by
1247specifying `enabled = true`.
1248+
1249Disabling sections in `gerrit.config` can be used by site administrators
1250to create a library of comment links with `html` set that are not
1251user-supplied and thus can be verified to be XSS-free, but are only
1252enabled for a subset of projects.
1253+
David Pursehouse6f1af472013-12-11 19:23:33 +09001254By default, true.
1255+
Dave Borowitz82d79c02013-04-08 15:45:12 -07001256Note that the names and contents of disabled sections are visible even
1257to anonymous users via the
1258link:rest-api-projects.html#get-config[REST API].
1259
Brad Larson991a31b2009-11-03 14:30:26 -06001260
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08001261[[container]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001262=== Section container
Shawn O. Pearcee24c71fb2009-12-07 20:32:40 -08001263
1264These settings are applied only if Gerrit is started as the container
1265process through Gerrit's 'gerrit.sh' rc.d compatible wrapper script.
1266
1267[[container.heapLimit]]container.heapLimit::
1268+
1269Maximum heap size of the Java process running Gerrit, in bytes.
1270This property is translated into the '-Xmx' flag for the JVM.
1271+
1272Default is platform and JVM specific.
1273+
1274Common unit suffixes of 'k', 'm', or 'g' are supported.
1275
1276[[container.javaHome]]container.javaHome::
1277+
1278Path of the JRE/JDK installation to run Gerrit with. If not set, the
1279Gerrit startup script will attempt to search your system and guess
1280a suitable JRE. Overrides the environment variable 'JAVA_HOME'.
1281
1282[[container.javaOptions]]container.javaOptions::
1283+
1284Additional options to pass along to the Java runtime. If multiple
1285values are configured, they are passed in order on the command line,
1286separated by spaces. These options are appended onto 'JAVA_OPTIONS'.
1287
David Ostrovskyc772bd82013-10-03 10:37:51 +02001288For example, it is possible to overwrite Gerrit's default log4j
1289configuration:
1290
1291----
1292 javaOptions = -Dlog4j.configuration=file:///home/gerrit/site/etc/log4j.properties
1293----
1294
Hugo Arès6710f0a2014-11-04 10:28:42 -05001295[[container.daemonOpt]]container.daemonOpt::
1296+
1297Additional options to pass to the daemon (e.g. '--enable-httpd'). If
1298multiple values are configured, they are passed in that order to the command
1299line, separated by spaces.
1300+
1301Execute `java -jar gerrit.war daemon --help` to see all possible
1302options.
1303
Fredrik Luthanderb8f7d6d2010-05-18 21:11:22 +02001304[[container.slave]]container.slave::
1305+
1306Used on Gerrit slave installations. If set to true the Gerrit JVM is
1307called with the '--slave' switch, enabling slave mode. If no value is
Matt Baker8ce12fc2013-11-26 21:43:12 -07001308set (or any other value), Gerrit defaults to master mode.
Fredrik Luthanderb8f7d6d2010-05-18 21:11:22 +02001309
Shawn O. Pearcee24c71fb2009-12-07 20:32:40 -08001310[[container.user]]container.user::
1311+
1312Login name (or UID) of the operating system user the Gerrit JVM
1313will execute as. If not set, defaults to the user who launched
1314the 'gerrit.sh' wrapper script.
1315
1316[[container.war]]container.war::
1317+
1318Path of the JAR file to start daemon execution with. This should
1319be the path of the local 'gerrit.war' archive. Overrides the
1320environment variable 'GERRIT_WAR'.
1321+
1322If not set, defaults to '$site_path/bin/gerrit.war', or to
1323'$HOME/gerrit.war'.
1324
1325
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08001326[[core]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001327=== Section core
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -07001328
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001329[[core.packedGitWindowSize]]core.packedGitWindowSize::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -07001330+
1331Number of bytes of a pack file to load into memory in a single
1332read operation. This is the "page size" of the JGit buffer cache,
1333used for all pack access operations. All disk IO occurs as single
1334window reads. Setting this too large may cause the process to load
1335more data than is required; setting this too small may increase
1336the frequency of `read()` system calls.
1337+
1338Default on JGit is 8 KiB on all platforms.
1339+
1340Common unit suffixes of 'k', 'm', or 'g' are supported.
1341
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001342[[core.packedGitLimit]]core.packedGitLimit::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -07001343+
1344Maximum number of bytes to load and cache in memory from pack files.
1345If JGit needs to access more than this many bytes it will unload less
1346frequently used windows to reclaim memory space within the process.
1347As this buffer must be shared with the rest of the JVM heap, it
1348should be a fraction of the total memory available.
1349+
1350Default on JGit is 10 MiB on all platforms.
1351+
1352Common unit suffixes of 'k', 'm', or 'g' are supported.
1353
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001354[[core.deltaBaseCaseLimit]]core.deltaBaseCacheLimit::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -07001355+
1356Maximum number of bytes to reserve for caching base objects
1357that multiple deltafied objects reference. By storing the entire
1358decompressed base object in a cache Git is able to avoid unpacking
1359and decompressing frequently used base objects multiple times.
1360+
1361Default on JGit is 10 MiB on all platforms. You probably do not
1362need to adjust this value.
1363+
1364Common unit suffixes of 'k', 'm', or 'g' are supported.
1365
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001366[[core.packedGitOpenFiles]]core.packedGitOpenFiles::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -07001367+
1368Maximum number of pack files to have open at once. A pack file
1369must be opened in order for any of its data to be available in
1370a cached window.
1371+
1372If you increase this to a larger setting you may need to also adjust
1373the ulimit on file descriptors for the host JVM, as Gerrit needs
1374additional file descriptors available for network sockets and other
1375repository data manipulation.
1376+
1377Default on JGit is 128 file descriptors on all platforms.
1378
Shawn O. Pearce329fe792010-09-03 15:44:23 -07001379[[core.streamFileThreshold]]core.streamFileThreshold::
1380+
1381Largest object size, in bytes, that JGit will allocate as a
1382contiguous byte array. Any file revision larger than this threshold
1383will have to be streamed, typically requiring the use of temporary
David Pursehouse92463562013-06-24 10:16:28 +09001384files under '$GIT_DIR/objects' to implement pseudo-random access
Shawn O. Pearce329fe792010-09-03 15:44:23 -07001385during delta decompression.
1386+
1387Servers with very high traffic should set this to be larger than
1388the size of their common big files. For example a server managing
1389the Android platform typically has to deal with ~10-12 MiB XML
1390files, so `15 m` would be a reasonable setting in that environment.
1391Setting this too high may cause the JVM to run out of heap space
1392when handling very big binary files, such as device firmware or
1393CD-ROM ISO images.
1394+
Edwin Kempin7f5a4af2014-11-12 10:05:03 +01001395Defaults to 25% of the available JVM heap, limited to 2048m.
Shawn O. Pearce329fe792010-09-03 15:44:23 -07001396+
1397Common unit suffixes of 'k', 'm', or 'g' are supported.
1398
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001399[[core.packedGitMmap]]core.packedGitMmap::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -07001400+
1401When true, JGit will use `mmap()` rather than `malloc()+read()`
1402to load data from pack files. The use of mmap can be problematic
1403on some JVMs as the garbage collector must deduce that a memory
1404mapped segment is no longer in use before a call to `munmap()`
1405can be made by the JVM native code.
1406+
1407In server applications (such as Gerrit) that need to access many
David Pursehouse92463562013-06-24 10:16:28 +09001408pack files, setting this to true risks artificially running out
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -07001409of virtual address space, as the garbage collector cannot reclaim
1410unused mapped spaces fast enough.
1411+
1412Default on JGit is false. Although potentially slower, it yields
1413much more predictable behavior.
1414
Sasa Zivkovf69aeb12012-06-11 14:05:14 +02001415[[core.asyncLoggingBufferSize]]core.asyncLoggingBufferSize::
1416+
1417Size of the buffer to store logging events for asynchronous logging.
1418Putting a larger value can protect threads from stalling when the
1419AsyncAppender threads are not fast enough to consume the logging events
David Pursehouse1ff91c02015-05-19 15:05:26 +09001420from the buffer. It also protects from losing log entries in this case.
Sasa Zivkovf69aeb12012-06-11 14:05:14 +02001421+
1422Default is 64 entries.
1423
Dave Borowitz1bec65a2013-03-13 10:59:01 -07001424[[core.useRecursiveMerge]]core.useRecursiveMerge::
1425+
Edwin Kempin71831d22014-07-15 08:54:29 +02001426Use JGit's recursive merger for three-way merges. This only affects
Sebastian Schuberth774aac92015-04-16 13:21:04 +02001427projects that allow content merges.
Edwin Kempin71831d22014-07-15 08:54:29 +02001428+
1429As explained in this
1430link:http://codicesoftware.blogspot.com/2011/09/merge-recursive-strategy.html[
1431blog], the recursive merge produces better results if the two commits
1432that are merged have more than one common predecessor.
Dave Borowitz1bec65a2013-03-13 10:59:01 -07001433+
Edwin Kempin7853c5b2014-07-15 08:57:17 +02001434Default is true.
Dave Borowitz1bec65a2013-03-13 10:59:01 -07001435
Hugo Arès47344372016-06-27 10:23:17 -04001436[[core.repositoryCacheCleanupDelay]]core.repositoryCacheCleanupDelay::
1437+
1438Delay between each periodic cleanup of expired repositories.
1439+
1440Values can be specified using standard time unit abbreviations (`ms`, `sec`,
1441`min`, etc.).
1442+
1443Set it to 0 in order to switch off cache expiration. If cache expiration is
1444switched off, the JVM can still evict cache entries when it is running low
1445on available heap memory.
1446+
1447Set it to -1 to automatically derive cleanup delay from
1448`core.repositoryCacheExpireAfter` (lowest value between 1/10 of
1449`core.repositoryCacheExpireAfter` and 10 minutes).
1450+
1451Default is -1.
1452
1453[[core.repositoryCacheExpireAfter]]core.repositoryCacheExpireAfter::
1454+
1455Time an unused repository should expire and be evicted from the repository
1456cache.
1457+
1458Values can be specified using standard time unit abbreviations (`ms`, `sec`,
1459`min`, etc.).
1460+
1461Default is 1 hour.
1462
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08001463[[database]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001464=== Section database
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001465
1466The database section configures where Gerrit stores its metadata
1467records about user accounts and change reviews.
1468
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001469----
1470[database]
Shawn O. Pearce1be39062009-12-19 14:11:52 -08001471 type = POSTGRESQL
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001472 hostname = localhost
1473 database = reviewdb
1474 username = gerrit2
1475 password = s3kr3t
1476----
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001477
1478[[database.type]]database.type::
1479+
1480Type of database server to connect to. If set this value will be
1481used to automatically create correct database.driver and database.url
1482values to open the connection.
1483+
David Pursehouse227e4032016-02-26 15:47:14 +09001484* `DB2`
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001485+
David Pursehouse227e4032016-02-26 15:47:14 +09001486Connect to a DB2 database server.
1487+
1488* `DERBY`
1489+
1490Connect to an Apache Derby database server.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001491+
1492* `H2`
1493+
Shawn O. Pearce1be39062009-12-19 14:11:52 -08001494Connect to a local embedded H2 database.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001495+
David Pursehouse4f859e72016-02-26 15:44:38 +09001496* `JDBC`
1497+
1498Connect using a JDBC driver class name and URL.
1499+
David Pursehouse227e4032016-02-26 15:47:14 +09001500* `MAXDB`
1501+
1502Connect to an SAP MaxDb database server.
1503+
Shawn O. Pearce1be39062009-12-19 14:11:52 -08001504* `MYSQL`
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001505+
1506Connect to a MySQL database server.
Shawn O. Pearce1be39062009-12-19 14:11:52 -08001507+
David Pursehouse227e4032016-02-26 15:47:14 +09001508* `ORACLE`
Shawn O. Pearce1be39062009-12-19 14:11:52 -08001509+
David Pursehouse227e4032016-02-26 15:47:14 +09001510Connect to an Oracle database server.
1511+
David Pursehouse4f859e72016-02-26 15:44:38 +09001512* `POSTGRESQL`
Shawn O. Pearce1be39062009-12-19 14:11:52 -08001513+
David Pursehouse4f859e72016-02-26 15:44:38 +09001514Connect to a PostgreSQL database server.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001515
1516+
1517If not specified, database.driver and database.url are used as-is,
1518and if they are also not specified, defaults to H2.
1519
1520[[database.hostname]]database.hostname::
1521+
1522Hostname of the database server. Defaults to 'localhost'.
1523
1524[[database.port]]database.port::
1525+
1526Port number of the database server. Defaults to the default port
1527of the server named by database.type.
1528
1529[[database.database]]database.database::
1530+
Shawn O. Pearce1be39062009-12-19 14:11:52 -08001531For POSTGRESQL or MYSQL, the name of the database on the server.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001532+
1533For H2, this is the path to the database, and if not absolute is
Shawn O. Pearce1be39062009-12-19 14:11:52 -08001534relative to `'$site_path'`.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001535
1536[[database.username]]database.username::
1537+
1538Username to connect to the database server as.
1539
1540[[database.password]]database.password::
1541+
1542Password to authenticate to the database server with.
1543
1544[[database.driver]]database.driver::
1545+
Shawn O. Pearce1be39062009-12-19 14:11:52 -08001546Name of the JDBC driver class to connect to the database with.
1547Setting this usually isn't necessary as it can be derived from
1548database.type or database.url for any supported database.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001549
1550[[database.url]]database.url::
1551+
Shawn O. Pearce1be39062009-12-19 14:11:52 -08001552'jdbc:' URL for the database. Setting this variable usually
1553isn't necessary as it can be constructed from the all of the
1554above properties.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001555
Christian Aistleitner851072a2013-05-05 15:04:09 +02001556[[database.connectionPool]]database.connectionPool::
1557+
1558If true, use connection pooling for database connections. Otherwise, a
1559new database connection is opened for each request.
1560+
1561Default is false for MySQL, and true for other database backends.
1562
Shawn O. Pearce07f35177d2010-02-23 09:47:10 -08001563[[database.poolLimit]]database.poolLimit::
1564+
1565Maximum number of open database connections. If the server needs
1566more than this number, request processing threads will wait up
1567to <<database.poolMaxWait, poolMaxWait>> seconds for a
1568connection to be released before they abort with an exception.
1569This limit must be several units higher than the total number of
1570httpd and sshd threads as some request processing code paths may
1571need multiple connections.
1572+
Dariusz Luksza2ebfc282015-11-09 20:25:25 +01001573Default is <<sshd.threads, sshd.threads>>
1574 + <<httpd.maxThreads, httpd.maxThreads>> + 2.
Christian Aistleitner851072a2013-05-05 15:04:09 +02001575+
1576This setting only applies if
1577<<database.connectionPool,database.connectionPool>> is true.
Shawn O. Pearce07f35177d2010-02-23 09:47:10 -08001578
Shawn O. Pearcef458bf62010-02-25 09:03:03 -08001579[[database.poolMinIdle]]database.poolMinIdle::
Shawn O. Pearce07f35177d2010-02-23 09:47:10 -08001580+
1581Minimum number of connections to keep idle in the pool.
1582Default is 4.
Christian Aistleitner851072a2013-05-05 15:04:09 +02001583+
1584This setting only applies if
1585<<database.connectionPool,database.connectionPool>> is true.
Shawn O. Pearce07f35177d2010-02-23 09:47:10 -08001586
Shawn O. Pearcef458bf62010-02-25 09:03:03 -08001587[[database.poolMaxIdle]]database.poolMaxIdle::
Shawn O. Pearce07f35177d2010-02-23 09:47:10 -08001588+
1589Maximum number of connections to keep idle in the pool. If there
1590are more idle connections, connections will be closed instead of
1591being returned back to the pool.
Dariusz Luksza30d70ae2015-11-09 22:19:59 +01001592Default is min(<<database.poolLimit, database.poolLimit>>, 16).
Christian Aistleitner851072a2013-05-05 15:04:09 +02001593+
1594This setting only applies if
1595<<database.connectionPool,database.connectionPool>> is true.
Shawn O. Pearce07f35177d2010-02-23 09:47:10 -08001596
1597[[database.poolMaxWait]]database.poolMaxWait::
1598+
1599Maximum amount of time a request processing thread will wait to
1600acquire a database connection from the pool. If no connection is
1601released within this time period, the processing thread will abort
1602its current operations and return an error to the client.
1603Values should use common unit suffixes to express their setting:
1604+
1605* ms, milliseconds
1606* s, sec, second, seconds
1607* m, min, minute, minutes
1608* h, hr, hour, hours
1609
1610+
Edwin Kempina09ebcf2015-04-16 14:53:23 +02001611--
Shawn O. Pearce07f35177d2010-02-23 09:47:10 -08001612If a unit suffix is not specified, `milliseconds` is assumed.
Edwin Kempina09ebcf2015-04-16 14:53:23 +02001613
Shawn O. Pearce07f35177d2010-02-23 09:47:10 -08001614Default is `30 seconds`.
Edwin Kempina09ebcf2015-04-16 14:53:23 +02001615
Christian Aistleitner851072a2013-05-05 15:04:09 +02001616This setting only applies if
1617<<database.connectionPool,database.connectionPool>> is true.
Edwin Kempina09ebcf2015-04-16 14:53:23 +02001618--
Shawn O. Pearce07f35177d2010-02-23 09:47:10 -08001619
David Ostrovsky38a6f6c2014-01-11 13:56:09 +01001620[[database.dataSourceInterceptorClass]]database.dataSourceInterceptorClass::
1621
1622Class that implements DataSourceInterceptor interface to monitor SQL activity.
1623This class must have default constructor and be available on Gerrit's bootstrap
1624classpath, e. g. in `$gerrit_site/lib` directory. Example implementation of
1625SQL monitoring can be found in javamelody-plugin.
1626
Björn Pedersen64af3ad2016-05-20 10:21:07 +02001627[[database.h2]]database.h2::
1628+
1629The settings in this section are used for the reviewdb if the
1630<<database.type,database.type>> is H2.
1631+
1632Additionally gerrit uses H2 for storing reviewed flags on changes.
1633
1634[[database.h2.cacheSize]]database.h2.cacheSize::
1635+
1636The size of the H2 internal database cache, in bytes. The H2 internal cache for
1637persistent H2-backed caches is controlled by
1638<<cache.h2CacheSize,cache.h2CacheSize>>.
1639+
1640H2 uses memory to cache its database content. The parameter `cacheSize`
1641allows to limit the memory used by H2 and thus prevent out-of-memory
1642caused by the H2 database using too much memory.
1643+
1644Technically the H2 cache size is configured using the CACHE_SIZE parameter in
1645the H2 JDBC connection URL, as described
1646link:http://www.h2database.com/html/features.html#cache_settings[here]
1647+
1648Default is unset, using up to half of the available memory.
1649
1650H2 will persist this value in the database, so to unset explicitly specify 0.
1651+
1652Common unit suffixes of 'k', 'm', or 'g' are supported.
1653
1654[[database.h2.autoServer]]database.h2.autoServer::
1655+
1656If `true` enable the automatic mixed mode
1657(see link:http://www.h2database.com/html/features.html#auto_mixed_mode[Automatic Mixed Mode]).
1658This enables concurrent access to the embedded H2 database from command line
1659utils (e.g. RebuildNoteDb).
1660+
1661Default is `false`.
1662
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08001663[[download]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001664=== Section download
monica.dionisio3f630442010-06-29 15:42:57 -03001665
1666----
1667[download]
Edwin Kempin08b03a22012-09-14 16:32:57 +02001668 command = checkout
1669 command = cherry_pick
1670 command = pull
1671 command = format_patch
monica.dionisio3f630442010-06-29 15:42:57 -03001672 scheme = ssh
1673 scheme = http
1674 scheme = anon_http
1675 scheme = anon_git
1676 scheme = repo_download
1677----
1678
1679The download section configures the allowed download methods.
1680
Edwin Kempin08b03a22012-09-14 16:32:57 +02001681[[download.command]]download.command::
1682+
1683Commands that should be offered to download changes.
1684+
1685Multiple commands are supported:
1686+
1687* `checkout`
1688+
1689Command to fetch and checkout the patch set.
1690+
1691* `cherry_pick`
1692+
1693Command to fetch the patch set and to cherry-pick it onto the current
1694commit.
1695+
1696* `pull`
1697+
1698Command to pull the patch set.
1699+
1700* `format_patch`
1701+
1702Command to fetch the patch set and to feed it into the `format-patch`
1703command.
1704
1705+
1706If `download.command` is not specified, all download commands are
1707offered.
1708
monica.dionisio3f630442010-06-29 15:42:57 -03001709[[download.scheme]]download.scheme::
1710+
1711Schemes that should be used to download changes.
1712+
1713Multiple schemes are supported:
1714+
1715* `http`
1716+
Shawn O. Pearce5c46a072010-08-23 08:33:32 -07001717Authenticated HTTP download is allowed.
monica.dionisio3f630442010-06-29 15:42:57 -03001718+
1719* `ssh`
1720+
Shawn O. Pearce5c46a072010-08-23 08:33:32 -07001721Authenticated SSH download is allowed.
monica.dionisio3f630442010-06-29 15:42:57 -03001722+
1723* `anon_http`
1724+
1725Anonymous HTTP download is allowed.
1726+
1727* `anon_git`
1728+
Shawn O. Pearce5c46a072010-08-23 08:33:32 -07001729Anonymous Git download is allowed. This is not default, it is also
1730necessary to set <<gerrit.canonicalGitUrl,gerrit.canonicalGitUrl>>
1731variable.
monica.dionisio3f630442010-06-29 15:42:57 -03001732+
1733* `repo_download`
1734+
Shawn O. Pearce5c46a072010-08-23 08:33:32 -07001735Gerrit advertises patch set downloads with the `repo download`
1736command, assuming that all projects managed by this instance are
1737generally worked on with the repo multi-repository tool. This is
1738not default, as not all instances will deploy repo.
monica.dionisio3f630442010-06-29 15:42:57 -03001739
1740+
Edwin Kempin08b03a22012-09-14 16:32:57 +02001741If `download.scheme` is not specified, SSH, HTTP and Anonymous HTTP
Shawn O. Pearce5c46a072010-08-23 08:33:32 -07001742downloads are allowed.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001743
Edwin Kempin322db672015-07-03 08:50:46 +02001744[[download.checkForHiddenChangeRefs]]download.checkForHiddenChangeRefs::
1745+
1746Whether the download commands should be adapted when the change refs
1747are hidden.
1748+
1749Git has a configuration option to hide refs from the initial
1750advertisement (`uploadpack.hideRefs`). This option can be used to hide
1751the change refs from the client. As consequence fetching changes by
1752change ref does not work anymore. However by setting
1753`uploadpack.allowTipSha1InWant` to `true` fetching changes by commit ID
1754is possible. If `download.checkForHiddenChangeRefs` is set to `true`
1755the git download commands use the commit ID instead of the change ref
1756when a project is configured like this.
1757+
1758Example git configuration on a project:
1759+
1760----
1761[uploadpack]
1762 hideRefs = refs/changes/
1763 hideRefs = refs/cache-automerge/
1764 allowTipSha1InWant = true
1765----
1766+
1767By default `false`.
1768
David Ostrovskyfc9cdf02014-03-26 14:46:45 -07001769[[download.archive]]download.archive::
1770+
1771Specifies which archive formats, if any, should be offered on the change
Francois Ferrand1e933882014-09-25 11:19:08 +02001772screen and supported for `git-upload-archive` operation:
David Ostrovskyfc9cdf02014-03-26 14:46:45 -07001773+
1774----
1775[download]
1776 archive = tar
1777 archive = tbz2
1778 archive = tgz
1779 archive = txz
Francois Ferrand1e933882014-09-25 11:19:08 +02001780 archive = zip
David Ostrovskyfc9cdf02014-03-26 14:46:45 -07001781----
1782
Shawn Pearce6edde312014-03-26 22:00:26 -07001783If `download.archive` is not specified defaults to all archive
1784commands. Set to `off` or empty string to disable.
David Ostrovskyfc9cdf02014-03-26 14:46:45 -07001785
Francois Ferrand1e933882014-09-25 11:19:08 +02001786Zip is not supported because it may be interpreted by a Java plugin as a
1787valid JAR file, whose code would have access to cookies on the domain.
1788For this reason `zip` format is always excluded from formats offered
1789through the `Download` drop down or accessible in the REST API.
1790
Matthias Sohn0fb2c992014-06-03 01:42:59 +02001791[[gc]]
1792=== Section gc
1793
1794This section allows to configure the git garbage collection and schedules it
1795to run periodically. It will be triggered and executed sequentially for all
1796projects.
1797
Christian Halstricke6c68322015-03-11 15:21:42 +01001798[[gc.aggressive]]gc.aggressive::
1799+
1800Determines if scheduled garbage collections and garbage collections triggered
1801through Web-UI should run in aggressive mode or not. Aggressive garbage
1802collections are more expensive but may lead to significantly smaller
1803repositories.
1804+
1805Valid values are "true" and "false," default is "false".
1806
Matthias Sohn0fb2c992014-06-03 01:42:59 +02001807[[gc.startTime]]gc.startTime::
1808+
1809Start time to define the first execution of the git garbage collection.
1810If the configured `'gc.interval'` is shorter than `'gc.startTime - now'`
1811the start time will be preponed by the maximum integral multiple of
1812`'gc.interval'` so that the start time is still in the future.
1813+
1814----
1815<day of week> <hours>:<minutes>
1816or
1817<hours>:<minutes>
1818
1819<day of week> : Mon, Tue, Wed, Thu, Fri, Sat, Sun
1820<hours> : 00-23
1821<minutes> : 0-59
1822----
1823
1824
1825[[gc.interval]]gc.interval::
1826+
1827Interval for periodic repetition of triggering the git garbage collection.
1828The interval must be larger than zero. The following suffixes are supported
1829to define the time unit for the interval:
1830+
1831* `s, sec, second, seconds`
1832* `m, min, minute, minutes`
1833* `h, hr, hour, hours`
1834* `d, day, days`
1835* `w, week, weeks` (`1 week` is treated as `7 days`)
1836* `mon, month, months` (`1 month` is treated as `30 days`)
1837* `y, year, years` (`1 year` is treated as `365 days`)
1838
Edwin Kempine326a1d2015-06-03 10:27:39 +02001839[[schedule-examples]]
Matthias Sohn0fb2c992014-06-03 01:42:59 +02001840Examples::
1841+
1842----
1843gc.startTime = Fri 10:30
1844gc.interval = 2 day
1845----
1846+
1847Assuming the server is started on Mon 7:00 -> `'startTime - now = 4 days 3:30 hours'`.
1848This is larger than the interval hence prepone the start time
1849by the maximum integral multiple of the interval so that start
1850time is still in the future, i.e. prepone by 4 days. This yields
1851a start time of Mon 10:30, next executions are Wed 10:30, Fri 10:30
1852etc.
1853+
1854----
1855gc.startTime = 6:00
1856gc.interval = 1 day
1857----
1858+
1859Assuming the server is started on Mon 7:00 this yields the first run on next Tuesday
1860at 6:00 and a repetition interval of 1 day.
1861
1862
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08001863[[gerrit]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001864=== Section gerrit
Shawn O. Pearceeb7f8ce2009-06-01 09:57:15 -07001865
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001866[[gerrit.basePath]]gerrit.basePath::
Shawn O. Pearce9743d0b2009-06-01 10:10:06 -07001867+
1868Local filesystem directory holding all Git repositories that
1869Gerrit knows about and can process changes for. A project
1870entity in Gerrit maps to a local Git repository by creating
Edwin Kempincdb0e002011-09-08 14:23:30 +02001871the path string `"${basePath}/${project_name}.git"`.
Shawn O. Pearce9743d0b2009-06-01 10:10:06 -07001872+
1873If relative, the path is resolved relative to `'$site_path'`.
1874
Shawn O. Pearce897d9212011-06-16 16:59:59 -07001875[[gerrit.allProjects]]gerrit.allProjects::
1876+
1877Name of the permissions-only project defining global server
1878access controls and settings. These are inherited into every
1879other project managed by the running server. The name is
1880relative to `gerrit.basePath`.
1881+
1882Defaults to `All-Projects` if not set.
1883
Edwin Kempin2bf5edd2014-03-25 22:21:23 +01001884[[gerrit.allUsers]]gerrit.allUsers::
1885+
1886Name of the project in which meta data of all users is stored.
1887The name is relative to `gerrit.basePath`.
1888+
1889Defaults to `All-Users` if not set.
1890
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001891[[gerrit.canonicalWebUrl]]gerrit.canonicalWebUrl::
Shawn O. Pearceeb7f8ce2009-06-01 09:57:15 -07001892+
1893The default URL for Gerrit to be accessed through.
1894+
Sebastian Schuberth64037132016-07-28 13:40:16 +02001895Typically this would be set to something like "http://review.example.com/"
1896or "http://example.com:8080/gerrit/" so Gerrit can output links that point
Shawn O. Pearceeb7f8ce2009-06-01 09:57:15 -07001897back to itself.
1898+
1899Setting this is highly recommended, as its necessary for the upload
1900code invoked by "git push" or "repo upload" to output hyperlinks
1901to the newly uploaded changes.
1902
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001903[[gerrit.canonicalGitUrl]]gerrit.canonicalGitUrl::
Shawn O. Pearceeb7f8ce2009-06-01 09:57:15 -07001904+
1905Optional base URL for repositories available over the anonymous git
1906protocol. For example, set this to `git://mirror.example.com/base/`
1907to have Gerrit display patch set download URLs in the UI. Gerrit
1908automatically appends the project name onto the end of the URL.
1909+
1910By default unset, as the git daemon must be configured externally
1911by the system administrator, and might not even be running on the
1912same host as Gerrit.
1913
Dave Borowitza5d3fec2015-07-09 14:24:02 -07001914[[gerrit.docUrl]]gerrit.docUrl::
1915+
1916Optional base URL for documentation, under which one can find
1917"index.html", "rest-api.html", etc. Used as the base for the fixed set
1918of links in the "Documentation" tab. A slash is implicitly appended.
1919(For finer control over the top menu, consider writing a
1920link:dev-plugins.html#top-menu-extensions[plugin].)
1921+
1922If unset or empty, the documentation tab will only be shown if
1923`/Documentation/index.html` can be reached by the browser at app load
1924time.
1925
Dave Borowitza17a9842015-09-15 09:58:17 -04001926[[gerrit.editGpgKeys]]gerrit.editGpgKeys::
1927+
1928If enabled and server-side signed push validation is also
1929link:#receive.enableSignedPush[enabled], enable the
1930link:rest-api-accounts.html#list-gpg-keys[REST API endpoints] and web UI
1931for editing GPG keys. If disabled, GPG keys can only be added by
1932administrators with direct git access to All-Users.
1933+
1934Defaults to true.
1935
Dave Borowitz76ab1a12013-05-10 17:01:29 +01001936[[gerrit.installCommitMsgHookCommand]]gerrit.installCommitMsgHookCommand::
1937+
1938Optional command to install the `commit-msg` hook. Typically of the
1939form:
David Pursehouse05588e52015-01-07 14:25:11 +09001940+
Dave Borowitz76ab1a12013-05-10 17:01:29 +01001941----
1942fetch-cmd some://url/to/commit-msg .git/hooks/commit-msg ; chmod +x .git/hooks/commit-msg
1943----
1944+
1945By default unset; falls back to using scp from the canonical SSH host,
1946or curl from the canonical HTTP URL for the server. Only necessary if a
1947proxy or other server/network configuration prevents clients from
1948fetching from the default location.
1949
Shawn O. Pearce5d6de522011-10-07 18:00:16 -07001950[[gerrit.gitHttpUrl]]gerrit.gitHttpUrl::
1951+
1952Optional base URL for repositories available over the HTTP
1953protocol. For example, set this to `http://mirror.example.com/base/`
1954to have Gerrit display URLs from this server, rather than itself.
1955+
1956By default unset, as the HTTP daemon must be configured externally
1957by the system administrator, and might not even be running on the
1958same host as Gerrit.
1959
Shawn O. Pearceb8bea1b2012-08-16 17:18:58 -07001960[[gerrit.reportBugUrl]]gerrit.reportBugUrl::
1961+
David Pursehouse214ab862014-12-01 11:48:26 +09001962URL to direct users to when they need to report a bug.
1963+
1964By default unset, meaning no bug report URL will be displayed. Administrators
1965should set this to the URL of their issue tracker, if necessary.
Shawn O. Pearceb8bea1b2012-08-16 17:18:58 -07001966
David Pursehouse753ca332013-12-10 15:36:29 +09001967[[gerrit.reportBugText]]gerrit.reportBugText::
1968+
1969Text to be displayed in the link to the bug report URL.
1970+
David Pursehouse214ab862014-12-01 11:48:26 +09001971Only used when `gerrit.reportBugUrl` is set.
1972+
David Pursehouse753ca332013-12-10 15:36:29 +09001973Defaults to "Report Bug".
1974
Dariusz Luksza45ee73e2014-08-20 09:38:09 +02001975[[gerrit.disableReverseDnsLookup]]gerrit.disableReverseDnsLookup::
1976+
1977Disables reverse DNS lookup during computing ref log entry for identified user.
1978+
1979Defaults to false.
1980
David Pursehouse962e1182014-12-03 17:17:52 +09001981[[gerrit.secureStoreClass]]gerrit.secureStoreClass::
1982+
1983Use the secure store implementation from a specified class.
1984+
1985If specified, must be the fully qualified class name of a class that implements
1986the `com.google.gerrit.server.securestore.SecureStore` interface, and the jar
1987file containing the class must be placed in the `$site_path/lib` folder.
1988+
1989If not specified, the default no-op implementation is used.
1990
Dariusz Luksza7a046da2014-04-03 17:05:47 +02001991[[gerrit.canLoadInIFrame]]gerrit.canLoadInIFrame::
1992+
1993For security reasons Gerrit will always jump out of iframe.
1994Setting this option to true will prevent this behavior.
1995+
1996By default false.
1997
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08001998[[gitweb]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001999=== Section gitweb
Shawn O. Pearced7ba11f2009-06-01 09:35:41 -07002000
Shawn O. Pearce618dae22010-03-12 19:07:43 -08002001Gerrit can forward requests to either an internally managed gitweb
2002(which allows Gerrit to enforce some access controls), or to an
2003externally managed gitweb (where the web server manages access).
Shawn O. Pearced7ba11f2009-06-01 09:35:41 -07002004See also link:config-gitweb.html[Gitweb Integration].
2005
Shawn O. Pearce618dae22010-03-12 19:07:43 -08002006[[gitweb.cgi]]gitweb.cgi::
2007+
2008Path to the locally installed `gitweb.cgi` executable. This CGI will
2009be called by Gerrit Code Review when the URL `/gitweb` is accessed.
2010Project level access controls are enforced prior to calling the CGI.
2011+
David Pursehousea89dc982016-09-15 09:35:44 +02002012Defaults to `/usr/lib/cgi-bin/gitweb.cgi` if `gitweb.url` is not set.
Shawn O. Pearce618dae22010-03-12 19:07:43 -08002013
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002014[[gitweb.url]]gitweb.url::
Shawn O. Pearced7ba11f2009-06-01 09:35:41 -07002015+
2016Optional URL of an affiliated gitweb service. Defines the
2017web location where a `gitweb.cgi` is installed to browse
David Pursehousea89dc982016-09-15 09:35:44 +02002018`gerrit.basePath` and the repositories it contains.
Shawn O. Pearced7ba11f2009-06-01 09:35:41 -07002019+
2020Gerrit appends any necessary query arguments onto the end of this URL.
David Pursehousea89dc982016-09-15 09:35:44 +02002021For example, `?p=$project.git;h=$commit`.
Shawn O. Pearced7ba11f2009-06-01 09:35:41 -07002022
Shane Mc Cormack27868a42009-12-28 04:49:39 +00002023[[gitweb.type]]gitweb.type::
2024+
2025Optional type of affiliated gitweb service. This allows using
David Pursehousea66f7ff2016-09-05 21:11:10 +09002026alternatives to gitweb, such as cgit.
Shane Mc Cormack27868a42009-12-28 04:49:39 +00002027+
Shawn O. Pearce2b11da02011-09-06 16:18:12 -07002028Valid values are `gitweb`, `cgit`, `disabled` or `custom`.
David Pursehousea66f7ff2016-09-05 21:11:10 +09002029+
2030If not set, or set to `disabled`, there is no gitweb hyperlinking
2031support.
Shane Mc Cormack27868a42009-12-28 04:49:39 +00002032
Edwin Kempind86909c2012-03-26 10:36:29 +02002033[[gitweb.revision]]gitweb.revision::
Shane Mc Cormack27868a42009-12-28 04:49:39 +00002034+
2035Optional pattern to use for constructing the gitweb URL when pointing
David Pursehousea89dc982016-09-15 09:35:44 +02002036at a specific commit when `gitweb.type` is set to `custom`.
Shane Mc Cormack27868a42009-12-28 04:49:39 +00002037+
Edwin Kempincdb0e002011-09-08 14:23:30 +02002038Valid replacements are `${project}` for the project name in Gerrit
2039and `${commit}` for the SHA1 hash for the commit.
Shane Mc Cormack27868a42009-12-28 04:49:39 +00002040
Edwin Kempind86909c2012-03-26 10:36:29 +02002041[[gitweb.project]]gitweb.project::
Shane Mc Cormack27868a42009-12-28 04:49:39 +00002042+
2043Optional pattern to use for constructing the gitweb URL when pointing
David Pursehousea89dc982016-09-15 09:35:44 +02002044at a specific project when `gitweb.type` is set to `custom`.
Shane Mc Cormack27868a42009-12-28 04:49:39 +00002045+
Edwin Kempincdb0e002011-09-08 14:23:30 +02002046Valid replacements are `${project}` for the project name in Gerrit.
Shane Mc Cormack27868a42009-12-28 04:49:39 +00002047
Edwin Kempind86909c2012-03-26 10:36:29 +02002048[[gitweb.branch]]gitweb.branch::
Shane Mc Cormack27868a42009-12-28 04:49:39 +00002049+
2050Optional pattern to use for constructing the gitweb URL when pointing
David Pursehousea89dc982016-09-15 09:35:44 +02002051at a specific branch when `gitweb.type` is set to `custom`.
Shane Mc Cormack27868a42009-12-28 04:49:39 +00002052+
Edwin Kempincdb0e002011-09-08 14:23:30 +02002053Valid replacements are `${project}` for the project name in Gerrit
2054and `${branch}` for the name of the branch.
Shane Mc Cormack27868a42009-12-28 04:49:39 +00002055
Colby Ranger79d4ebe2013-12-16 14:19:18 -08002056[[gitweb.roottree]]gitweb.roottree::
2057+
2058Optional pattern to use for constructing the gitweb URL when pointing
David Pursehousea89dc982016-09-15 09:35:44 +02002059at the contents of the root tree in a specific commit when `gitweb.type`
2060is set to `custom`.
Colby Ranger79d4ebe2013-12-16 14:19:18 -08002061+
2062Valid replacements are `${project}` for the project name in Gerrit
2063and `${commit}` for the SHA1 hash for the commit.
2064
2065[[gitweb.file]]gitweb.file::
2066+
2067Optional pattern to use for constructing the gitweb URL when pointing
David Pursehousea89dc982016-09-15 09:35:44 +02002068at the contents of a file in a specific commit when `gitweb.type` is
2069set to `custom`.
Colby Ranger79d4ebe2013-12-16 14:19:18 -08002070+
2071Valid replacements are `${project}` for the project name in Gerrit,
2072`${file}` for the file name and `${commit}` for the SHA1 hash for
2073the commit.
2074
Edwin Kempin64011562012-03-26 10:50:12 +02002075[[gitweb.filehistory]]gitweb.filehistory::
2076+
2077Optional pattern to use for constructing the gitweb URL when pointing
David Pursehousea89dc982016-09-15 09:35:44 +02002078at the history of a file in a specific branch when when `gitweb.type`
2079is set to `custom`.
Edwin Kempin64011562012-03-26 10:50:12 +02002080+
2081Valid replacements are `${project}` for the project name in Gerrit,
2082`${file}` for the file name and `${branch}` for the name of the
2083branch.
2084
Gustaf Lundha07d2e72011-10-27 15:26:35 -07002085[[gitweb.linkname]]gitweb.linkname::
2086+
2087Optional setting for modifying the link name presented to the user
2088in the Gerrit web-UI.
2089+
David Pursehousea89dc982016-09-15 09:35:44 +02002090The default linkname for custom type is `gitweb`.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002091
Adrian Goerlerf2007072011-11-10 08:39:55 +01002092[[gitweb.pathSeparator]]gitweb.pathSeparator::
2093+
2094Optional character to substitute the standard path separator (slash) in
2095project names and branch names.
2096+
2097By default, Gerrit will use hexadecimal encoding for slashes in project and
2098branch names. Some web servers, such as Tomcat, reject this hexadecimal
2099encoding in the URL.
2100+
2101Some alternative gitweb services, such as link:http://gitblit.com[Gitblit],
2102allow using an alternative path separator character. In Gitblit, this can be
2103configured through the property link:http://gitblit.com/properties.html[web.forwardSlashCharacter].
2104In Gerrit, the alternative path separator can be configured correspondingly
David Pursehousea89dc982016-09-15 09:35:44 +02002105using the property `gitweb.pathSeparator`.
Adrian Goerlerf2007072011-11-10 08:39:55 +01002106+
David Pursehousea89dc982016-09-15 09:35:44 +02002107Valid values are the characters `*`, `(` and `)`.
Adrian Goerlerf2007072011-11-10 08:39:55 +01002108
David Pursehouse5d592e82016-06-09 05:12:26 +00002109[[gitweb.urlEncode]]gitweb.urlEncode::
Luca Milanesio25312032013-10-11 11:34:39 +01002110+
2111Whether or not Gerrit should encode the generated viewer URL.
2112+
2113Gerrit composes the viewer URL using information about the project, branch, file
2114or commit of the target object to be displayed. Typically viewers such as CGit
David Pursehousea89dc982016-09-15 09:35:44 +02002115and gitweb do need those parts to be encoded, including the `/` in project's name,
Luca Milanesio25312032013-10-11 11:34:39 +01002116for being correctly parsed.
2117However other viewers could instead require an unencoded URL (e.g. GitHub web
David Pursehousea89dc982016-09-15 09:35:44 +02002118based viewer).
Luca Milanesio25312032013-10-11 11:34:39 +01002119+
David Pursehousea89dc982016-09-15 09:35:44 +02002120Valid values are `true` and `false`. The default is `true`.
Luca Milanesio25312032013-10-11 11:34:39 +01002121
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08002122[[groups]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002123=== Section groups
Edwin Kempin4bbff702013-01-11 09:59:53 +01002124
2125[[groups.newGroupsVisibleToAll]]groups.newGroupsVisibleToAll::
2126+
2127Controls whether newly created groups should be by default visible to
2128all registered users.
2129+
2130By default, false.
2131
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08002132[[http]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002133=== Section http
Shawn O. Pearce309d8d32009-11-17 16:03:16 -08002134
2135[[http.proxy]]http.proxy::
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08002136+
2137URL of the proxy server when making outgoing HTTP
2138connections for OpenID login transactions. Syntax
2139should be `http://`'hostname'`:`'port'.
Shawn O. Pearce309d8d32009-11-17 16:03:16 -08002140
2141[[http.proxyUsername]]http.proxyUsername::
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08002142+
2143Optional username to authenticate to the HTTP proxy with.
Robin Rosenberg524a3032012-10-14 14:24:36 +02002144This property is honored only if the username does not
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08002145appear in the http.proxy property above.
Shawn O. Pearce309d8d32009-11-17 16:03:16 -08002146
2147[[http.proxyPassword]]http.proxyPassword::
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08002148+
2149Optional password to authenticate to the HTTP proxy with.
Robin Rosenberg524a3032012-10-14 14:24:36 +02002150This property is honored only if the password does not
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08002151appear in the http.proxy property above.
Shawn O. Pearce309d8d32009-11-17 16:03:16 -08002152
Hugo Arès88e33ac2014-03-03 13:52:45 -05002153[[http.addUserAsRequestAttribute]]http.addUserAsRequestAttribute::
2154+
2155If true, 'User' attribute will be added to the request attributes so it
2156can be accessed outside the request scope (will be set to username or id
2157if username not configured).
2158+
2159This attribute can be used by the servlet container to log user in the
2160http access log.
2161+
2162When running the embedded servlet container, this attribute is used to
2163print user in the httpd_log.
2164+
2165* `%{User}r`
2166+
2167Pattern to print user in Tomcat AccessLog.
2168
2169+
2170Default value is true.
Shawn O. Pearce309d8d32009-11-17 16:03:16 -08002171
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08002172[[httpd]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002173=== Section httpd
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08002174
2175The httpd section configures the embedded servlet container.
2176
2177[[httpd.listenUrl]]httpd.listenUrl::
2178+
2179Specifies the URLs the internal HTTP daemon should listen for
Edwin Kempincdb0e002011-09-08 14:23:30 +02002180connections on. The special hostname '*' may be used to listen
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08002181on all local addresses. A context path may optionally be included,
2182placing Gerrit Code Review's web address within a subdirectory of
2183the server.
2184+
2185Multiple protocol schemes are supported:
2186+
2187* `http://`'hostname'`:`'port'
2188+
2189Plain-text HTTP protocol. If port is not supplied, defaults to 80,
2190the standard HTTP port.
2191+
2192* `https://`'hostname'`:`'port'
2193+
2194SSL encrypted HTTP protocol. If port is not supplied, defaults to
2195443, the standard HTTPS port.
2196+
2197Externally facing production sites are encouraged to use a reverse
2198proxy configuration and `proxy-https://` (below), rather than using
2199the embedded servlet container to implement the SSL processing.
2200The proxy server with SSL support is probably easier to configure,
2201provides more configuration options to control cipher usage, and
2202is likely using natively compiled encryption algorithms, resulting
2203in higher throughput.
2204+
2205* `proxy-http://`'hostname'`:`'port'
2206+
2207Plain-text HTTP relayed from a reverse proxy. If port is not
2208supplied, defaults to 8080.
2209+
2210Like http, but additional header parsing features are
2211enabled to honor X-Forwarded-For, X-Forwarded-Host and
2212X-Forwarded-Server. These headers are typically set by Apache's
2213link:http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#x-headers[mod_proxy].
2214+
2215* `proxy-https://`'hostname'`:`'port'
2216+
2217Plain text HTTP relayed from a reverse proxy that has already
2218handled the SSL encryption/decryption. If port is not supplied,
2219defaults to 8080.
2220+
2221Behaves exactly like proxy-http, but also sets the scheme to assume
2222'https://' is the proper URL back to the server.
2223
2224+
Edwin Kempina09ebcf2015-04-16 14:53:23 +02002225--
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08002226If multiple values are supplied, the daemon will listen on all
2227of them.
Edwin Kempina09ebcf2015-04-16 14:53:23 +02002228
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08002229By default, http://*:8080.
Edwin Kempina09ebcf2015-04-16 14:53:23 +02002230--
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08002231
2232[[httpd.reuseAddress]]httpd.reuseAddress::
2233+
2234If true, permits the daemon to bind to the port even if the port
2235is already in use. If false, the daemon ensures the port is not
2236in use before starting. Busy sites may need to set this to true
2237to permit fast restarts.
2238+
2239By default, true.
2240
2241[[httpd.requestHeaderSize]]httpd.requestHeaderSize::
2242+
2243Size, in bytes, of the buffer used to parse the HTTP headers of an
2244incoming HTTP request. The entire request headers, including any
2245cookies sent by the browser, must fit within this buffer, otherwise
2246the server aborts with the response '413 Request Entity Too Large'.
2247+
2248One buffer of this size is allocated per active connection.
2249Allocating a buffer that is too large wastes memory that cannot be
2250reclaimed, allocating a buffer that is too small may cause unexpected
2251errors caused by very long Referer URLs or large cookie values.
2252+
2253By default, 16384 (16 K), which is sufficient for most OpenID and
2254other web-based single-sign-on integrations.
2255
Chulho Yangb72ff8f2013-07-04 02:35:53 -04002256[[httpd.sslCrl]]httpd.sslCrl::
2257+
2258Path of the certificate revocation list file in PEM format. This
2259crl file is optional, and available for CLIENT_SSL_CERT_LDAP
2260authentication.
2261+
2262To create and view a crl using openssl:
2263+
2264----
2265openssl ca -gencrl -out crl.pem
2266openssl crl -in crl.pem -text
2267----
2268+
2269If not absolute, the path is resolved relative to `$site_path`.
2270+
2271By default, `$site_path/etc/crl.pem`.
2272
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08002273[[httpd.sslKeyStore]]httpd.sslKeyStore::
2274+
2275Path of the Java keystore containing the server's SSL certificate
2276and private key. This keystore is required for `https://` in URL.
2277+
2278To create a self-signed certificate for simple internal usage:
2279+
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08002280----
2281keytool -keystore keystore -alias jetty -genkey -keyalg RSA
2282chmod 600 keystore
2283----
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08002284+
2285If not absolute, the path is resolved relative to `$site_path`.
2286+
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08002287By default, `$site_path/etc/keystore`.
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08002288
2289[[httpd.sslKeyPassword]]httpd.sslKeyPassword::
2290+
2291Password used to decrypt the private portion of the sslKeyStore.
David Pursehouse221d4f62012-06-08 17:38:08 +09002292Java keystores require a password, even if the administrator
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08002293doesn't want to enable one.
2294+
2295If set to the empty string the embedded server will prompt for the
2296password during startup.
2297+
2298By default, `gerrit`.
2299
Shawn O. Pearce1766f502010-01-15 10:49:46 -08002300[[httpd.requestLog]]httpd.requestLog::
2301+
2302Enable (or disable) the `'$site_path'/logs/httpd_log` request log.
2303If enabled, an NCSA combined log format request log file is written
2304out by the internal HTTP daemon.
2305+
David Ostrovsky8e4a9902013-11-19 23:57:48 +01002306`log4j.appender` with the name `httpd_log` can be configured to overwrite
2307programmatic configuration.
2308+
Shawn O. Pearce1766f502010-01-15 10:49:46 -08002309By default, true if httpd.listenUrl uses http:// or https://,
2310and false if httpd.listenUrl uses proxy-http:// or proxy-https://.
2311
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08002312[[httpd.acceptorThreads]]httpd.acceptorThreads::
2313+
2314Number of worker threads dedicated to accepting new incoming TCP
David Pursehouse221d4f62012-06-08 17:38:08 +09002315connections and allocating them connection-specific resources.
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08002316+
2317By default, 2, which should be suitable for most high-traffic sites.
2318
2319[[httpd.minThreads]]httpd.minThreads::
2320+
2321Minimum number of spare threads to keep in the worker thread pool.
2322This number must be at least 1 larger than httpd.acceptorThreads
David Pursehouse92463562013-06-24 10:16:28 +09002323multiplied by the number of httpd.listenUrls configured.
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08002324+
2325By default, 5, suitable for most lower-volume traffic sites.
2326
2327[[httpd.maxThreads]]httpd.maxThreads::
2328+
2329Maximum number of threads to permit in the worker thread pool.
2330+
2331By default 25, suitable for most lower-volume traffic sites.
2332
2333[[httpd.maxQueued]]httpd.maxQueued::
2334+
2335Maximum number of client connections which can enter the worker
2336thread pool waiting for a worker thread to become available.
David Ostrovsky14fe8bc2014-03-26 06:03:44 -070023370 sets the queue size to the Integer.MAX_VALUE.
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08002338+
Luca Milanesio0ae62fe2015-09-04 07:56:00 -07002339By default 200.
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08002340
Shawn O. Pearcee5452b72010-01-15 14:32:50 -08002341[[httpd.maxWait]]httpd.maxWait::
2342+
David Pursehouse221d4f62012-06-08 17:38:08 +09002343Maximum amount of time a client will wait for an available
Shawn O. Pearcee5452b72010-01-15 14:32:50 -08002344thread to handle a project clone, fetch or push request over the
2345smart HTTP transport.
2346+
2347Values should use common unit suffixes to express their setting:
2348+
2349* s, sec, second, seconds
2350* m, min, minute, minutes
2351* h, hr, hour, hours
2352* d, day, days
2353* w, week, weeks (`1 week` is treated as `7 days`)
2354* mon, month, months (`1 month` is treated as `30 days`)
2355* y, year, years (`1 year` is treated as `365 days`)
2356
2357+
Edwin Kempina09ebcf2015-04-16 14:53:23 +02002358--
Shawn O. Pearcee5452b72010-01-15 14:32:50 -08002359If a unit suffix is not specified, `minutes` is assumed. If 0
2360is supplied, the maximum age is infinite and connections will not
2361abort until the client disconnects.
Edwin Kempina09ebcf2015-04-16 14:53:23 +02002362
Shawn O. Pearcee5452b72010-01-15 14:32:50 -08002363By default, 5 minutes.
Edwin Kempina09ebcf2015-04-16 14:53:23 +02002364--
Shawn O. Pearcee5452b72010-01-15 14:32:50 -08002365
Luca Milanesioce7b7452013-06-18 11:40:49 +01002366[[httpd.filterClass]]httpd.filterClass::
2367+
2368Class that implements the javax.servlet.Filter interface
2369for filtering any HTTP related traffic going through the Gerrit
2370HTTP protocol.
2371Class is loaded and configured in the Gerrit Jetty container
2372and run in front of all Gerrit URL handlers, allowing the filter
2373to inspect, modify, allow or reject each request.
2374It needs to be provided as JAR library
2375under $GERRIT_SITE/lib as it is resolved using the default Gerrit class
2376loader and cannot be dynamically loaded by a plugin.
2377+
2378Failing to load the Filter class would result in a Gerrit start-up
2379failure, as this class is supposed to provide mandatory filtering
2380in front of Gerrit HTTP protocol.
2381+
David Pursehouse42f42042013-08-01 14:02:25 +09002382Typical usage is in conjunction with the `auth.type=HTTP` as replacement
Luca Milanesioce7b7452013-06-18 11:40:49 +01002383of an Apache HTTP proxy layer as security enforcement on top of Gerrit
2384by returning a trusted username as HTTP Header.
2385+
2386Example of using a security library secure.jar under $GERRIT_SITE/lib
2387that provides a org.anyorg.MySecureFilter Servlet Filter that enforces
2388a trusted username in the `TRUSTED_USER` HTTP Header:
2389
2390----
2391[auth]
2392 type = HTTP
2393 httpHeader = TRUSTED_USER
2394
Dariusz Lukszaaac01132015-02-11 12:13:07 +01002395[httpd]
Luca Milanesioce7b7452013-06-18 11:40:49 +01002396 filterClass = org.anyorg.MySecureFilter
2397----
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08002398
Juan Hernandezec512562013-08-06 16:30:50 +02002399[[httpd.robotsFile]]httpd.robotsFile::
2400+
2401Location of an external robots.txt file to be used instead of the one
2402bundled with the .war of the application.
2403+
2404If not absolute, the path is resolved relative to `$site_path`.
2405+
2406If the file doesn't exist or can't be read the default robots.txt file
2407bundled with the .war will be used instead.
2408
Dariusz Luksza011cfed2014-04-03 10:23:35 +02002409[[httpd.registerMBeans]]httpd.registerMBeans::
2410+
2411Enable (or disable) registration of Jetty MBeans for Java JMX.
2412+
2413By default, false.
2414
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08002415[[index]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002416=== Section index
David Pursehouse6d458432013-08-23 16:17:18 +09002417
2418The index section configures the secondary index.
2419
David Pursehouse3fc5ee32014-03-17 18:35:32 +09002420Note that after enabling the secondary index, the index must be built
2421using the link:pgm-reindex.html[reindex program] before restarting the
2422Gerrit server.
2423
David Pursehouse6d458432013-08-23 16:17:18 +09002424[[index.type]]index.type::
2425+
2426Type of secondary indexing employed by Gerrit. The supported
2427values are:
2428+
2429* `LUCENE`
2430+
2431A link:http://lucene.apache.org/[Lucene] index is used.
2432+
David Pursehouse6d458432013-08-23 16:17:18 +09002433
2434+
Shawn Pearced4ae3a162013-11-24 17:00:31 -08002435By default, `LUCENE`.
David Pursehouse6d458432013-08-23 16:17:18 +09002436
David Pursehouse904db302014-03-17 18:55:38 +09002437[[index.threads]]index.threads::
2438+
Hugo Arèsfab06702016-06-10 12:49:52 -04002439Number of threads to use for indexing in normal interactive operations. Setting
2440it to 0 disables the dedicated thread pool and indexing will be done in the same
2441thread as the operation.
David Pursehouse904db302014-03-17 18:55:38 +09002442+
Hugo Arès176cd582016-05-06 14:37:09 -04002443If not set or set to a negative value, defaults to 1 plus half of the number of
2444logical CPUs as returned by the JVM.
David Pursehouse00c82142014-01-22 17:41:09 +09002445
Dave Borowitz787af5f2014-10-22 16:26:00 -07002446[[index.batchThreads]]index.batchThreads::
2447+
2448Number of threads to use for indexing in background operations, such as
2449online schema upgrades.
2450+
Sebastian Schubertha13dc292015-05-21 15:31:28 +02002451If not set or set to a negative value, defaults to the number of logical
Hugo Arès1cf252c2016-05-06 08:38:22 -04002452CPUs as returned by the JVM.
Dave Borowitz787af5f2014-10-22 16:26:00 -07002453
Dave Borowitzd80b9342015-03-25 10:32:21 -07002454[[index.onlineUpgrade]]index.onlineUpgrade::
2455+
2456Whether to upgrade to new index schema versions while the server is
2457running. This is recommended as it prevents additional downtime during
2458Gerrit version upgrades (avoiding the need for an offline reindex step
2459using Reindex), but can add additional server load during the upgrade.
2460+
2461If set to false, there is no way to upgrade the index schema to take
2462advantage of new search features without restarting the server.
2463+
2464Defaults to true.
2465
Dave Borowitzb82fbcb2015-04-22 16:43:54 -07002466[[index.maxLimit]]index.maxLimit::
2467+
2468Maximum limit to allow for search queries. Requesting results above this
2469limit will truncate the list (but will still set `_more_changes` on
2470result lists). Set to 0 for no limit.
2471+
2472Defaults to no limit.
2473
Dave Borowitzf56d3652015-04-22 17:35:34 -07002474[[index.maxPages]]index.maxPages::
2475+
2476Maximum number of pages of search results to allow, as index
2477implementations may have to scan through large numbers of skipped
2478results when searching with an offset. Requesting results starting past
2479this threshold times the requested limit will result in an error. Set to
24800 for no limit.
2481+
2482Defaults to no limit.
2483
Dave Borowitzd034ca82015-10-15 11:20:30 -04002484[[index.maxTerms]]index.maxTerms::
2485+
2486Maximum number of leaf terms to allow in a query. Too-large queries may
2487perform poorly, so setting this option causes query parsing to fail fast
Marco Miller6da22822016-01-29 12:31:38 -05002488before attempting to send them to the secondary index. Should this limit
2489be reached, database is used instead of index as applicable.
Dave Borowitzd034ca82015-10-15 11:20:30 -04002490+
Marco Miller6da22822016-01-29 12:31:38 -05002491When the index type is `LUCENE`, also sets the maximum number of clauses
2492permitted per BooleanQuery. This is so that all enforced query limits
2493are the same.
2494+
2495Defaults to 1024.
Dave Borowitzd034ca82015-10-15 11:20:30 -04002496
David Pursehouse902b3ee2014-07-09 16:17:49 +09002497==== Lucene configuration
2498
2499Open and closed changes are indexed in separate indexes named
2500'open' and 'closed' respectively.
2501
2502The following settings are only used when the index type is `LUCENE`.
David Pursehouseac88c362014-02-06 12:01:34 +09002503
David Pursehouse00c82142014-01-22 17:41:09 +09002504[[index.name.ramBufferSize]]index.name.ramBufferSize::
2505+
David Pursehouse00c82142014-01-22 17:41:09 +09002506Determines the amount of RAM that may be used for buffering added documents
2507and deletions before they are flushed to the index. See the
2508link:http://lucene.apache.org/core/4_6_0/core/org/apache/lucene/index/LiveIndexWriterConfig.html#setRAMBufferSizeMB(double)[
2509Lucene documentation] for further details.
2510+
2511Defaults to 16M.
2512
2513[[index.name.maxBufferedDocs]]index.name.maxBufferedDocs::
2514+
David Pursehouse00c82142014-01-22 17:41:09 +09002515Determines the minimal number of documents required before the buffered
2516in-memory documents are flushed to the index. Large values generally
2517give faster indexing. See the
2518link:http://lucene.apache.org/core/4_6_0/core/org/apache/lucene/index/LiveIndexWriterConfig.html#setMaxBufferedDocs(int)[
2519Lucene documentation] for further details.
2520+
2521Defaults to -1, meaning no maximum is set and the writer will flush
2522according to RAM usage.
2523
Dave Borowitzd08b0452014-02-13 11:56:03 -08002524[[index.name.commitWithin]]index.name.commitWithin::
2525+
Dave Borowitzd08b0452014-02-13 11:56:03 -08002526Determines the period at which changes are automatically committed to
2527stable store on disk. This is a costly operation and may block
2528additional index writes, so lower with caution.
2529+
Bruce Zuaf058e62014-03-21 10:03:05 +08002530If zero, changes are committed after every write. This is very costly
2531but may be useful if offline reindexing is infeasible, or for development
2532servers.
Dave Borowitzd08b0452014-02-13 11:56:03 -08002533+
Bruce Zuaf058e62014-03-21 10:03:05 +08002534Values can be specified using standard time unit abbreviations (`ms`, `sec`,
2535`min`, etc.).
David Pursehouse9354c1a2014-03-22 12:23:43 -07002536+
Bruce Zuaf058e62014-03-21 10:03:05 +08002537If negative, `commitWithin` is disabled. Changes are flushed to disk when
2538the in-memory buffer fills, but only committed and guaranteed to be synced
2539to disk when the process finishes.
David Pursehouse902b3ee2014-07-09 16:17:49 +09002540+
Dave Borowitzd08b0452014-02-13 11:56:03 -08002541Defaults to 300000 ms (5 minutes).
2542
David Pursehouse902b3ee2014-07-09 16:17:49 +09002543Sample Lucene index configuration:
David Pursehouse00c82142014-01-22 17:41:09 +09002544----
2545[index]
2546 type = LUCENE
2547
2548[index "changes_open"]
2549 ramBufferSize = 60 m
2550 maxBufferedDocs = 3000
2551
2552[index "changes_closed"]
2553 ramBufferSize = 20 m
2554 maxBufferedDocs = 500
2555----
2556
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08002557[[ldap]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002558=== Section ldap
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002559
David Pursehouse221d4f62012-06-08 17:38:08 +09002560LDAP integration is only enabled if `auth.type` is set to
Sasa Zivkoveabc8972010-10-04 15:47:08 +02002561`HTTP_LDAP`, `LDAP` or `CLIENT_SSL_CERT_LDAP`. See above for a
David Pursehouse42f42042013-08-01 14:02:25 +09002562detailed description of the `auth.type` settings and their
Sasa Zivkoveabc8972010-10-04 15:47:08 +02002563implications.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002564
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07002565An example LDAP configuration follows, and then discussion of
2566the parameters introduced here. Suitable defaults for most
2567parameters are automatically guessed based on the type of server
2568detected during startup. The guessed defaults support both
2569link:http://www.ietf.org/rfc/rfc2307.txt[RFC 2307] and Active
2570Directory.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002571
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08002572----
2573[ldap]
2574 server = ldap://ldap.example.com
2575
2576 accountBase = ou=people,dc=example,dc=com
2577 accountPattern = (&(objectClass=person)(uid=${username}))
2578 accountFullName = displayName
2579 accountEmailAddress = mail
2580
2581 groupBase = ou=groups,dc=example,dc=com
2582 groupMemberPattern = (&(objectClass=group)(member=${dn}))
2583----
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002584
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002585[[ldap.server]]ldap.server::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002586+
2587URL of the organization's LDAP server to query for user information
2588and group membership from. Must be of the form `ldap://host` or
2589`ldaps://host` to bind with either a plaintext or SSL connection.
Shawn O. Pearcef7e065e2009-09-26 20:01:10 -07002590+
David Pursehouse42f42042013-08-01 14:02:25 +09002591If `auth.type` is `LDAP` this setting should use `ldaps://` to
Shawn O. Pearcef7e065e2009-09-26 20:01:10 -07002592ensure the end user's plaintext password is transmitted only over
2593an encrypted connection.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002594
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07002595[[ldap.sslVerify]]ldap.sslVerify::
2596+
2597If false and ldap.server is an `ldaps://` style URL, Gerrit
2598will not verify the server certificate when it connects to
2599perform a query.
2600+
2601By default, true, requiring the certificate to be verified.
2602
Olga Grinbergcf1b06a2015-02-03 15:54:48 -05002603[[ldap.groupsVisibleToAll]]ldap.groupsVisibleToAll::
2604+
2605If true, LDAP groups are visible to all registered users.
2606+
2607By default, false, LDAP groups are visible only to administrators and
2608group members.
2609
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002610[[ldap.username]]ldap.username::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002611+
2612_(Optional)_ Username to bind to the LDAP server with. If not set,
2613an anonymous connection to the LDAP server is attempted.
2614
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002615[[ldap.password]]ldap.password::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002616+
2617_(Optional)_ Password for the user identified by `ldap.username`.
2618If not set, an anonymous (or passwordless) connection to the LDAP
2619server is attempted.
2620
Ben Wu0410a152010-06-04 16:17:24 +08002621[[ldap.referral]]ldap.referral::
2622+
2623_(Optional)_ How an LDAP referral should be handled if it is
2624encountered during directory traversal. Set to `follow` to
James Y Knight1244ed02011-01-04 02:40:32 -05002625automatically follow any referrals, or `ignore` to ignore the
2626referrals.
Ben Wu0410a152010-06-04 16:17:24 +08002627+
2628By default, `ignore`.
2629
Sasa Zivkov100bd4b2011-11-07 14:58:46 +01002630[[ldap.readTimeout]]ldap.readTimeout::
2631+
2632_(Optional)_ The read timeout for an LDAP operation. The value is
2633in the usual time-unit format like "1 s", "100 ms", etc...
2634A timeout can be used to avoid blocking all of the SSH command start
David Pursehouse221d4f62012-06-08 17:38:08 +09002635threads in case the LDAP server becomes slow.
Sasa Zivkov100bd4b2011-11-07 14:58:46 +01002636+
2637By default there is no timeout and Gerrit will wait for the LDAP
2638server to respond until the TCP connection times out.
2639
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002640[[ldap.accountBase]]ldap.accountBase::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002641+
2642Root of the tree containing all user accounts. This is typically
2643of the form `ou=people,dc=example,dc=com`.
David Pursehouse82d55632015-12-14 10:31:27 +00002644+
2645This setting may be added multiple times to specify more than
2646one root.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002647
Shawn O. Pearce304ccdb2009-08-25 12:25:27 -07002648[[ldap.accountScope]]ldap.accountScope::
2649+
2650Scope of the search performed for accounts. Must be one of:
2651+
2652* `one`: Search only one level below accountBase, but not recursive
2653* `sub` or `subtree`: Search recursively below accountBase
2654* `base` or `object`: Search exactly accountBase; probably not desired
2655
2656+
2657Default is `subtree` as many directories have several levels.
2658
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002659[[ldap.accountPattern]]ldap.accountPattern::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002660+
2661Query pattern to use when searching for a user account. This may be
2662any valid LDAP query expression, including the standard `(&...)` and
David Pursehouse42f42042013-08-01 14:02:25 +09002663`(|...)` operators. If `auth.type` is `HTTP_LDAP` then the variable
Edwin Kempincdb0e002011-09-08 14:23:30 +02002664`${username}` is replaced with a parameter set to the username
David Pursehouse42f42042013-08-01 14:02:25 +09002665that was supplied by the HTTP server. If `auth.type` is `LDAP` then
Edwin Kempincdb0e002011-09-08 14:23:30 +02002666the variable `${username}` is replaced by the string entered by
Shawn O. Pearcef7e065e2009-09-26 20:01:10 -07002667the end user.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002668+
2669This pattern is used to search the objects contained directly under
2670the `ldap.accountBase` tree. A typical setting for this parameter
Edwin Kempincdb0e002011-09-08 14:23:30 +02002671is `(uid=${username})` or `(cn=${username})`, but the proper
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002672setting depends on the LDAP schema used by the directory server.
2673+
Edwin Kempincdb0e002011-09-08 14:23:30 +02002674Default is `(uid=${username})` for RFC 2307 servers,
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07002675and `(&(objectClass=user)(sAMAccountName=${username}))`
2676for Active Directory.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002677
Shawn O. Pearce37dc1f82009-08-19 09:49:07 -07002678[[ldap.accountFullName]]ldap.accountFullName::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002679+
2680_(Optional)_ Name of an attribute on the user account object which
2681contains the initial value for the user's full name field in Gerrit.
2682Typically this is the `displayName` property in LDAP, but could
2683also be `legalName` or `cn`.
2684+
David Pursehouse221d4f62012-06-08 17:38:08 +09002685Attribute values may be concatenated with literal strings. For
2686example to join given name and surname together, use the pattern
Edwin Kempincdb0e002011-09-08 14:23:30 +02002687`${givenName} ${SN}`.
Shawn O. Pearceb86ae002009-09-26 16:54:05 -07002688+
Shawn O. Pearce3ca1dcf2009-08-20 08:56:23 -07002689If set, users will be unable to modify their full name field, as
2690Gerrit will populate it only from the LDAP data.
2691+
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07002692Default is `displayName` for RFC 2307 servers,
2693and `${givenName} ${sn}` for Active Directory.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002694
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002695[[ldap.accountEmailAddress]]ldap.accountEmailAddress::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002696+
2697_(Optional)_ Name of an attribute on the user account object which
2698contains the user's Internet email address, as defined by this
2699LDAP server.
2700+
Shawn O. Pearceb86ae002009-09-26 16:54:05 -07002701Attribute values may be concatenated with literal strings,
2702for example to set the email address to the lowercase form
2703of sAMAccountName followed by a constant domain name, use
Edwin Kempincdb0e002011-09-08 14:23:30 +02002704`${sAMAccountName.toLowerCase}@example.com`.
Shawn O. Pearceb86ae002009-09-26 16:54:05 -07002705+
Shawn O. Pearce3ca1dcf2009-08-20 08:56:23 -07002706If set, the preferred email address will be prefilled from LDAP,
David Pursehouse221d4f62012-06-08 17:38:08 +09002707but users may still be able to register additional email addresses,
Shawn O. Pearce3ca1dcf2009-08-20 08:56:23 -07002708and select a different preferred email address.
2709+
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07002710Default is `mail`.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002711
Shawn O. Pearce59e09222009-08-19 09:04:49 -07002712[[ldap.accountSshUserName]]ldap.accountSshUserName::
2713+
2714_(Optional)_ Name of an attribute on the user account object which
2715contains the initial value for the user's SSH username field in
2716Gerrit. Typically this is the `uid` property in LDAP, but could
2717also be `cn`. Administrators should prefer to match the attribute
2718corresponding to the user's workstation username, as this is what
2719SSH clients will default to.
2720+
Shawn O. Pearceb86ae002009-09-26 16:54:05 -07002721Attribute values may also be forced to lowercase, or to uppercase in
Edwin Kempincdb0e002011-09-08 14:23:30 +02002722an expression. For example, `${sAMAccountName.toLowerCase}` will
Shawn O. Pearceb86ae002009-09-26 16:54:05 -07002723force the value of sAMAccountName, if defined, to be all lowercase.
2724The suffix `.toUpperCase` can be used for the other direction.
2725The suffix `.localPart` can be used to split attribute values of
2726the form 'user@example.com' and return only the left hand side, for
Edwin Kempincdb0e002011-09-08 14:23:30 +02002727example `${userPrincipalName.localPart}` would provide only 'user'.
Shawn O. Pearceb86ae002009-09-26 16:54:05 -07002728+
Shawn O. Pearce3ca1dcf2009-08-20 08:56:23 -07002729If set, users will be unable to modify their SSH username field, as
David Pursehousec12da502016-08-11 20:45:03 +09002730Gerrit will populate it only from the LDAP data. Note that once the
2731username has been set it cannot be changed, therefore it is
2732recommended not to make changes to this setting that would cause the
2733value to differ, as this will prevent users from logging in.
Shawn O. Pearce3ca1dcf2009-08-20 08:56:23 -07002734+
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07002735Default is `uid` for RFC 2307 servers,
2736and `${sAMAccountName.toLowerCase}` for Active Directory.
Shawn O. Pearce59e09222009-08-19 09:04:49 -07002737
Shawn O. Pearce7d25f782009-10-30 08:01:03 -07002738[[ldap.accountMemberField]]ldap.accountMemberField::
Anthony93de7db2009-10-03 10:01:50 -04002739+
2740_(Optional)_ Name of an attribute on the user account object which
Shawn O. Pearce7d25f782009-10-30 08:01:03 -07002741contains the groups the user is part of. Typically used for Active
2742Directory servers.
Anthony93de7db2009-10-03 10:01:50 -04002743+
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07002744Default is unset for RFC 2307 servers (disabled)
2745and `memberOf` for Active Directory.
Anthony93de7db2009-10-03 10:01:50 -04002746
Saša Živkovc81291f2015-02-04 17:19:20 +01002747[[ldap.fetchMemberOfEagerly]]ldap.fetchMemberOfEagerly::
2748+
2749_(Optional)_ Whether to fetch the `memberOf` account attribute on
2750login. Setups which use LDAP for user authentication but don't make
2751use of the LDAP groups may benefit from setting this option to `false`
2752as this will result in a much faster LDAP login.
2753+
2754Default is unset for RFC 2307 servers (disabled) and `true` for
2755Active Directory.
2756
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002757[[ldap.groupBase]]ldap.groupBase::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002758+
2759Root of the tree containing all group objects. This is typically
2760of the form `ou=groups,dc=example,dc=com`.
David Pursehouse82d55632015-12-14 10:31:27 +00002761+
2762This setting may be added multiple times to specify more than
2763one root.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002764
Shawn O. Pearce304ccdb2009-08-25 12:25:27 -07002765[[ldap.groupScope]]ldap.groupScope::
2766+
2767Scope of the search performed for group objects. Must be one of:
2768+
2769* `one`: Search only one level below groupBase, but not recursive
2770* `sub` or `subtree`: Search recursively below groupBase
2771* `base` or `object`: Search exactly groupBase; probably not desired
2772
2773+
2774Default is `subtree` as many directories have several levels.
2775
Shawn O. Pearce7d25f782009-10-30 08:01:03 -07002776[[ldap.groupPattern]]ldap.groupPattern::
2777+
2778Query pattern used when searching for an LDAP group to connect
2779to a Gerrit group. This may be any valid LDAP query expression,
2780including the standard `(&...)` and `(|...)` operators. The variable
Edwin Kempincdb0e002011-09-08 14:23:30 +02002781`${groupname}` is replaced with the search term supplied by the
Shawn O. Pearce7d25f782009-10-30 08:01:03 -07002782group owner.
2783+
Edwin Kempincdb0e002011-09-08 14:23:30 +02002784Default is `(cn=${groupname})` for RFC 2307,
2785and `(&(objectClass=group)(cn=${groupname}))` for Active Directory.
Shawn O. Pearce7d25f782009-10-30 08:01:03 -07002786
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002787[[ldap.groupMemberPattern]]ldap.groupMemberPattern::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002788+
2789Query pattern to use when searching for the groups that a user
2790account is currently a member of. This may be any valid LDAP query
2791expression, including the standard `(&...)` and `(|...)` operators.
2792+
David Pursehouse42f42042013-08-01 14:02:25 +09002793If `auth.type` is `HTTP_LDAP` then the variable `${username}` is
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002794replaced with a parameter set to the username that was supplied
2795by the HTTP server. Other variables appearing in the pattern,
Edwin Kempincdb0e002011-09-08 14:23:30 +02002796such as `${fooBarAttribute}`, are replaced with the value of the
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002797corresponding attribute (in this case, `fooBarAttribute`) as read
2798from the user's account object matched under `ldap.accountBase`.
Edwin Kempincdb0e002011-09-08 14:23:30 +02002799Attributes such as `${dn}` or `${uidNumber}` may be useful.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002800+
Scott Dial50457502013-08-11 16:52:51 -04002801Default is `(|(memberUid=${username})(gidNumber=${gidNumber}))` for
2802RFC 2307, and unset (disabled) for Active Directory.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002803
Auke Schrijnen57809132012-09-26 21:05:39 +02002804[[ldap.groupName]]ldap.groupName::
2805+
David Pursehouse39489ae2012-10-12 13:50:04 +09002806_(Optional)_ Name of the attribute on the group object which contains
2807the value to use as the group name in Gerrit.
Auke Schrijnen57809132012-09-26 21:05:39 +02002808+
David Pursehouse39489ae2012-10-12 13:50:04 +09002809Typically the attribute name is `cn` for RFC 2307 and Active Directory
2810servers. For other servers the attribute name may differ, for example
2811`apple-group-realname` on Apple MacOS X Server.
Auke Schrijnen57809132012-09-26 21:05:39 +02002812+
David Pursehouse39489ae2012-10-12 13:50:04 +09002813It is also possible to specify a literal string containing a pattern of
2814attribute values. For example to create a Gerrit group name consisting of
2815LDAP group name and group ID, use the pattern `${cn} (${gidNumber})`.
2816+
2817Default is `cn`.
Auke Schrijnen57809132012-09-26 21:05:39 +02002818
Edwin Kempinb3b0d292011-09-14 14:17:34 +02002819[[ldap.localUsernameToLowerCase]]ldap.localUsernameToLowerCase::
2820+
2821Converts the local username, that is used to login into the Gerrit
David Pursehousea1d633b2014-05-02 17:21:02 +09002822Web UI, to lower case before doing the LDAP authentication. By setting
2823this parameter to true, a case insensitive login to the Gerrit Web UI
Edwin Kempinb3b0d292011-09-14 14:17:34 +02002824can be achieved.
2825+
2826If set, it must be ensured that the local usernames for all existing
2827accounts are converted to lower case, otherwise a user that has a
David Pursehouse221d4f62012-06-08 17:38:08 +09002828local username that contains upper case characters will not be able to login
Edwin Kempinb3b0d292011-09-14 14:17:34 +02002829anymore. The local usernames for the existing accounts can be
2830converted to lower case by running the server program
2831link:pgm-LocalUsernamesToLowerCase.html[LocalUsernamesToLowerCase].
2832Please be aware that the conversion of the local usernames to lower
2833case can't be undone. For newly created accounts the local username
2834will be directly stored in lower case.
2835+
2836By default, unset/false.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002837
Robin Rosenberga3baed02012-10-14 14:09:32 +02002838[[ldap.authentication]]ldap.authentication::
2839+
2840Defines how Gerrit authenticates with the server. When set to `GSSAPI`
2841Gerrit will use Kerberos. To use kerberos the
2842`java.security.auth.login.config` system property must point to a
2843login to a JAAS configuration file and, if Java 6 is used, the system
2844property `java.security.krb5.conf` must point to the appropriate
2845krb5.ini file with references to the KDC.
2846
2847Typical jaas.conf.
2848
2849----
2850KerberosLogin {
2851 com.sun.security.auth.module.Krb5LoginModule
2852 required
2853 useTicketCache=true
2854 doNotPrompt=true
2855 renewTGT=true;
2856};
2857----
2858
2859See Java documentation on how to create the krb5.ini file.
2860
2861Note the `renewTGT` property to make sure the TGT does not expire,
2862and `useTicketCache` to use the TGT supplied by the operating system. As
2863the whole point of using GSSAPI is to have passwordless authentication
David Pursehouse92463562013-06-24 10:16:28 +09002864to the LDAP service, this option does not acquire a new TGT on its own.
Robin Rosenberga3baed02012-10-14 14:09:32 +02002865
2866On Windows servers the registry key `HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\Kerberos\Parameters`
2867must have the DWORD value `allowtgtsessionkey` set to 1 and the account must not
2868have local administrator privileges.
2869
Bruce Zucd04bbc2014-07-25 15:48:09 +08002870[[ldap.useConnectionPooling]]ldap.useConnectionPooling::
2871+
2872_(Optional)_ Enable the LDAP connection pooling or not.
2873+
2874If it is true, the LDAP service provider maintains a pool of (possibly)
2875previously used connections and assigns them to a Context instance as
2876needed. When a Context instance is done with a connection (closed or
2877garbage collected), the connection is returned to the pool for future use.
2878+
2879For details, see link:http://docs.oracle.com/javase/tutorial/jndi/ldap/pool.html[
2880LDAP connection management (Pool)] and link:http://docs.oracle.com/javase/tutorial/jndi/ldap/config.html[
2881LDAP connection management (Configuration)]
2882+
2883By default, false.
2884
2885[[ldap.connectTimeout]]ldap.connectTimeout::
2886+
Saša Živkov303701a2015-01-19 16:24:44 +01002887_(Optional)_ Timeout period for establishment of an LDAP connection.
Bruce Zucd04bbc2014-07-25 15:48:09 +08002888+
2889The value is in the usual time-unit format like "1 s", "100 ms",
2890etc...
2891+
2892By default there is no timeout and Gerrit will wait indefinitely.
2893
Saša Živkov5049f512015-01-19 17:04:43 +01002894[[ldap-connection-pooling]]
2895==== LDAP Connection Pooling
2896Once LDAP connection pooling is enabled by setting the link:#ldap.useConnectionPooling[
2897ldap.useConnectionPooling] configuration property to `true`, the connection pool
2898can be configured using JVM system properties as explained in the
2899link:http://docs.oracle.com/javase/7/docs/technotes/guides/jndi/jndi-ldap.html#POOL[
2900Java SE Documentation].
Bruce Zucd04bbc2014-07-25 15:48:09 +08002901
Saša Živkov5049f512015-01-19 17:04:43 +01002902For standalone Gerrit (running with the embedded Jetty), JVM system properties
2903are specified in the link:#container[container section]:
Bruce Zucd04bbc2014-07-25 15:48:09 +08002904
Saša Živkov5049f512015-01-19 17:04:43 +01002905----
2906 javaOptions = -Dcom.sun.jndi.ldap.connect.pool.maxsize=20
2907 javaOptions = -Dcom.sun.jndi.ldap.connect.pool.prefsize=10
2908 javaOptions = -Dcom.sun.jndi.ldap.connect.pool.timeout=300000
2909----
Bruce Zucd04bbc2014-07-25 15:48:09 +08002910
Saša Živkovca7a67e2015-12-01 14:25:10 +01002911[[lfs]]
2912=== Section lfs
2913
2914[[lfs.plugin]]lfs.plugin::
2915+
David Pursehouse2463c542016-08-02 16:04:58 +09002916The name of a plugin which serves the
2917link:https://github.com/github/git-lfs/blob/master/docs/api/v1/http-v1-batch.md[
2918LFS protocol] on the `<project-name>/info/lfs/objects/batch` endpoint. When
2919not configured Gerrit will respond with `501 Not Implemented` on LFS protocol
2920requests.
Saša Živkovca7a67e2015-12-01 14:25:10 +01002921+
2922By default unset.
2923
Gustaf Lundhaef90122015-04-27 16:48:19 +02002924[[log]]
2925=== Section log
2926
2927[[log.jsonLogging]]log.jsonLogging::
2928+
2929If set to true, enables error logging in JSON format (file name: "logs/error_log.json").
2930+
2931Defaults to false.
2932
2933[[log.textLogging]]log.textLogging::
2934+
2935If set to true, enables error logging in regular plain text format. Can only be disabled
2936if `jsonLogging` is enabled.
2937+
2938Defaults to true.
2939
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08002940[[mimetype]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002941=== Section mimetype
Shawn O. Pearce01cb11902009-07-15 08:19:01 -07002942
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002943[[mimetype.name.safe]]mimetype.<name>.safe::
Shawn O. Pearce01cb11902009-07-15 08:19:01 -07002944+
2945If set to true, files with the MIME type `<name>` will be sent as
2946direct downloads to the user's browser, rather than being wrapped up
2947inside of zipped archives. The type name may be a complete type
Jonathan Nieder5758f182015-03-30 11:28:55 -07002948name, e.g. `image/gif`, a generic media type, e.g. `+image/*+`,
2949or the wildcard `+*/*+` to match all types.
Shawn O. Pearce01cb11902009-07-15 08:19:01 -07002950+
2951By default, false for all MIME types.
2952
2953Common examples:
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08002954----
2955[mimetype "image/*"]
2956 safe = true
2957
2958[mimetype "application/pdf"]
2959 safe = true
2960
2961[mimetype "application/msword"]
2962 safe = true
2963
2964[mimetype "application/vnd.ms-excel"]
2965 safe = true
2966----
Shawn O. Pearce01cb11902009-07-15 08:19:01 -07002967
Michael Ochmann69813262016-01-27 17:53:55 +01002968[[oauth]]
2969=== Section oauth
2970
2971OAuth integration is only enabled if `auth.type` is set to `OAUTH`. See
2972link:#auth.type[above] for a detailed description of the `auth.type` settings
2973and their implications.
2974
2975By default, contact information, like the full name and email address,
2976is retrieved from the selected OAuth provider when a user account is created,
2977or when a user requests to reload that information in the settings UI. If
2978that is not supported by the OAuth provider, users can be allowed to edit
2979their contact information manually.
2980
2981[[oauth.allowEditFullName]]oauth.allowEditFullName::
2982+
2983If true, the full name can be edited in the contact information.
2984+
2985Default is false.
2986
2987[[oauth.allowRegisterNewEmail]]oauth.allowRegisterNewEmail::
2988+
2989If true, additional email addresses can be registered in the contact
2990information.
2991+
2992Default is false.
Shawn O. Pearce5f11b292010-08-05 17:57:35 -07002993
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08002994[[pack]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002995=== Section pack
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08002996
Shawn O. Pearce5f11b292010-08-05 17:57:35 -07002997Global settings controlling how Gerrit Code Review creates pack
2998streams for Git clients running clone, fetch, or pull. Most of these
2999variables are per-client request, and thus should be carefully set
3000given the expected concurrent request load and available CPU and
3001memory resources.
3002
3003[[pack.deltacompression]]pack.deltacompression::
3004+
3005If true, delta compression between objects is enabled. This may
3006result in a smaller overall transfer for the client, but requires
3007more server memory and CPU time.
3008+
3009False (off) by default, matching Gerrit Code Review 2.1.4.
3010
3011[[pack.threads]]pack.threads::
3012+
3013Maximum number of threads to use for delta compression (if enabled).
3014This is per-client request. If set to 0 then the number of CPUs is
3015auto-detected and one thread per CPU is used, per client request.
3016+
3017By default, 1.
3018
3019
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08003020[[plugins]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08003021=== Section plugins
Shawn O. Pearce5ad16ea2012-05-09 14:24:25 -07003022
3023[[plugins.checkFrequency]]plugins.checkFrequency::
3024+
3025How often plugins should be examined for new plugins to load, removed
3026plugins to be unloaded, or updated plugins to be reloaded. Values can
3027be specified using standard time unit abbreviations ('ms', 'sec',
3028'min', etc.).
3029+
3030If set to 0, automatic plugin reloading is disabled. Administrators
Christian Aistleitner8ce1a4e2015-06-05 01:54:15 +02003031may force reloading with link:cmd-plugin-reload.html[gerrit plugin reload].
Shawn O. Pearce5ad16ea2012-05-09 14:24:25 -07003032+
3033Default is 1 minute.
3034
Shawn Pearcefd033502014-02-14 16:42:35 -08003035[[plugins.allowRemoteAdmin]]plugins.allowRemoteAdmin::
3036+
3037Enable remote installation, enable and disable of plugins over HTTP
3038and SSH. If set to true Administrators can install new plugins
3039remotely, or disable existing plugins. Defaults to false.
3040
Dariusz Luksza98f23522015-03-11 11:41:41 +01003041[[plugins.jsLoadTimeout]]plugins.jsLoadTimeout::
3042+
3043Set the timeout value for loading JavaScript plugins in Gerrit UI.
3044Values can be specified using standard time unit abbreviations ('ms',
3045'sec', 'min', etc.).
3046+
3047Default is 5 seconds. Negative values will be converted to 0.
Shawn O. Pearce5ad16ea2012-05-09 14:24:25 -07003048
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08003049[[receive]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08003050=== Section receive
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08003051
Dave Borowitzff243892015-08-31 15:35:28 -04003052This section is used to configure behavior of the 'receive-pack'
3053handler, which responds to 'git push' requests.
lincoln2be11602010-07-05 10:53:25 -03003054
Dave Borowitzff243892015-08-31 15:35:28 -04003055[[receive.allowGroup]]receive.allowGroup::
Dave Borowitz532342bf2015-06-18 20:28:22 -04003056+
Dave Borowitzff243892015-08-31 15:35:28 -04003057Name of the groups of users that are allowed to execute
3058'receive-pack' on the server. One or more groups can be set.
Dave Borowitz532342bf2015-06-18 20:28:22 -04003059+
Dave Borowitzff243892015-08-31 15:35:28 -04003060If no groups are added, any user will be allowed to execute
3061'receive-pack' on the server.
Dave Borowitz532342bf2015-06-18 20:28:22 -04003062
3063[[receive.certNonceSeed]]receive.certNonceSeed::
3064+
3065If set to a non-empty value and server-side signed push validation is
3066link:#receive.enableSignedPush[enabled], use this value as the seed to
3067the HMAC SHA-1 nonce generator. If unset, a 64-byte random seed will be
3068generated at server startup.
3069+
3070As this is used as the seed of a cryptographic algorithm, it is
3071recommended to be placed in link:#secure-config[`secure.config`].
3072+
3073Defaults to unset.
3074
3075[[receive.certNonceSlop]]receive.certNonceSlop::
3076+
3077When validating the nonce passed as part of the signed push protocol,
3078accept valid nonces up to this many seconds old. This allows
3079certificate verification to work over HTTP where there is a lag between
3080the HTTP response providing the nonce to sign and the next request
3081containing the signed nonce. This can be significant on large
3082repositories, since the lag also includes the time to count objects on
3083the client.
3084+
3085Default is 5 minutes.
3086
Dave Borowitzff243892015-08-31 15:35:28 -04003087[[receive.changeUpdateThreads]]receive.changeUpdateThreads::
3088+
3089Number of threads to perform change creation or patch set updates
3090concurrently. Each thread uses its own database connection from
3091the database connection pool, and if all threads are busy then
3092main receive thread will also perform a change creation or patch
3093set update.
3094+
3095Defaults to 1, using only the main receive thread. This feature is for
3096databases with very high latency that can benefit from concurrent
3097operations when multiple changes are impacted at once.
3098
Shawn Pearce5cb31bf2013-02-27 16:20:26 -08003099[[receive.checkMagicRefs]]receive.checkMagicRefs::
3100+
3101If true, Gerrit will verify the destination repository has
3102no references under the magic 'refs/drafts', 'refs/for', or
3103'refs/publish' branch namespaces. Names under these locations
3104confuse clients when trying to upload code reviews so Gerrit
3105requires them to be empty.
3106+
3107If false Gerrit skips the sanity check and assumes administrators
3108have ensured the repository does not contain any magic references.
3109Setting to false to skip the check can decrease latency during push.
3110+
3111Default is true.
3112
Gustaf Lundh9062fd62013-02-14 17:23:11 +01003113[[receive.checkReferencedObjectsAreReachable]]receive.checkReferencedObjectsAreReachable::
3114+
3115If set to true, Gerrit will validate that all referenced objects that
3116are not included in the received pack are reachable by the user.
3117+
3118Carrying out this check on gits with many refs and commits can be a
3119very CPU-heavy operation. For non public Gerrit-servers this check may
3120be overkill.
3121+
3122Only disable this check if you trust the clients not to forge SHA1
3123references to access commits intended to be hidden from the user.
3124+
3125Default is true.
3126
Dave Borowitzff243892015-08-31 15:35:28 -04003127[[receive.enableSignedPush]]receive.enableSignedPush::
lincoln2be11602010-07-05 10:53:25 -03003128+
Dave Borowitzff243892015-08-31 15:35:28 -04003129If true, server-side signed push validation is enabled.
lincoln2be11602010-07-05 10:53:25 -03003130+
Dave Borowitzff243892015-08-31 15:35:28 -04003131When a client pushes with `git push --signed`, this ensures that the
3132push certificate is valid and signed with a valid public key stored in
David Pursehouse6117a472016-07-26 08:02:49 +00003133the `refs/meta/gpg-keys` branch of `All-Users`.
Dave Borowitzff243892015-08-31 15:35:28 -04003134+
3135Defaults to false.
3136
3137[[receive.maxBatchChanges]]receive.maxBatchChanges::
3138+
3139The maximum number of changes that Gerrit allows to be pushed
3140in a batch for review. When this number is exceeded Gerrit rejects
3141the push with an error message.
3142+
3143May be overridden for certain groups by specifying a limit in the
3144link:access-control.html#capability_batchChangesLimit['Batch Changes Limit']
3145global capability.
3146+
3147This setting can be used to prevent users from uploading large
3148number of changes for review by mistake.
3149+
3150Default is zero, no limit.
lincoln2be11602010-07-05 10:53:25 -03003151
Sasa Zivkov59d89c32011-11-18 15:32:35 +01003152[[receive.maxObjectSizeLimit]]receive.maxObjectSizeLimit::
3153+
3154Maximum allowed Git object size that 'receive-pack' will accept.
3155If an object is larger than the given size the pack-parsing will abort
3156and the push operation will fail. If set to zero then there is no
3157limit.
3158+
David Pursehouse221d4f62012-06-08 17:38:08 +09003159Gerrit administrators can use this setting to prevent developers
Sasa Zivkov59d89c32011-11-18 15:32:35 +01003160from pushing objects which are too large to Gerrit.
3161+
Fredrik Luthandera3cf3542012-07-04 16:55:35 -07003162This setting can also be set in the `project.config`
3163link:config-project-config.html[receive.maxObjectSizeLimit] in order
3164to further reduce the global setting. The project specific setting is
3165only honored when it further reduces the global limit.
Sasa Zivkov5a708a82013-06-28 17:07:55 +02003166+
Sasa Zivkov59d89c32011-11-18 15:32:35 +01003167Default is zero.
3168+
3169Common unit suffixes of 'k', 'm', or 'g' are supported.
3170
Dave Borowitz1bb49492015-08-31 15:36:59 -04003171[[receive.maxTrustDepth]]receive.maxTrustDepth::
3172+
3173If signed push validation is link:#receive.enableSignedPush[enabled],
3174set to the maximum depth to search when checking if a key is
3175link:#receive.trustedKey[trusted].
3176+
3177Default is 0, meaning only explicitly trusted keys are allowed.
3178
Dave Borowitz234734a2012-03-01 14:22:29 -08003179[[receive.threadPoolSize]]receive.threadPoolSize::
3180+
3181Maximum size of the thread pool in which the change data in received packs is
3182processed.
3183+
3184Defaults to the number of available CPUs according to the Java runtime.
3185
Dave Borowitz1c401362012-03-02 17:39:17 -08003186[[receive.timeout]]receive.timeout::
3187+
Shawn O. Pearce00dd12d2012-03-12 15:52:11 -07003188Overall timeout on the time taken to process the change data in
3189received packs. Only includes the time processing Gerrit changes
3190and updating references, not the time to index the pack. Values can
3191be specified using standard time unit abbreviations ('ms', 'sec',
3192'min', etc.).
Dave Borowitz1c401362012-03-02 17:39:17 -08003193+
Dariusz Lukszade482b02015-11-09 18:25:04 +01003194Default is 4 minutes. If no unit is specified, milliseconds
Shawn O. Pearce00dd12d2012-03-12 15:52:11 -07003195is assumed.
Dave Borowitz1c401362012-03-02 17:39:17 -08003196
Dave Borowitz1bb49492015-08-31 15:36:59 -04003197[[receive.trustedKey]]receive.trustedKey::
3198+
3199List of GPG key fingerprints that should be considered trust roots by
3200the server when signed push validation is
3201link:#receive.enableSignedPush[enabled]. A key is trusted by the server
3202if it is either in this list, or a path of trust signatures leads from
3203the key to a configured trust root. The maximum length of the path is
3204determined by link:#receive.maxTrustDepth[`receive.maxTrustDepth`].
3205+
3206Key fingerprints can be displayed with `gpg --list-keys
3207--with-fingerprint`.
3208+
3209Trust signatures can be added to a key using the `tsign` command to
3210link:https://www.gnupg.org/documentation/manuals/gnupg/OpenPGP-Key-Management.html[
3211`gpg --edit-key`], after which the signed key should be re-uploaded.
3212+
3213If no keys are specified, web-of-trust checks are disabled. This is the
3214default behavior.
3215
lincoln2be11602010-07-05 10:53:25 -03003216
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08003217[[repository]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08003218=== Section repository
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08003219
Hugo Josefson072b4702010-04-21 19:27:11 +02003220Repositories in this sense are the same as projects.
3221
Shawn O. Pearce897d9212011-06-16 16:59:59 -07003222In the following example configuration `Registered Users` is set
3223to be the default owner of new projects.
Hugo Josefson072b4702010-04-21 19:27:11 +02003224
3225----
3226[repository "*"]
Hugo Josefson072b4702010-04-21 19:27:11 +02003227 ownerGroup = Registered Users
3228----
3229
Hugo Arès7d2b9422014-11-25 15:33:42 -05003230The only matching patterns supported are exact match or wildcard matching which
3231can be specified by ending the name with a `*`. If a project matches more than one
3232repository configuration, then the configuration from the more precise match
3233will be used. In the following example, the default submit type for a project
3234named `project/plugins/a` would be `CHERRY_PICK`.
3235
3236----
3237[repository "project/*"]
3238 defaultSubmitType = MERGE_IF_NECESSARY
3239[repository "project/plugins/*"]
3240 defaultSubmitType = CHERRY_PICK
3241----
3242
Michael Ochmann8129ece2016-07-08 11:25:25 +02003243[NOTE]
3244All properties are used from the matching repository configuration. In
Hugo Arès7d2b9422014-11-25 15:33:42 -05003245the previous example, all properties will be used from `project/plugins/\*`
3246section and no properties will be inherited nor overridden from `project/*`.
Hugo Josefson072b4702010-04-21 19:27:11 +02003247
Hugo Arès218bb3b2015-04-22 15:05:14 -04003248[[repository.name.basePath]]repository.<name>.basePath::
3249+
3250Alternate to <<gerrit.basePath,gerrit.basePath>>. The repository will be created
3251and used from this location instead: ${alternateBasePath}/${projectName}.git.
3252+
3253If configuring the basePath for an existing project in gerrit, make sure to stop
3254gerrit, move the repository in the alternate basePath, configure basePath for
3255this repository and then start Gerrit.
3256+
3257Path must be absolute.
3258
Edwin Kempina79ea552013-11-19 11:24:37 +01003259[[repository.name.defaultSubmitType]]repository.<name>.defaultSubmitType::
3260+
3261The default submit type for newly created projects. Supported values
3262are `MERGE_IF_NECESSARY`, `FAST_FORWARD_ONLY`, `REBASE_IF_NECESSARY`,
3263`MERGE_ALWAYS` and `CHERRY_PICK`.
3264+
3265By default, `MERGE_IF_NECESSARY`.
3266
Hugo Josefson072b4702010-04-21 19:27:11 +02003267[[repository.name.ownerGroup]]repository.<name>.ownerGroup::
3268+
3269A name of a group which exists in the database. Zero, one or many
3270groups are allowed. Each on its own line. Groups which don't exist
3271in the database are ignored.
Hugo Josefson072b4702010-04-21 19:27:11 +02003272
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08003273[[rules]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08003274=== Section rules
Shawn O. Pearce94860ee2011-09-29 13:11:08 -07003275
3276[[rules.enable]]rules.enable::
3277+
Matt Baker8ce12fc2013-11-26 21:43:12 -07003278If true, Gerrit will load and execute 'rules.pl' files in each
Shawn O. Pearce94860ee2011-09-29 13:11:08 -07003279project's refs/meta/config branch, if present. When set to false,
3280only the default internal rules will be used.
3281+
3282Default is true, to execute project specific rules.
3283
Shawn Pearceed001d72014-12-17 14:25:55 -08003284[[rules.reductionLimit]]rules.reductionLimit::
3285+
3286Maximum number of Prolog reductions that can be performed when
3287evaluating rules for a single change. Each function call made
3288in user rule code, internal Gerrit Prolog code, or the Prolog
3289interpreter counts against this limit.
3290+
3291Sites using very complex rules that need many reductions should
3292compile Prolog to Java bytecode with link:pgm-rulec.html[rulec].
3293This eliminates the dynamic Prolog interpreter from charging its
3294own reductions against the limit, enabling more logic to execute
3295within the same bounds.
3296+
3297A reductionLimit of 0 is nearly infinite, implemented by setting
3298the internal limit to 2^31-1.
3299+
3300Default is 100,000 reductions (about 14 ms on Intel Core i7 CPU).
3301
3302[[rules.compileReductionLimit]]rules.compileReductionLimit::
3303+
3304Maximum number of Prolog reductions that can be performed when
3305compiling source code to internal Prolog machine code.
3306+
3307Default is 10x reductionLimit (1,000,000).
3308
Shawn Pearcea2b98522015-11-21 09:47:32 -08003309[[rules.maxSourceBytes]]rules.maxSourceBytes::
3310+
3311Maximum input size (in bytes) of a Prolog rules.pl file. Larger
3312source files may need a larger rules.compileReductionLimit. Consider
3313using link:pgm-rulec.html[rulec] to precompile larger rule files.
3314+
3315A size of 0 bytes disables rules, same as rules.enable = false.
3316+
David Pursehouse0c1dadf2015-11-24 09:14:21 +00003317Common unit suffixes of 'k', 'm', or 'g' are supported.
3318+
Shawn Pearcea2b98522015-11-21 09:47:32 -08003319Default is 128 KiB.
3320
3321[[rules.maxPrologDatabaseSize]]rules.maxPrologDatabaseSize::
3322+
3323Number of predicate clauses allowed to be defined in the Prolog
3324database by project rules. Very complex rules may need more than the
3325default 256 limit, but cost more memory and may need more time to
3326evaluate. Consider using link:pgm-rulec.html[rulec] to precompile
3327larger rule files.
3328+
3329Default is 256.
3330
David Pursehouse511a35b2014-04-04 10:27:13 +09003331[[execution]]
3332=== Section execution
Bruce Zua7e34312014-04-01 17:35:41 +08003333
3334[[execution.defaultThreadPoolSize]]execution.defaultThreadPoolSize::
3335+
3336The default size of the background execution thread pool in
3337which miscellaneous tasks are handled.
3338+
3339Default is 1.
3340
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08003341[[sendemail]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08003342=== Section sendemail
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07003343
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07003344[[sendemail.enable]]sendemail.enable::
Shawn O. Pearce2e4573b2009-06-02 09:09:50 -07003345+
3346If false Gerrit will not send email messages, for any reason,
3347and all other properties of section sendemail are ignored.
3348+
3349By default, true, allowing notifications to be sent.
3350
Jonathan Niederdabd8c22016-09-20 14:10:11 -07003351[[sendemail.html]]sendemail.html::
3352+
3353If false, Gerrit will only send plain-text emails.
3354If true, Gerrit will send multi-part emails with an HTML and
3355plain text part.
3356+
3357By default, true, allowing HTML in the emails Gerrit sends.
3358
Bruce Zua7e34312014-04-01 17:35:41 +08003359[[sendemail.connectTimeout]]sendemail.connectTimeout::
3360+
3361The connection timeout of opening a socket connected to a
3362remote SMTP server.
3363+
3364Values can be specified using standard time unit abbreviations
3365('ms', 'sec', 'min', etc.).
3366If no unit is specified, milliseconds is assumed.
3367+
3368Default is 0. A timeout of zero is interpreted as an infinite
3369timeout. The connection will then block until established or
3370an error occurs.
3371
3372[[sendemail.threadPoolSize]]sendemail.threadPoolSize::
3373+
3374Maximum size of thread pool in which the review comments
3375notifications are sent out asynchronously.
3376+
3377By default, 1.
3378
Shawn O. Pearce5c31bd72009-09-10 18:13:33 -07003379[[sendemail.from]]sendemail.from::
3380+
3381Designates what name and address Gerrit will place in the From
3382field of any generated email messages. The supported values are:
3383+
3384* `USER`
3385+
3386Gerrit will set the From header to use the current user's
David Pursehouse92463562013-06-24 10:16:28 +09003387Full Name and Preferred Email. This may cause messages to be
Shawn O. Pearce5c31bd72009-09-10 18:13:33 -07003388classified as spam if the user's domain has SPF or DKIM enabled
3389and <<sendemail.smtpServer,sendemail.smtpServer>> is not a trusted
Zhen Chenae765aa2016-08-08 15:49:44 -07003390relay for that domain. You can specify
3391<<sendemail.allowedDomain,sendemail.allowedDomain>> to instruct Gerrit to only
3392send as USER if USER is from those domains.
Shawn O. Pearce5c31bd72009-09-10 18:13:33 -07003393+
3394* `MIXED`
3395+
Edwin Kempincdb0e002011-09-08 14:23:30 +02003396Shorthand for `${user} (Code Review) <review@example.com>` where
Shawn O. Pearce5c31bd72009-09-10 18:13:33 -07003397`review@example.com` is the same as <<user.email,user.email>>.
3398See below for a description of how the replacement is handled.
3399+
3400* `SERVER`
3401+
3402Gerrit will set the From header to the same name and address
3403it records in any commits Gerrit creates. This is set by
3404<<user.name,user.name>> and <<user.email,user.email>>, or guessed
3405from the local operating system.
3406+
Edwin Kempinebfbbac2015-07-01 16:02:39 +02003407* `Code Review <review@example.com>`
Shawn O. Pearce5c31bd72009-09-10 18:13:33 -07003408+
3409If set to a name and email address in brackets, Gerrit will use
3410this name and email address for any messages, overriding the name
3411that may have been selected for commits by user.name and user.email.
Edwin Kempincdb0e002011-09-08 14:23:30 +02003412Optionally, the name portion may contain the placeholder `${user}`,
Shawn O. Pearce5c31bd72009-09-10 18:13:33 -07003413which is replaced by the Full Name of the current user.
3414
3415+
3416By default, MIXED.
3417
Zhen Chenae765aa2016-08-08 15:49:44 -07003418[[sendemail.allowedDomain]]sendemail.allowedDomain::
3419+
3420Only used when `sendemail.from` is set to `USER`.
3421List of allowed domains. If user's email matches one of the domains, emails will
3422be sent as USER, otherwise as MIXED mode. Wildcards may be specified by
3423including `*` to match any number of characters, for example `*.example.com`
3424matches any subdomain of `example.com`.
3425+
3426By default, `*`.
3427
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07003428[[sendemail.smtpServer]]sendemail.smtpServer::
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07003429+
3430Hostname (or IP address) of a SMTP server that will relay
3431messages generated by Gerrit to end users.
3432+
3433By default, 127.0.0.1 (aka localhost).
3434
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07003435[[sendemail.smtpServerPort]]sendemail.smtpServerPort::
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07003436+
3437Port number of the SMTP server in sendemail.smtpserver.
3438+
Shawn O. Pearce6e9a83f2009-11-02 10:30:48 -08003439By default, 25, or 465 if smtpEncryption is 'ssl'.
3440
3441[[sendemail.smtpEncryption]]sendemail.smtpEncryption::
3442+
3443Specify the encryption to use, either 'ssl' or 'tls'.
3444+
3445By default, 'none', indicating no encryption is used.
3446
3447[[sendemail.sslVerify]]sendemail.sslVerify::
3448+
3449If false and sendemail.smtpEncryption is 'ssl' or 'tls', Gerrit
3450will not verify the server certificate when it connects to send
3451an email message.
3452+
3453By default, true, requiring the certificate to be verified.
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07003454
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07003455[[sendemail.smtpUser]]sendemail.smtpUser::
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07003456+
3457User name to authenticate with, if required for relay.
3458
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07003459[[sendemail.smtpPass]]sendemail.smtpPass::
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07003460+
3461Password for the account named by sendemail.smtpUser.
3462
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07003463[[sendemail.allowrcpt]]sendemail.allowrcpt::
Shawn O. Pearce219a8ee2009-06-01 18:13:57 -07003464+
3465If present, each value adds one entry to the whitelist of email
3466addresses that Gerrit can send email to. If set to a complete
3467email address, that one address is added to the white list.
3468If set to a domain name, any address at that domain can receive
3469email from Gerrit.
3470+
3471By default, unset, permitting delivery to any email address.
3472
Shawn O. Pearce02aacbc2012-06-12 13:44:22 -07003473[[sendemail.includeDiff]]sendemail.includeDiff::
3474+
Bruce Zueb00ff32012-11-27 17:38:10 +08003475If true, new change emails and merged change emails from Gerrit
3476will include the complete unified diff of the change.
3477Variable maxmimumDiffSize places an upper limit on how large the
3478email can get when this option is enabled.
Shawn O. Pearce02aacbc2012-06-12 13:44:22 -07003479+
3480By default, false.
3481
Shawn O. Pearce28a950b2012-06-12 14:36:34 -07003482[[sendemail.maximumDiffSize]]sendemail.maximumDiffSize::
3483+
3484Largest size of unified diff output to include in an email. When
3485the diff exceeds this size the file paths will be listed instead.
3486Standard byte unit suffixes are supported.
3487+
3488By default, 256 KiB.
3489
Alex Blewitt9cca7402011-02-11 01:39:30 +00003490[[sendemail.importance]]sendemail.importance::
3491+
3492If present, emails sent from Gerrit will have the given level
3493of importance. Valid values include 'high' and 'low', which
3494email clients will render in different ways.
3495+
3496By default, unset, so no Importance header is generated.
3497
3498[[sendemail.expiryDays]]sendemail.expiryDays::
3499+
3500If present, emails sent from Gerrit will expire after the given
3501number of days. This will add the Expiry-Date header and
3502email clients may expire or expunge mails whose Expiry-Date
3503header is in the past. This should be a positive non-zero
3504number indicating how many days in the future the mails
3505should expire.
3506+
3507By default, unset, so no Expiry-Date header is generated.
3508
Shawn O. Pearcedba97642011-09-07 20:12:31 -07003509
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08003510[[site]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08003511=== Section site
Shawn O. Pearcedba97642011-09-07 20:12:31 -07003512
Shawn Pearcec896eaa2016-08-23 19:38:58 -07003513[[site.allowOriginRegex]]site.allowOriginRegex::
3514+
3515List of regular expressions matching origins that should be permitted
3516to use the Gerrit REST API to read content. These should be trusted
3517applications as the sites may be able to use the user's credentials.
3518Only applies to GET and HEAD requests.
3519+
3520By default, unset, denying all cross-origin requests.
3521
Shawn O. Pearcedba97642011-09-07 20:12:31 -07003522[[site.refreshHeaderFooter]]site.refreshHeaderFooter::
3523+
3524If true the server checks the site header, footer and CSS files for
3525updated versions. If false, a server restart is required to change
3526any of these resources. Default is true, allowing automatic reloads.
3527
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08003528[[ssh-alias]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08003529=== Section ssh-alias
Shawn O. Pearce521380a2012-05-11 14:57:56 -07003530
3531Variables in section ssh-alias permit the site administrator to alias
3532another command from Gerrit or a plugin into the `gerrit` command
3533namespace. To alias `replication start` to `gerrit replicate`:
3534
3535----
3536[ssh-alias]
3537 replicate = replication start
3538----
Shawn O. Pearcedba97642011-09-07 20:12:31 -07003539
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08003540[[sshd]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08003541=== Section sshd
Shawn O. Pearce9410f2c2009-05-14 10:26:47 -07003542
Gustaf Lundhd60e90f2015-08-03 16:18:33 +02003543[[sshd.enableCompression]]sshd.enableCompression::
3544+
3545In the general case, we want to disable transparent compression, since
3546the majority of our data transfer is highly compressed Git pack files
3547and we cannot make them any smaller than they already are.
3548+
3549However, if there are CPU in abundance and the server is reachable
3550through slow networks, gits with huge amount of refs can benefit from
3551SSH-compression since git does not compress the ref announcement during
3552handshake.
3553+
3554Compression can be especially useful when Gerrit slaves are being used
3555for the larger clones and fetches and the master server mostly takes
3556small receive-packs.
3557+
3558By default, `false`.
3559
David Ostrovskye2921b62015-03-04 22:36:10 +01003560[[sshd.backend]]sshd.backend::
3561+
3562Starting from version 0.9.0 Apache SSHD project added support for NIO2
3563IoSession. To use the new NIO2 session the `backend` option must be set
Marco Miller4eba49e2016-04-06 08:23:01 -04003564to `NIO2`. Otherwise, this option must be set to `MINA`.
David Ostrovskye2921b62015-03-04 22:36:10 +01003565+
Luca Milanesiofc1ed9c2016-03-01 18:28:36 +00003566By default, `NIO2`.
David Ostrovskye2921b62015-03-04 22:36:10 +01003567
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07003568[[sshd.listenAddress]]sshd.listenAddress::
Shawn O. Pearce1d3cb4442009-05-30 14:03:31 -07003569+
3570Specifies the local addresses the internal SSHD should listen
3571for connections on. The following forms may be used to specify
3572an address. In any form, `:'port'` may be omitted to use the
David Pursehousea3af2552016-08-02 14:04:44 +09003573default of `29418`.
Shawn O. Pearce1d3cb4442009-05-30 14:03:31 -07003574+
David Pursehousea3af2552016-08-02 14:04:44 +09003575* `'hostname':'port'` (for example `review.example.com:29418`)
3576* `'IPv4':'port'` (for example `10.0.0.1:29418`)
3577* `['IPv6']:'port'` (for example `[ff02::1]:29418`)
3578* `+*:'port'+` (for example `+*:29418+`)
Shawn O. Pearce1d3cb4442009-05-30 14:03:31 -07003579
3580+
Edwin Kempina09ebcf2015-04-16 14:53:23 +02003581--
Shawn O. Pearce1d3cb4442009-05-30 14:03:31 -07003582If multiple values are supplied, the daemon will listen on all
3583of them.
Edwin Kempina09ebcf2015-04-16 14:53:23 +02003584
Shawn O. Pearce6af6f5f2010-06-08 17:38:43 -07003585To disable the internal SSHD, set listenAddress to `off`.
Edwin Kempina09ebcf2015-04-16 14:53:23 +02003586
David Pursehousea3af2552016-08-02 14:04:44 +09003587By default, `*:29418`.
Edwin Kempina09ebcf2015-04-16 14:53:23 +02003588--
Shawn O. Pearce1d3cb4442009-05-30 14:03:31 -07003589
James Y Knight910bd862011-01-11 20:05:56 -05003590[[sshd.advertisedAddress]]sshd.advertisedAddress::
3591+
3592Specifies the addresses clients should be told to connect to.
3593This may differ from sshd.listenAddress if a firewall based port
3594redirector is being used, making Gerrit appear to answer on port
359522. The following forms may be used to specify an address. In any
3596form, `:'port'` may be omitted to use the default SSH port of 22.
Edwin Kempina09ebcf2015-04-16 14:53:23 +02003597
David Pursehousea3af2552016-08-02 14:04:44 +09003598* `'hostname':'port'` (for example `review.example.com:22`)
3599* `'IPv4':'port'` (for example `10.0.0.1:29418`)
3600* `['IPv6']:'port'` (for example `[ff02::1]:29418`)
James Y Knight910bd862011-01-11 20:05:56 -05003601
3602+
Edwin Kempina09ebcf2015-04-16 14:53:23 +02003603--
James Y Knight910bd862011-01-11 20:05:56 -05003604If multiple values are supplied, the daemon will advertise all
3605of them.
Edwin Kempina09ebcf2015-04-16 14:53:23 +02003606
David Pursehousea3af2552016-08-02 14:04:44 +09003607By default uses the value of `sshd.listenAddress`.
Edwin Kempina09ebcf2015-04-16 14:53:23 +02003608--
James Y Knight910bd862011-01-11 20:05:56 -05003609
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07003610[[sshd.tcpKeepAlive]]sshd.tcpKeepAlive::
Shawn O. Pearcefc9081f2009-05-14 10:26:59 -07003611+
3612If true, enables TCP keepalive messages to the other side, so
3613the daemon can terminate connections if the peer disappears.
3614+
David Ostrovskye5b7f1a2013-10-23 21:10:39 +02003615Only effective when `sshd.backend` is set to `MINA`.
3616+
David Pursehousea3af2552016-08-02 14:04:44 +09003617By default, `true`.
Shawn O. Pearcefc9081f2009-05-14 10:26:59 -07003618
Shawn O. Pearce1a4580b2009-11-19 17:37:10 -08003619[[sshd.threads]]sshd.threads::
3620+
3621Number of threads to use when executing SSH command requests.
3622If additional requests are received while all threads are busy they
David Pursehouse221d4f62012-06-08 17:38:08 +09003623are queued and serviced in a first-come-first-served order.
Shawn O. Pearce1a4580b2009-11-19 17:37:10 -08003624+
Dariusz Luksza4b5a4162015-11-09 21:53:29 +01003625By default, 2x the number of CPUs available to the JVM.
Shawn O. Pearce1a4580b2009-11-19 17:37:10 -08003626
Nico Sallembienfc53f7f2010-05-18 16:40:10 -07003627[[sshd.batchThreads]]sshd.batchThreads::
3628+
3629Number of threads to allocate for SSH command requests from
Fredrik Luthander46843022012-03-13 16:11:02 +01003630link:access-control.html#non-interactive_users[non-interactive users].
3631If equals to 0, then all non-interactive requests are executed in the same
3632queue as interactive requests.
Nico Sallembienfc53f7f2010-05-18 16:40:10 -07003633+
3634Any other value will remove the number of threads from the queue
3635allocated to interactive users, and create a separate thread pool
3636of the requested size, which will be used to run commands from
3637non-interactive users.
3638+
3639If the number of threads requested for non-interactive users is larger
3640than the total number of threads allocated in sshd.threads, then the
David Pursehouse92463562013-06-24 10:16:28 +09003641value of sshd.threads is increased to accommodate the requested value.
Nico Sallembienfc53f7f2010-05-18 16:40:10 -07003642+
Dariusz Luksza145de472015-11-09 18:44:35 +01003643By default is 1 on single core node, 2 otherwise.
Nico Sallembienfc53f7f2010-05-18 16:40:10 -07003644
Kenny Root15ac1b82010-02-24 00:29:20 -08003645[[sshd.streamThreads]]sshd.streamThreads::
3646+
3647Number of threads to use when formatting events to asynchronous
3648streaming clients. Event formatting is multiplexed onto this thread
3649pool by a simple FIFO scheduling system.
3650+
3651By default, 1 plus the number of CPUs available to the JVM.
3652
Edwin Kempinb5df3b82011-10-10 11:31:14 +02003653[[sshd.commandStartThreads]]sshd.commandStartThreads::
Shawn O. Pearced6296552011-05-15 13:56:30 -07003654+
3655Number of threads used to parse a command line submitted by a client
3656over SSH for execution, create the internal data structures used by
3657that command, and schedule it for execution on another thread.
3658+
3659By default, 2.
3660
Shawn O. Pearce8a0bf362010-11-05 17:49:41 -07003661[[sshd.maxAuthTries]]sshd.maxAuthTries::
3662+
3663Maximum number of authentication attempts before the server
3664disconnects the client. Each public key that a client has loaded
3665into its local agent counts as one auth request. Users can work
3666around the server's limit by loading less keys into their agent,
3667or selecting a specific key in their `~/.ssh/config` file with
3668the `IdentityFile` option.
3669+
3670By default, 6.
3671
3672[[sshd.loginGraceTime]]sshd.loginGraceTime::
3673+
3674Time in seconds that a client has to authenticate before the server
3675automatically terminates their connection. Values should use common
3676unit suffixes to express their setting:
3677+
3678* s, sec, second, seconds
3679* m, min, minute, minutes
3680* h, hr, hour, hours
3681* d, day, days
3682
3683+
3684By default, 2 minutes.
3685
Christian Aistleitner3d794592013-04-08 00:19:40 +02003686[[sshd.idleTimeout]]sshd.idleTimeout::
3687+
3688Time in seconds after which the server automatically terminates idle
3689connections (or 0 to disable closing of idle connections). Values
3690should use common unit suffixes to express their setting:
3691+
3692* s, sec, second, seconds
3693* m, min, minute, minutes
3694* h, hr, hour, hours
3695* d, day, days
3696
3697+
3698By default, 0.
3699
Shawn O. Pearce8a0bf362010-11-05 17:49:41 -07003700[[sshd.maxConnectionsPerUser]]sshd.maxConnectionsPerUser::
3701+
3702Maximum number of concurrent SSH sessions that a user account
3703may open at one time. This is the number of distinct SSH logins
David Pursehouse221d4f62012-06-08 17:38:08 +09003704that each user may have active at one time, and is not related to
Shawn O. Pearce8a0bf362010-11-05 17:49:41 -07003705the number of commands a user may issue over a single connection.
3706If set to 0, there is no limit.
3707+
3708By default, 64.
3709
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07003710[[sshd.cipher]]sshd.cipher::
Shawn O. Pearce0bf2f522009-05-14 11:02:03 -07003711+
3712Available ciphers. To permit multiple ciphers, specify multiple
3713`sshd.cipher` keys in the configuration file, one cipher name
3714per key. Cipher names starting with `+` are enabled in addition
3715to the default ciphers, cipher names starting with `-` are removed
3716from the default cipher set.
3717+
David Pursehousea3af2552016-08-02 14:04:44 +09003718Supported ciphers: `aes128-cbc`, `aes128-cbc`, `aes256-cbc`, `blowfish-cbc`,
3719`3des-cbc`, `none`.
Shawn O. Pearce0bf2f522009-05-14 11:02:03 -07003720+
3721By default, all supported ciphers except `none` are available.
3722
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07003723[[sshd.mac]]sshd.mac::
Shawn O. Pearce0bf2f522009-05-14 11:02:03 -07003724+
3725Available MAC (message authentication code) algorithms. To permit
3726multiple algorithms, specify multiple `sshd.mac` keys in the
3727configuration file, one MAC per key. MAC names starting with `+`
3728are enabled in addition to the default MACs, MAC names starting with
3729`-` are removed from the default MACs.
3730+
David Pursehousea3af2552016-08-02 14:04:44 +09003731Supported MACs: `hmac-md5`, `hmac-md5-96`, `hmac-sha1`, `hmac-sha1-96`,
3732`hmac-sha2-256`, `hmac-sha2-512`.
Shawn O. Pearce0bf2f522009-05-14 11:02:03 -07003733+
3734By default, all supported MACs are available.
3735
Scott Dialb4a04fa2016-03-15 09:44:11 -04003736[[sshd.kex]]sshd.kex::
3737+
3738--
3739Available key exchange algorithms. To permit multiple algorithms,
3740specify multiple `sshd.kex` keys in the configuration file, one key
3741exchange algorithm per key. Key exchange algorithm names starting
3742with `+` are enabled in addition to the default key exchange
3743algorithms, key exchange algorithm names starting with `-` are
3744removed from the default key exchange algorithms.
3745
3746In the following example configuration, support for the 1024-bit
3747`diffie-hellman-group1-sha1` key exchange is disabled while leaving
3748all of the other default algorithms enabled:
3749
3750----
3751[sshd]
3752 kex = -diffie-hellman-group1-sha1
3753----
3754
3755Supported key exchange algorithms:
3756
3757* `ecdh-sha2-nistp521`
3758* `ecdh-sha2-nistp384`
3759* `ecdh-sha2-nistp256`
3760* `diffie-hellman-group-exchange-sha256`
3761* `diffie-hellman-group-exchange-sha1`
3762* `diffie-hellman-group14-sha1`
3763* `diffie-hellman-group1-sha1`
3764
3765By default, all supported key exchange algorithms are available.
3766Without Bouncy Castle, `diffie-hellman-group1-sha1` is the only
3767available algorithm.
3768--
3769
Alex Blewitt7efb06f2013-04-01 12:46:48 -04003770[[sshd.kerberosKeytab]]sshd.kerberosKeytab::
3771+
3772Enable kerberos authentication for SSH connections. To permit
3773kerberos authentication, the server must have a host principal
3774(see `sshd.kerberosPrincipal`) which is acquired from a keytab.
3775This must be provisioned by the kerberos administrators, and is
3776typically installed into `/etc/krb5.keytab` on host machines.
3777+
3778The keytab must contain at least one `host/` principal, typically
3779using the host's canonical name. If it does not use the
3780canonical name, the `sshd.kerberosPrincipal` should be configured
3781with the correct name.
3782+
3783By default, not set and so kerberos authentication is not enabled.
3784
3785[[sshd.kerberosPrincipal]]sshd.kerberosPrincipal::
3786+
3787If kerberos authentication is enabled with `sshd.kerberosKeytab`,
3788instead use the given principal name instead of the default.
3789If the principal does not begin with `host/` a warning message is
3790printed and may prevent successful authentication.
3791+
3792This may be useful if the host is behind an IP load balancer or
3793other SSH forwarding systems, since the principal name is constructed
3794by the client and must match for kerberos authentication to work.
3795+
3796By default, `host/canonical.host.name`
3797
Shawn Pearce318bfca2013-10-17 22:15:38 -07003798[[sshd.requestLog]]sshd.requestLog::
3799+
3800Enable (or disable) the `'$site_path'/logs/sshd_log` request log.
3801If enabled, a request log file is written out by the SSH daemon.
3802+
David Ostrovsky8e4a9902013-11-19 23:57:48 +01003803`log4j.appender` with the name `sshd_log` can be configured to overwrite
3804programmatic configuration.
3805+
David Pursehousea3af2552016-08-02 14:04:44 +09003806By default, `true`.
Shawn Pearce318bfca2013-10-17 22:15:38 -07003807
David Ostrovsky985201b2015-03-04 22:37:33 +01003808[[sshd.rekeyBytesLimit]]sshd.rekeyBytesLimit::
3809+
3810The SSH daemon will issue a rekeying after a certain amount of data.
3811This configuration option allows you to tweak that setting.
3812+
3813By default, 1073741824 (bytes, 1GB).
3814+
David Pursehousea3af2552016-08-02 14:04:44 +09003815The `rekeyBytesLimit` cannot be set to lower than 32.
David Ostrovsky985201b2015-03-04 22:37:33 +01003816
3817[[sshd.rekeyTimeLimit]]sshd.rekeyTimeLimit::
3818+
3819The SSH daemon will issue a rekeying after a certain amount of time.
3820This configuration option allows you to tweak that setting.
3821+
3822By default, 1h.
3823+
3824Set to 0 to disable this check.
3825
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08003826[[suggest]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08003827=== Section suggest
Shawn O. Pearce07bd6fb2011-04-29 19:15:47 -07003828
Sven Selberg42d9d292014-08-13 11:20:11 +02003829[[suggest.maxSuggestedReviewers]]suggest.maxSuggestedReviewers::
3830+
3831The maximum numbers of reviewers suggested.
3832+
3833By default 10.
3834
Edwin Kempinf957dc22012-10-19 20:41:18 +02003835[[suggest.from]]suggest.from::
3836+
3837The number of characters that a user must have typed before suggestions
3838are provided. If set to 0, suggestions are always provided.
3839+
3840By default 0.
3841
Sven Selberg42d9d292014-08-13 11:20:11 +02003842
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08003843[[theme]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08003844=== Section theme
Shawn O. Pearce2ba3ab42010-02-25 12:10:10 -08003845
3846[[theme.backgroundColor]]theme.backgroundColor::
3847+
3848Background color for the page, and major data tables like the all
3849open changes table or the account dashboard. The value must be a
3850valid HTML hex color code, or standard color name.
3851+
Chad Horohoebbdf7482012-11-13 18:23:15 -08003852By default white, `FFFFFF`.
Shawn O. Pearce2ba3ab42010-02-25 12:10:10 -08003853
3854[[theme.topMenuColor]]theme.topMenuColor::
3855+
3856This is the color of the main menu bar at the top of the page.
3857The value must be a valid HTML hex color code, or standard color
Chad Horohoebbdf7482012-11-13 18:23:15 -08003858name.
3859+
3860By default white, `FFFFFF`.
Shawn O. Pearce2ba3ab42010-02-25 12:10:10 -08003861
3862[[theme.textColor]]theme.textColor::
3863+
3864Text color for the page, and major data tables like the all
3865open changes table or the account dashboard. The value must be a
3866valid HTML hex color code, or standard color name.
3867+
Chad Horohoebbdf7482012-11-13 18:23:15 -08003868By default dark grey, `353535`.
Shawn O. Pearce2ba3ab42010-02-25 12:10:10 -08003869
3870[[theme.trimColor]]theme.trimColor::
3871+
3872Primary color used as a background color behind text. This is
3873the color of the main menu bar at the top, of table headers,
3874and of major UI areas that we want to offset from other portions
3875of the page. The value must be a valid HTML hex color code, or
3876standard color name.
3877+
Chad Horohoebbdf7482012-11-13 18:23:15 -08003878By default a light grey, `EEEEEE`.
Shawn O. Pearce2ba3ab42010-02-25 12:10:10 -08003879
3880[[theme.selectionColor]]theme.selectionColor::
3881+
3882Background color used within a trimColor area to denote the currently
3883selected tab, or the background color used in a table to denote the
3884currently selected row. The value must be a valid HTML hex color
3885code, or standard color name.
3886+
Chad Horohoebbdf7482012-11-13 18:23:15 -08003887By default a pale blue, `D8EDF9`.
Shawn O. Pearce2ba3ab42010-02-25 12:10:10 -08003888
Andrew Hutchingscfd7abb2012-06-29 10:57:05 +01003889[[theme.changeTableOutdatedColor]]theme.changeTableOutdatedColor::
3890+
3891Background color used for patch outdated messages. The value must be
3892a valid HTML hex color code, or standard color name.
3893+
Edwin Kempinb0347332012-07-17 10:14:32 +02003894By default a shade of red, `F08080`.
Andrew Hutchingscfd7abb2012-06-29 10:57:05 +01003895
3896[[theme.tableOddRowColor]]theme.tableOddRowColor::
3897+
3898Background color for tables such as lists of open reviews for odd
3899rows. This is so you can have a different color for odd and even
3900rows of the table. The value must be a valid HTML hex color code,
3901or standard color name.
3902+
3903By default transparent.
3904
3905[[theme.tableEvenRowColor]]theme.tableEvenRowColor::
3906+
3907Background color for tables such as lists of open reviews for even
3908rows. This is so you can have a different color for odd and even
3909rows of the table. The value must be a valid HTML hex color code,
3910or standard color name.
3911+
3912By default transparent.
3913
Shawn O. Pearcea83bb1c2011-05-20 08:46:48 -07003914A different theme may be used for signed-in vs. signed-out user status
3915by using the "signed-in" and "signed-out" theme sections. Variables
3916not specified in a section are inherited from the default theme.
3917
3918----
3919[theme]
3920 backgroundColor = FFFFFF
3921[theme "signed-in"]
3922 backgroundColor = C0C0C0
3923[theme "signed-out"]
3924 backgroundColor = 00FFFF
3925----
3926
David Ostrovsky117c6032013-08-09 00:44:56 +02003927As example, here is the theme configuration to have the old green look:
3928
3929----
3930[theme]
3931 backgroundColor = FCFEEF
3932 textColor = 000000
3933 trimColor = D4E9A9
3934 selectionColor = FFFFCC
3935 topMenuColor = D4E9A9
3936 changeTableOutdatedColor = F08080
3937[theme "signed-in"]
3938 backgroundColor = FFFFFF
3939----
3940
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08003941[[trackingid]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08003942=== Section trackingid
Goran Lungberg04132a12010-06-15 17:20:37 -07003943
Shawn O. Pearcee800b1e2010-06-16 17:33:43 -07003944Tagged footer lines containing references to external
3945tracking systems, parsed out of the commit message and
David Pursehoused55a6b62015-02-27 17:39:38 +09003946saved in Gerrit's secondary index.
Shawn Pearceff61c8a2013-10-07 19:35:53 -07003947
3948After making changes to this section, existing changes
Shawn Pearce9f4de522013-11-29 11:57:53 -08003949must be reindexed with link:pgm-reindex.html[reindex].
Goran Lungberg04132a12010-06-15 17:20:37 -07003950
Edwin Kempinbb421f12011-08-25 11:19:00 +02003951The tracking ids are searchable using tr:<tracking id> or
Shawn O. Pearce91763a02010-06-16 15:39:33 -07003952bug:<tracking id>.
Goran Lungberg04132a12010-06-15 17:20:37 -07003953
3954----
3955[trackingid "jira-bug"]
3956 footer = Bugfix:
David Pursehousece7f6862015-02-19 14:52:45 +09003957 footer = Bug:
Goran Lungberg04132a12010-06-15 17:20:37 -07003958 match = JRA\\d{2,8}
3959 system = JIRA
3960
3961[trackingid "jira-feature"]
3962 footer = Feature
3963 match = JRA(\\d{2,8})
3964 system = JIRA
3965----
3966
3967[[trackingid.name.footer]]trackingid.<name>.footer::
3968+
David Pursehousece7f6862015-02-19 14:52:45 +09003969A prefix tag that identifies the footer line to parse for tracking ids.
3970+
3971Several trackingid entries can have the same footer tag, and a single trackingid
3972entry can have multiple footer tags.
3973+
3974If multiple footer tags are specified, each tag will be parsed separately and
3975duplicates will be ignored.
3976+
3977The trailing ":" is optional.
Goran Lungberg04132a12010-06-15 17:20:37 -07003978
3979[[trackingid.name.match]]trackingid.<name>.match::
3980+
Magnus Bäcke5611832011-02-02 08:57:15 +01003981A link:http://download.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html[standard
3982Java regular expression (java.util.regex)] used to match the
3983external tracking id part of the footer line. The match can
3984result in several entries in the DB. If grouping is used in the
3985regex the first group will be interpreted as the tracking id.
Christian Aistleitner5cec3682013-03-16 23:02:37 +01003986Tracking ids longer than 32 characters will be ignored.
Goran Lungberg04132a12010-06-15 17:20:37 -07003987+
3988The configuration file parser eats one level of backslashes, so the
3989character class `\s` requires `\\s` in the configuration file. The
3990parser also terminates the line at the first `#`, so a match
3991expression containing # must be wrapped in double quotes.
3992
3993[[trackingid.name.system]]trackingid.<name>.system::
3994+
David Pursehouse221d4f62012-06-08 17:38:08 +09003995The name of the external tracking system (maximum 10 characters).
Goran Lungberg04132a12010-06-15 17:20:37 -07003996It is possible to have several trackingid entries for the same
3997tracking system.
3998
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08003999[[transfer]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08004000=== Section transfer
Shawn O. Pearce6e4dfdd2010-05-12 17:26:08 -07004001
4002[[transfer.timeout]]transfer.timeout::
4003+
4004Number of seconds to wait for a single network read or write
4005to complete before giving up and declaring the remote side is
4006not responding. If 0, there is no timeout, and this server will
4007wait indefinitely for a transfer to finish.
4008+
4009A timeout should be large enough to mostly transfer the objects to
4010the other side. 1 second may be too small for larger projects,
4011especially over a WAN link, while 10-30 seconds is a much more
4012reasonable timeout value.
4013+
4014Defaults to 0 seconds, wait indefinitely.
4015
lincoln2be11602010-07-05 10:53:25 -03004016
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08004017[[upload]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08004018=== Section upload
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08004019
lincoln2be11602010-07-05 10:53:25 -03004020Sets the group of users allowed to execute 'upload-pack' on the
4021server, 'upload-pack' is what runs on the server during a user's
4022fetch, clone or repo sync command.
4023
4024----
4025[upload]
4026 allowGroup = GROUP_ALLOWED_TO_EXECUTE
4027 allowGroup = YET_ANOTHER_GROUP_ALLOWED_TO_EXECUTE
4028----
4029
4030[[upload.allowGroup]]upload.allowGroup::
4031+
4032Name of the groups of users that are allowed to execute 'upload-pack'
4033on the server. One or more groups can be set.
4034+
4035If no groups are added, any user will be allowed to execute
4036'upload-pack' on the server.
4037
Edwin Kempinfa0d4942015-07-16 12:38:52 +02004038[[urlAlias]]
4039=== Section urlAlias
4040
4041URL aliases define regular expressions for URL tokens that are mapped
4042to target URL tokens.
4043
4044Each URL alias must be specified in its own subsection. The subsection
4045name should be a descriptive name. It must be unique, but is not
4046interpreted in any way.
4047
4048The URL aliases are applied in no particular order. The first matching
4049URL alias is used and further matches are ignored.
4050
4051URL aliases can be used to map plugin screens into the Gerrit URL
4052namespace, or to replace Gerrit screens by plugin screens.
4053
4054Example:
4055
4056----
4057[urlAlias "MyPluginScreen"]
4058 match = /myscreen/(.*)
4059 token = /x/myplugin/myscreen/$1
4060[urlAlias "MyChangeScreen"]
4061 match = /c/(.*)
4062 token = /x/myplugin/c/$1
4063----
4064
4065[[urlAlias.match]]urlAlias.match::
4066+
4067A regular expression for a URL token.
4068+
4069The matched URL token is replaced by `urlAlias.token`.
4070
4071[[urlAlias.token]]urlAlias.token::
4072+
4073The target URL token.
4074+
4075It can contain placeholders for the groups matched by the
4076`urlAlias.match` regular expression: `$1` for the first matched group,
4077`$2` for the second matched group, etc.
lincoln2be11602010-07-05 10:53:25 -03004078
Stefan Beller0f724ff2015-07-17 10:17:51 -07004079[[submodule]]
4080=== Section submodule
4081
Shawn Pearcedc477cd2016-03-24 19:56:18 -07004082[[submodule.verbosesuperprojectupdate]]submodule.verboseSuperprojectUpdate::
Stefan Beller0f724ff2015-07-17 10:17:51 -07004083+
4084When using link:user-submodules.html#automatic_update[automatic superproject updates]
Zhen Chenc877ca92016-07-27 14:22:37 -07004085this option will determine how the submodule commit messages are included into
Stefan Beller0f724ff2015-07-17 10:17:51 -07004086the commit message of the superproject update.
4087+
Zhen Chenc877ca92016-07-27 14:22:37 -07004088If `FALSE`, will not include any commit messages for the gitlink update.
4089+
4090If `SUBJECT_ONLY`, will include only the commit subjects.
4091+
4092If `TRUE`, will include full commit messages.
4093+
4094By default this is `TRUE`.
Stefan Beller0f724ff2015-07-17 10:17:51 -07004095
Shawn Pearcedc477cd2016-03-24 19:56:18 -07004096[[submodule.enableSuperProjectSubscriptions]]submodule.enableSuperProjectSubscriptions::
Stefan Beller8cc252e2016-03-10 10:06:53 -08004097+
4098This allows to enable the superproject subscription mechanism.
4099+
4100By default this is true.
Stefan Beller0f724ff2015-07-17 10:17:51 -07004101
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08004102[[user]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08004103=== Section user
Shawn O. Pearce0a351912009-06-01 08:14:46 -07004104
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07004105[[user.name]]user.name::
Shawn O. Pearce0a351912009-06-01 08:14:46 -07004106+
4107Name that Gerrit calls itself in Git when it creates a new Git
4108commit, such as a merge during change submission.
4109+
4110By default this is "Gerrit Code Review".
4111
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07004112[[user.email]]user.email::
Shawn O. Pearce0a351912009-06-01 08:14:46 -07004113+
4114Email address that Gerrit refers to itself as when it creates a
4115new Git commit, such as a merge commit during change submission.
4116+
4117If not set, Gerrit generates this as "gerrit@`hostname`", where
4118`hostname` is the hostname of the system Gerrit is running on.
4119+
4120By default, not set, generating the value at startup.
4121
Edwin Kempin0e02ded2011-09-16 15:10:14 +02004122[[user.anonymousCoward]]user.anonymousCoward::
4123+
David Pursehousea1d633b2014-05-02 17:21:02 +09004124Username that is displayed in the Gerrit Web UI and in e-mail
Edwin Kempin0e02ded2011-09-16 15:10:14 +02004125notifications if the full name of the user is not set.
4126+
4127By default "Anonymous Coward" is used.
4128
Shawn O. Pearce0bf2f522009-05-14 11:02:03 -07004129
Dave Borowitz532342bf2015-06-18 20:28:22 -04004130== [[secure.config]]File `etc/secure.config`
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08004131The optional file `'$site_path'/etc/secure.config` overrides (or
4132supplements) the settings supplied by `'$site_path'/etc/gerrit.config`.
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08004133The file should be readable only by the daemon process and can be
4134used to contain private configuration entries that wouldn't normally
4135be exposed to everyone.
4136
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08004137Sample `etc/secure.config`:
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08004138----
Shawn O. Pearce34f38cf2011-06-16 19:18:54 -07004139[auth]
4140 registerEmailPrivateKey = 2zHNrXE2bsoylzUqDxZp0H1cqUmjgWb6
4141
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08004142[database]
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08004143 username = webuser
4144 password = s3kr3t
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08004145
4146[ldap]
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08004147 password = l3tm3srch
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08004148
4149[httpd]
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08004150 sslKeyPassword = g3rr1t
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08004151
4152[sendemail]
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08004153 smtpPass = sp@m
Shawn O. Pearce7929d872011-05-15 13:33:15 -07004154
4155[remote "bar"]
4156 password = s3kr3t
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08004157----
4158
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08004159== File `etc/peer_keys`
Johan Bjork3e5ee302012-01-27 17:59:54 +01004160
4161The optional file `'$site_path'/etc/peer_keys` controls who can
4162login as the 'Gerrit Code Review' user, required for the link:cmd-suexec.html[suexec]
4163command.
4164
4165The format is one Base-64 encoded public key per line.
4166
4167
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08004168== Database system_config
Shawn O. Pearce7b405712009-05-08 18:27:53 -07004169
4170Several columns in the `system_config` table within the metadata
4171database may be set to control how Gerrit behaves.
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08004172
4173[NOTE]
4174The contents of the `system_config` table are cached at startup
4175by Gerrit. If you modify any columns in this table, Gerrit needs
4176to be restarted before it will use the new values.
4177
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08004178=== Configurable Parameters
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08004179
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07004180site_path::
4181+
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08004182Local filesystem directory holding the site customization assets.
4183Placing this directory under version control and/or backup is a
4184good idea.
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07004185+
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08004186Files in this directory provide additional configuration.
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07004187+
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08004188Other files support site customization.
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07004189+
Dave Borowitz1e49e142013-04-09 12:14:57 -07004190* link:config-themes.html[Themes]
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08004191
Shawn O. Pearce5500e692009-05-28 15:55:01 -07004192GERRIT
4193------
4194Part of link:index.html[Gerrit Code Review]
Yuxuan 'fishy' Wang99cb68d2013-10-31 17:26:00 -07004195
4196SEARCHBOX
4197---------