blob: 4f8a1988c38176c37a0254d3ee4b94caf6c9e34d [file] [log] [blame]
Shawn O. Pearcee31d02c2009-12-08 12:21:37 -08001Gerrit Code Review - Configuration
2==================================
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08003
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08004File `etc/gerrit.config`
5------------------------
Shawn O. Pearce51967cd2009-05-08 19:46:57 -07006
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08007The optional file `'$site_path'/etc/gerrit.config` is a Git-style
8config file that controls many host specific settings for Gerrit.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -07009
10[NOTE]
Shawn O. Pearcec5fed822009-11-17 16:10:10 -080011The contents of the `etc/gerrit.config` file are cached at startup
Brandon Casey4a21add2011-07-05 13:14:18 -050012by Gerrit. If you modify any properties in this file, Gerrit needs
Shawn O. Pearce51967cd2009-05-08 19:46:57 -070013to be restarted before it will use the new values.
14
Shawn O. Pearcec5fed822009-11-17 16:10:10 -080015Sample `etc/gerrit.config`:
Shawn O. Pearce51967cd2009-05-08 19:46:57 -070016----
17[core]
Shawn O. Pearce9d342a42009-12-16 15:49:05 -080018 packedGitLimit = 200 m
Shawn O. Pearce51967cd2009-05-08 19:46:57 -070019
20[cache]
Shawn O. Pearce9d342a42009-12-16 15:49:05 -080021 directory = /var/cache/gerrit2
Shawn O. Pearce51967cd2009-05-08 19:46:57 -070022----
23
Dave Borowitz45baa892012-02-23 16:43:05 -080024[[accounts]]Section accounts
25~~~~~~~~~~~~~~~~~~~~~~~~~~~~
26
Matthias Sohnf3360662012-04-05 15:42:52 +020027[[accounts.visibility]]accounts.visibility::
Dave Borowitz45baa892012-02-23 16:43:05 -080028+
29Controls visibility of other users' dashboard pages and
30completion suggestions to web users.
31+
32If `ALL`, all users are visible to all other users, even
33anonymous users.
34+
35If `SAME_GROUP`, only users who are also members of a group the
36current user is a member of are visible.
37+
38If `VISIBLE_GROUP`, only users who are members of at least one group
39that is visible to the current user are visible.
40+
41If `NONE`, no users other than the current user are visible.
42+
43Default is `ALL`.
44
Edwin Kempin49cb3e12011-06-29 14:35:14 +020045[[addreviewer]]Section addreviewer
46~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
47
48[[addreviewer.maxWithoutConfirmation]]addreviewer.maxWithoutConfirmation::
49+
50The maximum number of reviewers a user can add at once by adding a
51group as reviewer without being asked to confirm the operation.
52+
53If set to 0, the user will never be asked to confirm adding a group
54as reviewer.
55+
56Default is 10.
Edwin Kempin5e65d9b2011-07-08 07:35:48 +020057+
58This setting only applies for adding reviewers in the Gerrit WebUI,
59but is ignored when adding reviewers with the
Edwin Kempin33e92d02011-07-11 22:00:57 +020060link:cmd-set-reviewers.html[set-reviewers] command.
Edwin Kempin49cb3e12011-06-29 14:35:14 +020061
62[[addreviewer.maxAllowed]]addreviewer.maxAllowed::
63+
64The maximum number of reviewers a user can add at once by adding a
65group as reviewer.
66+
67If set to 0, there is no limit for the number of reviewers that can
68be added at once by adding a group as reviewer.
69+
70Default is 20.
71
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -070072[[auth]]Section auth
73~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -070074
75See also link:config-sso.html[SSO configuration].
76
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -070077[[auth.type]]auth.type::
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -070078+
Shawn O. Pearce2920ef32009-08-03 08:03:34 -070079Type of user authentication employed by Gerrit. The supported
80values are:
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -070081+
82* `OpenID`
83+
84The default setting. Gerrit uses any valid OpenID
85provider chosen by the end-user. For more information see
Shawn O. Pearce2920ef32009-08-03 08:03:34 -070086http://openid.net/[openid.net].
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -070087+
James E. Blairca8bc3b2011-12-21 18:12:26 +000088* `OpenID_SSO`
89+
90Supports OpenID from a single provider. There is no registration
91link, and the "Sign In" link sends the user directly to the provider's
92SSO entry point.
93+
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -070094* `HTTP`
95+
Shawn O. Pearce2920ef32009-08-03 08:03:34 -070096Gerrit relies upon data presented in the HTTP request. This includes
Edwin Kempinf1acbb82011-09-15 12:49:42 +020097HTTP basic authentication, or some types of commercial single-sign-on
Shawn O. Pearce2920ef32009-08-03 08:03:34 -070098solutions. With this setting enabled the authentication must
99take place in the web server or servlet container, and not from
100within Gerrit.
101+
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -0700102* `HTTP_LDAP`
103+
104Exactly like `HTTP` (above), but additionally Gerrit pre-populates
105a user's full name and email address based on information obtained
106from the user's account object in LDAP. The user's group membership
107is also pulled from LDAP, making any LDAP groups that a user is a
108member of available as groups in Gerrit.
109+
Sasa Zivkoveabc8972010-10-04 15:47:08 +0200110* `CLIENT_SSL_CERT_LDAP`
111+
112This authentication type is actually kind of SSO. Gerrit will configure
David Pursehouse221d4f62012-06-08 17:38:08 +0900113Jetty's SSL channel to request the client's SSL certificate. For this
Sasa Zivkoveabc8972010-10-04 15:47:08 +0200114authentication to work a Gerrit administrator has to import the root
115certificate of the trust chain used to issue the client's certificate
116into the <review-site>/etc/keystore.
117After the authentication is done Gerrit will obtain basic user
118registration (name and email) from LDAP, and some group memberships.
119Therefore, the "_LDAP" suffix in the name of this authentication type.
120This authentication type can only be used under hosted daemon mode, and
121the httpd.listenUrl must use https:// as the protocol.
Chulho Yangb72ff8f2013-07-04 02:35:53 -0400122Optionally, certificate revocation list file can be used
123at <review-site>/etc/crl.pem. For details, see httpd.sslCrl.
Sasa Zivkoveabc8972010-10-04 15:47:08 +0200124+
Shawn O. Pearcef7e065e2009-09-26 20:01:10 -0700125* `LDAP`
126+
127Gerrit prompts the user to enter a username and a password, which
128it then verifies by performing a simple bind against the configured
129<<ldap.server,ldap.server>>. In this configuration the web server
130is not involved in the user authentication process.
131+
Shawn O. Pearcec892d342010-02-17 17:00:50 -0800132The actual username used in the LDAP simple bind request is the
133account's full DN, which is discovered by first querying the
134directory using either an anonymous request, or the configured
Robin Rosenberga3baed02012-10-14 14:09:32 +0200135<<ldap.username,ldap.username>> identity. Gerrit can also use kerberos if
136<<ldap.authentication,ldap.authentication>> is set to `GSSAPI`.
Shawn O. Pearcec892d342010-02-17 17:00:50 -0800137
138* `LDAP_BIND`
139+
140Gerrit prompts the user to enter a username and a password, which
141it then verifies by performing a simple bind against the configured
142<<ldap.server,ldap.server>>. In this configuration the web server
143is not involved in the user authentication process.
144+
David Pursehouse42f42042013-08-01 14:02:25 +0900145Unlike `LDAP` above, the username used to perform the LDAP simple bind
David Pursehouse1344f5b2013-08-09 17:35:47 +0900146request is the exact string supplied in the dialog by the user.
Robin Rosenberg524a3032012-10-14 14:24:36 +0200147The configured <<ldap.username,ldap.username>> identity is not used to obtain
Shawn O. Pearcec892d342010-02-17 17:00:50 -0800148account information.
149+
Shawn O. Pearce2920ef32009-08-03 08:03:34 -0700150* `DEVELOPMENT_BECOME_ANY_ACCOUNT`
151+
152*DO NOT USE*. Only for use in a development environment.
153+
154When this is the configured authentication method a hyperlink titled
155`Become` appears in the top right corner of the page, taking the
156user to a form where they can enter the username of any existing
157user account, and immediately login as that account, without any
158authentication taking place. This form of authentication is only
159useful for the GWT hosted mode shell, where OpenID authentication
160redirects might be risky to the developer's host computer, and HTTP
161authentication is not possible.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700162
163+
164By default, OpenID.
165
Shawn O. Pearce533cafc2010-05-11 16:05:27 -0700166[[auth.allowedOpenID]]auth.allowedOpenID::
167+
168List of permitted OpenID providers. A user may only authenticate
169with an OpenID that matches this list. Only used if `auth.type`
David Pursehouse42f42042013-08-01 14:02:25 +0900170is set to `OpenID` (the default).
Shawn O. Pearce533cafc2010-05-11 16:05:27 -0700171+
Magnus Bäcke5611832011-02-02 08:57:15 +0100172Patterns may be either a
173link:http://download.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html[standard
174Java regular expression (java.util.regex)] (start with `^` and
Shawn O. Pearce533cafc2010-05-11 16:05:27 -0700175end with `$`) or be a simple prefix (any other string).
176+
177By default, the list contains two values, `http://` and `https://`,
178allowing users to authenticate with any OpenID provider.
179
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700180[[auth.trustedOpenID]]auth.trustedOpenID::
Shawn O. Pearced7c026d2009-08-05 20:11:22 -0700181+
David Pursehouse221d4f62012-06-08 17:38:08 +0900182List of trusted OpenID providers. Only used if `auth.type` is
David Pursehouse42f42042013-08-01 14:02:25 +0900183set to `OpenID` (the default).
Shawn O. Pearced7c026d2009-08-05 20:11:22 -0700184+
185In order for a user to take advantage of permissions beyond those
186granted to the `Anonymous Users` and `Registered Users` groups,
187the user account must only have OpenIDs which match at least one
188pattern from this list.
189+
Magnus Bäcke5611832011-02-02 08:57:15 +0100190Patterns may be either a
191link:http://download.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html[standard
192Java regular expression (java.util.regex)] (start with `^` and
Shawn O. Pearced7c026d2009-08-05 20:11:22 -0700193end with `$`) or be a simple prefix (any other string).
194+
195By default, the list contains two values, `http://` and `https://`,
196allowing Gerrit to trust any OpenID it receives.
197
Mike Goulined2ab0cd2012-12-18 11:20:53 +1100198[[auth.openIdDomain]]auth.openIdDomain::
199+
200List of allowed OpenID email address domains. Only used if
David Pursehouse42f42042013-08-01 14:02:25 +0900201`auth.type` is set to `OPENID` or `OPENID_SSO`.
Mike Goulined2ab0cd2012-12-18 11:20:53 +1100202+
203Domain is case insensitive and must be in the same form as it
204appears in the email address, for example, "example.com".
205+
206By default, any domain is accepted.
207
Shawn O. Pearce89030bc2010-04-24 17:25:29 -0700208[[auth.maxOpenIdSessionAge]]auth.maxOpenIdSessionAge::
209+
210Time in seconds before an OpenID provider must force the user
211to authenticate themselves again before authentication to this
212Gerrit server. Currently this is only a polite request, and users
213coming from providers that don't support the PAPE extension will
214be accepted anyway. In the future it may be enforced, rejecting
215users coming from providers that don't honor the max session age.
216+
217If set to 0, the provider will always force the user to authenticate
218(e.g. supply their password). Values should use common unit suffixes
219to express their setting:
220+
221* s, sec, second, seconds
222* m, min, minute, minutes
223* h, hr, hour, hours
224* d, day, days
225* w, week, weeks (`1 week` is treated as `7 days`)
226* mon, month, months (`1 month` is treated as `30 days`)
227* y, year, years (`1 year` is treated as `365 days`)
228
229+
230Default is -1, permitting infinite time between authentications.
231
Shawn O. Pearce34f38cf2011-06-16 19:18:54 -0700232[[auth.maxRegisterEmailTokenAge]]auth.maxRegisterEmailTokenAge::
233+
234Time in seconds before an email verification token sent to a user in
235order to validate their email address expires.
236+
237* s, sec, second, seconds
238* m, min, minute, minutes
239* h, hr, hour, hours
240* d, day, days
241* w, week, weeks (`1 week` is treated as `7 days`)
242* mon, month, months (`1 month` is treated as `30 days`)
243* y, year, years (`1 year` is treated as `365 days`)
244
245+
Shawn O. Pearced6bd00b2012-01-20 12:40:51 -0800246Default is 12 hours.
Shawn O. Pearce34f38cf2011-06-16 19:18:54 -0700247
James E. Blairca8bc3b2011-12-21 18:12:26 +0000248[[auth.openIdSsoUrl]]auth.openIdSsoUrl::
249+
David Pursehouse42f42042013-08-01 14:02:25 +0900250The SSO entry point URL. Only used if `auth.type` is set to
251`OpenID_SSO`.
James E. Blairca8bc3b2011-12-21 18:12:26 +0000252+
253The "Sign In" link will send users directly to this URL.
254
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700255[[auth.httpHeader]]auth.httpHeader::
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700256+
257HTTP header to trust the username from, or unset to select HTTP basic
David Pursehouse42f42042013-08-01 14:02:25 +0900258or digest authentication. Only used if `auth.type` is set to `HTTP`.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700259
Luca Milanesio384ed6c2013-07-30 09:10:07 +0100260[[auth.httpDisplaynameHeader]]auth.httpDisplaynameHeader::
261+
262HTTP header to retrieve the user's display name from. Only used if `auth.type`
263is set to `HTTP`.
264+
265If set, Gerrit trusts and enforces the user's full name using the HTTP header
266and disables the ability to manually modify the user's full name
267from the contact information page.
268
269[[auth.httpEmailHeader]]auth.httpEmailHeader::
270+
271HTTP header to retrieve the user's e-mail from. Only used if `auth.type`
272is set to `HTTP`.
273+
274If set, Gerrit trusts and enforces the user's e-mail using the HTTP header
275and disables the ability to manually modify or register other e-mails
276from the contact information page.
277
Luca Milanesio5185b042013-07-27 22:03:06 +0100278[[auth.loginUrl]]auth.loginUrl::
279+
280URL to redirect a browser to after the end-user has clicked on the
David Pursehouse42f42042013-08-01 14:02:25 +0900281login link in the upper right corner. Only used if `auth.type` is set
282to `HTTP` or `HTTP_LDAP`.
Luca Milanesio5185b042013-07-27 22:03:06 +0100283Organizations using an enterprise single-sign-on solution may want to
284redirect the browser to the SSO product's sign-in page for completing the
285login process and validate their credentials.
286+
David Pursehouse42f42042013-08-01 14:02:25 +0900287If set, Gerrit allows anonymous access until the end-user performs the login
288and provides a trusted identity through the HTTP header.
Luca Milanesio5185b042013-07-27 22:03:06 +0100289If not set, Gerrit requires the HTTP header with a trusted identity
David Pursehouse42f42042013-08-01 14:02:25 +0900290and returns the error page 'LoginRedirect.html' if such a header is not
291present.
Luca Milanesio5185b042013-07-27 22:03:06 +0100292
293[[auth.loginText]]auth.loginText::
294+
David Pursehouse42f42042013-08-01 14:02:25 +0900295Text displayed in the loginUrl link. Only used if `auth.loginUrl` is set.
Luca Milanesio5185b042013-07-27 22:03:06 +0100296+
David Pursehouse42f42042013-08-01 14:02:25 +0900297If not set, the "Sign In" text is used.
Luca Milanesio5185b042013-07-27 22:03:06 +0100298
Luca Milanesio111e0b72013-08-15 18:56:42 +0100299[[auth.registerPageUrl]]auth.registerPageUrl::
300+
David Pursehouse268744b2013-08-17 15:32:11 +0900301URL of the registration page to use when a new user logs in to Gerrit for
302the first time. Used only when `auth.type` is set to `HTTP`.
Luca Milanesio111e0b72013-08-15 18:56:42 +0100303+
304If not set, the standard Gerrit registration page `/#/register/` is displayed.
305
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700306[[auth.logoutUrl]]auth.logoutUrl::
Shawn O. Pearce12b5d842009-08-15 15:11:10 -0700307+
308URL to redirect a browser to after the end-user has clicked on the
309"Sign Out" link in the upper right corner. Organizations using an
310enterprise single-sign-on solution may want to redirect the browser
311to the SSO product's sign-out page.
312+
313If not set, the redirect returns to the list of all open changes.
314
Shawn O. Pearcec9d26b52009-12-16 08:05:27 -0800315[[auth.registerUrl]]auth.registerUrl::
316+
317Target for the "Register" link in the upper right corner. Used only
David Pursehouse42f42042013-08-01 14:02:25 +0900318when `auth.type` is `LDAP`.
Shawn O. Pearcec9d26b52009-12-16 08:05:27 -0800319+
320If not set, no "Register" link is displayed.
321
Chad Horohoe65897082012-11-10 10:26:25 -0800322[[auth.registerText]]auth.registerText::
323+
324Text for the "Register" link in the upper right corner. Used only
David Pursehouse42f42042013-08-01 14:02:25 +0900325when `auth.type` is `LDAP`.
Chad Horohoe65897082012-11-10 10:26:25 -0800326+
327If not set, defaults to "Register".
328
David Pursehouse3d604492013-01-25 17:41:53 +0900329[[auth.editFullNameUrl]]auth.editFullNameUrl::
330+
331Target for the "Edit" button when the user is allowed to edit their
332full name.
333
334[[auth.httpPasswordUrl]]auth.httpPasswordUrl::
335+
David Pursehouse42f42042013-08-01 14:02:25 +0900336Target for the "Obtain Password" link. Used only when `auth.type` is
David Pursehouse3d604492013-01-25 17:41:53 +0900337`LDAP`, `LDAP_BIND` or `CUSTOM_EXTENSION`.
Shawn Pearcee0cafe42013-08-29 23:28:13 -0700338
339[[auth.switchAccountUrl]]auth.switchAccountUrl::
David Pursehouse3d604492013-01-25 17:41:53 +0900340+
Shawn Pearcee0cafe42013-08-29 23:28:13 -0700341URL to switch user identities and login as a different account than
342the currently active account. This is disabled by default except when
343`auth.type` is `OPENID` and `DEVELOPMENT_BECOME_ANY_ACCOUNT`. If set
344the "Switch Account" link is displayed next to "Sign Out".
345+
346When `auth.type` does not normally enable this URL administrators may
347set this to `login/` or `$canonicalWebUrl/login`, allowing users to
348begin a new web session.
David Pursehouse3d604492013-01-25 17:41:53 +0900349
Piotr Sikora7cec2f82011-02-26 12:57:30 +0000350[[auth.cookiePath]]auth.cookiePath::
351+
352Sets "path" attribute of the authentication cookie.
353+
354If not set, HTTP request's path is used.
355
356[[auth.cookieSecure]]auth.cookieSecure::
357+
358Sets "secure" flag of the authentication cookie. If true, cookies
359will be transmitted only over HTTPS protocol.
360+
361By default, false.
362
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700363[[auth.emailFormat]]auth.emailFormat::
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700364+
365Optional format string to construct user email addresses out of
David Pursehouse42f42042013-08-01 14:02:25 +0900366user login names. Only used if `auth.type` is `HTTP`, `HTTP_LDAP`
Shawn O. Pearcef7e065e2009-09-26 20:01:10 -0700367or `LDAP`.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700368+
Shawn O. Pearce44221bf2011-06-27 10:37:30 -0700369This value can be set to a format string, where `{0}` is replaced
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700370with the login name. E.g. "\{0\}+gerrit@example.com" with a user
371login name of "foo" will produce "foo+gerrit@example.com" during
372the first time user "foo" registers.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -0700373+
Shawn O. Pearcef7e065e2009-09-26 20:01:10 -0700374If the site is using `HTTP_LDAP` or `LDAP`, using this option is
375discouraged. Setting `ldap.accountEmailAddress` and importing the
376email address from the LDAP directory is generally preferred.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700377
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700378[[auth.contributorAgreements]]auth.contributorAgreements::
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700379+
380Controls whether or not the contributor agreement features are
381enabled for the Gerrit site. If enabled a user must complete a
382contributor agreement before they can upload changes.
383+
Marc Petit-Hugueninbbb85492012-12-03 11:11:00 -0800384If enabled, the admin must also add one or more
385link:config-cla.html[contributor-agreement sections]
386in project.config and create agreement files under
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700387`'$site_path'/static`, so users can actually complete one or
Grzegorz Kossakowski28e4e1b2009-09-23 11:33:34 -0700388more agreements.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700389+
390By default this is false (no agreements are used).
Fredrik Luthandera3cf3542012-07-04 16:55:35 -0700391+
392To enable the actual usage of contributor agreement the project
393specific config option in the `project.config` must be set:
394link:config-project-config.html[receive.requireContributorAgreement].
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700395
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700396auth.allowGoogleAccountUpgrade::
397+
Shawn O. Pearce48eea072009-08-31 10:53:12 -0700398Allows Google Account users to automatically update their Gerrit
399account when/if their Google Account OpenID identity token changes.
400Identity tokens can change if the server changes hostnames, or
401for other reasons known only to Google. The upgrade path works
402by matching users by email address if the identity is not present,
403and then changing the identity.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700404+
Shawn O. Pearce48eea072009-08-31 10:53:12 -0700405This setting also permits old Gerrit 1.x users to seamlessly upgrade
406from Google Accounts on Google App Engine to OpenID authentication.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700407+
Shawn O. Pearce48eea072009-08-31 10:53:12 -0700408Having this enabled incurs an extra database query when Google
Shawn O. Pearcee31d02c2009-12-08 12:21:37 -0800409Account users register with the Gerrit server.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700410+
411By default, unset/false.
412
Christian Halstricka3d88a52011-08-31 09:21:41 +0200413[[auth.trustContainerAuth]]auth.trustContainerAuth::
414+
415If true then it is the responsibility of the container hosting
416Gerrit to authenticate users. In this case Gerrit will blindly trust
417the container.
418+
419This parameter only affects git over http traffic. If set to false
420then Gerrit will do the authentication (using DIGEST authentication).
421+
422By default this is set to false.
423
Luca Milanesio42058842012-01-05 21:25:38 +0000424[[auth.gitBasicAuth]]auth.gitBasicAuth::
425+
426If true then Git over HTTP and HTTP/S traffic is authenticated using
427standard BasicAuth and credentials validated using the same auth
428method configured for Gerrit Web UI.
429+
430This parameter only affects git over http traffic. If set to false
431then Gerrit will authenticate through DIGEST authentication and
432the randomly generated HTTP password in Gerrit DB.
433+
434By default this is set to false.
435
Edwin Kempin4b9e5e72011-09-22 15:06:14 +0200436[[auth.userNameToLowerCase]]auth.userNameToLowerCase::
437+
438If set the username that is received to authenticate a git operation
439is converted to lower case for looking up the user account in Gerrit.
440+
441By setting this parameter a case insensitive authentication for the
442git operations can be achieved, if it is ensured that the usernames in
443Gerrit (scheme `username`) are stored in lower case (e.g. if the
444parameter link:#ldap.accountSshUserName[ldap.accountSshUserName] is
445set to `${sAMAccountName.toLowerCase}`). It is important that for all
446existing accounts this username is already in lower case. It is not
447possible to convert the usernames of the existing accounts to lower
448case because this would break the access to existing per-user
449branches.
450+
451This parameter only affects git over http and git over SSH traffic.
452+
453By default this is set to false.
454
Shawn Pearcea931fe12013-06-11 12:29:17 -0700455[[auth.enableRunAs]]auth.enableRunAs::
456+
457If true HTTP REST APIs will accept the `X-Gerrit-RunAs` HTTP request
458header from any users granted the link:access-control.html#capability_runAs[Run As]
459capability. The header and capability permit the authenticated user
460to impersonate another account.
461+
462If false the feature is disabled and cannot be re-enabled without
463editing gerrit.config and restarting the server.
464+
465Default is true.
466
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -0700467[[cache]]Section cache
468~~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700469
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700470[[cache.directory]]cache.directory::
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700471+
472Path to a local directory where Gerrit can write cached entities for
Shawn O. Pearce4b212282009-08-05 19:45:56 -0700473future lookup. This local disk cache is used to retain potentially
474expensive to compute information across restarts. If the location
475does not exist, Gerrit will try to create it.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700476+
Shawn O. Pearce4b212282009-08-05 19:45:56 -0700477If not absolute, the path is resolved relative to `$site_path`.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700478+
Shawn O. Pearce4b212282009-08-05 19:45:56 -0700479Default is unset, no disk cache.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700480
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700481[[cache.name.maxAge]]cache.<name>.maxAge::
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700482+
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700483Maximum age to keep an entry in the cache. Entries are removed from
484the cache and refreshed from source data every maxAge interval.
Shawn O. Pearced9c403e2009-08-19 08:35:41 -0700485Values should use common unit suffixes to express their setting:
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700486+
Shawn O. Pearced9c403e2009-08-19 08:35:41 -0700487* s, sec, second, seconds
488* m, min, minute, minutes
489* h, hr, hour, hours
490* d, day, days
491* w, week, weeks (`1 week` is treated as `7 days`)
492* mon, month, months (`1 month` is treated as `30 days`)
493* y, year, years (`1 year` is treated as `365 days`)
494
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -0700495+
Edwin Kempinabcd5042013-03-12 16:04:37 +0100496If a unit suffix is not specified, `seconds` is assumed. If 0 is
Shawn O. Pearce3fdbf392009-09-04 18:08:26 -0700497supplied, the maximum age is infinite and items are never purged
498except when the cache is full.
Shawn O. Pearced9c403e2009-08-19 08:35:41 -0700499+
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700500Default is `0`, meaning store forever with no expire, except:
Shawn O. Pearced9c403e2009-08-19 08:35:41 -0700501+
Shawn O. Pearce05687e92011-04-04 17:29:03 -0400502* `"adv_bases"`: default is `10 minutes`
Shawn O. Pearced9c403e2009-08-19 08:35:41 -0700503* `"ldap_groups"`: default is `1 hour`
Shawn O. Pearced9c403e2009-08-19 08:35:41 -0700504* `"web_sessions"`: default is `12 hours`
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700505
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700506[[cache.name.memoryLimit]]cache.<name>.memoryLimit::
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700507+
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700508The total cost of entries to retain in memory. The cost computation
509varies by the cache. For most caches where the in-memory size of each
510entry is relatively the same, memoryLimit is currently defined to be
511the number of entries held by the cache (each entry costs 1).
512+
513For caches where the size of an entry can vary significantly between
514individual entries (notably `"diff"`, `"diff_intraline"`), memoryLimit
515is an approximation of the total number of bytes stored by the cache.
516Larger entries that represent bigger patch sets or longer source files
517will consume a bigger portion of the memoryLimit. For these caches the
518memoryLimit should be set to roughly the amount of RAM (in bytes) the
519administrator can dedicate to the cache.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700520+
Shawn O. Pearceefaf9792009-09-02 18:12:52 -0700521Default is 1024 for most caches, except:
522+
Shawn O. Pearce05687e92011-04-04 17:29:03 -0400523* `"adv_bases"`: default is `4096`
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700524* `"diff"`: default is `10m` (10 MiB of memory)
525* `"diff_intraline"`: default is `10m` (10 MiB of memory)
526* `"plugin_resources"`: default is 2m (2 MiB of memory)
527
528+
529If set to 0 the cache is disabled. Entries are removed immediately
530after being stored by the cache. This is primarily useful for testing.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700531
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700532[[cache.name.diskLimit]]cache.<name>.diskLimit::
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700533+
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700534Total size in bytes of the keys and values stored on disk. Caches that
535have grown bigger than this size are scanned daily at 1 AM local
536server time to trim the cache. Entries are removed in least recently
537accessed order until the cache fits within this limit. Caches may
538grow larger than this during the day, as the size check is only
539performed once every 24 hours.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700540+
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700541Default is 128 MiB per cache.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700542+
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700543If 0, disk storage for the cache is disabled.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700544
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -0700545[[cache_names]]Standard Caches
Shawn O. Pearce4016a932009-05-28 15:12:40 -0700546^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700547
Shawn O. Pearce4a452712009-05-28 20:12:33 -0700548cache `"accounts"`::
549+
Shawn O. Pearce4dba9882009-08-05 19:55:15 -0700550Cache entries contain important details of an active user, including
551their display name, preferences, known email addresses, and group
552memberships. Entry information is obtained from the following
553database tables:
554+
555* `accounts`
556+
557* `account_group_members`
558+
559* `account_external_ids`
560
561+
562If direct updates are made to any of these database tables, this
563cache should be flushed.
564
565cache `"accounts_byemail"`::
566+
567Caches account identities keyed by email address, which is scanned
568from the `account_external_ids` database table. If updates are
569made to this table, this cache should be flushed.
Shawn O. Pearce4a452712009-05-28 20:12:33 -0700570
Shawn O. Pearce05687e92011-04-04 17:29:03 -0400571cache `"adv_bases"`::
572+
573Used only for push over smart HTTP when branch level access controls
David Pursehouse92463562013-06-24 10:16:28 +0900574are enabled. The cache entry contains all commits that are available
Shawn O. Pearce05687e92011-04-04 17:29:03 -0400575for the client to use as potential delta bases. Push over smart HTTP
576requires two HTTP requests, and this cache tries to carry state from
577the first request into the second to ensure it can complete.
578
Gustaf Lundh47ce4e32012-05-21 11:18:42 +0200579cache `"changes"`::
580+
Gustaf Lundh3353c362013-04-24 17:25:39 +0200581The size of `memoryLimit` determines the number of projects for which
582all changes will be cached. If the cache is set to 1024, this means all
583changes for up to 1024 projects can be held in the cache.
Gustaf Lundh53493772012-11-18 18:41:15 -0800584+
Gustaf Lundh3353c362013-04-24 17:25:39 +0200585Default value is 0 (disabled). It is disabled by default due to the fact
586that change updates are not communicated between Gerrit servers. Hence
587this cache should be disabled in an multi-master/multi-slave setup.
Gustaf Lundh53493772012-11-18 18:41:15 -0800588+
589The cache should be flushed whenever the database changes table is modified
Gustaf Lundh47ce4e32012-05-21 11:18:42 +0200590outside of gerrit.
591
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700592cache `"diff"`::
593+
Shawn O. Pearceefaf9792009-09-02 18:12:52 -0700594Each item caches the differences between two commits, at both the
595directory and file levels. Gerrit uses this cache to accelerate
596the display of affected file names, as well as file contents.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700597+
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700598Entries in this cache are relatively large, so memoryLimit is an
599estimate in bytes of memory used. Administrators should try to target
600cache.diff.memoryLimit to fit all changes users will view in a 1 or 2
601day span.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700602
Shawn O. Pearcef0cfe532011-04-11 23:40:06 -0400603cache `"diff_intraline"`::
604+
605Each item caches the intraline difference of one file, when compared
606between two commits. Gerrit uses this cache to accelerate display of
607intraline differences when viewing a file.
608+
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700609Entries in this cache are relatively large, so memoryLimit is an
610estimate in bytes of memory used. Administrators should try to target
611cache.diff.memoryLimit to fit all files users will view in a 1 or 2
612day span.
Shawn O. Pearcef0cfe532011-04-11 23:40:06 -0400613
Shawn O. Pearce2d65d292011-06-24 08:12:02 -0700614cache `"git_tags"`::
615+
616If branch or reference level READ access controls are used, this
617cache tracks which tags are reachable from the branch tips of a
618repository. Gerrit uses this information to determine the set
619of tags that a client may access, derived from which tags are
620part of the history of a visible branch.
621+
622The cache is persisted to disk across server restarts as it can
623be expensive to compute (60 or more seconds for a large history
624like the Linux kernel repository).
625
Shawn O. Pearce4a452712009-05-28 20:12:33 -0700626cache `"groups"`::
627+
Shawn O. Pearce4dba9882009-08-05 19:55:15 -0700628Caches the basic group information from the `account_groups` table,
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -0700629including the group owner, name, and description.
630+
631Gerrit group membership obtained from the `account_group_members`
632table is cached under the `"accounts"` cache, above. External group
633membership obtained from LDAP is cached under `"ldap_groups"`.
634
Matt Fischer620255a2011-03-22 14:28:23 -0500635cache `"groups_byinclude"`::
636+
637Caches group inclusions in other groups. If direct updates are made
638to the `account_group_includes` table, this cache should be flushed.
639
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -0700640cache `"ldap_groups"`::
641+
642Caches the LDAP groups that a user belongs to, if LDAP has been
643configured on this server. This cache should be configured with a
644low maxAge setting, to ensure LDAP modifications are picked up in
645a timely fashion.
Shawn O. Pearce4a452712009-05-28 20:12:33 -0700646
Gustaf Lundh0919a492012-10-19 15:29:23 +0200647cache `"ldap_groups_byinclude"`::
648+
649Caches the hierarchical structure of LDAP groups.
650
Shawn O. Pearce6d26f4a2009-08-24 15:43:52 -0700651cache `"ldap_usernames"`::
652+
653Caches a mapping of LDAP username to Gerrit account identity. The
654cache automatically updates when a user first creates their account
655within Gerrit, so the cache expire time is largely irrelevant.
656
Shawn O. Pearce0c1abdb2011-06-24 11:01:25 -0700657cache `"permission_sort"`::
658+
David Pursehouse221d4f62012-06-08 17:38:08 +0900659Caches the order in which access control sections must be applied to a
Shawn O. Pearce0c1abdb2011-06-24 11:01:25 -0700660reference. Sorting the sections can be expensive when regular
661expressions are used, so this cache remembers the ordering for
662each branch.
663
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700664cache `"plugin_resources"`::
665+
666Caches formatted plugin resources, such as plugin documentation that
667has been converted from Markdown to HTML. The memoryLimit refers to
668the bytes of memory dedicated to storing the documentation.
669
Shawn O. Pearce4a452712009-05-28 20:12:33 -0700670cache `"projects"`::
671+
672Caches the project description records, from the `projects` table
673in the database. If a project record is updated or deleted, this
674cache should be flushed. Newly inserted projects do not require
675a cache flush, as they will be read upon first reference.
676
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700677cache `"sshkeys"`::
678+
679Caches unpacked versions of user SSH keys, so the internal SSH daemon
680can match against them during authentication. The unit of storage
681is per-user, so 1024 items translates to 1024 unique user accounts.
682As each individual user account may configure multiple SSH keys,
683the total number of keys may be larger than the item count.
Shawn O. Pearce4a452712009-05-28 20:12:33 -0700684+
685This cache is based off the `account_ssh_keys` table and the
686`accounts.ssh_user_name` column in the database. If either is
687modified directly, this cache should be flushed.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700688
Shawn O. Pearceb09322b2009-08-15 17:49:00 -0700689cache `"web_sessions"`::
690+
691Tracks the live user sessions coming in over HTTP. Flushing this
692cache would cause all users to be signed out immediately, forcing
Shawn O. Pearce727d80f2009-08-17 07:57:54 -0700693them to sign-in again. To avoid breaking active users, this cache
694is not flushed automatically by `gerrit flush-caches --all`, but
695instead must be explicitly requested.
696+
697If no disk cache is configured (or `cache.web_sessions.diskLimit`
698is set to 0) a server restart will force all users to sign-out,
699and need to sign-in again after the restart, as the cache was
700unable to persist the session information. Enabling a disk cache
701is strongly recommended.
702+
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700703Session storage is relatively inexpensive. The average entry in
704this cache is approximately 346 bytes.
Shawn O. Pearceb09322b2009-08-15 17:49:00 -0700705
Shawn O. Pearce4016a932009-05-28 15:12:40 -0700706See also link:cmd-flush-caches.html[gerrit flush-caches].
707
Shawn O. Pearce29de4362010-03-03 17:51:26 -0800708[[cache_options]]Cache Options
709^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
710
Shawn O. Pearce617aa392010-11-15 14:03:28 -0800711cache.diff_intraline.maxIdleWorkers::
712+
713Number of idle worker threads to maintain for the intraline difference
714computations. There is no upper bound on how many concurrent requests
715can occur at once, if additional threads are started to handle a peak
David Pursehouse221d4f62012-06-08 17:38:08 +0900716load, only this many will remain idle afterwards.
Shawn O. Pearce617aa392010-11-15 14:03:28 -0800717+
718Default is 1.5x number of available CPUs.
719
720cache.diff_intraline.timeout::
721+
722Maximum number of milliseconds to wait for intraline difference data
723before giving up and disabling it for a particular file pair. This is
724a work around for an infinite loop bug in the intraline difference
David Pursehousee8c1fb92013-04-17 17:18:43 +0900725implementation.
726+
727If computation takes longer than the timeout, the worker thread is
728terminated, an error message is shown, and no intraline difference is
729displayed for the file pair.
Shawn O. Pearce617aa392010-11-15 14:03:28 -0800730+
731Values should use common unit suffixes to express their setting:
732+
733* ms, milliseconds
734* s, sec, second, seconds
735* m, min, minute, minutes
736* h, hr, hour, hours
737
738+
739If a unit suffix is not specified, `milliseconds` is assumed.
740+
741Default is 5 seconds.
742
Shawn O. Pearce307dd4e2010-11-15 12:12:20 -0800743cache.diff_intraline.enabled::
Shawn O. Pearce29de4362010-03-03 17:51:26 -0800744+
745Boolean to enable or disable the computation of intraline differences
Shawn O. Pearce307dd4e2010-11-15 12:12:20 -0800746when populating a diff cache entry. This flag is provided primarily
747as a backdoor to disable the intraline difference feature if
David Pursehouse92463562013-06-24 10:16:28 +0900748necessary. To maintain backwards compatibility with prior versions,
Shawn O. Pearce307dd4e2010-11-15 12:12:20 -0800749this setting will fallback to `cache.diff.intraline` if not set in the
750configuration.
Shawn O. Pearce29de4362010-03-03 17:51:26 -0800751+
752Default is true, enabled.
753
Shawn O. Pearceb8e4e352011-05-19 18:09:01 -0700754cache.projects.checkFrequency::
755+
756How often project configuration should be checked for update from Git.
757Gerrit Code Review caches project access rules and configuration in
758memory, checking the refs/meta/config branch every checkFrequency
759minutes to see if a new revision should be loaded and used for future
760access. Values can be specified using standard time unit abbreviations
761('ms', 'sec', 'min', etc.).
762+
763If set to 0, checks occur every time, which may slow down operations.
Shawn Pearcec825ef12013-02-20 11:29:46 -0800764If set to 'disabled' or 'off', no check will ever be done.
Shawn O. Pearceb8e4e352011-05-19 18:09:01 -0700765Administrators may force the cache to flush with
766link:cmd-flush-caches.html[gerrit flush-caches].
767+
768Default is 5 minutes.
769
Shawn Pearceb9ebb662013-07-19 19:45:25 -0700770[[change]]Section change
771~~~~~~~~~~~~~~~~~~~~~~~~
772
773[[change.updateDelay]]change.updateDelay::
774+
775How often in seconds the web interface should poll for updates to the
776currently open change. The poller relies on the client's browser
777cache to use If-Modified-Since and respect `304 Not Modified` HTTP
778reponses. This allows for fast polls, often under 8 milliseconds.
779+
780With a configured 30 second delay a server with 4900 active users will
781typically need to dedicate 1 CPU to the update check. 4900 users
782divided by an average delay of 30 seconds is 163 requests arriving per
783second. If requests are served at ~6 ms response time, 1 CPU is
784necessary to keep up with the update request traffic. On a smaller
785user base of 500 active users, the default 30 second delay is only 17
786requests per second and requires ~10% CPU.
787+
788If 0 the update polling is disabled.
789+
790Default is 30 seconds.
791
carloseduardo.baldacin14246de2011-07-14 17:52:22 -0300792[[changeMerge]]Section changeMerge
Remy Bohmer203eea32012-02-19 21:21:36 +0100793~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
carloseduardo.baldacin14246de2011-07-14 17:52:22 -0300794
Dave Borowitz204669c22012-10-11 11:06:08 -0700795changeMerge.checkFrequency::
796+
797How often the database should be rescanned for changes that have been
798submitted but not merged due to transient errors. Values can be
799specified using standard time unit abbreviations ('ms', 'sec', 'min',
800etc.). Set to 0 to disable periodic rescanning, only scanning once on
801master node startup.
802+
803Default is 300 seconds (5 minutes).
804
805changeMerge.test::
806+
carloseduardo.baldacin14246de2011-07-14 17:52:22 -0300807Controls whether or not the mergeability test of changes is
808enabled. If enabled, when the change page is loaded, the test is
809triggered. The submit button will be enabled or disabled according to
810the result.
Dave Borowitz204669c22012-10-11 11:06:08 -0700811+
carloseduardo.baldacin14246de2011-07-14 17:52:22 -0300812By default this is false (test is not enabled).
813
Edwin Kempinf8be8fd2013-11-18 14:12:20 +0100814[[changeMerge.threadPoolSize]]changeMerge.threadPoolSize::
815+
816Maximum size of the thread pool in which the mergeability flag of open
817changes is updated.
818+
819Default is 1.
820
Brad Larson991a31b2009-11-03 14:30:26 -0600821[[commentlink]]Section commentlink
Remy Bohmer203eea32012-02-19 21:21:36 +0100822~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Brad Larson991a31b2009-11-03 14:30:26 -0600823Comment links are find/replace strings applied to change descriptions,
Chris Harris63c7cdd2012-11-23 12:17:36 -0500824patch comments, in-line code comments and approval category value descriptions
825to turn set strings into hyperlinks. One common use is for linking to
826bug-tracking systems.
Brad Larson991a31b2009-11-03 14:30:26 -0600827
828In the following example configuration the 'changeid' comment link
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800829will match typical Gerrit Change-Id values and create a hyperlink
830to changes which reference it. The second configuration 'bugzilla'
831will hyperlink terms such as 'bug 42' to an external bug tracker,
832supplying the argument record number '42' for display. The third
David Pursehouse221d4f62012-06-08 17:38:08 +0900833configuration 'tracker' uses raw HTML to more precisely control
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800834how the replacement is displayed to the user.
Brad Larson991a31b2009-11-03 14:30:26 -0600835
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800836----
837[commentlink "changeid"]
838 match = (I[0-9a-f]{8,40})
839 link = "#q,$1,n,z"
Brad Larson991a31b2009-11-03 14:30:26 -0600840
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800841[commentlink "bugzilla"]
Shawn O. Pearcec99630a2010-02-21 19:11:56 -0800842 match = "(bug\\s+#?)(\\d+)"
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800843 link = http://bugs.example.com/show_bug.cgi?id=$2
Brad Larson991a31b2009-11-03 14:30:26 -0600844
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800845[commentlink "tracker"]
846 match = ([Bb]ug:\\s+)(\\d+)
847 html = $1<a href=\"http://trak.example.com/$2\">$2</a>
848----
849
Dave Borowitz13b38002013-04-08 12:03:29 -0700850Comment links can also be specified in `project.config` and sections in
851children override those in parents. The only restriction is that to
852avoid injecting arbitrary user-supplied HTML in the page, comment links
853defined in `project.config` may only supply `link`, not `html`.
854
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800855[[commentlink.name.match]]commentlink.<name>.match::
Brad Larson991a31b2009-11-03 14:30:26 -0600856+
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800857A JavaScript regular expression to match positions to be replaced
858with a hyperlink. Subexpressions of the matched string can be
859stored using groups and accessed with `$'n'` syntax, where 'n'
860is the group number, starting from 1.
Brad Larson991a31b2009-11-03 14:30:26 -0600861+
Shawn O. Pearcec99630a2010-02-21 19:11:56 -0800862The configuration file parser eats one level of backslashes, so the
863character class `\s` requires `\\s` in the configuration file. The
864parser also terminates the line at the first `#`, so a match
865expression containing # must be wrapped in double quotes.
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800866+
Shawn O. Pearce665beaa2010-02-21 22:41:03 -0800867To match case insensitive strings, a character class with both the
868upper and lower case character for each position must be used. For
869example, to match the string `bug` in a case insensitive way the match
870pattern `[bB][uU][gG]` needs to be used.
871+
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800872A common pattern to match is `bug\\s+(\\d+)`.
Brad Larson991a31b2009-11-03 14:30:26 -0600873
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800874[[commentlink.name.link]]commentlink.<name>.link::
Brad Larson991a31b2009-11-03 14:30:26 -0600875+
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800876The URL to direct the user to whenever the regular expression is
877matched. Groups in the match expression may be accessed as `$'n'`.
878+
879The link property is used only when the html property is not present.
880
881[[commentlink.name.html]]commentlink.<name>.html::
882+
883HTML to replace the entire matched string with. If present,
884this property overrides the link property above. Groups in the
885match expression may be accessed as `$'n'`.
886+
887The configuration file eats double quotes, so escaping them as
888`\"` is necessary to protect them from the parser.
Brad Larson991a31b2009-11-03 14:30:26 -0600889
Dave Borowitz82d79c02013-04-08 15:45:12 -0700890[[commentlink.name.enabled]]commentlink.<name>.enabled::
891+
892Whether the comment link is enabled. A child project may override a
893section in a parent or the site-wide config that is disabled by
894specifying `enabled = true`.
895+
896Disabling sections in `gerrit.config` can be used by site administrators
897to create a library of comment links with `html` set that are not
898user-supplied and thus can be verified to be XSS-free, but are only
899enabled for a subset of projects.
900+
901Note that the names and contents of disabled sections are visible even
902to anonymous users via the
903link:rest-api-projects.html#get-config[REST API].
904
Brad Larson991a31b2009-11-03 14:30:26 -0600905
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -0700906[[contactstore]]Section contactstore
907~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700908
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700909[[contactstore.url]]contactstore.url::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700910+
911URL of the web based contact store Gerrit will send any offline
912contact information to when it collects the data from users as part
913of a contributor agreement.
914+
915See link:config-contact.html[Contact Information].
916
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700917[[contactstore.appsec]]contactstore.appsec::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700918+
919Shared secret of the web based contact store.
920
Shawn O. Pearcee24c71fb2009-12-07 20:32:40 -0800921
922[[container]]Section container
923~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
924
925These settings are applied only if Gerrit is started as the container
926process through Gerrit's 'gerrit.sh' rc.d compatible wrapper script.
927
928[[container.heapLimit]]container.heapLimit::
929+
930Maximum heap size of the Java process running Gerrit, in bytes.
931This property is translated into the '-Xmx' flag for the JVM.
932+
933Default is platform and JVM specific.
934+
935Common unit suffixes of 'k', 'm', or 'g' are supported.
936
937[[container.javaHome]]container.javaHome::
938+
939Path of the JRE/JDK installation to run Gerrit with. If not set, the
940Gerrit startup script will attempt to search your system and guess
941a suitable JRE. Overrides the environment variable 'JAVA_HOME'.
942
943[[container.javaOptions]]container.javaOptions::
944+
945Additional options to pass along to the Java runtime. If multiple
946values are configured, they are passed in order on the command line,
947separated by spaces. These options are appended onto 'JAVA_OPTIONS'.
948
David Ostrovskyc772bd82013-10-03 10:37:51 +0200949For example, it is possible to overwrite Gerrit's default log4j
950configuration:
951
952----
953 javaOptions = -Dlog4j.configuration=file:///home/gerrit/site/etc/log4j.properties
954----
955
Fredrik Luthanderb8f7d6d2010-05-18 21:11:22 +0200956[[container.slave]]container.slave::
957+
958Used on Gerrit slave installations. If set to true the Gerrit JVM is
959called with the '--slave' switch, enabling slave mode. If no value is
960set (or any other value), gerrit defaults to master mode.
961
Shawn O. Pearcee24c71fb2009-12-07 20:32:40 -0800962[[container.user]]container.user::
963+
964Login name (or UID) of the operating system user the Gerrit JVM
965will execute as. If not set, defaults to the user who launched
966the 'gerrit.sh' wrapper script.
967
968[[container.war]]container.war::
969+
970Path of the JAR file to start daemon execution with. This should
971be the path of the local 'gerrit.war' archive. Overrides the
972environment variable 'GERRIT_WAR'.
973+
974If not set, defaults to '$site_path/bin/gerrit.war', or to
975'$HOME/gerrit.war'.
976
977
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -0700978[[core]]Section core
979~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700980
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700981[[core.packedGitWindowSize]]core.packedGitWindowSize::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700982+
983Number of bytes of a pack file to load into memory in a single
984read operation. This is the "page size" of the JGit buffer cache,
985used for all pack access operations. All disk IO occurs as single
986window reads. Setting this too large may cause the process to load
987more data than is required; setting this too small may increase
988the frequency of `read()` system calls.
989+
990Default on JGit is 8 KiB on all platforms.
991+
992Common unit suffixes of 'k', 'm', or 'g' are supported.
993
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700994[[core.packedGitLimit]]core.packedGitLimit::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700995+
996Maximum number of bytes to load and cache in memory from pack files.
997If JGit needs to access more than this many bytes it will unload less
998frequently used windows to reclaim memory space within the process.
999As this buffer must be shared with the rest of the JVM heap, it
1000should be a fraction of the total memory available.
1001+
1002Default on JGit is 10 MiB on all platforms.
1003+
1004Common unit suffixes of 'k', 'm', or 'g' are supported.
1005
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001006[[core.deltaBaseCaseLimit]]core.deltaBaseCacheLimit::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -07001007+
1008Maximum number of bytes to reserve for caching base objects
1009that multiple deltafied objects reference. By storing the entire
1010decompressed base object in a cache Git is able to avoid unpacking
1011and decompressing frequently used base objects multiple times.
1012+
1013Default on JGit is 10 MiB on all platforms. You probably do not
1014need to adjust this value.
1015+
1016Common unit suffixes of 'k', 'm', or 'g' are supported.
1017
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001018[[core.packedGitOpenFiles]]core.packedGitOpenFiles::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -07001019+
1020Maximum number of pack files to have open at once. A pack file
1021must be opened in order for any of its data to be available in
1022a cached window.
1023+
1024If you increase this to a larger setting you may need to also adjust
1025the ulimit on file descriptors for the host JVM, as Gerrit needs
1026additional file descriptors available for network sockets and other
1027repository data manipulation.
1028+
1029Default on JGit is 128 file descriptors on all platforms.
1030
Shawn O. Pearce329fe792010-09-03 15:44:23 -07001031[[core.streamFileThreshold]]core.streamFileThreshold::
1032+
1033Largest object size, in bytes, that JGit will allocate as a
1034contiguous byte array. Any file revision larger than this threshold
1035will have to be streamed, typically requiring the use of temporary
David Pursehouse92463562013-06-24 10:16:28 +09001036files under '$GIT_DIR/objects' to implement pseudo-random access
Shawn O. Pearce329fe792010-09-03 15:44:23 -07001037during delta decompression.
1038+
1039Servers with very high traffic should set this to be larger than
1040the size of their common big files. For example a server managing
1041the Android platform typically has to deal with ~10-12 MiB XML
1042files, so `15 m` would be a reasonable setting in that environment.
1043Setting this too high may cause the JVM to run out of heap space
1044when handling very big binary files, such as device firmware or
1045CD-ROM ISO images.
1046+
Shawn O. Pearcee3febd92010-10-13 21:17:53 -07001047Default is 50 MiB on all platforms. Prior to Gerrit 2.1.6,
Shawn O. Pearce329fe792010-09-03 15:44:23 -07001048this value was effectively 2047 MiB.
1049+
1050Common unit suffixes of 'k', 'm', or 'g' are supported.
1051
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001052[[core.packedGitMmap]]core.packedGitMmap::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -07001053+
1054When true, JGit will use `mmap()` rather than `malloc()+read()`
1055to load data from pack files. The use of mmap can be problematic
1056on some JVMs as the garbage collector must deduce that a memory
1057mapped segment is no longer in use before a call to `munmap()`
1058can be made by the JVM native code.
1059+
1060In server applications (such as Gerrit) that need to access many
David Pursehouse92463562013-06-24 10:16:28 +09001061pack files, setting this to true risks artificially running out
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -07001062of virtual address space, as the garbage collector cannot reclaim
1063unused mapped spaces fast enough.
1064+
1065Default on JGit is false. Although potentially slower, it yields
1066much more predictable behavior.
1067
Sasa Zivkovf69aeb12012-06-11 14:05:14 +02001068[[core.asyncLoggingBufferSize]]core.asyncLoggingBufferSize::
1069+
1070Size of the buffer to store logging events for asynchronous logging.
1071Putting a larger value can protect threads from stalling when the
1072AsyncAppender threads are not fast enough to consume the logging events
1073from the buffer. It also protects from loosing log entries in this case.
1074+
1075Default is 64 entries.
1076
Dave Borowitz1bec65a2013-03-13 10:59:01 -07001077[[core.useRecursiveMerge]]core.useRecursiveMerge::
1078+
1079Use JGit's new, experimental recursive merger for three-way merges.
1080This only affects projects configured to automatically resolve
1081conflicts.
1082+
1083Default is false, but in a future release may default to true.
1084
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001085[[database]]Section database
1086~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1087
1088The database section configures where Gerrit stores its metadata
1089records about user accounts and change reviews.
1090
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001091----
1092[database]
Shawn O. Pearce1be39062009-12-19 14:11:52 -08001093 type = POSTGRESQL
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001094 hostname = localhost
1095 database = reviewdb
1096 username = gerrit2
1097 password = s3kr3t
1098----
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001099
1100[[database.type]]database.type::
1101+
1102Type of database server to connect to. If set this value will be
1103used to automatically create correct database.driver and database.url
1104values to open the connection.
1105+
Shawn O. Pearce1be39062009-12-19 14:11:52 -08001106* `POSTGRESQL`
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001107+
1108Connect to a PostgreSQL database server.
1109+
1110* `H2`
1111+
Shawn O. Pearce1be39062009-12-19 14:11:52 -08001112Connect to a local embedded H2 database.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001113+
Shawn O. Pearce1be39062009-12-19 14:11:52 -08001114* `MYSQL`
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001115+
1116Connect to a MySQL database server.
Shawn O. Pearce1be39062009-12-19 14:11:52 -08001117+
1118* `JDBC`
1119+
1120Connect using a JDBC driver class name and URL.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001121
1122+
1123If not specified, database.driver and database.url are used as-is,
1124and if they are also not specified, defaults to H2.
1125
1126[[database.hostname]]database.hostname::
1127+
1128Hostname of the database server. Defaults to 'localhost'.
1129
1130[[database.port]]database.port::
1131+
1132Port number of the database server. Defaults to the default port
1133of the server named by database.type.
1134
1135[[database.database]]database.database::
1136+
Shawn O. Pearce1be39062009-12-19 14:11:52 -08001137For POSTGRESQL or MYSQL, the name of the database on the server.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001138+
1139For H2, this is the path to the database, and if not absolute is
Shawn O. Pearce1be39062009-12-19 14:11:52 -08001140relative to `'$site_path'`.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001141
1142[[database.username]]database.username::
1143+
1144Username to connect to the database server as.
1145
1146[[database.password]]database.password::
1147+
1148Password to authenticate to the database server with.
1149
1150[[database.driver]]database.driver::
1151+
Shawn O. Pearce1be39062009-12-19 14:11:52 -08001152Name of the JDBC driver class to connect to the database with.
1153Setting this usually isn't necessary as it can be derived from
1154database.type or database.url for any supported database.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001155
1156[[database.url]]database.url::
1157+
Shawn O. Pearce1be39062009-12-19 14:11:52 -08001158'jdbc:' URL for the database. Setting this variable usually
1159isn't necessary as it can be constructed from the all of the
1160above properties.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001161
Christian Aistleitner851072a2013-05-05 15:04:09 +02001162[[database.connectionPool]]database.connectionPool::
1163+
1164If true, use connection pooling for database connections. Otherwise, a
1165new database connection is opened for each request.
1166+
1167Default is false for MySQL, and true for other database backends.
1168
Shawn O. Pearce07f35177d2010-02-23 09:47:10 -08001169[[database.poolLimit]]database.poolLimit::
1170+
1171Maximum number of open database connections. If the server needs
1172more than this number, request processing threads will wait up
1173to <<database.poolMaxWait, poolMaxWait>> seconds for a
1174connection to be released before they abort with an exception.
1175This limit must be several units higher than the total number of
1176httpd and sshd threads as some request processing code paths may
1177need multiple connections.
1178+
1179Default is 8.
Christian Aistleitner851072a2013-05-05 15:04:09 +02001180+
1181This setting only applies if
1182<<database.connectionPool,database.connectionPool>> is true.
Shawn O. Pearce07f35177d2010-02-23 09:47:10 -08001183
Shawn O. Pearcef458bf62010-02-25 09:03:03 -08001184[[database.poolMinIdle]]database.poolMinIdle::
Shawn O. Pearce07f35177d2010-02-23 09:47:10 -08001185+
1186Minimum number of connections to keep idle in the pool.
1187Default is 4.
Christian Aistleitner851072a2013-05-05 15:04:09 +02001188+
1189This setting only applies if
1190<<database.connectionPool,database.connectionPool>> is true.
Shawn O. Pearce07f35177d2010-02-23 09:47:10 -08001191
Shawn O. Pearcef458bf62010-02-25 09:03:03 -08001192[[database.poolMaxIdle]]database.poolMaxIdle::
Shawn O. Pearce07f35177d2010-02-23 09:47:10 -08001193+
1194Maximum number of connections to keep idle in the pool. If there
1195are more idle connections, connections will be closed instead of
1196being returned back to the pool.
1197Default is 4.
Christian Aistleitner851072a2013-05-05 15:04:09 +02001198+
1199This setting only applies if
1200<<database.connectionPool,database.connectionPool>> is true.
Shawn O. Pearce07f35177d2010-02-23 09:47:10 -08001201
1202[[database.poolMaxWait]]database.poolMaxWait::
1203+
1204Maximum amount of time a request processing thread will wait to
1205acquire a database connection from the pool. If no connection is
1206released within this time period, the processing thread will abort
1207its current operations and return an error to the client.
1208Values should use common unit suffixes to express their setting:
1209+
1210* ms, milliseconds
1211* s, sec, second, seconds
1212* m, min, minute, minutes
1213* h, hr, hour, hours
1214
1215+
1216If a unit suffix is not specified, `milliseconds` is assumed.
1217+
1218Default is `30 seconds`.
Christian Aistleitner851072a2013-05-05 15:04:09 +02001219+
1220This setting only applies if
1221<<database.connectionPool,database.connectionPool>> is true.
Shawn O. Pearce07f35177d2010-02-23 09:47:10 -08001222
monica.dionisio3f630442010-06-29 15:42:57 -03001223[[download]]Section download
Nasser Grainawib9a50372010-08-10 07:57:47 -06001224~~~~~~~~~~~~~~~~~~~~~~~~~~~~
monica.dionisio3f630442010-06-29 15:42:57 -03001225
1226----
1227[download]
Edwin Kempin08b03a22012-09-14 16:32:57 +02001228 command = checkout
1229 command = cherry_pick
1230 command = pull
1231 command = format_patch
monica.dionisio3f630442010-06-29 15:42:57 -03001232 scheme = ssh
1233 scheme = http
1234 scheme = anon_http
1235 scheme = anon_git
1236 scheme = repo_download
1237----
1238
1239The download section configures the allowed download methods.
1240
Edwin Kempin08b03a22012-09-14 16:32:57 +02001241[[download.command]]download.command::
1242+
1243Commands that should be offered to download changes.
1244+
1245Multiple commands are supported:
1246+
1247* `checkout`
1248+
1249Command to fetch and checkout the patch set.
1250+
1251* `cherry_pick`
1252+
1253Command to fetch the patch set and to cherry-pick it onto the current
1254commit.
1255+
1256* `pull`
1257+
1258Command to pull the patch set.
1259+
1260* `format_patch`
1261+
1262Command to fetch the patch set and to feed it into the `format-patch`
1263command.
1264
1265+
1266If `download.command` is not specified, all download commands are
1267offered.
1268
monica.dionisio3f630442010-06-29 15:42:57 -03001269[[download.scheme]]download.scheme::
1270+
1271Schemes that should be used to download changes.
1272+
1273Multiple schemes are supported:
1274+
1275* `http`
1276+
Shawn O. Pearce5c46a072010-08-23 08:33:32 -07001277Authenticated HTTP download is allowed.
monica.dionisio3f630442010-06-29 15:42:57 -03001278+
1279* `ssh`
1280+
Shawn O. Pearce5c46a072010-08-23 08:33:32 -07001281Authenticated SSH download is allowed.
monica.dionisio3f630442010-06-29 15:42:57 -03001282+
1283* `anon_http`
1284+
1285Anonymous HTTP download is allowed.
1286+
1287* `anon_git`
1288+
Shawn O. Pearce5c46a072010-08-23 08:33:32 -07001289Anonymous Git download is allowed. This is not default, it is also
1290necessary to set <<gerrit.canonicalGitUrl,gerrit.canonicalGitUrl>>
1291variable.
monica.dionisio3f630442010-06-29 15:42:57 -03001292+
1293* `repo_download`
1294+
Shawn O. Pearce5c46a072010-08-23 08:33:32 -07001295Gerrit advertises patch set downloads with the `repo download`
1296command, assuming that all projects managed by this instance are
1297generally worked on with the repo multi-repository tool. This is
1298not default, as not all instances will deploy repo.
monica.dionisio3f630442010-06-29 15:42:57 -03001299
1300+
Edwin Kempin08b03a22012-09-14 16:32:57 +02001301If `download.scheme` is not specified, SSH, HTTP and Anonymous HTTP
Shawn O. Pearce5c46a072010-08-23 08:33:32 -07001302downloads are allowed.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001303
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -07001304[[gerrit]]Section gerrit
1305~~~~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearceeb7f8ce2009-06-01 09:57:15 -07001306
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001307[[gerrit.basePath]]gerrit.basePath::
Shawn O. Pearce9743d0b2009-06-01 10:10:06 -07001308+
1309Local filesystem directory holding all Git repositories that
1310Gerrit knows about and can process changes for. A project
1311entity in Gerrit maps to a local Git repository by creating
Edwin Kempincdb0e002011-09-08 14:23:30 +02001312the path string `"${basePath}/${project_name}.git"`.
Shawn O. Pearce9743d0b2009-06-01 10:10:06 -07001313+
1314If relative, the path is resolved relative to `'$site_path'`.
1315
Shawn O. Pearce897d9212011-06-16 16:59:59 -07001316[[gerrit.allProjects]]gerrit.allProjects::
1317+
1318Name of the permissions-only project defining global server
1319access controls and settings. These are inherited into every
1320other project managed by the running server. The name is
1321relative to `gerrit.basePath`.
1322+
1323Defaults to `All-Projects` if not set.
1324
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001325[[gerrit.canonicalWebUrl]]gerrit.canonicalWebUrl::
Shawn O. Pearceeb7f8ce2009-06-01 09:57:15 -07001326+
1327The default URL for Gerrit to be accessed through.
1328+
1329Typically this would be set to "http://review.example.com/" or
1330"http://example.com/gerrit/" so Gerrit can output links that point
1331back to itself.
1332+
1333Setting this is highly recommended, as its necessary for the upload
1334code invoked by "git push" or "repo upload" to output hyperlinks
1335to the newly uploaded changes.
1336
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001337[[gerrit.canonicalGitUrl]]gerrit.canonicalGitUrl::
Shawn O. Pearceeb7f8ce2009-06-01 09:57:15 -07001338+
1339Optional base URL for repositories available over the anonymous git
1340protocol. For example, set this to `git://mirror.example.com/base/`
1341to have Gerrit display patch set download URLs in the UI. Gerrit
1342automatically appends the project name onto the end of the URL.
1343+
1344By default unset, as the git daemon must be configured externally
1345by the system administrator, and might not even be running on the
1346same host as Gerrit.
1347
Dave Borowitz76ab1a12013-05-10 17:01:29 +01001348[[gerrit.installCommitMsgHookCommand]]gerrit.installCommitMsgHookCommand::
1349+
1350Optional command to install the `commit-msg` hook. Typically of the
1351form:
1352----
1353fetch-cmd some://url/to/commit-msg .git/hooks/commit-msg ; chmod +x .git/hooks/commit-msg
1354----
Shawn Pearce6d731f52013-09-24 12:13:50 -07001355
Dave Borowitz76ab1a12013-05-10 17:01:29 +01001356+
1357By default unset; falls back to using scp from the canonical SSH host,
1358or curl from the canonical HTTP URL for the server. Only necessary if a
1359proxy or other server/network configuration prevents clients from
1360fetching from the default location.
1361
Shawn O. Pearce5d6de522011-10-07 18:00:16 -07001362[[gerrit.gitHttpUrl]]gerrit.gitHttpUrl::
1363+
1364Optional base URL for repositories available over the HTTP
1365protocol. For example, set this to `http://mirror.example.com/base/`
1366to have Gerrit display URLs from this server, rather than itself.
1367+
1368By default unset, as the HTTP daemon must be configured externally
1369by the system administrator, and might not even be running on the
1370same host as Gerrit.
1371
Shawn O. Pearceb8bea1b2012-08-16 17:18:58 -07001372[[gerrit.reportBugUrl]]gerrit.reportBugUrl::
1373+
1374URL to direct users to when they need to report a bug about the
1375Gerrit service. By default this links to the upstream Gerrit
1376Code Review's own bug tracker but could be directed to the system
1377administrator's ticket queue.
1378
Shawn Pearce6d731f52013-09-24 12:13:50 -07001379[[gerrit.changeScreen]]gerrit.changeScreen::
1380+
1381Default change screen UI to direct users to. Valid values are
David Ostrovskybbb688e2013-11-09 12:10:19 +01001382`OLD_UI` and `CHANGE_SCREEN2`. Default is `CHANGE_SCREEN2`.
Shawn Pearce6d731f52013-09-24 12:13:50 -07001383
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -07001384[[gitweb]]Section gitweb
1385~~~~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearced7ba11f2009-06-01 09:35:41 -07001386
Shawn O. Pearce618dae22010-03-12 19:07:43 -08001387Gerrit can forward requests to either an internally managed gitweb
1388(which allows Gerrit to enforce some access controls), or to an
1389externally managed gitweb (where the web server manages access).
Shawn O. Pearced7ba11f2009-06-01 09:35:41 -07001390See also link:config-gitweb.html[Gitweb Integration].
1391
Shawn O. Pearce618dae22010-03-12 19:07:43 -08001392[[gitweb.cgi]]gitweb.cgi::
1393+
1394Path to the locally installed `gitweb.cgi` executable. This CGI will
1395be called by Gerrit Code Review when the URL `/gitweb` is accessed.
1396Project level access controls are enforced prior to calling the CGI.
1397+
1398Defaults to `/usr/lib/cgi-bin/gitweb.cgi` if gitweb.url is not set.
1399
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001400[[gitweb.url]]gitweb.url::
Shawn O. Pearced7ba11f2009-06-01 09:35:41 -07001401+
1402Optional URL of an affiliated gitweb service. Defines the
1403web location where a `gitweb.cgi` is installed to browse
Shawn O. Pearce9743d0b2009-06-01 10:10:06 -07001404gerrit.basePath and the repositories it contains.
Shawn O. Pearced7ba11f2009-06-01 09:35:41 -07001405+
1406Gerrit appends any necessary query arguments onto the end of this URL.
1407For example, "?p=$project.git;h=$commit".
1408
Shane Mc Cormack27868a42009-12-28 04:49:39 +00001409[[gitweb.type]]gitweb.type::
1410+
1411Optional type of affiliated gitweb service. This allows using
Shawn O. Pearce2b11da02011-09-06 16:18:12 -07001412alternatives to gitweb, such as cgit. If set to disabled there
1413is no gitweb hyperlinking support.
Shane Mc Cormack27868a42009-12-28 04:49:39 +00001414+
Shawn O. Pearce2b11da02011-09-06 16:18:12 -07001415Valid values are `gitweb`, `cgit`, `disabled` or `custom`.
Shane Mc Cormack27868a42009-12-28 04:49:39 +00001416
Edwin Kempind86909c2012-03-26 10:36:29 +02001417[[gitweb.revision]]gitweb.revision::
Shane Mc Cormack27868a42009-12-28 04:49:39 +00001418+
1419Optional pattern to use for constructing the gitweb URL when pointing
1420at a specific commit when `custom` is used above.
1421+
Edwin Kempincdb0e002011-09-08 14:23:30 +02001422Valid replacements are `${project}` for the project name in Gerrit
1423and `${commit}` for the SHA1 hash for the commit.
Shane Mc Cormack27868a42009-12-28 04:49:39 +00001424
Edwin Kempind86909c2012-03-26 10:36:29 +02001425[[gitweb.project]]gitweb.project::
Shane Mc Cormack27868a42009-12-28 04:49:39 +00001426+
1427Optional pattern to use for constructing the gitweb URL when pointing
1428at a specific project when `custom` is used above.
1429+
Edwin Kempincdb0e002011-09-08 14:23:30 +02001430Valid replacements are `${project}` for the project name in Gerrit.
Shane Mc Cormack27868a42009-12-28 04:49:39 +00001431
Edwin Kempind86909c2012-03-26 10:36:29 +02001432[[gitweb.branch]]gitweb.branch::
Shane Mc Cormack27868a42009-12-28 04:49:39 +00001433+
1434Optional pattern to use for constructing the gitweb URL when pointing
1435at a specific branch when `custom` is used above.
1436+
Edwin Kempincdb0e002011-09-08 14:23:30 +02001437Valid replacements are `${project}` for the project name in Gerrit
1438and `${branch}` for the name of the branch.
Shane Mc Cormack27868a42009-12-28 04:49:39 +00001439
Edwin Kempin64011562012-03-26 10:50:12 +02001440[[gitweb.filehistory]]gitweb.filehistory::
1441+
1442Optional pattern to use for constructing the gitweb URL when pointing
1443at the history of a file in a specific branch when `custom` is used
1444above.
1445+
1446Valid replacements are `${project}` for the project name in Gerrit,
1447`${file}` for the file name and `${branch}` for the name of the
1448branch.
1449
Gustaf Lundha07d2e72011-10-27 15:26:35 -07001450[[gitweb.linkname]]gitweb.linkname::
1451+
1452Optional setting for modifying the link name presented to the user
1453in the Gerrit web-UI.
1454+
1455Default linkname for custom type is "gitweb".
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001456
Adrian Goerlerf2007072011-11-10 08:39:55 +01001457[[gitweb.pathSeparator]]gitweb.pathSeparator::
1458+
1459Optional character to substitute the standard path separator (slash) in
1460project names and branch names.
1461+
1462By default, Gerrit will use hexadecimal encoding for slashes in project and
1463branch names. Some web servers, such as Tomcat, reject this hexadecimal
1464encoding in the URL.
1465+
1466Some alternative gitweb services, such as link:http://gitblit.com[Gitblit],
1467allow using an alternative path separator character. In Gitblit, this can be
1468configured through the property link:http://gitblit.com/properties.html[web.forwardSlashCharacter].
1469In Gerrit, the alternative path separator can be configured correspondingly
1470using the property 'gitweb.pathSeparator'.
1471+
1472Valid values are the characters '*', '(' and ')'.
1473
Luca Milanesio25312032013-10-11 11:34:39 +01001474[[gitweb.linkDrafts]]gitweb.urlEncode::
1475+
1476Whether or not Gerrit should encode the generated viewer URL.
1477+
1478Gerrit composes the viewer URL using information about the project, branch, file
1479or commit of the target object to be displayed. Typically viewers such as CGit
1480and GitWeb do need those parts to be encoded, including the '/' in project's name,
1481for being correctly parsed.
1482However other viewers could instead require an unencoded URL (e.g. GitHub web
1483based viewer)
1484+
1485Valid values are "true" and "false," default is "true."
1486
Chad Horohoe1dfe36c2013-04-12 14:52:56 -04001487[[gitweb.linkDrafts]]gitweb.linkDrafts::
1488+
1489Whether or not Gerrit should provide links to gitweb on draft patch sets.
1490+
1491By default, Gerrit will show links to gitweb on all patch sets. If gitweb
1492only allows publicly viewable references, set this to false to remove
1493the links to draft patch sets from the change review screen.
1494+
Luca Milanesio25312032013-10-11 11:34:39 +01001495Valid values are "true" and "false," default is "true".
Chad Horohoe1dfe36c2013-04-12 14:52:56 -04001496
Edwin Kempin4bbff702013-01-11 09:59:53 +01001497[[groups]]Section groups
1498~~~~~~~~~~~~~~~~~~~~~~~~
1499
1500[[groups.newGroupsVisibleToAll]]groups.newGroupsVisibleToAll::
1501+
1502Controls whether newly created groups should be by default visible to
1503all registered users.
1504+
1505By default, false.
1506
Shane Mc Cormack6c2b6772010-01-12 21:56:44 +00001507[[hooks]]Section hooks
Remy Bohmer203eea32012-02-19 21:21:36 +01001508~~~~~~~~~~~~~~~~~~~~~~
Shane Mc Cormack6c2b6772010-01-12 21:56:44 +00001509
1510See also link:config-hooks.html[Hooks].
1511
1512[[hooks.path]]hooks.path::
1513+
1514Optional path to hooks, if not specified then `'$site_path'/hooks` will be used.
1515
1516[[hooks.patchsetCreatedHook]]hooks.patchsetCreatedHook::
1517+
1518Optional filename for the patchset created hook, if not specified then
1519`patchset-created` will be used.
1520
David Pursehoused556c192012-06-12 18:34:37 +09001521[[hooks.draftPublishedHook]]hooks.draftPublishedHook::
1522+
1523Optional filename for the draft published hook, if not specified then
1524`draft-published` will be used.
1525
Shane Mc Cormack6c2b6772010-01-12 21:56:44 +00001526[[hooks.commentAddedHook]]hooks.commentAddedHook::
1527+
1528Optional filename for the comment added hook, if not specified then
1529`comment-added` will be used.
1530
1531[[hooks.changeMergedHook]]hooks.changeMergedHook::
1532+
1533Optional filename for the change merged hook, if not specified then
1534`change-merged` will be used.
1535
David Pursehousef9f3b272012-09-28 19:58:59 +09001536[[hooks.mergeFailedHook]]hooks.mergeFailedHook::
1537+
1538Optional filename for the merge failed hook, if not specified then
1539`merge-failed` will be used.
1540
Shane Mc Cormack6c2b6772010-01-12 21:56:44 +00001541[[hooks.changeAbandonedHook]]hooks.changeAbandonedHook::
1542+
1543Optional filename for the change abandoned hook, if not specified then
1544`change-abandoned` will be used.
1545
David Pursehousea93c9302012-06-15 16:29:26 +09001546[[hooks.changeRestoredHook]]hooks.changeRestoredHook::
1547+
1548Optional filename for the change restored hook, if not specified then
1549`change-restored` will be used.
1550
1551[[hooks.refUpdatedHook]]hooks.refUpdatedHook::
1552+
1553Optional filename for the ref updated hook, if not specified then
1554`ref-updated` will be used.
1555
David Pursehouse2336bd82012-09-21 12:50:19 +09001556[[hooks.reviewerAddedHook]]hooks.reviewerAddedHook::
1557+
1558Optional filename for the reviewer added hook, if not specified then
1559`reviewer-added` will be used.
1560
David Pursehouseba3e28d2013-07-12 14:48:51 +09001561[[hooks.topicChangedHook]]hooks.topicChangedHook::
1562+
1563Optional filename for the topic changed hook, if not specified then
1564`topic-changed` will be used.
1565
David Pursehousea93c9302012-06-15 16:29:26 +09001566[[hooks.claSignedHook]]hooks.claSignedHook::
1567+
1568Optional filename for the CLA signed hook, if not specified then
1569`cla-signed` will be used.
1570
Chris Harrisf736d6c2012-11-21 09:35:56 -05001571[[hooks.refUpdateHook]]hooks.refUpdateHook::
1572+
1573Optional filename for the ref update hook, if not specified then
1574`ref-update` will be used.
1575
1576[[hooks.syncHookTimeout]]hooks.syncHookTimeout::
David Pursehouse6fdc8d92012-11-28 12:34:18 +09001577+
1578Optional timeout value in seconds for synchronous hooks, if not specified
Chris Harrisf736d6c2012-11-21 09:35:56 -05001579then 30 seconds will be used.
1580
Shawn O. Pearce309d8d32009-11-17 16:03:16 -08001581[[http]]Section http
1582~~~~~~~~~~~~~~~~~~~~
1583
1584[[http.proxy]]http.proxy::
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001585+
1586URL of the proxy server when making outgoing HTTP
1587connections for OpenID login transactions. Syntax
1588should be `http://`'hostname'`:`'port'.
Shawn O. Pearce309d8d32009-11-17 16:03:16 -08001589
1590[[http.proxyUsername]]http.proxyUsername::
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001591+
1592Optional username to authenticate to the HTTP proxy with.
Robin Rosenberg524a3032012-10-14 14:24:36 +02001593This property is honored only if the username does not
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001594appear in the http.proxy property above.
Shawn O. Pearce309d8d32009-11-17 16:03:16 -08001595
1596[[http.proxyPassword]]http.proxyPassword::
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001597+
1598Optional password to authenticate to the HTTP proxy with.
Robin Rosenberg524a3032012-10-14 14:24:36 +02001599This property is honored only if the password does not
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001600appear in the http.proxy property above.
Shawn O. Pearce309d8d32009-11-17 16:03:16 -08001601
1602
1603[[httpd]]Section httpd
1604~~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08001605
1606The httpd section configures the embedded servlet container.
1607
1608[[httpd.listenUrl]]httpd.listenUrl::
1609+
1610Specifies the URLs the internal HTTP daemon should listen for
Edwin Kempincdb0e002011-09-08 14:23:30 +02001611connections on. The special hostname '*' may be used to listen
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08001612on all local addresses. A context path may optionally be included,
1613placing Gerrit Code Review's web address within a subdirectory of
1614the server.
1615+
1616Multiple protocol schemes are supported:
1617+
1618* `http://`'hostname'`:`'port'
1619+
1620Plain-text HTTP protocol. If port is not supplied, defaults to 80,
1621the standard HTTP port.
1622+
1623* `https://`'hostname'`:`'port'
1624+
1625SSL encrypted HTTP protocol. If port is not supplied, defaults to
1626443, the standard HTTPS port.
1627+
1628Externally facing production sites are encouraged to use a reverse
1629proxy configuration and `proxy-https://` (below), rather than using
1630the embedded servlet container to implement the SSL processing.
1631The proxy server with SSL support is probably easier to configure,
1632provides more configuration options to control cipher usage, and
1633is likely using natively compiled encryption algorithms, resulting
1634in higher throughput.
1635+
1636* `proxy-http://`'hostname'`:`'port'
1637+
1638Plain-text HTTP relayed from a reverse proxy. If port is not
1639supplied, defaults to 8080.
1640+
1641Like http, but additional header parsing features are
1642enabled to honor X-Forwarded-For, X-Forwarded-Host and
1643X-Forwarded-Server. These headers are typically set by Apache's
1644link:http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#x-headers[mod_proxy].
1645+
1646* `proxy-https://`'hostname'`:`'port'
1647+
1648Plain text HTTP relayed from a reverse proxy that has already
1649handled the SSL encryption/decryption. If port is not supplied,
1650defaults to 8080.
1651+
1652Behaves exactly like proxy-http, but also sets the scheme to assume
1653'https://' is the proper URL back to the server.
1654
1655+
1656If multiple values are supplied, the daemon will listen on all
1657of them.
1658+
1659By default, http://*:8080.
1660
1661[[httpd.reuseAddress]]httpd.reuseAddress::
1662+
1663If true, permits the daemon to bind to the port even if the port
1664is already in use. If false, the daemon ensures the port is not
1665in use before starting. Busy sites may need to set this to true
1666to permit fast restarts.
1667+
1668By default, true.
1669
1670[[httpd.requestHeaderSize]]httpd.requestHeaderSize::
1671+
1672Size, in bytes, of the buffer used to parse the HTTP headers of an
1673incoming HTTP request. The entire request headers, including any
1674cookies sent by the browser, must fit within this buffer, otherwise
1675the server aborts with the response '413 Request Entity Too Large'.
1676+
1677One buffer of this size is allocated per active connection.
1678Allocating a buffer that is too large wastes memory that cannot be
1679reclaimed, allocating a buffer that is too small may cause unexpected
1680errors caused by very long Referer URLs or large cookie values.
1681+
1682By default, 16384 (16 K), which is sufficient for most OpenID and
1683other web-based single-sign-on integrations.
1684
Chulho Yangb72ff8f2013-07-04 02:35:53 -04001685[[httpd.sslCrl]]httpd.sslCrl::
1686+
1687Path of the certificate revocation list file in PEM format. This
1688crl file is optional, and available for CLIENT_SSL_CERT_LDAP
1689authentication.
1690+
1691To create and view a crl using openssl:
1692+
1693----
1694openssl ca -gencrl -out crl.pem
1695openssl crl -in crl.pem -text
1696----
1697+
1698If not absolute, the path is resolved relative to `$site_path`.
1699+
1700By default, `$site_path/etc/crl.pem`.
1701
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08001702[[httpd.sslKeyStore]]httpd.sslKeyStore::
1703+
1704Path of the Java keystore containing the server's SSL certificate
1705and private key. This keystore is required for `https://` in URL.
1706+
1707To create a self-signed certificate for simple internal usage:
1708+
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001709----
1710keytool -keystore keystore -alias jetty -genkey -keyalg RSA
1711chmod 600 keystore
1712----
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08001713+
1714If not absolute, the path is resolved relative to `$site_path`.
1715+
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08001716By default, `$site_path/etc/keystore`.
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08001717
1718[[httpd.sslKeyPassword]]httpd.sslKeyPassword::
1719+
1720Password used to decrypt the private portion of the sslKeyStore.
David Pursehouse221d4f62012-06-08 17:38:08 +09001721Java keystores require a password, even if the administrator
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08001722doesn't want to enable one.
1723+
1724If set to the empty string the embedded server will prompt for the
1725password during startup.
1726+
1727By default, `gerrit`.
1728
Shawn O. Pearce1766f502010-01-15 10:49:46 -08001729[[httpd.requestLog]]httpd.requestLog::
1730+
1731Enable (or disable) the `'$site_path'/logs/httpd_log` request log.
1732If enabled, an NCSA combined log format request log file is written
1733out by the internal HTTP daemon.
1734+
David Ostrovsky8e4a9902013-11-19 23:57:48 +01001735`log4j.appender` with the name `httpd_log` can be configured to overwrite
1736programmatic configuration.
1737+
Shawn O. Pearce1766f502010-01-15 10:49:46 -08001738By default, true if httpd.listenUrl uses http:// or https://,
1739and false if httpd.listenUrl uses proxy-http:// or proxy-https://.
1740
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08001741[[httpd.acceptorThreads]]httpd.acceptorThreads::
1742+
1743Number of worker threads dedicated to accepting new incoming TCP
David Pursehouse221d4f62012-06-08 17:38:08 +09001744connections and allocating them connection-specific resources.
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08001745+
1746By default, 2, which should be suitable for most high-traffic sites.
1747
1748[[httpd.minThreads]]httpd.minThreads::
1749+
1750Minimum number of spare threads to keep in the worker thread pool.
1751This number must be at least 1 larger than httpd.acceptorThreads
David Pursehouse92463562013-06-24 10:16:28 +09001752multiplied by the number of httpd.listenUrls configured.
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08001753+
1754By default, 5, suitable for most lower-volume traffic sites.
1755
1756[[httpd.maxThreads]]httpd.maxThreads::
1757+
1758Maximum number of threads to permit in the worker thread pool.
1759+
1760By default 25, suitable for most lower-volume traffic sites.
1761
1762[[httpd.maxQueued]]httpd.maxQueued::
1763+
1764Maximum number of client connections which can enter the worker
1765thread pool waiting for a worker thread to become available.
17660 disables the queue and permits infinite number of connections.
1767+
1768By default 50.
1769
Shawn O. Pearcee5452b72010-01-15 14:32:50 -08001770[[httpd.maxWait]]httpd.maxWait::
1771+
David Pursehouse221d4f62012-06-08 17:38:08 +09001772Maximum amount of time a client will wait for an available
Shawn O. Pearcee5452b72010-01-15 14:32:50 -08001773thread to handle a project clone, fetch or push request over the
1774smart HTTP transport.
1775+
1776Values should use common unit suffixes to express their setting:
1777+
1778* s, sec, second, seconds
1779* m, min, minute, minutes
1780* h, hr, hour, hours
1781* d, day, days
1782* w, week, weeks (`1 week` is treated as `7 days`)
1783* mon, month, months (`1 month` is treated as `30 days`)
1784* y, year, years (`1 year` is treated as `365 days`)
1785
1786+
1787If a unit suffix is not specified, `minutes` is assumed. If 0
1788is supplied, the maximum age is infinite and connections will not
1789abort until the client disconnects.
1790+
1791By default, 5 minutes.
1792
Luca Milanesioce7b7452013-06-18 11:40:49 +01001793[[httpd.filterClass]]httpd.filterClass::
1794+
1795Class that implements the javax.servlet.Filter interface
1796for filtering any HTTP related traffic going through the Gerrit
1797HTTP protocol.
1798Class is loaded and configured in the Gerrit Jetty container
1799and run in front of all Gerrit URL handlers, allowing the filter
1800to inspect, modify, allow or reject each request.
1801It needs to be provided as JAR library
1802under $GERRIT_SITE/lib as it is resolved using the default Gerrit class
1803loader and cannot be dynamically loaded by a plugin.
1804+
1805Failing to load the Filter class would result in a Gerrit start-up
1806failure, as this class is supposed to provide mandatory filtering
1807in front of Gerrit HTTP protocol.
1808+
David Pursehouse42f42042013-08-01 14:02:25 +09001809Typical usage is in conjunction with the `auth.type=HTTP` as replacement
Luca Milanesioce7b7452013-06-18 11:40:49 +01001810of an Apache HTTP proxy layer as security enforcement on top of Gerrit
1811by returning a trusted username as HTTP Header.
1812+
1813Example of using a security library secure.jar under $GERRIT_SITE/lib
1814that provides a org.anyorg.MySecureFilter Servlet Filter that enforces
1815a trusted username in the `TRUSTED_USER` HTTP Header:
1816
1817----
1818[auth]
1819type = HTTP
1820httpHeader = TRUSTED_USER
1821
1822[http]
1823filterClass = org.anyorg.MySecureFilter
1824----
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08001825
Juan Hernandezec512562013-08-06 16:30:50 +02001826[[httpd.robotsFile]]httpd.robotsFile::
1827+
1828Location of an external robots.txt file to be used instead of the one
1829bundled with the .war of the application.
1830+
1831If not absolute, the path is resolved relative to `$site_path`.
1832+
1833If the file doesn't exist or can't be read the default robots.txt file
1834bundled with the .war will be used instead.
1835
David Pursehouse6d458432013-08-23 16:17:18 +09001836[[index]]Section index
1837~~~~~~~~~~~~~~~~~~~~~~
1838
1839The index section configures the secondary index.
1840
1841[[index.type]]index.type::
1842+
1843Type of secondary indexing employed by Gerrit. The supported
1844values are:
1845+
1846* `LUCENE`
1847+
1848A link:http://lucene.apache.org/[Lucene] index is used.
1849+
1850* `SOLR`
1851+
1852A link:http://lucene.apache.org/solr/[Solr] index is used.
1853+
1854* `SQL`
1855+
1856No secondary index. Not all query operators are supported. Other
1857query operators are routed through the standard SQL query engine.
1858
1859+
1860By default, `SQL`.
1861
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -07001862[[ldap]]Section ldap
1863~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001864
David Pursehouse221d4f62012-06-08 17:38:08 +09001865LDAP integration is only enabled if `auth.type` is set to
Sasa Zivkoveabc8972010-10-04 15:47:08 +02001866`HTTP_LDAP`, `LDAP` or `CLIENT_SSL_CERT_LDAP`. See above for a
David Pursehouse42f42042013-08-01 14:02:25 +09001867detailed description of the `auth.type` settings and their
Sasa Zivkoveabc8972010-10-04 15:47:08 +02001868implications.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001869
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07001870An example LDAP configuration follows, and then discussion of
1871the parameters introduced here. Suitable defaults for most
1872parameters are automatically guessed based on the type of server
1873detected during startup. The guessed defaults support both
1874link:http://www.ietf.org/rfc/rfc2307.txt[RFC 2307] and Active
1875Directory.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001876
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001877----
1878[ldap]
1879 server = ldap://ldap.example.com
1880
1881 accountBase = ou=people,dc=example,dc=com
1882 accountPattern = (&(objectClass=person)(uid=${username}))
1883 accountFullName = displayName
1884 accountEmailAddress = mail
1885
1886 groupBase = ou=groups,dc=example,dc=com
1887 groupMemberPattern = (&(objectClass=group)(member=${dn}))
1888----
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001889
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001890[[ldap.server]]ldap.server::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001891+
1892URL of the organization's LDAP server to query for user information
1893and group membership from. Must be of the form `ldap://host` or
1894`ldaps://host` to bind with either a plaintext or SSL connection.
Shawn O. Pearcef7e065e2009-09-26 20:01:10 -07001895+
David Pursehouse42f42042013-08-01 14:02:25 +09001896If `auth.type` is `LDAP` this setting should use `ldaps://` to
Shawn O. Pearcef7e065e2009-09-26 20:01:10 -07001897ensure the end user's plaintext password is transmitted only over
1898an encrypted connection.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001899
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07001900[[ldap.sslVerify]]ldap.sslVerify::
1901+
1902If false and ldap.server is an `ldaps://` style URL, Gerrit
1903will not verify the server certificate when it connects to
1904perform a query.
1905+
1906By default, true, requiring the certificate to be verified.
1907
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001908[[ldap.username]]ldap.username::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001909+
1910_(Optional)_ Username to bind to the LDAP server with. If not set,
1911an anonymous connection to the LDAP server is attempted.
1912
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001913[[ldap.password]]ldap.password::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001914+
1915_(Optional)_ Password for the user identified by `ldap.username`.
1916If not set, an anonymous (or passwordless) connection to the LDAP
1917server is attempted.
1918
Ben Wu0410a152010-06-04 16:17:24 +08001919[[ldap.referral]]ldap.referral::
1920+
1921_(Optional)_ How an LDAP referral should be handled if it is
1922encountered during directory traversal. Set to `follow` to
James Y Knight1244ed02011-01-04 02:40:32 -05001923automatically follow any referrals, or `ignore` to ignore the
1924referrals.
Ben Wu0410a152010-06-04 16:17:24 +08001925+
1926By default, `ignore`.
1927
Sasa Zivkov100bd4b2011-11-07 14:58:46 +01001928[[ldap.readTimeout]]ldap.readTimeout::
1929+
1930_(Optional)_ The read timeout for an LDAP operation. The value is
1931in the usual time-unit format like "1 s", "100 ms", etc...
1932A timeout can be used to avoid blocking all of the SSH command start
David Pursehouse221d4f62012-06-08 17:38:08 +09001933threads in case the LDAP server becomes slow.
Sasa Zivkov100bd4b2011-11-07 14:58:46 +01001934+
1935By default there is no timeout and Gerrit will wait for the LDAP
1936server to respond until the TCP connection times out.
1937
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001938[[ldap.accountBase]]ldap.accountBase::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001939+
1940Root of the tree containing all user accounts. This is typically
1941of the form `ou=people,dc=example,dc=com`.
1942
Shawn O. Pearce304ccdb2009-08-25 12:25:27 -07001943[[ldap.accountScope]]ldap.accountScope::
1944+
1945Scope of the search performed for accounts. Must be one of:
1946+
1947* `one`: Search only one level below accountBase, but not recursive
1948* `sub` or `subtree`: Search recursively below accountBase
1949* `base` or `object`: Search exactly accountBase; probably not desired
1950
1951+
1952Default is `subtree` as many directories have several levels.
1953
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001954[[ldap.accountPattern]]ldap.accountPattern::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001955+
1956Query pattern to use when searching for a user account. This may be
1957any valid LDAP query expression, including the standard `(&...)` and
David Pursehouse42f42042013-08-01 14:02:25 +09001958`(|...)` operators. If `auth.type` is `HTTP_LDAP` then the variable
Edwin Kempincdb0e002011-09-08 14:23:30 +02001959`${username}` is replaced with a parameter set to the username
David Pursehouse42f42042013-08-01 14:02:25 +09001960that was supplied by the HTTP server. If `auth.type` is `LDAP` then
Edwin Kempincdb0e002011-09-08 14:23:30 +02001961the variable `${username}` is replaced by the string entered by
Shawn O. Pearcef7e065e2009-09-26 20:01:10 -07001962the end user.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001963+
1964This pattern is used to search the objects contained directly under
1965the `ldap.accountBase` tree. A typical setting for this parameter
Edwin Kempincdb0e002011-09-08 14:23:30 +02001966is `(uid=${username})` or `(cn=${username})`, but the proper
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001967setting depends on the LDAP schema used by the directory server.
1968+
Edwin Kempincdb0e002011-09-08 14:23:30 +02001969Default is `(uid=${username})` for RFC 2307 servers,
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07001970and `(&(objectClass=user)(sAMAccountName=${username}))`
1971for Active Directory.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001972
Shawn O. Pearce37dc1f82009-08-19 09:49:07 -07001973[[ldap.accountFullName]]ldap.accountFullName::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001974+
1975_(Optional)_ Name of an attribute on the user account object which
1976contains the initial value for the user's full name field in Gerrit.
1977Typically this is the `displayName` property in LDAP, but could
1978also be `legalName` or `cn`.
1979+
David Pursehouse221d4f62012-06-08 17:38:08 +09001980Attribute values may be concatenated with literal strings. For
1981example to join given name and surname together, use the pattern
Edwin Kempincdb0e002011-09-08 14:23:30 +02001982`${givenName} ${SN}`.
Shawn O. Pearceb86ae002009-09-26 16:54:05 -07001983+
Shawn O. Pearce3ca1dcf2009-08-20 08:56:23 -07001984If set, users will be unable to modify their full name field, as
1985Gerrit will populate it only from the LDAP data.
1986+
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07001987Default is `displayName` for RFC 2307 servers,
1988and `${givenName} ${sn}` for Active Directory.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001989
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001990[[ldap.accountEmailAddress]]ldap.accountEmailAddress::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001991+
1992_(Optional)_ Name of an attribute on the user account object which
1993contains the user's Internet email address, as defined by this
1994LDAP server.
1995+
Shawn O. Pearceb86ae002009-09-26 16:54:05 -07001996Attribute values may be concatenated with literal strings,
1997for example to set the email address to the lowercase form
1998of sAMAccountName followed by a constant domain name, use
Edwin Kempincdb0e002011-09-08 14:23:30 +02001999`${sAMAccountName.toLowerCase}@example.com`.
Shawn O. Pearceb86ae002009-09-26 16:54:05 -07002000+
Shawn O. Pearce3ca1dcf2009-08-20 08:56:23 -07002001If set, the preferred email address will be prefilled from LDAP,
David Pursehouse221d4f62012-06-08 17:38:08 +09002002but users may still be able to register additional email addresses,
Shawn O. Pearce3ca1dcf2009-08-20 08:56:23 -07002003and select a different preferred email address.
2004+
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07002005Default is `mail`.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002006
Shawn O. Pearce59e09222009-08-19 09:04:49 -07002007[[ldap.accountSshUserName]]ldap.accountSshUserName::
2008+
2009_(Optional)_ Name of an attribute on the user account object which
2010contains the initial value for the user's SSH username field in
2011Gerrit. Typically this is the `uid` property in LDAP, but could
2012also be `cn`. Administrators should prefer to match the attribute
2013corresponding to the user's workstation username, as this is what
2014SSH clients will default to.
2015+
Shawn O. Pearceb86ae002009-09-26 16:54:05 -07002016Attribute values may also be forced to lowercase, or to uppercase in
Edwin Kempincdb0e002011-09-08 14:23:30 +02002017an expression. For example, `${sAMAccountName.toLowerCase}` will
Shawn O. Pearceb86ae002009-09-26 16:54:05 -07002018force the value of sAMAccountName, if defined, to be all lowercase.
2019The suffix `.toUpperCase` can be used for the other direction.
2020The suffix `.localPart` can be used to split attribute values of
2021the form 'user@example.com' and return only the left hand side, for
Edwin Kempincdb0e002011-09-08 14:23:30 +02002022example `${userPrincipalName.localPart}` would provide only 'user'.
Shawn O. Pearceb86ae002009-09-26 16:54:05 -07002023+
Shawn O. Pearce3ca1dcf2009-08-20 08:56:23 -07002024If set, users will be unable to modify their SSH username field, as
2025Gerrit will populate it only from the LDAP data.
2026+
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07002027Default is `uid` for RFC 2307 servers,
2028and `${sAMAccountName.toLowerCase}` for Active Directory.
Shawn O. Pearce59e09222009-08-19 09:04:49 -07002029
Shawn O. Pearce7d25f782009-10-30 08:01:03 -07002030[[ldap.accountMemberField]]ldap.accountMemberField::
Anthony93de7db2009-10-03 10:01:50 -04002031+
2032_(Optional)_ Name of an attribute on the user account object which
Shawn O. Pearce7d25f782009-10-30 08:01:03 -07002033contains the groups the user is part of. Typically used for Active
2034Directory servers.
Anthony93de7db2009-10-03 10:01:50 -04002035+
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07002036Default is unset for RFC 2307 servers (disabled)
2037and `memberOf` for Active Directory.
Anthony93de7db2009-10-03 10:01:50 -04002038
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002039[[ldap.groupBase]]ldap.groupBase::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002040+
2041Root of the tree containing all group objects. This is typically
2042of the form `ou=groups,dc=example,dc=com`.
2043
Shawn O. Pearce304ccdb2009-08-25 12:25:27 -07002044[[ldap.groupScope]]ldap.groupScope::
2045+
2046Scope of the search performed for group objects. Must be one of:
2047+
2048* `one`: Search only one level below groupBase, but not recursive
2049* `sub` or `subtree`: Search recursively below groupBase
2050* `base` or `object`: Search exactly groupBase; probably not desired
2051
2052+
2053Default is `subtree` as many directories have several levels.
2054
Shawn O. Pearce7d25f782009-10-30 08:01:03 -07002055[[ldap.groupPattern]]ldap.groupPattern::
2056+
2057Query pattern used when searching for an LDAP group to connect
2058to a Gerrit group. This may be any valid LDAP query expression,
2059including the standard `(&...)` and `(|...)` operators. The variable
Edwin Kempincdb0e002011-09-08 14:23:30 +02002060`${groupname}` is replaced with the search term supplied by the
Shawn O. Pearce7d25f782009-10-30 08:01:03 -07002061group owner.
2062+
Edwin Kempincdb0e002011-09-08 14:23:30 +02002063Default is `(cn=${groupname})` for RFC 2307,
2064and `(&(objectClass=group)(cn=${groupname}))` for Active Directory.
Shawn O. Pearce7d25f782009-10-30 08:01:03 -07002065
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002066[[ldap.groupMemberPattern]]ldap.groupMemberPattern::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002067+
2068Query pattern to use when searching for the groups that a user
2069account is currently a member of. This may be any valid LDAP query
2070expression, including the standard `(&...)` and `(|...)` operators.
2071+
David Pursehouse42f42042013-08-01 14:02:25 +09002072If `auth.type` is `HTTP_LDAP` then the variable `${username}` is
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002073replaced with a parameter set to the username that was supplied
2074by the HTTP server. Other variables appearing in the pattern,
Edwin Kempincdb0e002011-09-08 14:23:30 +02002075such as `${fooBarAttribute}`, are replaced with the value of the
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002076corresponding attribute (in this case, `fooBarAttribute`) as read
2077from the user's account object matched under `ldap.accountBase`.
Edwin Kempincdb0e002011-09-08 14:23:30 +02002078Attributes such as `${dn}` or `${uidNumber}` may be useful.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002079+
Scott Dial50457502013-08-11 16:52:51 -04002080Default is `(|(memberUid=${username})(gidNumber=${gidNumber}))` for
2081RFC 2307, and unset (disabled) for Active Directory.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002082
Auke Schrijnen57809132012-09-26 21:05:39 +02002083[[ldap.groupName]]ldap.groupName::
2084+
David Pursehouse39489ae2012-10-12 13:50:04 +09002085_(Optional)_ Name of the attribute on the group object which contains
2086the value to use as the group name in Gerrit.
Auke Schrijnen57809132012-09-26 21:05:39 +02002087+
David Pursehouse39489ae2012-10-12 13:50:04 +09002088Typically the attribute name is `cn` for RFC 2307 and Active Directory
2089servers. For other servers the attribute name may differ, for example
2090`apple-group-realname` on Apple MacOS X Server.
Auke Schrijnen57809132012-09-26 21:05:39 +02002091+
David Pursehouse39489ae2012-10-12 13:50:04 +09002092It is also possible to specify a literal string containing a pattern of
2093attribute values. For example to create a Gerrit group name consisting of
2094LDAP group name and group ID, use the pattern `${cn} (${gidNumber})`.
2095+
2096Default is `cn`.
Auke Schrijnen57809132012-09-26 21:05:39 +02002097
Edwin Kempinb3b0d292011-09-14 14:17:34 +02002098[[ldap.localUsernameToLowerCase]]ldap.localUsernameToLowerCase::
2099+
2100Converts the local username, that is used to login into the Gerrit
2101WebUI, to lower case before doing the LDAP authentication. By setting
2102this parameter to true, a case insensitive login to the Gerrit WebUI
2103can be achieved.
2104+
2105If set, it must be ensured that the local usernames for all existing
2106accounts are converted to lower case, otherwise a user that has a
David Pursehouse221d4f62012-06-08 17:38:08 +09002107local username that contains upper case characters will not be able to login
Edwin Kempinb3b0d292011-09-14 14:17:34 +02002108anymore. The local usernames for the existing accounts can be
2109converted to lower case by running the server program
2110link:pgm-LocalUsernamesToLowerCase.html[LocalUsernamesToLowerCase].
2111Please be aware that the conversion of the local usernames to lower
2112case can't be undone. For newly created accounts the local username
2113will be directly stored in lower case.
2114+
2115By default, unset/false.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002116
Robin Rosenberga3baed02012-10-14 14:09:32 +02002117[[ldap.authentication]]ldap.authentication::
2118+
2119Defines how Gerrit authenticates with the server. When set to `GSSAPI`
2120Gerrit will use Kerberos. To use kerberos the
2121`java.security.auth.login.config` system property must point to a
2122login to a JAAS configuration file and, if Java 6 is used, the system
2123property `java.security.krb5.conf` must point to the appropriate
2124krb5.ini file with references to the KDC.
2125
2126Typical jaas.conf.
2127
2128----
2129KerberosLogin {
2130 com.sun.security.auth.module.Krb5LoginModule
2131 required
2132 useTicketCache=true
2133 doNotPrompt=true
2134 renewTGT=true;
2135};
2136----
2137
2138See Java documentation on how to create the krb5.ini file.
2139
2140Note the `renewTGT` property to make sure the TGT does not expire,
2141and `useTicketCache` to use the TGT supplied by the operating system. As
2142the whole point of using GSSAPI is to have passwordless authentication
David Pursehouse92463562013-06-24 10:16:28 +09002143to the LDAP service, this option does not acquire a new TGT on its own.
Robin Rosenberga3baed02012-10-14 14:09:32 +02002144
2145On Windows servers the registry key `HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\Kerberos\Parameters`
2146must have the DWORD value `allowtgtsessionkey` set to 1 and the account must not
2147have local administrator privileges.
2148
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -07002149[[mimetype]]Section mimetype
2150~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearce01cb11902009-07-15 08:19:01 -07002151
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002152[[mimetype.name.safe]]mimetype.<name>.safe::
Shawn O. Pearce01cb11902009-07-15 08:19:01 -07002153+
2154If set to true, files with the MIME type `<name>` will be sent as
2155direct downloads to the user's browser, rather than being wrapped up
2156inside of zipped archives. The type name may be a complete type
Edwin Kempincdb0e002011-09-08 14:23:30 +02002157name, e.g. `image/gif`, a generic media type, e.g. `image/*`,
2158or the wildcard `*/*` to match all types.
Shawn O. Pearce01cb11902009-07-15 08:19:01 -07002159+
2160By default, false for all MIME types.
2161
2162Common examples:
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08002163----
2164[mimetype "image/*"]
2165 safe = true
2166
2167[mimetype "application/pdf"]
2168 safe = true
2169
2170[mimetype "application/msword"]
2171 safe = true
2172
2173[mimetype "application/vnd.ms-excel"]
2174 safe = true
2175----
Shawn O. Pearce01cb11902009-07-15 08:19:01 -07002176
Shawn O. Pearce5f11b292010-08-05 17:57:35 -07002177
2178[[pack]]Section pack
2179~~~~~~~~~~~~~~~~~~~~
2180Global settings controlling how Gerrit Code Review creates pack
2181streams for Git clients running clone, fetch, or pull. Most of these
2182variables are per-client request, and thus should be carefully set
2183given the expected concurrent request load and available CPU and
2184memory resources.
2185
2186[[pack.deltacompression]]pack.deltacompression::
2187+
2188If true, delta compression between objects is enabled. This may
2189result in a smaller overall transfer for the client, but requires
2190more server memory and CPU time.
2191+
2192False (off) by default, matching Gerrit Code Review 2.1.4.
2193
2194[[pack.threads]]pack.threads::
2195+
2196Maximum number of threads to use for delta compression (if enabled).
2197This is per-client request. If set to 0 then the number of CPUs is
2198auto-detected and one thread per CPU is used, per client request.
2199+
2200By default, 1.
2201
2202
Shawn O. Pearce5ad16ea2012-05-09 14:24:25 -07002203[[plugins]]Section plugins
2204~~~~~~~~~~~~~~~~~~~~~~~~~~
2205
2206[[plugins.checkFrequency]]plugins.checkFrequency::
2207+
2208How often plugins should be examined for new plugins to load, removed
2209plugins to be unloaded, or updated plugins to be reloaded. Values can
2210be specified using standard time unit abbreviations ('ms', 'sec',
2211'min', etc.).
2212+
2213If set to 0, automatic plugin reloading is disabled. Administrators
2214may force reloading with link:cmd-plugin.html[gerrit plugin reload].
2215+
2216Default is 1 minute.
2217
2218
lincoln2be11602010-07-05 10:53:25 -03002219[[receive]]Section receive
2220~~~~~~~~~~~~~~~~~~~~~~~~~~
Sasa Zivkov59d89c32011-11-18 15:32:35 +01002221This section is used to set who can execute the 'receive-pack' and
2222to limit the maximum Git object size that 'receive-pack' will accept.
2223'receive-pack' is what runs on the server during a user's push or
Dave Borowitz234734a2012-03-01 14:22:29 -08002224repo upload command. It also contains some advanced options for tuning the
2225behavior of Gerrit's 'receive-pack' mechanism.
lincoln2be11602010-07-05 10:53:25 -03002226
2227----
2228[receive]
2229 allowGroup = GROUP_ALLOWED_TO_EXECUTE
2230 allowGroup = YET_ANOTHER_GROUP_ALLOWED_TO_EXECUTE
Sasa Zivkov59d89c32011-11-18 15:32:35 +01002231 maxObjectSizeLimit = 40 m
lincoln2be11602010-07-05 10:53:25 -03002232----
2233
Shawn Pearce5cb31bf2013-02-27 16:20:26 -08002234[[receive.checkMagicRefs]]receive.checkMagicRefs::
2235+
2236If true, Gerrit will verify the destination repository has
2237no references under the magic 'refs/drafts', 'refs/for', or
2238'refs/publish' branch namespaces. Names under these locations
2239confuse clients when trying to upload code reviews so Gerrit
2240requires them to be empty.
2241+
2242If false Gerrit skips the sanity check and assumes administrators
2243have ensured the repository does not contain any magic references.
2244Setting to false to skip the check can decrease latency during push.
2245+
2246Default is true.
2247
Gustaf Lundh9062fd62013-02-14 17:23:11 +01002248[[receive.checkReferencedObjectsAreReachable]]receive.checkReferencedObjectsAreReachable::
2249+
2250If set to true, Gerrit will validate that all referenced objects that
2251are not included in the received pack are reachable by the user.
2252+
2253Carrying out this check on gits with many refs and commits can be a
2254very CPU-heavy operation. For non public Gerrit-servers this check may
2255be overkill.
2256+
2257Only disable this check if you trust the clients not to forge SHA1
2258references to access commits intended to be hidden from the user.
2259+
2260Default is true.
2261
lincoln2be11602010-07-05 10:53:25 -03002262[[receive.allowGroup]]receive.allowGroup::
2263+
2264Name of the groups of users that are allowed to execute
2265'receive-pack' on the server. One or more groups can be set.
2266+
2267If no groups are added, any user will be allowed to execute
2268'receive-pack' on the server.
2269
Sasa Zivkov59d89c32011-11-18 15:32:35 +01002270[[receive.maxObjectSizeLimit]]receive.maxObjectSizeLimit::
2271+
2272Maximum allowed Git object size that 'receive-pack' will accept.
2273If an object is larger than the given size the pack-parsing will abort
2274and the push operation will fail. If set to zero then there is no
2275limit.
2276+
David Pursehouse221d4f62012-06-08 17:38:08 +09002277Gerrit administrators can use this setting to prevent developers
Sasa Zivkov59d89c32011-11-18 15:32:35 +01002278from pushing objects which are too large to Gerrit.
2279+
Fredrik Luthandera3cf3542012-07-04 16:55:35 -07002280This setting can also be set in the `project.config`
2281link:config-project-config.html[receive.maxObjectSizeLimit] in order
2282to further reduce the global setting. The project specific setting is
2283only honored when it further reduces the global limit.
Sasa Zivkov5a708a82013-06-28 17:07:55 +02002284+
Sasa Zivkov59d89c32011-11-18 15:32:35 +01002285Default is zero.
2286+
2287Common unit suffixes of 'k', 'm', or 'g' are supported.
2288
Dave Borowitz234734a2012-03-01 14:22:29 -08002289[[receive.threadPoolSize]]receive.threadPoolSize::
2290+
2291Maximum size of the thread pool in which the change data in received packs is
2292processed.
2293+
2294Defaults to the number of available CPUs according to the Java runtime.
2295
Shawn O. Pearcec545c092012-07-27 16:38:55 -07002296[[receive.changeUpdateThreads]]receive.changeUpdateThreads::
2297+
2298Number of threads to perform change creation or patch set updates
2299concurrently. Each thread uses its own database connection from
2300the database connection pool, and if all threads are busy then
2301main receive thread will also perform a change creation or patch
2302set update.
2303+
2304Defaults to 1, using only the main receive thread. This feature is for
David Pursehouse92463562013-06-24 10:16:28 +09002305databases with very high latency that can benefit from concurrent
Shawn O. Pearcec545c092012-07-27 16:38:55 -07002306operations when multiple changes are impacted at once.
2307
Dave Borowitz1c401362012-03-02 17:39:17 -08002308[[receive.timeout]]receive.timeout::
2309+
Shawn O. Pearce00dd12d2012-03-12 15:52:11 -07002310Overall timeout on the time taken to process the change data in
2311received packs. Only includes the time processing Gerrit changes
2312and updating references, not the time to index the pack. Values can
2313be specified using standard time unit abbreviations ('ms', 'sec',
2314'min', etc.).
Dave Borowitz1c401362012-03-02 17:39:17 -08002315+
David Pursehouse92463562013-06-24 10:16:28 +09002316Default is 2 minutes. If no unit is specified, milliseconds
Shawn O. Pearce00dd12d2012-03-12 15:52:11 -07002317is assumed.
Dave Borowitz1c401362012-03-02 17:39:17 -08002318
lincoln2be11602010-07-05 10:53:25 -03002319
Hugo Josefson072b4702010-04-21 19:27:11 +02002320[[repository]]Section repository
2321~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2322Repositories in this sense are the same as projects.
2323
Shawn O. Pearce897d9212011-06-16 16:59:59 -07002324In the following example configuration `Registered Users` is set
2325to be the default owner of new projects.
Hugo Josefson072b4702010-04-21 19:27:11 +02002326
2327----
2328[repository "*"]
Hugo Josefson072b4702010-04-21 19:27:11 +02002329 ownerGroup = Registered Users
2330----
2331
2332[NOTE]
2333Currently only the repository name `*` is supported.
2334This is a wildcard designating all repositories.
2335
Edwin Kempina79ea552013-11-19 11:24:37 +01002336[[repository.name.defaultSubmitType]]repository.<name>.defaultSubmitType::
2337+
2338The default submit type for newly created projects. Supported values
2339are `MERGE_IF_NECESSARY`, `FAST_FORWARD_ONLY`, `REBASE_IF_NECESSARY`,
2340`MERGE_ALWAYS` and `CHERRY_PICK`.
2341+
2342By default, `MERGE_IF_NECESSARY`.
2343
Hugo Josefson072b4702010-04-21 19:27:11 +02002344[[repository.name.ownerGroup]]repository.<name>.ownerGroup::
2345+
2346A name of a group which exists in the database. Zero, one or many
2347groups are allowed. Each on its own line. Groups which don't exist
2348in the database are ignored.
Hugo Josefson072b4702010-04-21 19:27:11 +02002349
Shawn O. Pearce94860ee2011-09-29 13:11:08 -07002350[[rules]]Section rules
2351~~~~~~~~~~~~~~~~~~~~~~
2352
2353[[rules.enable]]rules.enable::
2354+
2355If true, Gerrit will load and excute 'rules.pl' files in each
2356project's refs/meta/config branch, if present. When set to false,
2357only the default internal rules will be used.
2358+
2359Default is true, to execute project specific rules.
2360
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -07002361[[sendemail]]Section sendemail
2362~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07002363
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002364[[sendemail.enable]]sendemail.enable::
Shawn O. Pearce2e4573b2009-06-02 09:09:50 -07002365+
2366If false Gerrit will not send email messages, for any reason,
2367and all other properties of section sendemail are ignored.
2368+
2369By default, true, allowing notifications to be sent.
2370
Shawn O. Pearce5c31bd72009-09-10 18:13:33 -07002371[[sendemail.from]]sendemail.from::
2372+
2373Designates what name and address Gerrit will place in the From
2374field of any generated email messages. The supported values are:
2375+
2376* `USER`
2377+
2378Gerrit will set the From header to use the current user's
David Pursehouse92463562013-06-24 10:16:28 +09002379Full Name and Preferred Email. This may cause messages to be
Shawn O. Pearce5c31bd72009-09-10 18:13:33 -07002380classified as spam if the user's domain has SPF or DKIM enabled
2381and <<sendemail.smtpServer,sendemail.smtpServer>> is not a trusted
2382relay for that domain.
2383+
2384* `MIXED`
2385+
Edwin Kempincdb0e002011-09-08 14:23:30 +02002386Shorthand for `${user} (Code Review) <review@example.com>` where
Shawn O. Pearce5c31bd72009-09-10 18:13:33 -07002387`review@example.com` is the same as <<user.email,user.email>>.
2388See below for a description of how the replacement is handled.
2389+
2390* `SERVER`
2391+
2392Gerrit will set the From header to the same name and address
2393it records in any commits Gerrit creates. This is set by
2394<<user.name,user.name>> and <<user.email,user.email>>, or guessed
2395from the local operating system.
2396+
2397* 'Code Review' `<`'review'`@`'example.com'`>`
2398+
2399If set to a name and email address in brackets, Gerrit will use
2400this name and email address for any messages, overriding the name
2401that may have been selected for commits by user.name and user.email.
Edwin Kempincdb0e002011-09-08 14:23:30 +02002402Optionally, the name portion may contain the placeholder `${user}`,
Shawn O. Pearce5c31bd72009-09-10 18:13:33 -07002403which is replaced by the Full Name of the current user.
2404
2405+
2406By default, MIXED.
2407
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002408[[sendemail.smtpServer]]sendemail.smtpServer::
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07002409+
2410Hostname (or IP address) of a SMTP server that will relay
2411messages generated by Gerrit to end users.
2412+
2413By default, 127.0.0.1 (aka localhost).
2414
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002415[[sendemail.smtpServerPort]]sendemail.smtpServerPort::
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07002416+
2417Port number of the SMTP server in sendemail.smtpserver.
2418+
Shawn O. Pearce6e9a83f2009-11-02 10:30:48 -08002419By default, 25, or 465 if smtpEncryption is 'ssl'.
2420
2421[[sendemail.smtpEncryption]]sendemail.smtpEncryption::
2422+
2423Specify the encryption to use, either 'ssl' or 'tls'.
2424+
2425By default, 'none', indicating no encryption is used.
2426
2427[[sendemail.sslVerify]]sendemail.sslVerify::
2428+
2429If false and sendemail.smtpEncryption is 'ssl' or 'tls', Gerrit
2430will not verify the server certificate when it connects to send
2431an email message.
2432+
2433By default, true, requiring the certificate to be verified.
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07002434
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002435[[sendemail.smtpUser]]sendemail.smtpUser::
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07002436+
2437User name to authenticate with, if required for relay.
2438
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002439[[sendemail.smtpPass]]sendemail.smtpPass::
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07002440+
2441Password for the account named by sendemail.smtpUser.
2442
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002443[[sendemail.allowrcpt]]sendemail.allowrcpt::
Shawn O. Pearce219a8ee2009-06-01 18:13:57 -07002444+
2445If present, each value adds one entry to the whitelist of email
2446addresses that Gerrit can send email to. If set to a complete
2447email address, that one address is added to the white list.
2448If set to a domain name, any address at that domain can receive
2449email from Gerrit.
2450+
2451By default, unset, permitting delivery to any email address.
2452
Shawn O. Pearce02aacbc2012-06-12 13:44:22 -07002453[[sendemail.includeDiff]]sendemail.includeDiff::
2454+
Bruce Zueb00ff32012-11-27 17:38:10 +08002455If true, new change emails and merged change emails from Gerrit
2456will include the complete unified diff of the change.
2457Variable maxmimumDiffSize places an upper limit on how large the
2458email can get when this option is enabled.
Shawn O. Pearce02aacbc2012-06-12 13:44:22 -07002459+
2460By default, false.
2461
Shawn O. Pearce28a950b2012-06-12 14:36:34 -07002462[[sendemail.maximumDiffSize]]sendemail.maximumDiffSize::
2463+
2464Largest size of unified diff output to include in an email. When
2465the diff exceeds this size the file paths will be listed instead.
2466Standard byte unit suffixes are supported.
2467+
2468By default, 256 KiB.
2469
Alex Blewitt9cca7402011-02-11 01:39:30 +00002470[[sendemail.importance]]sendemail.importance::
2471+
2472If present, emails sent from Gerrit will have the given level
2473of importance. Valid values include 'high' and 'low', which
2474email clients will render in different ways.
2475+
2476By default, unset, so no Importance header is generated.
2477
2478[[sendemail.expiryDays]]sendemail.expiryDays::
2479+
2480If present, emails sent from Gerrit will expire after the given
2481number of days. This will add the Expiry-Date header and
2482email clients may expire or expunge mails whose Expiry-Date
2483header is in the past. This should be a positive non-zero
2484number indicating how many days in the future the mails
2485should expire.
2486+
2487By default, unset, so no Expiry-Date header is generated.
2488
Shawn O. Pearcedba97642011-09-07 20:12:31 -07002489
2490[[site]]Section site
2491~~~~~~~~~~~~~~~~~~~~
2492
2493[[site.checkUserAgent]]site.checkUserAgent::
2494+
2495If true the server checks the User-Agent HTTP header and sends the
2496correct JavaScript to the client as part of the initial page load.
2497This usually reduces a round-trip for the client, allowing the UI to
2498start more quickly. If false, a tiny JavaScript loader is sent to the
2499client instead to determine the correct code to use. Default is true.
2500
2501[[site.refreshHeaderFooter]]site.refreshHeaderFooter::
2502+
2503If true the server checks the site header, footer and CSS files for
2504updated versions. If false, a server restart is required to change
2505any of these resources. Default is true, allowing automatic reloads.
2506
Shawn O. Pearce6bd04fd2012-04-05 14:39:22 -07002507[[site.enableDeprecatedQuery]]site.enableDeprecatedQuery::
2508+
2509If true the deprecated `/query` URL is available to return JSON
2510and text results for changes. If false, the URL is disabled and
2511returns 404 to clients. Default is true, enabling `/query`.
2512
Shawn O. Pearce521380a2012-05-11 14:57:56 -07002513[[ssh-alias]] Section ssh-alias
2514~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2515
2516Variables in section ssh-alias permit the site administrator to alias
2517another command from Gerrit or a plugin into the `gerrit` command
2518namespace. To alias `replication start` to `gerrit replicate`:
2519
2520----
2521[ssh-alias]
2522 replicate = replication start
2523----
Shawn O. Pearcedba97642011-09-07 20:12:31 -07002524
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -07002525[[sshd]] Section sshd
Shawn O. Pearcea758fef2009-08-19 08:29:32 -07002526~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearce9410f2c2009-05-14 10:26:47 -07002527
David Ostrovskye5b7f1a2013-10-23 21:10:39 +02002528[[sshd.backend]]sshd.backend::
2529+
2530Starting from version 0.9.0 Apache SSHD project added support for NIO2
2531IoSession. To use the new NIO2 session the `backend` option must be set
2532to `NIO2`.
2533+
2534By default, `MINA`.
2535
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002536[[sshd.listenAddress]]sshd.listenAddress::
Shawn O. Pearce1d3cb4442009-05-30 14:03:31 -07002537+
2538Specifies the local addresses the internal SSHD should listen
2539for connections on. The following forms may be used to specify
2540an address. In any form, `:'port'` may be omitted to use the
2541default of 29418.
2542+
2543* 'hostname':'port' (for example `review.example.com:29418`)
2544* 'IPv4':'port' (for example `10.0.0.1:29418`)
2545* ['IPv6']:'port' (for example `[ff02::1]:29418`)
Edwin Kempincdb0e002011-09-08 14:23:30 +02002546* *:'port' (for example `*:29418`)
Shawn O. Pearce1d3cb4442009-05-30 14:03:31 -07002547
2548+
2549If multiple values are supplied, the daemon will listen on all
2550of them.
2551+
Shawn O. Pearce6af6f5f2010-06-08 17:38:43 -07002552To disable the internal SSHD, set listenAddress to `off`.
2553+
Shawn O. Pearce1d3cb4442009-05-30 14:03:31 -07002554By default, *:29418.
2555
James Y Knight910bd862011-01-11 20:05:56 -05002556[[sshd.advertisedAddress]]sshd.advertisedAddress::
2557+
2558Specifies the addresses clients should be told to connect to.
2559This may differ from sshd.listenAddress if a firewall based port
2560redirector is being used, making Gerrit appear to answer on port
256122. The following forms may be used to specify an address. In any
2562form, `:'port'` may be omitted to use the default SSH port of 22.
2563+
2564* 'hostname':'port' (for example `review.example.com:22`)
2565* 'IPv4':'port' (for example `10.0.0.1:29418`)
2566* ['IPv6']:'port' (for example `[ff02::1]:29418`)
2567
2568+
2569If multiple values are supplied, the daemon will advertise all
2570of them.
2571+
2572By default, sshd.listenAddress.
2573
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002574[[sshd.tcpKeepAlive]]sshd.tcpKeepAlive::
Shawn O. Pearcefc9081f2009-05-14 10:26:59 -07002575+
2576If true, enables TCP keepalive messages to the other side, so
2577the daemon can terminate connections if the peer disappears.
2578+
David Ostrovskye5b7f1a2013-10-23 21:10:39 +02002579Only effective when `sshd.backend` is set to `MINA`.
2580+
Shawn O. Pearcefc9081f2009-05-14 10:26:59 -07002581By default, true.
2582
Shawn O. Pearce1a4580b2009-11-19 17:37:10 -08002583[[sshd.threads]]sshd.threads::
2584+
2585Number of threads to use when executing SSH command requests.
2586If additional requests are received while all threads are busy they
David Pursehouse221d4f62012-06-08 17:38:08 +09002587are queued and serviced in a first-come-first-served order.
Shawn O. Pearce1a4580b2009-11-19 17:37:10 -08002588+
2589By default, 1.5x the number of CPUs available to the JVM.
2590
Nico Sallembienfc53f7f2010-05-18 16:40:10 -07002591[[sshd.batchThreads]]sshd.batchThreads::
2592+
2593Number of threads to allocate for SSH command requests from
Fredrik Luthander46843022012-03-13 16:11:02 +01002594link:access-control.html#non-interactive_users[non-interactive users].
2595If equals to 0, then all non-interactive requests are executed in the same
2596queue as interactive requests.
Nico Sallembienfc53f7f2010-05-18 16:40:10 -07002597+
2598Any other value will remove the number of threads from the queue
2599allocated to interactive users, and create a separate thread pool
2600of the requested size, which will be used to run commands from
2601non-interactive users.
2602+
2603If the number of threads requested for non-interactive users is larger
2604than the total number of threads allocated in sshd.threads, then the
David Pursehouse92463562013-06-24 10:16:28 +09002605value of sshd.threads is increased to accommodate the requested value.
Nico Sallembienfc53f7f2010-05-18 16:40:10 -07002606+
2607By default, 0.
2608
Kenny Root15ac1b82010-02-24 00:29:20 -08002609[[sshd.streamThreads]]sshd.streamThreads::
2610+
2611Number of threads to use when formatting events to asynchronous
2612streaming clients. Event formatting is multiplexed onto this thread
2613pool by a simple FIFO scheduling system.
2614+
2615By default, 1 plus the number of CPUs available to the JVM.
2616
Edwin Kempinb5df3b82011-10-10 11:31:14 +02002617[[sshd.commandStartThreads]]sshd.commandStartThreads::
Shawn O. Pearced6296552011-05-15 13:56:30 -07002618+
2619Number of threads used to parse a command line submitted by a client
2620over SSH for execution, create the internal data structures used by
2621that command, and schedule it for execution on another thread.
2622+
2623By default, 2.
2624
Shawn O. Pearce8a0bf362010-11-05 17:49:41 -07002625[[sshd.maxAuthTries]]sshd.maxAuthTries::
2626+
2627Maximum number of authentication attempts before the server
2628disconnects the client. Each public key that a client has loaded
2629into its local agent counts as one auth request. Users can work
2630around the server's limit by loading less keys into their agent,
2631or selecting a specific key in their `~/.ssh/config` file with
2632the `IdentityFile` option.
2633+
2634By default, 6.
2635
2636[[sshd.loginGraceTime]]sshd.loginGraceTime::
2637+
2638Time in seconds that a client has to authenticate before the server
2639automatically terminates their connection. Values should use common
2640unit suffixes to express their setting:
2641+
2642* s, sec, second, seconds
2643* m, min, minute, minutes
2644* h, hr, hour, hours
2645* d, day, days
2646
2647+
2648By default, 2 minutes.
2649
Christian Aistleitner3d794592013-04-08 00:19:40 +02002650[[sshd.idleTimeout]]sshd.idleTimeout::
2651+
2652Time in seconds after which the server automatically terminates idle
2653connections (or 0 to disable closing of idle connections). Values
2654should use common unit suffixes to express their setting:
2655+
2656* s, sec, second, seconds
2657* m, min, minute, minutes
2658* h, hr, hour, hours
2659* d, day, days
2660
2661+
2662By default, 0.
2663
Shawn O. Pearce8a0bf362010-11-05 17:49:41 -07002664[[sshd.maxConnectionsPerUser]]sshd.maxConnectionsPerUser::
2665+
2666Maximum number of concurrent SSH sessions that a user account
2667may open at one time. This is the number of distinct SSH logins
David Pursehouse221d4f62012-06-08 17:38:08 +09002668that each user may have active at one time, and is not related to
Shawn O. Pearce8a0bf362010-11-05 17:49:41 -07002669the number of commands a user may issue over a single connection.
2670If set to 0, there is no limit.
2671+
2672By default, 64.
2673
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002674[[sshd.cipher]]sshd.cipher::
Shawn O. Pearce0bf2f522009-05-14 11:02:03 -07002675+
2676Available ciphers. To permit multiple ciphers, specify multiple
2677`sshd.cipher` keys in the configuration file, one cipher name
2678per key. Cipher names starting with `+` are enabled in addition
2679to the default ciphers, cipher names starting with `-` are removed
2680from the default cipher set.
2681+
2682Supported ciphers: aes128-cbc, aes128-cbc, aes256-cbc, blowfish-cbc,
26833des-cbc, none.
2684+
2685By default, all supported ciphers except `none` are available.
2686
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002687[[sshd.mac]]sshd.mac::
Shawn O. Pearce0bf2f522009-05-14 11:02:03 -07002688+
2689Available MAC (message authentication code) algorithms. To permit
2690multiple algorithms, specify multiple `sshd.mac` keys in the
2691configuration file, one MAC per key. MAC names starting with `+`
2692are enabled in addition to the default MACs, MAC names starting with
2693`-` are removed from the default MACs.
2694+
2695Supported MACs: hmac-md5, hmac-md5-96, hmac-sha1, hmac-sha1-96.
2696+
2697By default, all supported MACs are available.
2698
Alex Blewitt7efb06f2013-04-01 12:46:48 -04002699[[sshd.kerberosKeytab]]sshd.kerberosKeytab::
2700+
2701Enable kerberos authentication for SSH connections. To permit
2702kerberos authentication, the server must have a host principal
2703(see `sshd.kerberosPrincipal`) which is acquired from a keytab.
2704This must be provisioned by the kerberos administrators, and is
2705typically installed into `/etc/krb5.keytab` on host machines.
2706+
2707The keytab must contain at least one `host/` principal, typically
2708using the host's canonical name. If it does not use the
2709canonical name, the `sshd.kerberosPrincipal` should be configured
2710with the correct name.
2711+
2712By default, not set and so kerberos authentication is not enabled.
2713
2714[[sshd.kerberosPrincipal]]sshd.kerberosPrincipal::
2715+
2716If kerberos authentication is enabled with `sshd.kerberosKeytab`,
2717instead use the given principal name instead of the default.
2718If the principal does not begin with `host/` a warning message is
2719printed and may prevent successful authentication.
2720+
2721This may be useful if the host is behind an IP load balancer or
2722other SSH forwarding systems, since the principal name is constructed
2723by the client and must match for kerberos authentication to work.
2724+
2725By default, `host/canonical.host.name`
2726
Shawn Pearce318bfca2013-10-17 22:15:38 -07002727[[sshd.requestLog]]sshd.requestLog::
2728+
2729Enable (or disable) the `'$site_path'/logs/sshd_log` request log.
2730If enabled, a request log file is written out by the SSH daemon.
2731+
David Ostrovsky8e4a9902013-11-19 23:57:48 +01002732`log4j.appender` with the name `sshd_log` can be configured to overwrite
2733programmatic configuration.
2734+
Shawn Pearce318bfca2013-10-17 22:15:38 -07002735By default, true.
2736
Shawn O. Pearce07bd6fb2011-04-29 19:15:47 -07002737[[suggest]] Section suggest
2738~~~~~~~~~~~~~~~~~~~~~~~~~~~
2739
Dave Borowitz1ae8c532012-03-09 18:39:40 -08002740[[suggest.accounts]]suggest.accounts::
Shawn O. Pearce07bd6fb2011-04-29 19:15:47 -07002741+
Dave Borowitz45baa892012-02-23 16:43:05 -08002742If `true`, visible user accounts (according to the value of
2743`accounts.visibility`) will be offered as completion suggestions
2744when adding a reviewer to a change, or a user to a group.
Shawn O. Pearce07bd6fb2011-04-29 19:15:47 -07002745+
Dave Borowitz45baa892012-02-23 16:43:05 -08002746If `false`, account suggestion is disabled.
Shawn O. Pearce07bd6fb2011-04-29 19:15:47 -07002747+
Dave Borowitz45baa892012-02-23 16:43:05 -08002748Older configurations may also have one of the `accounts.visibility`
2749values for this field, including `OFF` as a synonym for `NONE`. If
2750`accounts.visibility` is also set, that value overrides this one;
2751otherwise, this value applies to both `suggest.accounts` and
2752`accounts.visibility`.
Edwin Kempin42488812011-05-20 03:11:43 +02002753+
Dave Borowitz45baa892012-02-23 16:43:05 -08002754New configurations should prefer the boolean value for this field
2755and an enum value for `accounts.visibility`.
Shawn O. Pearce07bd6fb2011-04-29 19:15:47 -07002756
Edwin Kempinf957dc22012-10-19 20:41:18 +02002757[[suggest.from]]suggest.from::
2758+
2759The number of characters that a user must have typed before suggestions
2760are provided. If set to 0, suggestions are always provided.
2761+
2762By default 0.
2763
Shawn O. Pearce2ba3ab42010-02-25 12:10:10 -08002764[[theme]] Section theme
2765~~~~~~~~~~~~~~~~~~~~~~~
2766
2767[[theme.backgroundColor]]theme.backgroundColor::
2768+
2769Background color for the page, and major data tables like the all
2770open changes table or the account dashboard. The value must be a
2771valid HTML hex color code, or standard color name.
2772+
Chad Horohoebbdf7482012-11-13 18:23:15 -08002773By default white, `FFFFFF`.
Shawn O. Pearce2ba3ab42010-02-25 12:10:10 -08002774
2775[[theme.topMenuColor]]theme.topMenuColor::
2776+
2777This is the color of the main menu bar at the top of the page.
2778The value must be a valid HTML hex color code, or standard color
Chad Horohoebbdf7482012-11-13 18:23:15 -08002779name.
2780+
2781By default white, `FFFFFF`.
Shawn O. Pearce2ba3ab42010-02-25 12:10:10 -08002782
2783[[theme.textColor]]theme.textColor::
2784+
2785Text color for the page, and major data tables like the all
2786open changes table or the account dashboard. The value must be a
2787valid HTML hex color code, or standard color name.
2788+
Chad Horohoebbdf7482012-11-13 18:23:15 -08002789By default dark grey, `353535`.
Shawn O. Pearce2ba3ab42010-02-25 12:10:10 -08002790
2791[[theme.trimColor]]theme.trimColor::
2792+
2793Primary color used as a background color behind text. This is
2794the color of the main menu bar at the top, of table headers,
2795and of major UI areas that we want to offset from other portions
2796of the page. The value must be a valid HTML hex color code, or
2797standard color name.
2798+
Chad Horohoebbdf7482012-11-13 18:23:15 -08002799By default a light grey, `EEEEEE`.
Shawn O. Pearce2ba3ab42010-02-25 12:10:10 -08002800
2801[[theme.selectionColor]]theme.selectionColor::
2802+
2803Background color used within a trimColor area to denote the currently
2804selected tab, or the background color used in a table to denote the
2805currently selected row. The value must be a valid HTML hex color
2806code, or standard color name.
2807+
Chad Horohoebbdf7482012-11-13 18:23:15 -08002808By default a pale blue, `D8EDF9`.
Shawn O. Pearce2ba3ab42010-02-25 12:10:10 -08002809
Andrew Hutchingscfd7abb2012-06-29 10:57:05 +01002810[[theme.changeTableOutdatedColor]]theme.changeTableOutdatedColor::
2811+
2812Background color used for patch outdated messages. The value must be
2813a valid HTML hex color code, or standard color name.
2814+
Edwin Kempinb0347332012-07-17 10:14:32 +02002815By default a shade of red, `F08080`.
Andrew Hutchingscfd7abb2012-06-29 10:57:05 +01002816
2817[[theme.tableOddRowColor]]theme.tableOddRowColor::
2818+
2819Background color for tables such as lists of open reviews for odd
2820rows. This is so you can have a different color for odd and even
2821rows of the table. The value must be a valid HTML hex color code,
2822or standard color name.
2823+
2824By default transparent.
2825
2826[[theme.tableEvenRowColor]]theme.tableEvenRowColor::
2827+
2828Background color for tables such as lists of open reviews for even
2829rows. This is so you can have a different color for odd and even
2830rows of the table. The value must be a valid HTML hex color code,
2831or standard color name.
2832+
2833By default transparent.
2834
Shawn O. Pearcea83bb1c2011-05-20 08:46:48 -07002835A different theme may be used for signed-in vs. signed-out user status
2836by using the "signed-in" and "signed-out" theme sections. Variables
2837not specified in a section are inherited from the default theme.
2838
2839----
2840[theme]
2841 backgroundColor = FFFFFF
2842[theme "signed-in"]
2843 backgroundColor = C0C0C0
2844[theme "signed-out"]
2845 backgroundColor = 00FFFF
2846----
2847
David Ostrovsky117c6032013-08-09 00:44:56 +02002848As example, here is the theme configuration to have the old green look:
2849
2850----
2851[theme]
2852 backgroundColor = FCFEEF
2853 textColor = 000000
2854 trimColor = D4E9A9
2855 selectionColor = FFFFCC
2856 topMenuColor = D4E9A9
2857 changeTableOutdatedColor = F08080
2858[theme "signed-in"]
2859 backgroundColor = FFFFFF
2860----
2861
Goran Lungberg04132a12010-06-15 17:20:37 -07002862[[trackingid]] Section trackingid
Shawn O. Pearce91763a02010-06-16 15:39:33 -07002863~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Goran Lungberg04132a12010-06-15 17:20:37 -07002864
Shawn O. Pearcee800b1e2010-06-16 17:33:43 -07002865Tagged footer lines containing references to external
2866tracking systems, parsed out of the commit message and
Shawn Pearceff61c8a2013-10-07 19:35:53 -07002867saved in Gerrit's database.
2868
2869After making changes to this section, existing changes
2870must be reindexed with link:pgm-reindex.html[reindex]
2871if index.type is `LUCENE` or `SOLR`; or with
2872link:pgm-ScanTrackingIds.html[ScanTrackingIds] if index.type
2873is unset or `SQL`.
Goran Lungberg04132a12010-06-15 17:20:37 -07002874
Edwin Kempinbb421f12011-08-25 11:19:00 +02002875The tracking ids are searchable using tr:<tracking id> or
Shawn O. Pearce91763a02010-06-16 15:39:33 -07002876bug:<tracking id>.
Goran Lungberg04132a12010-06-15 17:20:37 -07002877
2878----
2879[trackingid "jira-bug"]
2880 footer = Bugfix:
2881 match = JRA\\d{2,8}
2882 system = JIRA
2883
2884[trackingid "jira-feature"]
2885 footer = Feature
2886 match = JRA(\\d{2,8})
2887 system = JIRA
2888----
2889
2890[[trackingid.name.footer]]trackingid.<name>.footer::
2891+
2892A prefix tag that identify the footer line to parse for tracking ids.
Kevin Degi9af42ea2011-08-01 15:54:42 -06002893Several trackingid entries can have the same footer tag. A single
2894trackingid entry can have multiple footer tags. If multiple footer
2895tags are specified, each tag will be parsed separately.
Goran Lungberg04132a12010-06-15 17:20:37 -07002896(the trailing ":" is optional)
2897
2898[[trackingid.name.match]]trackingid.<name>.match::
2899+
Magnus Bäcke5611832011-02-02 08:57:15 +01002900A link:http://download.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html[standard
2901Java regular expression (java.util.regex)] used to match the
2902external tracking id part of the footer line. The match can
2903result in several entries in the DB. If grouping is used in the
2904regex the first group will be interpreted as the tracking id.
Christian Aistleitner5cec3682013-03-16 23:02:37 +01002905Tracking ids longer than 32 characters will be ignored.
Goran Lungberg04132a12010-06-15 17:20:37 -07002906+
2907The configuration file parser eats one level of backslashes, so the
2908character class `\s` requires `\\s` in the configuration file. The
2909parser also terminates the line at the first `#`, so a match
2910expression containing # must be wrapped in double quotes.
2911
2912[[trackingid.name.system]]trackingid.<name>.system::
2913+
David Pursehouse221d4f62012-06-08 17:38:08 +09002914The name of the external tracking system (maximum 10 characters).
Goran Lungberg04132a12010-06-15 17:20:37 -07002915It is possible to have several trackingid entries for the same
2916tracking system.
2917
Shawn O. Pearce6e4dfdd2010-05-12 17:26:08 -07002918[[transfer]] Section transfer
2919~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2920
2921[[transfer.timeout]]transfer.timeout::
2922+
2923Number of seconds to wait for a single network read or write
2924to complete before giving up and declaring the remote side is
2925not responding. If 0, there is no timeout, and this server will
2926wait indefinitely for a transfer to finish.
2927+
2928A timeout should be large enough to mostly transfer the objects to
2929the other side. 1 second may be too small for larger projects,
2930especially over a WAN link, while 10-30 seconds is a much more
2931reasonable timeout value.
2932+
2933Defaults to 0 seconds, wait indefinitely.
2934
lincoln2be11602010-07-05 10:53:25 -03002935
2936[[upload]]Section upload
Remy Bohmer203eea32012-02-19 21:21:36 +01002937~~~~~~~~~~~~~~~~~~~~~~~~
lincoln2be11602010-07-05 10:53:25 -03002938Sets the group of users allowed to execute 'upload-pack' on the
2939server, 'upload-pack' is what runs on the server during a user's
2940fetch, clone or repo sync command.
2941
2942----
2943[upload]
2944 allowGroup = GROUP_ALLOWED_TO_EXECUTE
2945 allowGroup = YET_ANOTHER_GROUP_ALLOWED_TO_EXECUTE
2946----
2947
2948[[upload.allowGroup]]upload.allowGroup::
2949+
2950Name of the groups of users that are allowed to execute 'upload-pack'
2951on the server. One or more groups can be set.
2952+
2953If no groups are added, any user will be allowed to execute
2954'upload-pack' on the server.
2955
2956
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -07002957[[user]] Section user
Shawn O. Pearcea758fef2009-08-19 08:29:32 -07002958~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearce0a351912009-06-01 08:14:46 -07002959
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002960[[user.name]]user.name::
Shawn O. Pearce0a351912009-06-01 08:14:46 -07002961+
2962Name that Gerrit calls itself in Git when it creates a new Git
2963commit, such as a merge during change submission.
2964+
2965By default this is "Gerrit Code Review".
2966
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002967[[user.email]]user.email::
Shawn O. Pearce0a351912009-06-01 08:14:46 -07002968+
2969Email address that Gerrit refers to itself as when it creates a
2970new Git commit, such as a merge commit during change submission.
2971+
2972If not set, Gerrit generates this as "gerrit@`hostname`", where
2973`hostname` is the hostname of the system Gerrit is running on.
2974+
2975By default, not set, generating the value at startup.
2976
Edwin Kempin0e02ded2011-09-16 15:10:14 +02002977[[user.anonymousCoward]]user.anonymousCoward::
2978+
David Pursehouse13b21902013-10-16 12:59:18 +09002979Username that is displayed in the Gerrit WebUI and in e-mail
Edwin Kempin0e02ded2011-09-16 15:10:14 +02002980notifications if the full name of the user is not set.
2981+
2982By default "Anonymous Coward" is used.
2983
Shawn O. Pearce0bf2f522009-05-14 11:02:03 -07002984
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08002985File `etc/secure.config`
Remy Bohmer203eea32012-02-19 21:21:36 +01002986------------------------
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08002987The optional file `'$site_path'/etc/secure.config` overrides (or
2988supplements) the settings supplied by `'$site_path'/etc/gerrit.config`.
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08002989The file should be readable only by the daemon process and can be
2990used to contain private configuration entries that wouldn't normally
2991be exposed to everyone.
2992
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08002993Sample `etc/secure.config`:
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08002994----
Shawn O. Pearce34f38cf2011-06-16 19:18:54 -07002995[auth]
2996 registerEmailPrivateKey = 2zHNrXE2bsoylzUqDxZp0H1cqUmjgWb6
Brad Larson3a6f0772012-07-25 11:41:22 -05002997 restTokenPrivateKey = 7e40PzCjlUKOnXATvcBNXH6oyiu+r0dFk2c=
Shawn O. Pearce34f38cf2011-06-16 19:18:54 -07002998
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08002999[database]
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08003000 username = webuser
3001 password = s3kr3t
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08003002
3003[ldap]
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08003004 password = l3tm3srch
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08003005
3006[httpd]
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08003007 sslKeyPassword = g3rr1t
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08003008
3009[sendemail]
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08003010 smtpPass = sp@m
Shawn O. Pearce7929d872011-05-15 13:33:15 -07003011
3012[remote "bar"]
3013 password = s3kr3t
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08003014----
3015
Johan Bjork3e5ee302012-01-27 17:59:54 +01003016File `etc/peer_keys`
3017--------------------
3018
3019The optional file `'$site_path'/etc/peer_keys` controls who can
3020login as the 'Gerrit Code Review' user, required for the link:cmd-suexec.html[suexec]
3021command.
3022
3023The format is one Base-64 encoded public key per line.
3024
3025
Shawn O. Pearce7b405712009-05-08 18:27:53 -07003026Database system_config
3027----------------------
3028
3029Several columns in the `system_config` table within the metadata
3030database may be set to control how Gerrit behaves.
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08003031
3032[NOTE]
3033The contents of the `system_config` table are cached at startup
3034by Gerrit. If you modify any columns in this table, Gerrit needs
3035to be restarted before it will use the new values.
3036
Shawn O. Pearce7b405712009-05-08 18:27:53 -07003037Configurable Parameters
3038~~~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08003039
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07003040site_path::
3041+
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08003042Local filesystem directory holding the site customization assets.
3043Placing this directory under version control and/or backup is a
3044good idea.
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07003045+
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08003046Files in this directory provide additional configuration.
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07003047+
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08003048Other files support site customization.
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07003049+
Dave Borowitz1e49e142013-04-09 12:14:57 -07003050* link:config-themes.html[Themes]
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08003051
Shawn O. Pearce5500e692009-05-28 15:55:01 -07003052GERRIT
3053------
3054Part of link:index.html[Gerrit Code Review]
Yuxuan 'fishy' Wang99cb68d2013-10-31 17:26:00 -07003055
3056SEARCHBOX
3057---------