blob: 1ceb3dc6eb058caf98ab6237e22b2e4540a4b873 [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
Brad Larson991a31b2009-11-03 14:30:26 -0600814[[commentlink]]Section commentlink
Remy Bohmer203eea32012-02-19 21:21:36 +0100815~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Brad Larson991a31b2009-11-03 14:30:26 -0600816Comment links are find/replace strings applied to change descriptions,
Chris Harris63c7cdd2012-11-23 12:17:36 -0500817patch comments, in-line code comments and approval category value descriptions
818to turn set strings into hyperlinks. One common use is for linking to
819bug-tracking systems.
Brad Larson991a31b2009-11-03 14:30:26 -0600820
821In the following example configuration the 'changeid' comment link
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800822will match typical Gerrit Change-Id values and create a hyperlink
823to changes which reference it. The second configuration 'bugzilla'
824will hyperlink terms such as 'bug 42' to an external bug tracker,
825supplying the argument record number '42' for display. The third
David Pursehouse221d4f62012-06-08 17:38:08 +0900826configuration 'tracker' uses raw HTML to more precisely control
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800827how the replacement is displayed to the user.
Brad Larson991a31b2009-11-03 14:30:26 -0600828
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800829----
830[commentlink "changeid"]
831 match = (I[0-9a-f]{8,40})
832 link = "#q,$1,n,z"
Brad Larson991a31b2009-11-03 14:30:26 -0600833
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800834[commentlink "bugzilla"]
Shawn O. Pearcec99630a2010-02-21 19:11:56 -0800835 match = "(bug\\s+#?)(\\d+)"
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800836 link = http://bugs.example.com/show_bug.cgi?id=$2
Brad Larson991a31b2009-11-03 14:30:26 -0600837
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800838[commentlink "tracker"]
839 match = ([Bb]ug:\\s+)(\\d+)
840 html = $1<a href=\"http://trak.example.com/$2\">$2</a>
841----
842
Dave Borowitz13b38002013-04-08 12:03:29 -0700843Comment links can also be specified in `project.config` and sections in
844children override those in parents. The only restriction is that to
845avoid injecting arbitrary user-supplied HTML in the page, comment links
846defined in `project.config` may only supply `link`, not `html`.
847
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800848[[commentlink.name.match]]commentlink.<name>.match::
Brad Larson991a31b2009-11-03 14:30:26 -0600849+
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800850A JavaScript regular expression to match positions to be replaced
851with a hyperlink. Subexpressions of the matched string can be
852stored using groups and accessed with `$'n'` syntax, where 'n'
853is the group number, starting from 1.
Brad Larson991a31b2009-11-03 14:30:26 -0600854+
Shawn O. Pearcec99630a2010-02-21 19:11:56 -0800855The configuration file parser eats one level of backslashes, so the
856character class `\s` requires `\\s` in the configuration file. The
857parser also terminates the line at the first `#`, so a match
858expression containing # must be wrapped in double quotes.
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800859+
Shawn O. Pearce665beaa2010-02-21 22:41:03 -0800860To match case insensitive strings, a character class with both the
861upper and lower case character for each position must be used. For
862example, to match the string `bug` in a case insensitive way the match
863pattern `[bB][uU][gG]` needs to be used.
864+
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800865A common pattern to match is `bug\\s+(\\d+)`.
Brad Larson991a31b2009-11-03 14:30:26 -0600866
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800867[[commentlink.name.link]]commentlink.<name>.link::
Brad Larson991a31b2009-11-03 14:30:26 -0600868+
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800869The URL to direct the user to whenever the regular expression is
870matched. Groups in the match expression may be accessed as `$'n'`.
871+
872The link property is used only when the html property is not present.
873
874[[commentlink.name.html]]commentlink.<name>.html::
875+
876HTML to replace the entire matched string with. If present,
877this property overrides the link property above. Groups in the
878match expression may be accessed as `$'n'`.
879+
880The configuration file eats double quotes, so escaping them as
881`\"` is necessary to protect them from the parser.
Brad Larson991a31b2009-11-03 14:30:26 -0600882
Dave Borowitz82d79c02013-04-08 15:45:12 -0700883[[commentlink.name.enabled]]commentlink.<name>.enabled::
884+
885Whether the comment link is enabled. A child project may override a
886section in a parent or the site-wide config that is disabled by
887specifying `enabled = true`.
888+
889Disabling sections in `gerrit.config` can be used by site administrators
890to create a library of comment links with `html` set that are not
891user-supplied and thus can be verified to be XSS-free, but are only
892enabled for a subset of projects.
893+
894Note that the names and contents of disabled sections are visible even
895to anonymous users via the
896link:rest-api-projects.html#get-config[REST API].
897
Brad Larson991a31b2009-11-03 14:30:26 -0600898
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -0700899[[contactstore]]Section contactstore
900~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700901
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700902[[contactstore.url]]contactstore.url::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700903+
904URL of the web based contact store Gerrit will send any offline
905contact information to when it collects the data from users as part
906of a contributor agreement.
907+
908See link:config-contact.html[Contact Information].
909
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700910[[contactstore.appsec]]contactstore.appsec::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700911+
912Shared secret of the web based contact store.
913
Shawn O. Pearcee24c71fb2009-12-07 20:32:40 -0800914
915[[container]]Section container
916~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
917
918These settings are applied only if Gerrit is started as the container
919process through Gerrit's 'gerrit.sh' rc.d compatible wrapper script.
920
921[[container.heapLimit]]container.heapLimit::
922+
923Maximum heap size of the Java process running Gerrit, in bytes.
924This property is translated into the '-Xmx' flag for the JVM.
925+
926Default is platform and JVM specific.
927+
928Common unit suffixes of 'k', 'm', or 'g' are supported.
929
930[[container.javaHome]]container.javaHome::
931+
932Path of the JRE/JDK installation to run Gerrit with. If not set, the
933Gerrit startup script will attempt to search your system and guess
934a suitable JRE. Overrides the environment variable 'JAVA_HOME'.
935
936[[container.javaOptions]]container.javaOptions::
937+
938Additional options to pass along to the Java runtime. If multiple
939values are configured, they are passed in order on the command line,
940separated by spaces. These options are appended onto 'JAVA_OPTIONS'.
941
David Ostrovskyc772bd82013-10-03 10:37:51 +0200942For example, it is possible to overwrite Gerrit's default log4j
943configuration:
944
945----
946 javaOptions = -Dlog4j.configuration=file:///home/gerrit/site/etc/log4j.properties
947----
948
Fredrik Luthanderb8f7d6d2010-05-18 21:11:22 +0200949[[container.slave]]container.slave::
950+
951Used on Gerrit slave installations. If set to true the Gerrit JVM is
952called with the '--slave' switch, enabling slave mode. If no value is
953set (or any other value), gerrit defaults to master mode.
954
Shawn O. Pearcee24c71fb2009-12-07 20:32:40 -0800955[[container.user]]container.user::
956+
957Login name (or UID) of the operating system user the Gerrit JVM
958will execute as. If not set, defaults to the user who launched
959the 'gerrit.sh' wrapper script.
960
961[[container.war]]container.war::
962+
963Path of the JAR file to start daemon execution with. This should
964be the path of the local 'gerrit.war' archive. Overrides the
965environment variable 'GERRIT_WAR'.
966+
967If not set, defaults to '$site_path/bin/gerrit.war', or to
968'$HOME/gerrit.war'.
969
970
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -0700971[[core]]Section core
972~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700973
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700974[[core.packedGitWindowSize]]core.packedGitWindowSize::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700975+
976Number of bytes of a pack file to load into memory in a single
977read operation. This is the "page size" of the JGit buffer cache,
978used for all pack access operations. All disk IO occurs as single
979window reads. Setting this too large may cause the process to load
980more data than is required; setting this too small may increase
981the frequency of `read()` system calls.
982+
983Default on JGit is 8 KiB on all platforms.
984+
985Common unit suffixes of 'k', 'm', or 'g' are supported.
986
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700987[[core.packedGitLimit]]core.packedGitLimit::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700988+
989Maximum number of bytes to load and cache in memory from pack files.
990If JGit needs to access more than this many bytes it will unload less
991frequently used windows to reclaim memory space within the process.
992As this buffer must be shared with the rest of the JVM heap, it
993should be a fraction of the total memory available.
994+
995Default on JGit is 10 MiB on all platforms.
996+
997Common unit suffixes of 'k', 'm', or 'g' are supported.
998
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700999[[core.deltaBaseCaseLimit]]core.deltaBaseCacheLimit::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -07001000+
1001Maximum number of bytes to reserve for caching base objects
1002that multiple deltafied objects reference. By storing the entire
1003decompressed base object in a cache Git is able to avoid unpacking
1004and decompressing frequently used base objects multiple times.
1005+
1006Default on JGit is 10 MiB on all platforms. You probably do not
1007need to adjust this value.
1008+
1009Common unit suffixes of 'k', 'm', or 'g' are supported.
1010
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001011[[core.packedGitOpenFiles]]core.packedGitOpenFiles::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -07001012+
1013Maximum number of pack files to have open at once. A pack file
1014must be opened in order for any of its data to be available in
1015a cached window.
1016+
1017If you increase this to a larger setting you may need to also adjust
1018the ulimit on file descriptors for the host JVM, as Gerrit needs
1019additional file descriptors available for network sockets and other
1020repository data manipulation.
1021+
1022Default on JGit is 128 file descriptors on all platforms.
1023
Shawn O. Pearce329fe792010-09-03 15:44:23 -07001024[[core.streamFileThreshold]]core.streamFileThreshold::
1025+
1026Largest object size, in bytes, that JGit will allocate as a
1027contiguous byte array. Any file revision larger than this threshold
1028will have to be streamed, typically requiring the use of temporary
David Pursehouse92463562013-06-24 10:16:28 +09001029files under '$GIT_DIR/objects' to implement pseudo-random access
Shawn O. Pearce329fe792010-09-03 15:44:23 -07001030during delta decompression.
1031+
1032Servers with very high traffic should set this to be larger than
1033the size of their common big files. For example a server managing
1034the Android platform typically has to deal with ~10-12 MiB XML
1035files, so `15 m` would be a reasonable setting in that environment.
1036Setting this too high may cause the JVM to run out of heap space
1037when handling very big binary files, such as device firmware or
1038CD-ROM ISO images.
1039+
Shawn O. Pearcee3febd92010-10-13 21:17:53 -07001040Default is 50 MiB on all platforms. Prior to Gerrit 2.1.6,
Shawn O. Pearce329fe792010-09-03 15:44:23 -07001041this value was effectively 2047 MiB.
1042+
1043Common unit suffixes of 'k', 'm', or 'g' are supported.
1044
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001045[[core.packedGitMmap]]core.packedGitMmap::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -07001046+
1047When true, JGit will use `mmap()` rather than `malloc()+read()`
1048to load data from pack files. The use of mmap can be problematic
1049on some JVMs as the garbage collector must deduce that a memory
1050mapped segment is no longer in use before a call to `munmap()`
1051can be made by the JVM native code.
1052+
1053In server applications (such as Gerrit) that need to access many
David Pursehouse92463562013-06-24 10:16:28 +09001054pack files, setting this to true risks artificially running out
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -07001055of virtual address space, as the garbage collector cannot reclaim
1056unused mapped spaces fast enough.
1057+
1058Default on JGit is false. Although potentially slower, it yields
1059much more predictable behavior.
1060
Sasa Zivkovf69aeb12012-06-11 14:05:14 +02001061[[core.asyncLoggingBufferSize]]core.asyncLoggingBufferSize::
1062+
1063Size of the buffer to store logging events for asynchronous logging.
1064Putting a larger value can protect threads from stalling when the
1065AsyncAppender threads are not fast enough to consume the logging events
1066from the buffer. It also protects from loosing log entries in this case.
1067+
1068Default is 64 entries.
1069
Dave Borowitz1bec65a2013-03-13 10:59:01 -07001070[[core.useRecursiveMerge]]core.useRecursiveMerge::
1071+
1072Use JGit's new, experimental recursive merger for three-way merges.
1073This only affects projects configured to automatically resolve
1074conflicts.
1075+
1076Default is false, but in a future release may default to true.
1077
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001078[[database]]Section database
1079~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1080
1081The database section configures where Gerrit stores its metadata
1082records about user accounts and change reviews.
1083
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001084----
1085[database]
Shawn O. Pearce1be39062009-12-19 14:11:52 -08001086 type = POSTGRESQL
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001087 hostname = localhost
1088 database = reviewdb
1089 username = gerrit2
1090 password = s3kr3t
1091----
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001092
1093[[database.type]]database.type::
1094+
1095Type of database server to connect to. If set this value will be
1096used to automatically create correct database.driver and database.url
1097values to open the connection.
1098+
Shawn O. Pearce1be39062009-12-19 14:11:52 -08001099* `POSTGRESQL`
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001100+
1101Connect to a PostgreSQL database server.
1102+
1103* `H2`
1104+
Shawn O. Pearce1be39062009-12-19 14:11:52 -08001105Connect to a local embedded H2 database.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001106+
Shawn O. Pearce1be39062009-12-19 14:11:52 -08001107* `MYSQL`
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001108+
1109Connect to a MySQL database server.
Shawn O. Pearce1be39062009-12-19 14:11:52 -08001110+
1111* `JDBC`
1112+
1113Connect using a JDBC driver class name and URL.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001114
1115+
1116If not specified, database.driver and database.url are used as-is,
1117and if they are also not specified, defaults to H2.
1118
1119[[database.hostname]]database.hostname::
1120+
1121Hostname of the database server. Defaults to 'localhost'.
1122
1123[[database.port]]database.port::
1124+
1125Port number of the database server. Defaults to the default port
1126of the server named by database.type.
1127
1128[[database.database]]database.database::
1129+
Shawn O. Pearce1be39062009-12-19 14:11:52 -08001130For POSTGRESQL or MYSQL, the name of the database on the server.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001131+
1132For H2, this is the path to the database, and if not absolute is
Shawn O. Pearce1be39062009-12-19 14:11:52 -08001133relative to `'$site_path'`.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001134
1135[[database.username]]database.username::
1136+
1137Username to connect to the database server as.
1138
1139[[database.password]]database.password::
1140+
1141Password to authenticate to the database server with.
1142
1143[[database.driver]]database.driver::
1144+
Shawn O. Pearce1be39062009-12-19 14:11:52 -08001145Name of the JDBC driver class to connect to the database with.
1146Setting this usually isn't necessary as it can be derived from
1147database.type or database.url for any supported database.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001148
1149[[database.url]]database.url::
1150+
Shawn O. Pearce1be39062009-12-19 14:11:52 -08001151'jdbc:' URL for the database. Setting this variable usually
1152isn't necessary as it can be constructed from the all of the
1153above properties.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001154
Christian Aistleitner851072a2013-05-05 15:04:09 +02001155[[database.connectionPool]]database.connectionPool::
1156+
1157If true, use connection pooling for database connections. Otherwise, a
1158new database connection is opened for each request.
1159+
1160Default is false for MySQL, and true for other database backends.
1161
Shawn O. Pearce07f35177d2010-02-23 09:47:10 -08001162[[database.poolLimit]]database.poolLimit::
1163+
1164Maximum number of open database connections. If the server needs
1165more than this number, request processing threads will wait up
1166to <<database.poolMaxWait, poolMaxWait>> seconds for a
1167connection to be released before they abort with an exception.
1168This limit must be several units higher than the total number of
1169httpd and sshd threads as some request processing code paths may
1170need multiple connections.
1171+
1172Default is 8.
Christian Aistleitner851072a2013-05-05 15:04:09 +02001173+
1174This setting only applies if
1175<<database.connectionPool,database.connectionPool>> is true.
Shawn O. Pearce07f35177d2010-02-23 09:47:10 -08001176
Shawn O. Pearcef458bf62010-02-25 09:03:03 -08001177[[database.poolMinIdle]]database.poolMinIdle::
Shawn O. Pearce07f35177d2010-02-23 09:47:10 -08001178+
1179Minimum number of connections to keep idle in the pool.
1180Default is 4.
Christian Aistleitner851072a2013-05-05 15:04:09 +02001181+
1182This setting only applies if
1183<<database.connectionPool,database.connectionPool>> is true.
Shawn O. Pearce07f35177d2010-02-23 09:47:10 -08001184
Shawn O. Pearcef458bf62010-02-25 09:03:03 -08001185[[database.poolMaxIdle]]database.poolMaxIdle::
Shawn O. Pearce07f35177d2010-02-23 09:47:10 -08001186+
1187Maximum number of connections to keep idle in the pool. If there
1188are more idle connections, connections will be closed instead of
1189being returned back to the pool.
1190Default is 4.
Christian Aistleitner851072a2013-05-05 15:04:09 +02001191+
1192This setting only applies if
1193<<database.connectionPool,database.connectionPool>> is true.
Shawn O. Pearce07f35177d2010-02-23 09:47:10 -08001194
1195[[database.poolMaxWait]]database.poolMaxWait::
1196+
1197Maximum amount of time a request processing thread will wait to
1198acquire a database connection from the pool. If no connection is
1199released within this time period, the processing thread will abort
1200its current operations and return an error to the client.
1201Values should use common unit suffixes to express their setting:
1202+
1203* ms, milliseconds
1204* s, sec, second, seconds
1205* m, min, minute, minutes
1206* h, hr, hour, hours
1207
1208+
1209If a unit suffix is not specified, `milliseconds` is assumed.
1210+
1211Default is `30 seconds`.
Christian Aistleitner851072a2013-05-05 15:04:09 +02001212+
1213This setting only applies if
1214<<database.connectionPool,database.connectionPool>> is true.
Shawn O. Pearce07f35177d2010-02-23 09:47:10 -08001215
monica.dionisio3f630442010-06-29 15:42:57 -03001216[[download]]Section download
Nasser Grainawib9a50372010-08-10 07:57:47 -06001217~~~~~~~~~~~~~~~~~~~~~~~~~~~~
monica.dionisio3f630442010-06-29 15:42:57 -03001218
1219----
1220[download]
Edwin Kempin08b03a22012-09-14 16:32:57 +02001221 command = checkout
1222 command = cherry_pick
1223 command = pull
1224 command = format_patch
monica.dionisio3f630442010-06-29 15:42:57 -03001225 scheme = ssh
1226 scheme = http
1227 scheme = anon_http
1228 scheme = anon_git
1229 scheme = repo_download
1230----
1231
1232The download section configures the allowed download methods.
1233
Edwin Kempin08b03a22012-09-14 16:32:57 +02001234[[download.command]]download.command::
1235+
1236Commands that should be offered to download changes.
1237+
1238Multiple commands are supported:
1239+
1240* `checkout`
1241+
1242Command to fetch and checkout the patch set.
1243+
1244* `cherry_pick`
1245+
1246Command to fetch the patch set and to cherry-pick it onto the current
1247commit.
1248+
1249* `pull`
1250+
1251Command to pull the patch set.
1252+
1253* `format_patch`
1254+
1255Command to fetch the patch set and to feed it into the `format-patch`
1256command.
1257
1258+
1259If `download.command` is not specified, all download commands are
1260offered.
1261
monica.dionisio3f630442010-06-29 15:42:57 -03001262[[download.scheme]]download.scheme::
1263+
1264Schemes that should be used to download changes.
1265+
1266Multiple schemes are supported:
1267+
1268* `http`
1269+
Shawn O. Pearce5c46a072010-08-23 08:33:32 -07001270Authenticated HTTP download is allowed.
monica.dionisio3f630442010-06-29 15:42:57 -03001271+
1272* `ssh`
1273+
Shawn O. Pearce5c46a072010-08-23 08:33:32 -07001274Authenticated SSH download is allowed.
monica.dionisio3f630442010-06-29 15:42:57 -03001275+
1276* `anon_http`
1277+
1278Anonymous HTTP download is allowed.
1279+
1280* `anon_git`
1281+
Shawn O. Pearce5c46a072010-08-23 08:33:32 -07001282Anonymous Git download is allowed. This is not default, it is also
1283necessary to set <<gerrit.canonicalGitUrl,gerrit.canonicalGitUrl>>
1284variable.
monica.dionisio3f630442010-06-29 15:42:57 -03001285+
1286* `repo_download`
1287+
Shawn O. Pearce5c46a072010-08-23 08:33:32 -07001288Gerrit advertises patch set downloads with the `repo download`
1289command, assuming that all projects managed by this instance are
1290generally worked on with the repo multi-repository tool. This is
1291not default, as not all instances will deploy repo.
monica.dionisio3f630442010-06-29 15:42:57 -03001292
1293+
Edwin Kempin08b03a22012-09-14 16:32:57 +02001294If `download.scheme` is not specified, SSH, HTTP and Anonymous HTTP
Shawn O. Pearce5c46a072010-08-23 08:33:32 -07001295downloads are allowed.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001296
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -07001297[[gerrit]]Section gerrit
1298~~~~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearceeb7f8ce2009-06-01 09:57:15 -07001299
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001300[[gerrit.basePath]]gerrit.basePath::
Shawn O. Pearce9743d0b2009-06-01 10:10:06 -07001301+
1302Local filesystem directory holding all Git repositories that
1303Gerrit knows about and can process changes for. A project
1304entity in Gerrit maps to a local Git repository by creating
Edwin Kempincdb0e002011-09-08 14:23:30 +02001305the path string `"${basePath}/${project_name}.git"`.
Shawn O. Pearce9743d0b2009-06-01 10:10:06 -07001306+
1307If relative, the path is resolved relative to `'$site_path'`.
1308
Shawn O. Pearce897d9212011-06-16 16:59:59 -07001309[[gerrit.allProjects]]gerrit.allProjects::
1310+
1311Name of the permissions-only project defining global server
1312access controls and settings. These are inherited into every
1313other project managed by the running server. The name is
1314relative to `gerrit.basePath`.
1315+
1316Defaults to `All-Projects` if not set.
1317
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001318[[gerrit.canonicalWebUrl]]gerrit.canonicalWebUrl::
Shawn O. Pearceeb7f8ce2009-06-01 09:57:15 -07001319+
1320The default URL for Gerrit to be accessed through.
1321+
1322Typically this would be set to "http://review.example.com/" or
1323"http://example.com/gerrit/" so Gerrit can output links that point
1324back to itself.
1325+
1326Setting this is highly recommended, as its necessary for the upload
1327code invoked by "git push" or "repo upload" to output hyperlinks
1328to the newly uploaded changes.
1329
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001330[[gerrit.canonicalGitUrl]]gerrit.canonicalGitUrl::
Shawn O. Pearceeb7f8ce2009-06-01 09:57:15 -07001331+
1332Optional base URL for repositories available over the anonymous git
1333protocol. For example, set this to `git://mirror.example.com/base/`
1334to have Gerrit display patch set download URLs in the UI. Gerrit
1335automatically appends the project name onto the end of the URL.
1336+
1337By default unset, as the git daemon must be configured externally
1338by the system administrator, and might not even be running on the
1339same host as Gerrit.
1340
Dave Borowitz76ab1a12013-05-10 17:01:29 +01001341[[gerrit.installCommitMsgHookCommand]]gerrit.installCommitMsgHookCommand::
1342+
1343Optional command to install the `commit-msg` hook. Typically of the
1344form:
1345----
1346fetch-cmd some://url/to/commit-msg .git/hooks/commit-msg ; chmod +x .git/hooks/commit-msg
1347----
Shawn Pearce6d731f52013-09-24 12:13:50 -07001348
Dave Borowitz76ab1a12013-05-10 17:01:29 +01001349+
1350By default unset; falls back to using scp from the canonical SSH host,
1351or curl from the canonical HTTP URL for the server. Only necessary if a
1352proxy or other server/network configuration prevents clients from
1353fetching from the default location.
1354
Shawn O. Pearce5d6de522011-10-07 18:00:16 -07001355[[gerrit.gitHttpUrl]]gerrit.gitHttpUrl::
1356+
1357Optional base URL for repositories available over the HTTP
1358protocol. For example, set this to `http://mirror.example.com/base/`
1359to have Gerrit display URLs from this server, rather than itself.
1360+
1361By default unset, as the HTTP daemon must be configured externally
1362by the system administrator, and might not even be running on the
1363same host as Gerrit.
1364
Shawn O. Pearceb8bea1b2012-08-16 17:18:58 -07001365[[gerrit.reportBugUrl]]gerrit.reportBugUrl::
1366+
1367URL to direct users to when they need to report a bug about the
1368Gerrit service. By default this links to the upstream Gerrit
1369Code Review's own bug tracker but could be directed to the system
1370administrator's ticket queue.
1371
Shawn Pearce6d731f52013-09-24 12:13:50 -07001372[[gerrit.changeScreen]]gerrit.changeScreen::
1373+
1374Default change screen UI to direct users to. Valid values are
David Ostrovskybbb688e2013-11-09 12:10:19 +01001375`OLD_UI` and `CHANGE_SCREEN2`. Default is `CHANGE_SCREEN2`.
Shawn Pearce6d731f52013-09-24 12:13:50 -07001376
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -07001377[[gitweb]]Section gitweb
1378~~~~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearced7ba11f2009-06-01 09:35:41 -07001379
Shawn O. Pearce618dae22010-03-12 19:07:43 -08001380Gerrit can forward requests to either an internally managed gitweb
1381(which allows Gerrit to enforce some access controls), or to an
1382externally managed gitweb (where the web server manages access).
Shawn O. Pearced7ba11f2009-06-01 09:35:41 -07001383See also link:config-gitweb.html[Gitweb Integration].
1384
Shawn O. Pearce618dae22010-03-12 19:07:43 -08001385[[gitweb.cgi]]gitweb.cgi::
1386+
1387Path to the locally installed `gitweb.cgi` executable. This CGI will
1388be called by Gerrit Code Review when the URL `/gitweb` is accessed.
1389Project level access controls are enforced prior to calling the CGI.
1390+
1391Defaults to `/usr/lib/cgi-bin/gitweb.cgi` if gitweb.url is not set.
1392
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001393[[gitweb.url]]gitweb.url::
Shawn O. Pearced7ba11f2009-06-01 09:35:41 -07001394+
1395Optional URL of an affiliated gitweb service. Defines the
1396web location where a `gitweb.cgi` is installed to browse
Shawn O. Pearce9743d0b2009-06-01 10:10:06 -07001397gerrit.basePath and the repositories it contains.
Shawn O. Pearced7ba11f2009-06-01 09:35:41 -07001398+
1399Gerrit appends any necessary query arguments onto the end of this URL.
1400For example, "?p=$project.git;h=$commit".
1401
Shane Mc Cormack27868a42009-12-28 04:49:39 +00001402[[gitweb.type]]gitweb.type::
1403+
1404Optional type of affiliated gitweb service. This allows using
Shawn O. Pearce2b11da02011-09-06 16:18:12 -07001405alternatives to gitweb, such as cgit. If set to disabled there
1406is no gitweb hyperlinking support.
Shane Mc Cormack27868a42009-12-28 04:49:39 +00001407+
Shawn O. Pearce2b11da02011-09-06 16:18:12 -07001408Valid values are `gitweb`, `cgit`, `disabled` or `custom`.
Shane Mc Cormack27868a42009-12-28 04:49:39 +00001409
Edwin Kempind86909c2012-03-26 10:36:29 +02001410[[gitweb.revision]]gitweb.revision::
Shane Mc Cormack27868a42009-12-28 04:49:39 +00001411+
1412Optional pattern to use for constructing the gitweb URL when pointing
1413at a specific commit when `custom` is used above.
1414+
Edwin Kempincdb0e002011-09-08 14:23:30 +02001415Valid replacements are `${project}` for the project name in Gerrit
1416and `${commit}` for the SHA1 hash for the commit.
Shane Mc Cormack27868a42009-12-28 04:49:39 +00001417
Edwin Kempind86909c2012-03-26 10:36:29 +02001418[[gitweb.project]]gitweb.project::
Shane Mc Cormack27868a42009-12-28 04:49:39 +00001419+
1420Optional pattern to use for constructing the gitweb URL when pointing
1421at a specific project when `custom` is used above.
1422+
Edwin Kempincdb0e002011-09-08 14:23:30 +02001423Valid replacements are `${project}` for the project name in Gerrit.
Shane Mc Cormack27868a42009-12-28 04:49:39 +00001424
Edwin Kempind86909c2012-03-26 10:36:29 +02001425[[gitweb.branch]]gitweb.branch::
Shane Mc Cormack27868a42009-12-28 04:49:39 +00001426+
1427Optional pattern to use for constructing the gitweb URL when pointing
1428at a specific branch when `custom` is used above.
1429+
Edwin Kempincdb0e002011-09-08 14:23:30 +02001430Valid replacements are `${project}` for the project name in Gerrit
1431and `${branch}` for the name of the branch.
Shane Mc Cormack27868a42009-12-28 04:49:39 +00001432
Edwin Kempin64011562012-03-26 10:50:12 +02001433[[gitweb.filehistory]]gitweb.filehistory::
1434+
1435Optional pattern to use for constructing the gitweb URL when pointing
1436at the history of a file in a specific branch when `custom` is used
1437above.
1438+
1439Valid replacements are `${project}` for the project name in Gerrit,
1440`${file}` for the file name and `${branch}` for the name of the
1441branch.
1442
Gustaf Lundha07d2e72011-10-27 15:26:35 -07001443[[gitweb.linkname]]gitweb.linkname::
1444+
1445Optional setting for modifying the link name presented to the user
1446in the Gerrit web-UI.
1447+
1448Default linkname for custom type is "gitweb".
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001449
Adrian Goerlerf2007072011-11-10 08:39:55 +01001450[[gitweb.pathSeparator]]gitweb.pathSeparator::
1451+
1452Optional character to substitute the standard path separator (slash) in
1453project names and branch names.
1454+
1455By default, Gerrit will use hexadecimal encoding for slashes in project and
1456branch names. Some web servers, such as Tomcat, reject this hexadecimal
1457encoding in the URL.
1458+
1459Some alternative gitweb services, such as link:http://gitblit.com[Gitblit],
1460allow using an alternative path separator character. In Gitblit, this can be
1461configured through the property link:http://gitblit.com/properties.html[web.forwardSlashCharacter].
1462In Gerrit, the alternative path separator can be configured correspondingly
1463using the property 'gitweb.pathSeparator'.
1464+
1465Valid values are the characters '*', '(' and ')'.
1466
Luca Milanesio25312032013-10-11 11:34:39 +01001467[[gitweb.linkDrafts]]gitweb.urlEncode::
1468+
1469Whether or not Gerrit should encode the generated viewer URL.
1470+
1471Gerrit composes the viewer URL using information about the project, branch, file
1472or commit of the target object to be displayed. Typically viewers such as CGit
1473and GitWeb do need those parts to be encoded, including the '/' in project's name,
1474for being correctly parsed.
1475However other viewers could instead require an unencoded URL (e.g. GitHub web
1476based viewer)
1477+
1478Valid values are "true" and "false," default is "true."
1479
Chad Horohoe1dfe36c2013-04-12 14:52:56 -04001480[[gitweb.linkDrafts]]gitweb.linkDrafts::
1481+
1482Whether or not Gerrit should provide links to gitweb on draft patch sets.
1483+
1484By default, Gerrit will show links to gitweb on all patch sets. If gitweb
1485only allows publicly viewable references, set this to false to remove
1486the links to draft patch sets from the change review screen.
1487+
Luca Milanesio25312032013-10-11 11:34:39 +01001488Valid values are "true" and "false," default is "true".
Chad Horohoe1dfe36c2013-04-12 14:52:56 -04001489
Edwin Kempin4bbff702013-01-11 09:59:53 +01001490[[groups]]Section groups
1491~~~~~~~~~~~~~~~~~~~~~~~~
1492
1493[[groups.newGroupsVisibleToAll]]groups.newGroupsVisibleToAll::
1494+
1495Controls whether newly created groups should be by default visible to
1496all registered users.
1497+
1498By default, false.
1499
Shane Mc Cormack6c2b6772010-01-12 21:56:44 +00001500[[hooks]]Section hooks
Remy Bohmer203eea32012-02-19 21:21:36 +01001501~~~~~~~~~~~~~~~~~~~~~~
Shane Mc Cormack6c2b6772010-01-12 21:56:44 +00001502
1503See also link:config-hooks.html[Hooks].
1504
1505[[hooks.path]]hooks.path::
1506+
1507Optional path to hooks, if not specified then `'$site_path'/hooks` will be used.
1508
1509[[hooks.patchsetCreatedHook]]hooks.patchsetCreatedHook::
1510+
1511Optional filename for the patchset created hook, if not specified then
1512`patchset-created` will be used.
1513
David Pursehoused556c192012-06-12 18:34:37 +09001514[[hooks.draftPublishedHook]]hooks.draftPublishedHook::
1515+
1516Optional filename for the draft published hook, if not specified then
1517`draft-published` will be used.
1518
Shane Mc Cormack6c2b6772010-01-12 21:56:44 +00001519[[hooks.commentAddedHook]]hooks.commentAddedHook::
1520+
1521Optional filename for the comment added hook, if not specified then
1522`comment-added` will be used.
1523
1524[[hooks.changeMergedHook]]hooks.changeMergedHook::
1525+
1526Optional filename for the change merged hook, if not specified then
1527`change-merged` will be used.
1528
David Pursehousef9f3b272012-09-28 19:58:59 +09001529[[hooks.mergeFailedHook]]hooks.mergeFailedHook::
1530+
1531Optional filename for the merge failed hook, if not specified then
1532`merge-failed` will be used.
1533
Shane Mc Cormack6c2b6772010-01-12 21:56:44 +00001534[[hooks.changeAbandonedHook]]hooks.changeAbandonedHook::
1535+
1536Optional filename for the change abandoned hook, if not specified then
1537`change-abandoned` will be used.
1538
David Pursehousea93c9302012-06-15 16:29:26 +09001539[[hooks.changeRestoredHook]]hooks.changeRestoredHook::
1540+
1541Optional filename for the change restored hook, if not specified then
1542`change-restored` will be used.
1543
1544[[hooks.refUpdatedHook]]hooks.refUpdatedHook::
1545+
1546Optional filename for the ref updated hook, if not specified then
1547`ref-updated` will be used.
1548
David Pursehouse2336bd82012-09-21 12:50:19 +09001549[[hooks.reviewerAddedHook]]hooks.reviewerAddedHook::
1550+
1551Optional filename for the reviewer added hook, if not specified then
1552`reviewer-added` will be used.
1553
David Pursehouseba3e28d2013-07-12 14:48:51 +09001554[[hooks.topicChangedHook]]hooks.topicChangedHook::
1555+
1556Optional filename for the topic changed hook, if not specified then
1557`topic-changed` will be used.
1558
David Pursehousea93c9302012-06-15 16:29:26 +09001559[[hooks.claSignedHook]]hooks.claSignedHook::
1560+
1561Optional filename for the CLA signed hook, if not specified then
1562`cla-signed` will be used.
1563
Chris Harrisf736d6c2012-11-21 09:35:56 -05001564[[hooks.refUpdateHook]]hooks.refUpdateHook::
1565+
1566Optional filename for the ref update hook, if not specified then
1567`ref-update` will be used.
1568
1569[[hooks.syncHookTimeout]]hooks.syncHookTimeout::
David Pursehouse6fdc8d92012-11-28 12:34:18 +09001570+
1571Optional timeout value in seconds for synchronous hooks, if not specified
Chris Harrisf736d6c2012-11-21 09:35:56 -05001572then 30 seconds will be used.
1573
Shawn O. Pearce309d8d32009-11-17 16:03:16 -08001574[[http]]Section http
1575~~~~~~~~~~~~~~~~~~~~
1576
1577[[http.proxy]]http.proxy::
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001578+
1579URL of the proxy server when making outgoing HTTP
1580connections for OpenID login transactions. Syntax
1581should be `http://`'hostname'`:`'port'.
Shawn O. Pearce309d8d32009-11-17 16:03:16 -08001582
1583[[http.proxyUsername]]http.proxyUsername::
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001584+
1585Optional username to authenticate to the HTTP proxy with.
Robin Rosenberg524a3032012-10-14 14:24:36 +02001586This property is honored only if the username does not
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001587appear in the http.proxy property above.
Shawn O. Pearce309d8d32009-11-17 16:03:16 -08001588
1589[[http.proxyPassword]]http.proxyPassword::
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001590+
1591Optional password to authenticate to the HTTP proxy with.
Robin Rosenberg524a3032012-10-14 14:24:36 +02001592This property is honored only if the password does not
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001593appear in the http.proxy property above.
Shawn O. Pearce309d8d32009-11-17 16:03:16 -08001594
1595
1596[[httpd]]Section httpd
1597~~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08001598
1599The httpd section configures the embedded servlet container.
1600
1601[[httpd.listenUrl]]httpd.listenUrl::
1602+
1603Specifies the URLs the internal HTTP daemon should listen for
Edwin Kempincdb0e002011-09-08 14:23:30 +02001604connections on. The special hostname '*' may be used to listen
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08001605on all local addresses. A context path may optionally be included,
1606placing Gerrit Code Review's web address within a subdirectory of
1607the server.
1608+
1609Multiple protocol schemes are supported:
1610+
1611* `http://`'hostname'`:`'port'
1612+
1613Plain-text HTTP protocol. If port is not supplied, defaults to 80,
1614the standard HTTP port.
1615+
1616* `https://`'hostname'`:`'port'
1617+
1618SSL encrypted HTTP protocol. If port is not supplied, defaults to
1619443, the standard HTTPS port.
1620+
1621Externally facing production sites are encouraged to use a reverse
1622proxy configuration and `proxy-https://` (below), rather than using
1623the embedded servlet container to implement the SSL processing.
1624The proxy server with SSL support is probably easier to configure,
1625provides more configuration options to control cipher usage, and
1626is likely using natively compiled encryption algorithms, resulting
1627in higher throughput.
1628+
1629* `proxy-http://`'hostname'`:`'port'
1630+
1631Plain-text HTTP relayed from a reverse proxy. If port is not
1632supplied, defaults to 8080.
1633+
1634Like http, but additional header parsing features are
1635enabled to honor X-Forwarded-For, X-Forwarded-Host and
1636X-Forwarded-Server. These headers are typically set by Apache's
1637link:http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#x-headers[mod_proxy].
1638+
1639* `proxy-https://`'hostname'`:`'port'
1640+
1641Plain text HTTP relayed from a reverse proxy that has already
1642handled the SSL encryption/decryption. If port is not supplied,
1643defaults to 8080.
1644+
1645Behaves exactly like proxy-http, but also sets the scheme to assume
1646'https://' is the proper URL back to the server.
1647
1648+
1649If multiple values are supplied, the daemon will listen on all
1650of them.
1651+
1652By default, http://*:8080.
1653
1654[[httpd.reuseAddress]]httpd.reuseAddress::
1655+
1656If true, permits the daemon to bind to the port even if the port
1657is already in use. If false, the daemon ensures the port is not
1658in use before starting. Busy sites may need to set this to true
1659to permit fast restarts.
1660+
1661By default, true.
1662
1663[[httpd.requestHeaderSize]]httpd.requestHeaderSize::
1664+
1665Size, in bytes, of the buffer used to parse the HTTP headers of an
1666incoming HTTP request. The entire request headers, including any
1667cookies sent by the browser, must fit within this buffer, otherwise
1668the server aborts with the response '413 Request Entity Too Large'.
1669+
1670One buffer of this size is allocated per active connection.
1671Allocating a buffer that is too large wastes memory that cannot be
1672reclaimed, allocating a buffer that is too small may cause unexpected
1673errors caused by very long Referer URLs or large cookie values.
1674+
1675By default, 16384 (16 K), which is sufficient for most OpenID and
1676other web-based single-sign-on integrations.
1677
Chulho Yangb72ff8f2013-07-04 02:35:53 -04001678[[httpd.sslCrl]]httpd.sslCrl::
1679+
1680Path of the certificate revocation list file in PEM format. This
1681crl file is optional, and available for CLIENT_SSL_CERT_LDAP
1682authentication.
1683+
1684To create and view a crl using openssl:
1685+
1686----
1687openssl ca -gencrl -out crl.pem
1688openssl crl -in crl.pem -text
1689----
1690+
1691If not absolute, the path is resolved relative to `$site_path`.
1692+
1693By default, `$site_path/etc/crl.pem`.
1694
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08001695[[httpd.sslKeyStore]]httpd.sslKeyStore::
1696+
1697Path of the Java keystore containing the server's SSL certificate
1698and private key. This keystore is required for `https://` in URL.
1699+
1700To create a self-signed certificate for simple internal usage:
1701+
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001702----
1703keytool -keystore keystore -alias jetty -genkey -keyalg RSA
1704chmod 600 keystore
1705----
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08001706+
1707If not absolute, the path is resolved relative to `$site_path`.
1708+
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08001709By default, `$site_path/etc/keystore`.
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08001710
1711[[httpd.sslKeyPassword]]httpd.sslKeyPassword::
1712+
1713Password used to decrypt the private portion of the sslKeyStore.
David Pursehouse221d4f62012-06-08 17:38:08 +09001714Java keystores require a password, even if the administrator
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08001715doesn't want to enable one.
1716+
1717If set to the empty string the embedded server will prompt for the
1718password during startup.
1719+
1720By default, `gerrit`.
1721
Shawn O. Pearce1766f502010-01-15 10:49:46 -08001722[[httpd.requestLog]]httpd.requestLog::
1723+
1724Enable (or disable) the `'$site_path'/logs/httpd_log` request log.
1725If enabled, an NCSA combined log format request log file is written
1726out by the internal HTTP daemon.
1727+
1728By default, true if httpd.listenUrl uses http:// or https://,
1729and false if httpd.listenUrl uses proxy-http:// or proxy-https://.
1730
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08001731[[httpd.acceptorThreads]]httpd.acceptorThreads::
1732+
1733Number of worker threads dedicated to accepting new incoming TCP
David Pursehouse221d4f62012-06-08 17:38:08 +09001734connections and allocating them connection-specific resources.
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08001735+
1736By default, 2, which should be suitable for most high-traffic sites.
1737
1738[[httpd.minThreads]]httpd.minThreads::
1739+
1740Minimum number of spare threads to keep in the worker thread pool.
1741This number must be at least 1 larger than httpd.acceptorThreads
David Pursehouse92463562013-06-24 10:16:28 +09001742multiplied by the number of httpd.listenUrls configured.
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08001743+
1744By default, 5, suitable for most lower-volume traffic sites.
1745
1746[[httpd.maxThreads]]httpd.maxThreads::
1747+
1748Maximum number of threads to permit in the worker thread pool.
1749+
1750By default 25, suitable for most lower-volume traffic sites.
1751
1752[[httpd.maxQueued]]httpd.maxQueued::
1753+
1754Maximum number of client connections which can enter the worker
1755thread pool waiting for a worker thread to become available.
17560 disables the queue and permits infinite number of connections.
1757+
1758By default 50.
1759
Shawn O. Pearcee5452b72010-01-15 14:32:50 -08001760[[httpd.maxWait]]httpd.maxWait::
1761+
David Pursehouse221d4f62012-06-08 17:38:08 +09001762Maximum amount of time a client will wait for an available
Shawn O. Pearcee5452b72010-01-15 14:32:50 -08001763thread to handle a project clone, fetch or push request over the
1764smart HTTP transport.
1765+
1766Values should use common unit suffixes to express their setting:
1767+
1768* s, sec, second, seconds
1769* m, min, minute, minutes
1770* h, hr, hour, hours
1771* d, day, days
1772* w, week, weeks (`1 week` is treated as `7 days`)
1773* mon, month, months (`1 month` is treated as `30 days`)
1774* y, year, years (`1 year` is treated as `365 days`)
1775
1776+
1777If a unit suffix is not specified, `minutes` is assumed. If 0
1778is supplied, the maximum age is infinite and connections will not
1779abort until the client disconnects.
1780+
1781By default, 5 minutes.
1782
Luca Milanesioce7b7452013-06-18 11:40:49 +01001783[[httpd.filterClass]]httpd.filterClass::
1784+
1785Class that implements the javax.servlet.Filter interface
1786for filtering any HTTP related traffic going through the Gerrit
1787HTTP protocol.
1788Class is loaded and configured in the Gerrit Jetty container
1789and run in front of all Gerrit URL handlers, allowing the filter
1790to inspect, modify, allow or reject each request.
1791It needs to be provided as JAR library
1792under $GERRIT_SITE/lib as it is resolved using the default Gerrit class
1793loader and cannot be dynamically loaded by a plugin.
1794+
1795Failing to load the Filter class would result in a Gerrit start-up
1796failure, as this class is supposed to provide mandatory filtering
1797in front of Gerrit HTTP protocol.
1798+
David Pursehouse42f42042013-08-01 14:02:25 +09001799Typical usage is in conjunction with the `auth.type=HTTP` as replacement
Luca Milanesioce7b7452013-06-18 11:40:49 +01001800of an Apache HTTP proxy layer as security enforcement on top of Gerrit
1801by returning a trusted username as HTTP Header.
1802+
1803Example of using a security library secure.jar under $GERRIT_SITE/lib
1804that provides a org.anyorg.MySecureFilter Servlet Filter that enforces
1805a trusted username in the `TRUSTED_USER` HTTP Header:
1806
1807----
1808[auth]
1809type = HTTP
1810httpHeader = TRUSTED_USER
1811
1812[http]
1813filterClass = org.anyorg.MySecureFilter
1814----
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08001815
Juan Hernandezec512562013-08-06 16:30:50 +02001816[[httpd.robotsFile]]httpd.robotsFile::
1817+
1818Location of an external robots.txt file to be used instead of the one
1819bundled with the .war of the application.
1820+
1821If not absolute, the path is resolved relative to `$site_path`.
1822+
1823If the file doesn't exist or can't be read the default robots.txt file
1824bundled with the .war will be used instead.
1825
David Pursehouse6d458432013-08-23 16:17:18 +09001826[[index]]Section index
1827~~~~~~~~~~~~~~~~~~~~~~
1828
1829The index section configures the secondary index.
1830
1831[[index.type]]index.type::
1832+
1833Type of secondary indexing employed by Gerrit. The supported
1834values are:
1835+
1836* `LUCENE`
1837+
1838A link:http://lucene.apache.org/[Lucene] index is used.
1839+
1840* `SOLR`
1841+
1842A link:http://lucene.apache.org/solr/[Solr] index is used.
1843+
1844* `SQL`
1845+
1846No secondary index. Not all query operators are supported. Other
1847query operators are routed through the standard SQL query engine.
1848
1849+
1850By default, `SQL`.
1851
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -07001852[[ldap]]Section ldap
1853~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001854
David Pursehouse221d4f62012-06-08 17:38:08 +09001855LDAP integration is only enabled if `auth.type` is set to
Sasa Zivkoveabc8972010-10-04 15:47:08 +02001856`HTTP_LDAP`, `LDAP` or `CLIENT_SSL_CERT_LDAP`. See above for a
David Pursehouse42f42042013-08-01 14:02:25 +09001857detailed description of the `auth.type` settings and their
Sasa Zivkoveabc8972010-10-04 15:47:08 +02001858implications.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001859
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07001860An example LDAP configuration follows, and then discussion of
1861the parameters introduced here. Suitable defaults for most
1862parameters are automatically guessed based on the type of server
1863detected during startup. The guessed defaults support both
1864link:http://www.ietf.org/rfc/rfc2307.txt[RFC 2307] and Active
1865Directory.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001866
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001867----
1868[ldap]
1869 server = ldap://ldap.example.com
1870
1871 accountBase = ou=people,dc=example,dc=com
1872 accountPattern = (&(objectClass=person)(uid=${username}))
1873 accountFullName = displayName
1874 accountEmailAddress = mail
1875
1876 groupBase = ou=groups,dc=example,dc=com
1877 groupMemberPattern = (&(objectClass=group)(member=${dn}))
1878----
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001879
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001880[[ldap.server]]ldap.server::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001881+
1882URL of the organization's LDAP server to query for user information
1883and group membership from. Must be of the form `ldap://host` or
1884`ldaps://host` to bind with either a plaintext or SSL connection.
Shawn O. Pearcef7e065e2009-09-26 20:01:10 -07001885+
David Pursehouse42f42042013-08-01 14:02:25 +09001886If `auth.type` is `LDAP` this setting should use `ldaps://` to
Shawn O. Pearcef7e065e2009-09-26 20:01:10 -07001887ensure the end user's plaintext password is transmitted only over
1888an encrypted connection.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001889
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07001890[[ldap.sslVerify]]ldap.sslVerify::
1891+
1892If false and ldap.server is an `ldaps://` style URL, Gerrit
1893will not verify the server certificate when it connects to
1894perform a query.
1895+
1896By default, true, requiring the certificate to be verified.
1897
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001898[[ldap.username]]ldap.username::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001899+
1900_(Optional)_ Username to bind to the LDAP server with. If not set,
1901an anonymous connection to the LDAP server is attempted.
1902
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001903[[ldap.password]]ldap.password::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001904+
1905_(Optional)_ Password for the user identified by `ldap.username`.
1906If not set, an anonymous (or passwordless) connection to the LDAP
1907server is attempted.
1908
Ben Wu0410a152010-06-04 16:17:24 +08001909[[ldap.referral]]ldap.referral::
1910+
1911_(Optional)_ How an LDAP referral should be handled if it is
1912encountered during directory traversal. Set to `follow` to
James Y Knight1244ed02011-01-04 02:40:32 -05001913automatically follow any referrals, or `ignore` to ignore the
1914referrals.
Ben Wu0410a152010-06-04 16:17:24 +08001915+
1916By default, `ignore`.
1917
Sasa Zivkov100bd4b2011-11-07 14:58:46 +01001918[[ldap.readTimeout]]ldap.readTimeout::
1919+
1920_(Optional)_ The read timeout for an LDAP operation. The value is
1921in the usual time-unit format like "1 s", "100 ms", etc...
1922A timeout can be used to avoid blocking all of the SSH command start
David Pursehouse221d4f62012-06-08 17:38:08 +09001923threads in case the LDAP server becomes slow.
Sasa Zivkov100bd4b2011-11-07 14:58:46 +01001924+
1925By default there is no timeout and Gerrit will wait for the LDAP
1926server to respond until the TCP connection times out.
1927
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001928[[ldap.accountBase]]ldap.accountBase::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001929+
1930Root of the tree containing all user accounts. This is typically
1931of the form `ou=people,dc=example,dc=com`.
1932
Shawn O. Pearce304ccdb2009-08-25 12:25:27 -07001933[[ldap.accountScope]]ldap.accountScope::
1934+
1935Scope of the search performed for accounts. Must be one of:
1936+
1937* `one`: Search only one level below accountBase, but not recursive
1938* `sub` or `subtree`: Search recursively below accountBase
1939* `base` or `object`: Search exactly accountBase; probably not desired
1940
1941+
1942Default is `subtree` as many directories have several levels.
1943
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001944[[ldap.accountPattern]]ldap.accountPattern::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001945+
1946Query pattern to use when searching for a user account. This may be
1947any valid LDAP query expression, including the standard `(&...)` and
David Pursehouse42f42042013-08-01 14:02:25 +09001948`(|...)` operators. If `auth.type` is `HTTP_LDAP` then the variable
Edwin Kempincdb0e002011-09-08 14:23:30 +02001949`${username}` is replaced with a parameter set to the username
David Pursehouse42f42042013-08-01 14:02:25 +09001950that was supplied by the HTTP server. If `auth.type` is `LDAP` then
Edwin Kempincdb0e002011-09-08 14:23:30 +02001951the variable `${username}` is replaced by the string entered by
Shawn O. Pearcef7e065e2009-09-26 20:01:10 -07001952the end user.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001953+
1954This pattern is used to search the objects contained directly under
1955the `ldap.accountBase` tree. A typical setting for this parameter
Edwin Kempincdb0e002011-09-08 14:23:30 +02001956is `(uid=${username})` or `(cn=${username})`, but the proper
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001957setting depends on the LDAP schema used by the directory server.
1958+
Edwin Kempincdb0e002011-09-08 14:23:30 +02001959Default is `(uid=${username})` for RFC 2307 servers,
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07001960and `(&(objectClass=user)(sAMAccountName=${username}))`
1961for Active Directory.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001962
Shawn O. Pearce37dc1f82009-08-19 09:49:07 -07001963[[ldap.accountFullName]]ldap.accountFullName::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001964+
1965_(Optional)_ Name of an attribute on the user account object which
1966contains the initial value for the user's full name field in Gerrit.
1967Typically this is the `displayName` property in LDAP, but could
1968also be `legalName` or `cn`.
1969+
David Pursehouse221d4f62012-06-08 17:38:08 +09001970Attribute values may be concatenated with literal strings. For
1971example to join given name and surname together, use the pattern
Edwin Kempincdb0e002011-09-08 14:23:30 +02001972`${givenName} ${SN}`.
Shawn O. Pearceb86ae002009-09-26 16:54:05 -07001973+
Shawn O. Pearce3ca1dcf2009-08-20 08:56:23 -07001974If set, users will be unable to modify their full name field, as
1975Gerrit will populate it only from the LDAP data.
1976+
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07001977Default is `displayName` for RFC 2307 servers,
1978and `${givenName} ${sn}` for Active Directory.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001979
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001980[[ldap.accountEmailAddress]]ldap.accountEmailAddress::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001981+
1982_(Optional)_ Name of an attribute on the user account object which
1983contains the user's Internet email address, as defined by this
1984LDAP server.
1985+
Shawn O. Pearceb86ae002009-09-26 16:54:05 -07001986Attribute values may be concatenated with literal strings,
1987for example to set the email address to the lowercase form
1988of sAMAccountName followed by a constant domain name, use
Edwin Kempincdb0e002011-09-08 14:23:30 +02001989`${sAMAccountName.toLowerCase}@example.com`.
Shawn O. Pearceb86ae002009-09-26 16:54:05 -07001990+
Shawn O. Pearce3ca1dcf2009-08-20 08:56:23 -07001991If set, the preferred email address will be prefilled from LDAP,
David Pursehouse221d4f62012-06-08 17:38:08 +09001992but users may still be able to register additional email addresses,
Shawn O. Pearce3ca1dcf2009-08-20 08:56:23 -07001993and select a different preferred email address.
1994+
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07001995Default is `mail`.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001996
Shawn O. Pearce59e09222009-08-19 09:04:49 -07001997[[ldap.accountSshUserName]]ldap.accountSshUserName::
1998+
1999_(Optional)_ Name of an attribute on the user account object which
2000contains the initial value for the user's SSH username field in
2001Gerrit. Typically this is the `uid` property in LDAP, but could
2002also be `cn`. Administrators should prefer to match the attribute
2003corresponding to the user's workstation username, as this is what
2004SSH clients will default to.
2005+
Shawn O. Pearceb86ae002009-09-26 16:54:05 -07002006Attribute values may also be forced to lowercase, or to uppercase in
Edwin Kempincdb0e002011-09-08 14:23:30 +02002007an expression. For example, `${sAMAccountName.toLowerCase}` will
Shawn O. Pearceb86ae002009-09-26 16:54:05 -07002008force the value of sAMAccountName, if defined, to be all lowercase.
2009The suffix `.toUpperCase` can be used for the other direction.
2010The suffix `.localPart` can be used to split attribute values of
2011the form 'user@example.com' and return only the left hand side, for
Edwin Kempincdb0e002011-09-08 14:23:30 +02002012example `${userPrincipalName.localPart}` would provide only 'user'.
Shawn O. Pearceb86ae002009-09-26 16:54:05 -07002013+
Shawn O. Pearce3ca1dcf2009-08-20 08:56:23 -07002014If set, users will be unable to modify their SSH username field, as
2015Gerrit will populate it only from the LDAP data.
2016+
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07002017Default is `uid` for RFC 2307 servers,
2018and `${sAMAccountName.toLowerCase}` for Active Directory.
Shawn O. Pearce59e09222009-08-19 09:04:49 -07002019
Shawn O. Pearce7d25f782009-10-30 08:01:03 -07002020[[ldap.accountMemberField]]ldap.accountMemberField::
Anthony93de7db2009-10-03 10:01:50 -04002021+
2022_(Optional)_ Name of an attribute on the user account object which
Shawn O. Pearce7d25f782009-10-30 08:01:03 -07002023contains the groups the user is part of. Typically used for Active
2024Directory servers.
Anthony93de7db2009-10-03 10:01:50 -04002025+
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07002026Default is unset for RFC 2307 servers (disabled)
2027and `memberOf` for Active Directory.
Anthony93de7db2009-10-03 10:01:50 -04002028
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002029[[ldap.groupBase]]ldap.groupBase::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002030+
2031Root of the tree containing all group objects. This is typically
2032of the form `ou=groups,dc=example,dc=com`.
2033
Shawn O. Pearce304ccdb2009-08-25 12:25:27 -07002034[[ldap.groupScope]]ldap.groupScope::
2035+
2036Scope of the search performed for group objects. Must be one of:
2037+
2038* `one`: Search only one level below groupBase, but not recursive
2039* `sub` or `subtree`: Search recursively below groupBase
2040* `base` or `object`: Search exactly groupBase; probably not desired
2041
2042+
2043Default is `subtree` as many directories have several levels.
2044
Shawn O. Pearce7d25f782009-10-30 08:01:03 -07002045[[ldap.groupPattern]]ldap.groupPattern::
2046+
2047Query pattern used when searching for an LDAP group to connect
2048to a Gerrit group. This may be any valid LDAP query expression,
2049including the standard `(&...)` and `(|...)` operators. The variable
Edwin Kempincdb0e002011-09-08 14:23:30 +02002050`${groupname}` is replaced with the search term supplied by the
Shawn O. Pearce7d25f782009-10-30 08:01:03 -07002051group owner.
2052+
Edwin Kempincdb0e002011-09-08 14:23:30 +02002053Default is `(cn=${groupname})` for RFC 2307,
2054and `(&(objectClass=group)(cn=${groupname}))` for Active Directory.
Shawn O. Pearce7d25f782009-10-30 08:01:03 -07002055
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002056[[ldap.groupMemberPattern]]ldap.groupMemberPattern::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002057+
2058Query pattern to use when searching for the groups that a user
2059account is currently a member of. This may be any valid LDAP query
2060expression, including the standard `(&...)` and `(|...)` operators.
2061+
David Pursehouse42f42042013-08-01 14:02:25 +09002062If `auth.type` is `HTTP_LDAP` then the variable `${username}` is
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002063replaced with a parameter set to the username that was supplied
2064by the HTTP server. Other variables appearing in the pattern,
Edwin Kempincdb0e002011-09-08 14:23:30 +02002065such as `${fooBarAttribute}`, are replaced with the value of the
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002066corresponding attribute (in this case, `fooBarAttribute`) as read
2067from the user's account object matched under `ldap.accountBase`.
Edwin Kempincdb0e002011-09-08 14:23:30 +02002068Attributes such as `${dn}` or `${uidNumber}` may be useful.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002069+
Scott Dial50457502013-08-11 16:52:51 -04002070Default is `(|(memberUid=${username})(gidNumber=${gidNumber}))` for
2071RFC 2307, and unset (disabled) for Active Directory.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002072
Auke Schrijnen57809132012-09-26 21:05:39 +02002073[[ldap.groupName]]ldap.groupName::
2074+
David Pursehouse39489ae2012-10-12 13:50:04 +09002075_(Optional)_ Name of the attribute on the group object which contains
2076the value to use as the group name in Gerrit.
Auke Schrijnen57809132012-09-26 21:05:39 +02002077+
David Pursehouse39489ae2012-10-12 13:50:04 +09002078Typically the attribute name is `cn` for RFC 2307 and Active Directory
2079servers. For other servers the attribute name may differ, for example
2080`apple-group-realname` on Apple MacOS X Server.
Auke Schrijnen57809132012-09-26 21:05:39 +02002081+
David Pursehouse39489ae2012-10-12 13:50:04 +09002082It is also possible to specify a literal string containing a pattern of
2083attribute values. For example to create a Gerrit group name consisting of
2084LDAP group name and group ID, use the pattern `${cn} (${gidNumber})`.
2085+
2086Default is `cn`.
Auke Schrijnen57809132012-09-26 21:05:39 +02002087
Edwin Kempinb3b0d292011-09-14 14:17:34 +02002088[[ldap.localUsernameToLowerCase]]ldap.localUsernameToLowerCase::
2089+
2090Converts the local username, that is used to login into the Gerrit
2091WebUI, to lower case before doing the LDAP authentication. By setting
2092this parameter to true, a case insensitive login to the Gerrit WebUI
2093can be achieved.
2094+
2095If set, it must be ensured that the local usernames for all existing
2096accounts are converted to lower case, otherwise a user that has a
David Pursehouse221d4f62012-06-08 17:38:08 +09002097local username that contains upper case characters will not be able to login
Edwin Kempinb3b0d292011-09-14 14:17:34 +02002098anymore. The local usernames for the existing accounts can be
2099converted to lower case by running the server program
2100link:pgm-LocalUsernamesToLowerCase.html[LocalUsernamesToLowerCase].
2101Please be aware that the conversion of the local usernames to lower
2102case can't be undone. For newly created accounts the local username
2103will be directly stored in lower case.
2104+
2105By default, unset/false.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002106
Robin Rosenberga3baed02012-10-14 14:09:32 +02002107[[ldap.authentication]]ldap.authentication::
2108+
2109Defines how Gerrit authenticates with the server. When set to `GSSAPI`
2110Gerrit will use Kerberos. To use kerberos the
2111`java.security.auth.login.config` system property must point to a
2112login to a JAAS configuration file and, if Java 6 is used, the system
2113property `java.security.krb5.conf` must point to the appropriate
2114krb5.ini file with references to the KDC.
2115
2116Typical jaas.conf.
2117
2118----
2119KerberosLogin {
2120 com.sun.security.auth.module.Krb5LoginModule
2121 required
2122 useTicketCache=true
2123 doNotPrompt=true
2124 renewTGT=true;
2125};
2126----
2127
2128See Java documentation on how to create the krb5.ini file.
2129
2130Note the `renewTGT` property to make sure the TGT does not expire,
2131and `useTicketCache` to use the TGT supplied by the operating system. As
2132the whole point of using GSSAPI is to have passwordless authentication
David Pursehouse92463562013-06-24 10:16:28 +09002133to the LDAP service, this option does not acquire a new TGT on its own.
Robin Rosenberga3baed02012-10-14 14:09:32 +02002134
2135On Windows servers the registry key `HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\Kerberos\Parameters`
2136must have the DWORD value `allowtgtsessionkey` set to 1 and the account must not
2137have local administrator privileges.
2138
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -07002139[[mimetype]]Section mimetype
2140~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearce01cb11902009-07-15 08:19:01 -07002141
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002142[[mimetype.name.safe]]mimetype.<name>.safe::
Shawn O. Pearce01cb11902009-07-15 08:19:01 -07002143+
2144If set to true, files with the MIME type `<name>` will be sent as
2145direct downloads to the user's browser, rather than being wrapped up
2146inside of zipped archives. The type name may be a complete type
Edwin Kempincdb0e002011-09-08 14:23:30 +02002147name, e.g. `image/gif`, a generic media type, e.g. `image/*`,
2148or the wildcard `*/*` to match all types.
Shawn O. Pearce01cb11902009-07-15 08:19:01 -07002149+
2150By default, false for all MIME types.
2151
2152Common examples:
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08002153----
2154[mimetype "image/*"]
2155 safe = true
2156
2157[mimetype "application/pdf"]
2158 safe = true
2159
2160[mimetype "application/msword"]
2161 safe = true
2162
2163[mimetype "application/vnd.ms-excel"]
2164 safe = true
2165----
Shawn O. Pearce01cb11902009-07-15 08:19:01 -07002166
Shawn O. Pearce5f11b292010-08-05 17:57:35 -07002167
2168[[pack]]Section pack
2169~~~~~~~~~~~~~~~~~~~~
2170Global settings controlling how Gerrit Code Review creates pack
2171streams for Git clients running clone, fetch, or pull. Most of these
2172variables are per-client request, and thus should be carefully set
2173given the expected concurrent request load and available CPU and
2174memory resources.
2175
2176[[pack.deltacompression]]pack.deltacompression::
2177+
2178If true, delta compression between objects is enabled. This may
2179result in a smaller overall transfer for the client, but requires
2180more server memory and CPU time.
2181+
2182False (off) by default, matching Gerrit Code Review 2.1.4.
2183
2184[[pack.threads]]pack.threads::
2185+
2186Maximum number of threads to use for delta compression (if enabled).
2187This is per-client request. If set to 0 then the number of CPUs is
2188auto-detected and one thread per CPU is used, per client request.
2189+
2190By default, 1.
2191
2192
Shawn O. Pearce5ad16ea2012-05-09 14:24:25 -07002193[[plugins]]Section plugins
2194~~~~~~~~~~~~~~~~~~~~~~~~~~
2195
2196[[plugins.checkFrequency]]plugins.checkFrequency::
2197+
2198How often plugins should be examined for new plugins to load, removed
2199plugins to be unloaded, or updated plugins to be reloaded. Values can
2200be specified using standard time unit abbreviations ('ms', 'sec',
2201'min', etc.).
2202+
2203If set to 0, automatic plugin reloading is disabled. Administrators
2204may force reloading with link:cmd-plugin.html[gerrit plugin reload].
2205+
2206Default is 1 minute.
2207
2208
lincoln2be11602010-07-05 10:53:25 -03002209[[receive]]Section receive
2210~~~~~~~~~~~~~~~~~~~~~~~~~~
Sasa Zivkov59d89c32011-11-18 15:32:35 +01002211This section is used to set who can execute the 'receive-pack' and
2212to limit the maximum Git object size that 'receive-pack' will accept.
2213'receive-pack' is what runs on the server during a user's push or
Dave Borowitz234734a2012-03-01 14:22:29 -08002214repo upload command. It also contains some advanced options for tuning the
2215behavior of Gerrit's 'receive-pack' mechanism.
lincoln2be11602010-07-05 10:53:25 -03002216
2217----
2218[receive]
2219 allowGroup = GROUP_ALLOWED_TO_EXECUTE
2220 allowGroup = YET_ANOTHER_GROUP_ALLOWED_TO_EXECUTE
Sasa Zivkov59d89c32011-11-18 15:32:35 +01002221 maxObjectSizeLimit = 40 m
lincoln2be11602010-07-05 10:53:25 -03002222----
2223
Shawn Pearce5cb31bf2013-02-27 16:20:26 -08002224[[receive.checkMagicRefs]]receive.checkMagicRefs::
2225+
2226If true, Gerrit will verify the destination repository has
2227no references under the magic 'refs/drafts', 'refs/for', or
2228'refs/publish' branch namespaces. Names under these locations
2229confuse clients when trying to upload code reviews so Gerrit
2230requires them to be empty.
2231+
2232If false Gerrit skips the sanity check and assumes administrators
2233have ensured the repository does not contain any magic references.
2234Setting to false to skip the check can decrease latency during push.
2235+
2236Default is true.
2237
Gustaf Lundh9062fd62013-02-14 17:23:11 +01002238[[receive.checkReferencedObjectsAreReachable]]receive.checkReferencedObjectsAreReachable::
2239+
2240If set to true, Gerrit will validate that all referenced objects that
2241are not included in the received pack are reachable by the user.
2242+
2243Carrying out this check on gits with many refs and commits can be a
2244very CPU-heavy operation. For non public Gerrit-servers this check may
2245be overkill.
2246+
2247Only disable this check if you trust the clients not to forge SHA1
2248references to access commits intended to be hidden from the user.
2249+
2250Default is true.
2251
lincoln2be11602010-07-05 10:53:25 -03002252[[receive.allowGroup]]receive.allowGroup::
2253+
2254Name of the groups of users that are allowed to execute
2255'receive-pack' on the server. One or more groups can be set.
2256+
2257If no groups are added, any user will be allowed to execute
2258'receive-pack' on the server.
2259
Sasa Zivkov59d89c32011-11-18 15:32:35 +01002260[[receive.maxObjectSizeLimit]]receive.maxObjectSizeLimit::
2261+
2262Maximum allowed Git object size that 'receive-pack' will accept.
2263If an object is larger than the given size the pack-parsing will abort
2264and the push operation will fail. If set to zero then there is no
2265limit.
2266+
David Pursehouse221d4f62012-06-08 17:38:08 +09002267Gerrit administrators can use this setting to prevent developers
Sasa Zivkov59d89c32011-11-18 15:32:35 +01002268from pushing objects which are too large to Gerrit.
2269+
Fredrik Luthandera3cf3542012-07-04 16:55:35 -07002270This setting can also be set in the `project.config`
2271link:config-project-config.html[receive.maxObjectSizeLimit] in order
2272to further reduce the global setting. The project specific setting is
2273only honored when it further reduces the global limit.
Sasa Zivkov5a708a82013-06-28 17:07:55 +02002274+
Sasa Zivkov59d89c32011-11-18 15:32:35 +01002275Default is zero.
2276+
2277Common unit suffixes of 'k', 'm', or 'g' are supported.
2278
Dave Borowitz234734a2012-03-01 14:22:29 -08002279[[receive.threadPoolSize]]receive.threadPoolSize::
2280+
2281Maximum size of the thread pool in which the change data in received packs is
2282processed.
2283+
2284Defaults to the number of available CPUs according to the Java runtime.
2285
Shawn O. Pearcec545c092012-07-27 16:38:55 -07002286[[receive.changeUpdateThreads]]receive.changeUpdateThreads::
2287+
2288Number of threads to perform change creation or patch set updates
2289concurrently. Each thread uses its own database connection from
2290the database connection pool, and if all threads are busy then
2291main receive thread will also perform a change creation or patch
2292set update.
2293+
2294Defaults to 1, using only the main receive thread. This feature is for
David Pursehouse92463562013-06-24 10:16:28 +09002295databases with very high latency that can benefit from concurrent
Shawn O. Pearcec545c092012-07-27 16:38:55 -07002296operations when multiple changes are impacted at once.
2297
Dave Borowitz1c401362012-03-02 17:39:17 -08002298[[receive.timeout]]receive.timeout::
2299+
Shawn O. Pearce00dd12d2012-03-12 15:52:11 -07002300Overall timeout on the time taken to process the change data in
2301received packs. Only includes the time processing Gerrit changes
2302and updating references, not the time to index the pack. Values can
2303be specified using standard time unit abbreviations ('ms', 'sec',
2304'min', etc.).
Dave Borowitz1c401362012-03-02 17:39:17 -08002305+
David Pursehouse92463562013-06-24 10:16:28 +09002306Default is 2 minutes. If no unit is specified, milliseconds
Shawn O. Pearce00dd12d2012-03-12 15:52:11 -07002307is assumed.
Dave Borowitz1c401362012-03-02 17:39:17 -08002308
lincoln2be11602010-07-05 10:53:25 -03002309
Hugo Josefson072b4702010-04-21 19:27:11 +02002310[[repository]]Section repository
2311~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2312Repositories in this sense are the same as projects.
2313
Shawn O. Pearce897d9212011-06-16 16:59:59 -07002314In the following example configuration `Registered Users` is set
2315to be the default owner of new projects.
Hugo Josefson072b4702010-04-21 19:27:11 +02002316
2317----
2318[repository "*"]
Hugo Josefson072b4702010-04-21 19:27:11 +02002319 ownerGroup = Registered Users
2320----
2321
2322[NOTE]
2323Currently only the repository name `*` is supported.
2324This is a wildcard designating all repositories.
2325
Hugo Josefson072b4702010-04-21 19:27:11 +02002326[[repository.name.ownerGroup]]repository.<name>.ownerGroup::
2327+
2328A name of a group which exists in the database. Zero, one or many
2329groups are allowed. Each on its own line. Groups which don't exist
2330in the database are ignored.
Hugo Josefson072b4702010-04-21 19:27:11 +02002331
Shawn O. Pearce94860ee2011-09-29 13:11:08 -07002332[[rules]]Section rules
2333~~~~~~~~~~~~~~~~~~~~~~
2334
2335[[rules.enable]]rules.enable::
2336+
2337If true, Gerrit will load and excute 'rules.pl' files in each
2338project's refs/meta/config branch, if present. When set to false,
2339only the default internal rules will be used.
2340+
2341Default is true, to execute project specific rules.
2342
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -07002343[[sendemail]]Section sendemail
2344~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07002345
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002346[[sendemail.enable]]sendemail.enable::
Shawn O. Pearce2e4573b2009-06-02 09:09:50 -07002347+
2348If false Gerrit will not send email messages, for any reason,
2349and all other properties of section sendemail are ignored.
2350+
2351By default, true, allowing notifications to be sent.
2352
Shawn O. Pearce5c31bd72009-09-10 18:13:33 -07002353[[sendemail.from]]sendemail.from::
2354+
2355Designates what name and address Gerrit will place in the From
2356field of any generated email messages. The supported values are:
2357+
2358* `USER`
2359+
2360Gerrit will set the From header to use the current user's
David Pursehouse92463562013-06-24 10:16:28 +09002361Full Name and Preferred Email. This may cause messages to be
Shawn O. Pearce5c31bd72009-09-10 18:13:33 -07002362classified as spam if the user's domain has SPF or DKIM enabled
2363and <<sendemail.smtpServer,sendemail.smtpServer>> is not a trusted
2364relay for that domain.
2365+
2366* `MIXED`
2367+
Edwin Kempincdb0e002011-09-08 14:23:30 +02002368Shorthand for `${user} (Code Review) <review@example.com>` where
Shawn O. Pearce5c31bd72009-09-10 18:13:33 -07002369`review@example.com` is the same as <<user.email,user.email>>.
2370See below for a description of how the replacement is handled.
2371+
2372* `SERVER`
2373+
2374Gerrit will set the From header to the same name and address
2375it records in any commits Gerrit creates. This is set by
2376<<user.name,user.name>> and <<user.email,user.email>>, or guessed
2377from the local operating system.
2378+
2379* 'Code Review' `<`'review'`@`'example.com'`>`
2380+
2381If set to a name and email address in brackets, Gerrit will use
2382this name and email address for any messages, overriding the name
2383that may have been selected for commits by user.name and user.email.
Edwin Kempincdb0e002011-09-08 14:23:30 +02002384Optionally, the name portion may contain the placeholder `${user}`,
Shawn O. Pearce5c31bd72009-09-10 18:13:33 -07002385which is replaced by the Full Name of the current user.
2386
2387+
2388By default, MIXED.
2389
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002390[[sendemail.smtpServer]]sendemail.smtpServer::
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07002391+
2392Hostname (or IP address) of a SMTP server that will relay
2393messages generated by Gerrit to end users.
2394+
2395By default, 127.0.0.1 (aka localhost).
2396
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002397[[sendemail.smtpServerPort]]sendemail.smtpServerPort::
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07002398+
2399Port number of the SMTP server in sendemail.smtpserver.
2400+
Shawn O. Pearce6e9a83f2009-11-02 10:30:48 -08002401By default, 25, or 465 if smtpEncryption is 'ssl'.
2402
2403[[sendemail.smtpEncryption]]sendemail.smtpEncryption::
2404+
2405Specify the encryption to use, either 'ssl' or 'tls'.
2406+
2407By default, 'none', indicating no encryption is used.
2408
2409[[sendemail.sslVerify]]sendemail.sslVerify::
2410+
2411If false and sendemail.smtpEncryption is 'ssl' or 'tls', Gerrit
2412will not verify the server certificate when it connects to send
2413an email message.
2414+
2415By default, true, requiring the certificate to be verified.
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07002416
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002417[[sendemail.smtpUser]]sendemail.smtpUser::
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07002418+
2419User name to authenticate with, if required for relay.
2420
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002421[[sendemail.smtpPass]]sendemail.smtpPass::
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07002422+
2423Password for the account named by sendemail.smtpUser.
2424
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002425[[sendemail.allowrcpt]]sendemail.allowrcpt::
Shawn O. Pearce219a8ee2009-06-01 18:13:57 -07002426+
2427If present, each value adds one entry to the whitelist of email
2428addresses that Gerrit can send email to. If set to a complete
2429email address, that one address is added to the white list.
2430If set to a domain name, any address at that domain can receive
2431email from Gerrit.
2432+
2433By default, unset, permitting delivery to any email address.
2434
Shawn O. Pearce02aacbc2012-06-12 13:44:22 -07002435[[sendemail.includeDiff]]sendemail.includeDiff::
2436+
Bruce Zueb00ff32012-11-27 17:38:10 +08002437If true, new change emails and merged change emails from Gerrit
2438will include the complete unified diff of the change.
2439Variable maxmimumDiffSize places an upper limit on how large the
2440email can get when this option is enabled.
Shawn O. Pearce02aacbc2012-06-12 13:44:22 -07002441+
2442By default, false.
2443
Shawn O. Pearce28a950b2012-06-12 14:36:34 -07002444[[sendemail.maximumDiffSize]]sendemail.maximumDiffSize::
2445+
2446Largest size of unified diff output to include in an email. When
2447the diff exceeds this size the file paths will be listed instead.
2448Standard byte unit suffixes are supported.
2449+
2450By default, 256 KiB.
2451
Alex Blewitt9cca7402011-02-11 01:39:30 +00002452[[sendemail.importance]]sendemail.importance::
2453+
2454If present, emails sent from Gerrit will have the given level
2455of importance. Valid values include 'high' and 'low', which
2456email clients will render in different ways.
2457+
2458By default, unset, so no Importance header is generated.
2459
2460[[sendemail.expiryDays]]sendemail.expiryDays::
2461+
2462If present, emails sent from Gerrit will expire after the given
2463number of days. This will add the Expiry-Date header and
2464email clients may expire or expunge mails whose Expiry-Date
2465header is in the past. This should be a positive non-zero
2466number indicating how many days in the future the mails
2467should expire.
2468+
2469By default, unset, so no Expiry-Date header is generated.
2470
Shawn O. Pearcedba97642011-09-07 20:12:31 -07002471
2472[[site]]Section site
2473~~~~~~~~~~~~~~~~~~~~
2474
2475[[site.checkUserAgent]]site.checkUserAgent::
2476+
2477If true the server checks the User-Agent HTTP header and sends the
2478correct JavaScript to the client as part of the initial page load.
2479This usually reduces a round-trip for the client, allowing the UI to
2480start more quickly. If false, a tiny JavaScript loader is sent to the
2481client instead to determine the correct code to use. Default is true.
2482
2483[[site.refreshHeaderFooter]]site.refreshHeaderFooter::
2484+
2485If true the server checks the site header, footer and CSS files for
2486updated versions. If false, a server restart is required to change
2487any of these resources. Default is true, allowing automatic reloads.
2488
Shawn O. Pearce6bd04fd2012-04-05 14:39:22 -07002489[[site.enableDeprecatedQuery]]site.enableDeprecatedQuery::
2490+
2491If true the deprecated `/query` URL is available to return JSON
2492and text results for changes. If false, the URL is disabled and
2493returns 404 to clients. Default is true, enabling `/query`.
2494
Shawn O. Pearce521380a2012-05-11 14:57:56 -07002495[[ssh-alias]] Section ssh-alias
2496~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2497
2498Variables in section ssh-alias permit the site administrator to alias
2499another command from Gerrit or a plugin into the `gerrit` command
2500namespace. To alias `replication start` to `gerrit replicate`:
2501
2502----
2503[ssh-alias]
2504 replicate = replication start
2505----
Shawn O. Pearcedba97642011-09-07 20:12:31 -07002506
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -07002507[[sshd]] Section sshd
Shawn O. Pearcea758fef2009-08-19 08:29:32 -07002508~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearce9410f2c2009-05-14 10:26:47 -07002509
David Ostrovskye5b7f1a2013-10-23 21:10:39 +02002510[[sshd.backend]]sshd.backend::
2511+
2512Starting from version 0.9.0 Apache SSHD project added support for NIO2
2513IoSession. To use the new NIO2 session the `backend` option must be set
2514to `NIO2`.
2515+
2516By default, `MINA`.
2517
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002518[[sshd.listenAddress]]sshd.listenAddress::
Shawn O. Pearce1d3cb4442009-05-30 14:03:31 -07002519+
2520Specifies the local addresses the internal SSHD should listen
2521for connections on. The following forms may be used to specify
2522an address. In any form, `:'port'` may be omitted to use the
2523default of 29418.
2524+
2525* 'hostname':'port' (for example `review.example.com:29418`)
2526* 'IPv4':'port' (for example `10.0.0.1:29418`)
2527* ['IPv6']:'port' (for example `[ff02::1]:29418`)
Edwin Kempincdb0e002011-09-08 14:23:30 +02002528* *:'port' (for example `*:29418`)
Shawn O. Pearce1d3cb4442009-05-30 14:03:31 -07002529
2530+
2531If multiple values are supplied, the daemon will listen on all
2532of them.
2533+
Shawn O. Pearce6af6f5f2010-06-08 17:38:43 -07002534To disable the internal SSHD, set listenAddress to `off`.
2535+
Shawn O. Pearce1d3cb4442009-05-30 14:03:31 -07002536By default, *:29418.
2537
James Y Knight910bd862011-01-11 20:05:56 -05002538[[sshd.advertisedAddress]]sshd.advertisedAddress::
2539+
2540Specifies the addresses clients should be told to connect to.
2541This may differ from sshd.listenAddress if a firewall based port
2542redirector is being used, making Gerrit appear to answer on port
254322. The following forms may be used to specify an address. In any
2544form, `:'port'` may be omitted to use the default SSH port of 22.
2545+
2546* 'hostname':'port' (for example `review.example.com:22`)
2547* 'IPv4':'port' (for example `10.0.0.1:29418`)
2548* ['IPv6']:'port' (for example `[ff02::1]:29418`)
2549
2550+
2551If multiple values are supplied, the daemon will advertise all
2552of them.
2553+
2554By default, sshd.listenAddress.
2555
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002556[[sshd.tcpKeepAlive]]sshd.tcpKeepAlive::
Shawn O. Pearcefc9081f2009-05-14 10:26:59 -07002557+
2558If true, enables TCP keepalive messages to the other side, so
2559the daemon can terminate connections if the peer disappears.
2560+
David Ostrovskye5b7f1a2013-10-23 21:10:39 +02002561Only effective when `sshd.backend` is set to `MINA`.
2562+
Shawn O. Pearcefc9081f2009-05-14 10:26:59 -07002563By default, true.
2564
Shawn O. Pearce1a4580b2009-11-19 17:37:10 -08002565[[sshd.threads]]sshd.threads::
2566+
2567Number of threads to use when executing SSH command requests.
2568If additional requests are received while all threads are busy they
David Pursehouse221d4f62012-06-08 17:38:08 +09002569are queued and serviced in a first-come-first-served order.
Shawn O. Pearce1a4580b2009-11-19 17:37:10 -08002570+
2571By default, 1.5x the number of CPUs available to the JVM.
2572
Nico Sallembienfc53f7f2010-05-18 16:40:10 -07002573[[sshd.batchThreads]]sshd.batchThreads::
2574+
2575Number of threads to allocate for SSH command requests from
Fredrik Luthander46843022012-03-13 16:11:02 +01002576link:access-control.html#non-interactive_users[non-interactive users].
2577If equals to 0, then all non-interactive requests are executed in the same
2578queue as interactive requests.
Nico Sallembienfc53f7f2010-05-18 16:40:10 -07002579+
2580Any other value will remove the number of threads from the queue
2581allocated to interactive users, and create a separate thread pool
2582of the requested size, which will be used to run commands from
2583non-interactive users.
2584+
2585If the number of threads requested for non-interactive users is larger
2586than the total number of threads allocated in sshd.threads, then the
David Pursehouse92463562013-06-24 10:16:28 +09002587value of sshd.threads is increased to accommodate the requested value.
Nico Sallembienfc53f7f2010-05-18 16:40:10 -07002588+
2589By default, 0.
2590
Kenny Root15ac1b82010-02-24 00:29:20 -08002591[[sshd.streamThreads]]sshd.streamThreads::
2592+
2593Number of threads to use when formatting events to asynchronous
2594streaming clients. Event formatting is multiplexed onto this thread
2595pool by a simple FIFO scheduling system.
2596+
2597By default, 1 plus the number of CPUs available to the JVM.
2598
Edwin Kempinb5df3b82011-10-10 11:31:14 +02002599[[sshd.commandStartThreads]]sshd.commandStartThreads::
Shawn O. Pearced6296552011-05-15 13:56:30 -07002600+
2601Number of threads used to parse a command line submitted by a client
2602over SSH for execution, create the internal data structures used by
2603that command, and schedule it for execution on another thread.
2604+
2605By default, 2.
2606
Shawn O. Pearce8a0bf362010-11-05 17:49:41 -07002607[[sshd.maxAuthTries]]sshd.maxAuthTries::
2608+
2609Maximum number of authentication attempts before the server
2610disconnects the client. Each public key that a client has loaded
2611into its local agent counts as one auth request. Users can work
2612around the server's limit by loading less keys into their agent,
2613or selecting a specific key in their `~/.ssh/config` file with
2614the `IdentityFile` option.
2615+
2616By default, 6.
2617
2618[[sshd.loginGraceTime]]sshd.loginGraceTime::
2619+
2620Time in seconds that a client has to authenticate before the server
2621automatically terminates their connection. Values should use common
2622unit suffixes to express their setting:
2623+
2624* s, sec, second, seconds
2625* m, min, minute, minutes
2626* h, hr, hour, hours
2627* d, day, days
2628
2629+
2630By default, 2 minutes.
2631
Christian Aistleitner3d794592013-04-08 00:19:40 +02002632[[sshd.idleTimeout]]sshd.idleTimeout::
2633+
2634Time in seconds after which the server automatically terminates idle
2635connections (or 0 to disable closing of idle connections). Values
2636should use common unit suffixes to express their setting:
2637+
2638* s, sec, second, seconds
2639* m, min, minute, minutes
2640* h, hr, hour, hours
2641* d, day, days
2642
2643+
2644By default, 0.
2645
Shawn O. Pearce8a0bf362010-11-05 17:49:41 -07002646[[sshd.maxConnectionsPerUser]]sshd.maxConnectionsPerUser::
2647+
2648Maximum number of concurrent SSH sessions that a user account
2649may open at one time. This is the number of distinct SSH logins
David Pursehouse221d4f62012-06-08 17:38:08 +09002650that each user may have active at one time, and is not related to
Shawn O. Pearce8a0bf362010-11-05 17:49:41 -07002651the number of commands a user may issue over a single connection.
2652If set to 0, there is no limit.
2653+
2654By default, 64.
2655
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002656[[sshd.cipher]]sshd.cipher::
Shawn O. Pearce0bf2f522009-05-14 11:02:03 -07002657+
2658Available ciphers. To permit multiple ciphers, specify multiple
2659`sshd.cipher` keys in the configuration file, one cipher name
2660per key. Cipher names starting with `+` are enabled in addition
2661to the default ciphers, cipher names starting with `-` are removed
2662from the default cipher set.
2663+
2664Supported ciphers: aes128-cbc, aes128-cbc, aes256-cbc, blowfish-cbc,
26653des-cbc, none.
2666+
2667By default, all supported ciphers except `none` are available.
2668
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002669[[sshd.mac]]sshd.mac::
Shawn O. Pearce0bf2f522009-05-14 11:02:03 -07002670+
2671Available MAC (message authentication code) algorithms. To permit
2672multiple algorithms, specify multiple `sshd.mac` keys in the
2673configuration file, one MAC per key. MAC names starting with `+`
2674are enabled in addition to the default MACs, MAC names starting with
2675`-` are removed from the default MACs.
2676+
2677Supported MACs: hmac-md5, hmac-md5-96, hmac-sha1, hmac-sha1-96.
2678+
2679By default, all supported MACs are available.
2680
Alex Blewitt7efb06f2013-04-01 12:46:48 -04002681[[sshd.kerberosKeytab]]sshd.kerberosKeytab::
2682+
2683Enable kerberos authentication for SSH connections. To permit
2684kerberos authentication, the server must have a host principal
2685(see `sshd.kerberosPrincipal`) which is acquired from a keytab.
2686This must be provisioned by the kerberos administrators, and is
2687typically installed into `/etc/krb5.keytab` on host machines.
2688+
2689The keytab must contain at least one `host/` principal, typically
2690using the host's canonical name. If it does not use the
2691canonical name, the `sshd.kerberosPrincipal` should be configured
2692with the correct name.
2693+
2694By default, not set and so kerberos authentication is not enabled.
2695
2696[[sshd.kerberosPrincipal]]sshd.kerberosPrincipal::
2697+
2698If kerberos authentication is enabled with `sshd.kerberosKeytab`,
2699instead use the given principal name instead of the default.
2700If the principal does not begin with `host/` a warning message is
2701printed and may prevent successful authentication.
2702+
2703This may be useful if the host is behind an IP load balancer or
2704other SSH forwarding systems, since the principal name is constructed
2705by the client and must match for kerberos authentication to work.
2706+
2707By default, `host/canonical.host.name`
2708
Shawn Pearce318bfca2013-10-17 22:15:38 -07002709[[sshd.requestLog]]sshd.requestLog::
2710+
2711Enable (or disable) the `'$site_path'/logs/sshd_log` request log.
2712If enabled, a request log file is written out by the SSH daemon.
2713+
2714By default, true.
2715
Shawn O. Pearce07bd6fb2011-04-29 19:15:47 -07002716[[suggest]] Section suggest
2717~~~~~~~~~~~~~~~~~~~~~~~~~~~
2718
Dave Borowitz1ae8c532012-03-09 18:39:40 -08002719[[suggest.accounts]]suggest.accounts::
Shawn O. Pearce07bd6fb2011-04-29 19:15:47 -07002720+
Dave Borowitz45baa892012-02-23 16:43:05 -08002721If `true`, visible user accounts (according to the value of
2722`accounts.visibility`) will be offered as completion suggestions
2723when adding a reviewer to a change, or a user to a group.
Shawn O. Pearce07bd6fb2011-04-29 19:15:47 -07002724+
Dave Borowitz45baa892012-02-23 16:43:05 -08002725If `false`, account suggestion is disabled.
Shawn O. Pearce07bd6fb2011-04-29 19:15:47 -07002726+
Dave Borowitz45baa892012-02-23 16:43:05 -08002727Older configurations may also have one of the `accounts.visibility`
2728values for this field, including `OFF` as a synonym for `NONE`. If
2729`accounts.visibility` is also set, that value overrides this one;
2730otherwise, this value applies to both `suggest.accounts` and
2731`accounts.visibility`.
Edwin Kempin42488812011-05-20 03:11:43 +02002732+
Dave Borowitz45baa892012-02-23 16:43:05 -08002733New configurations should prefer the boolean value for this field
2734and an enum value for `accounts.visibility`.
Shawn O. Pearce07bd6fb2011-04-29 19:15:47 -07002735
Edwin Kempinf957dc22012-10-19 20:41:18 +02002736[[suggest.from]]suggest.from::
2737+
2738The number of characters that a user must have typed before suggestions
2739are provided. If set to 0, suggestions are always provided.
2740+
2741By default 0.
2742
Shawn O. Pearce2ba3ab42010-02-25 12:10:10 -08002743[[theme]] Section theme
2744~~~~~~~~~~~~~~~~~~~~~~~
2745
2746[[theme.backgroundColor]]theme.backgroundColor::
2747+
2748Background color for the page, and major data tables like the all
2749open changes table or the account dashboard. The value must be a
2750valid HTML hex color code, or standard color name.
2751+
Chad Horohoebbdf7482012-11-13 18:23:15 -08002752By default white, `FFFFFF`.
Shawn O. Pearce2ba3ab42010-02-25 12:10:10 -08002753
2754[[theme.topMenuColor]]theme.topMenuColor::
2755+
2756This is the color of the main menu bar at the top of the page.
2757The value must be a valid HTML hex color code, or standard color
Chad Horohoebbdf7482012-11-13 18:23:15 -08002758name.
2759+
2760By default white, `FFFFFF`.
Shawn O. Pearce2ba3ab42010-02-25 12:10:10 -08002761
2762[[theme.textColor]]theme.textColor::
2763+
2764Text color for the page, and major data tables like the all
2765open changes table or the account dashboard. The value must be a
2766valid HTML hex color code, or standard color name.
2767+
Chad Horohoebbdf7482012-11-13 18:23:15 -08002768By default dark grey, `353535`.
Shawn O. Pearce2ba3ab42010-02-25 12:10:10 -08002769
2770[[theme.trimColor]]theme.trimColor::
2771+
2772Primary color used as a background color behind text. This is
2773the color of the main menu bar at the top, of table headers,
2774and of major UI areas that we want to offset from other portions
2775of the page. The value must be a valid HTML hex color code, or
2776standard color name.
2777+
Chad Horohoebbdf7482012-11-13 18:23:15 -08002778By default a light grey, `EEEEEE`.
Shawn O. Pearce2ba3ab42010-02-25 12:10:10 -08002779
2780[[theme.selectionColor]]theme.selectionColor::
2781+
2782Background color used within a trimColor area to denote the currently
2783selected tab, or the background color used in a table to denote the
2784currently selected row. The value must be a valid HTML hex color
2785code, or standard color name.
2786+
Chad Horohoebbdf7482012-11-13 18:23:15 -08002787By default a pale blue, `D8EDF9`.
Shawn O. Pearce2ba3ab42010-02-25 12:10:10 -08002788
Andrew Hutchingscfd7abb2012-06-29 10:57:05 +01002789[[theme.changeTableOutdatedColor]]theme.changeTableOutdatedColor::
2790+
2791Background color used for patch outdated messages. The value must be
2792a valid HTML hex color code, or standard color name.
2793+
Edwin Kempinb0347332012-07-17 10:14:32 +02002794By default a shade of red, `F08080`.
Andrew Hutchingscfd7abb2012-06-29 10:57:05 +01002795
2796[[theme.tableOddRowColor]]theme.tableOddRowColor::
2797+
2798Background color for tables such as lists of open reviews for odd
2799rows. This is so you can have a different color for odd and even
2800rows of the table. The value must be a valid HTML hex color code,
2801or standard color name.
2802+
2803By default transparent.
2804
2805[[theme.tableEvenRowColor]]theme.tableEvenRowColor::
2806+
2807Background color for tables such as lists of open reviews for even
2808rows. This is so you can have a different color for odd and even
2809rows of the table. The value must be a valid HTML hex color code,
2810or standard color name.
2811+
2812By default transparent.
2813
Shawn O. Pearcea83bb1c2011-05-20 08:46:48 -07002814A different theme may be used for signed-in vs. signed-out user status
2815by using the "signed-in" and "signed-out" theme sections. Variables
2816not specified in a section are inherited from the default theme.
2817
2818----
2819[theme]
2820 backgroundColor = FFFFFF
2821[theme "signed-in"]
2822 backgroundColor = C0C0C0
2823[theme "signed-out"]
2824 backgroundColor = 00FFFF
2825----
2826
David Ostrovsky117c6032013-08-09 00:44:56 +02002827As example, here is the theme configuration to have the old green look:
2828
2829----
2830[theme]
2831 backgroundColor = FCFEEF
2832 textColor = 000000
2833 trimColor = D4E9A9
2834 selectionColor = FFFFCC
2835 topMenuColor = D4E9A9
2836 changeTableOutdatedColor = F08080
2837[theme "signed-in"]
2838 backgroundColor = FFFFFF
2839----
2840
Goran Lungberg04132a12010-06-15 17:20:37 -07002841[[trackingid]] Section trackingid
Shawn O. Pearce91763a02010-06-16 15:39:33 -07002842~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Goran Lungberg04132a12010-06-15 17:20:37 -07002843
Shawn O. Pearcee800b1e2010-06-16 17:33:43 -07002844Tagged footer lines containing references to external
2845tracking systems, parsed out of the commit message and
Shawn Pearceff61c8a2013-10-07 19:35:53 -07002846saved in Gerrit's database.
2847
2848After making changes to this section, existing changes
2849must be reindexed with link:pgm-reindex.html[reindex]
2850if index.type is `LUCENE` or `SOLR`; or with
2851link:pgm-ScanTrackingIds.html[ScanTrackingIds] if index.type
2852is unset or `SQL`.
Goran Lungberg04132a12010-06-15 17:20:37 -07002853
Edwin Kempinbb421f12011-08-25 11:19:00 +02002854The tracking ids are searchable using tr:<tracking id> or
Shawn O. Pearce91763a02010-06-16 15:39:33 -07002855bug:<tracking id>.
Goran Lungberg04132a12010-06-15 17:20:37 -07002856
2857----
2858[trackingid "jira-bug"]
2859 footer = Bugfix:
2860 match = JRA\\d{2,8}
2861 system = JIRA
2862
2863[trackingid "jira-feature"]
2864 footer = Feature
2865 match = JRA(\\d{2,8})
2866 system = JIRA
2867----
2868
2869[[trackingid.name.footer]]trackingid.<name>.footer::
2870+
2871A prefix tag that identify the footer line to parse for tracking ids.
Kevin Degi9af42ea2011-08-01 15:54:42 -06002872Several trackingid entries can have the same footer tag. A single
2873trackingid entry can have multiple footer tags. If multiple footer
2874tags are specified, each tag will be parsed separately.
Goran Lungberg04132a12010-06-15 17:20:37 -07002875(the trailing ":" is optional)
2876
2877[[trackingid.name.match]]trackingid.<name>.match::
2878+
Magnus Bäcke5611832011-02-02 08:57:15 +01002879A link:http://download.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html[standard
2880Java regular expression (java.util.regex)] used to match the
2881external tracking id part of the footer line. The match can
2882result in several entries in the DB. If grouping is used in the
2883regex the first group will be interpreted as the tracking id.
Christian Aistleitner5cec3682013-03-16 23:02:37 +01002884Tracking ids longer than 32 characters will be ignored.
Goran Lungberg04132a12010-06-15 17:20:37 -07002885+
2886The configuration file parser eats one level of backslashes, so the
2887character class `\s` requires `\\s` in the configuration file. The
2888parser also terminates the line at the first `#`, so a match
2889expression containing # must be wrapped in double quotes.
2890
2891[[trackingid.name.system]]trackingid.<name>.system::
2892+
David Pursehouse221d4f62012-06-08 17:38:08 +09002893The name of the external tracking system (maximum 10 characters).
Goran Lungberg04132a12010-06-15 17:20:37 -07002894It is possible to have several trackingid entries for the same
2895tracking system.
2896
Shawn O. Pearce6e4dfdd2010-05-12 17:26:08 -07002897[[transfer]] Section transfer
2898~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2899
2900[[transfer.timeout]]transfer.timeout::
2901+
2902Number of seconds to wait for a single network read or write
2903to complete before giving up and declaring the remote side is
2904not responding. If 0, there is no timeout, and this server will
2905wait indefinitely for a transfer to finish.
2906+
2907A timeout should be large enough to mostly transfer the objects to
2908the other side. 1 second may be too small for larger projects,
2909especially over a WAN link, while 10-30 seconds is a much more
2910reasonable timeout value.
2911+
2912Defaults to 0 seconds, wait indefinitely.
2913
lincoln2be11602010-07-05 10:53:25 -03002914
2915[[upload]]Section upload
Remy Bohmer203eea32012-02-19 21:21:36 +01002916~~~~~~~~~~~~~~~~~~~~~~~~
lincoln2be11602010-07-05 10:53:25 -03002917Sets the group of users allowed to execute 'upload-pack' on the
2918server, 'upload-pack' is what runs on the server during a user's
2919fetch, clone or repo sync command.
2920
2921----
2922[upload]
2923 allowGroup = GROUP_ALLOWED_TO_EXECUTE
2924 allowGroup = YET_ANOTHER_GROUP_ALLOWED_TO_EXECUTE
2925----
2926
2927[[upload.allowGroup]]upload.allowGroup::
2928+
2929Name of the groups of users that are allowed to execute 'upload-pack'
2930on the server. One or more groups can be set.
2931+
2932If no groups are added, any user will be allowed to execute
2933'upload-pack' on the server.
2934
2935
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -07002936[[user]] Section user
Shawn O. Pearcea758fef2009-08-19 08:29:32 -07002937~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearce0a351912009-06-01 08:14:46 -07002938
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002939[[user.name]]user.name::
Shawn O. Pearce0a351912009-06-01 08:14:46 -07002940+
2941Name that Gerrit calls itself in Git when it creates a new Git
2942commit, such as a merge during change submission.
2943+
2944By default this is "Gerrit Code Review".
2945
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002946[[user.email]]user.email::
Shawn O. Pearce0a351912009-06-01 08:14:46 -07002947+
2948Email address that Gerrit refers to itself as when it creates a
2949new Git commit, such as a merge commit during change submission.
2950+
2951If not set, Gerrit generates this as "gerrit@`hostname`", where
2952`hostname` is the hostname of the system Gerrit is running on.
2953+
2954By default, not set, generating the value at startup.
2955
Edwin Kempin0e02ded2011-09-16 15:10:14 +02002956[[user.anonymousCoward]]user.anonymousCoward::
2957+
David Pursehouse13b21902013-10-16 12:59:18 +09002958Username that is displayed in the Gerrit WebUI and in e-mail
Edwin Kempin0e02ded2011-09-16 15:10:14 +02002959notifications if the full name of the user is not set.
2960+
2961By default "Anonymous Coward" is used.
2962
Shawn O. Pearce0bf2f522009-05-14 11:02:03 -07002963
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08002964File `etc/secure.config`
Remy Bohmer203eea32012-02-19 21:21:36 +01002965------------------------
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08002966The optional file `'$site_path'/etc/secure.config` overrides (or
2967supplements) the settings supplied by `'$site_path'/etc/gerrit.config`.
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08002968The file should be readable only by the daemon process and can be
2969used to contain private configuration entries that wouldn't normally
2970be exposed to everyone.
2971
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08002972Sample `etc/secure.config`:
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08002973----
Shawn O. Pearce34f38cf2011-06-16 19:18:54 -07002974[auth]
2975 registerEmailPrivateKey = 2zHNrXE2bsoylzUqDxZp0H1cqUmjgWb6
Brad Larson3a6f0772012-07-25 11:41:22 -05002976 restTokenPrivateKey = 7e40PzCjlUKOnXATvcBNXH6oyiu+r0dFk2c=
Shawn O. Pearce34f38cf2011-06-16 19:18:54 -07002977
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08002978[database]
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08002979 username = webuser
2980 password = s3kr3t
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08002981
2982[ldap]
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08002983 password = l3tm3srch
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08002984
2985[httpd]
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08002986 sslKeyPassword = g3rr1t
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08002987
2988[sendemail]
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08002989 smtpPass = sp@m
Shawn O. Pearce7929d872011-05-15 13:33:15 -07002990
2991[remote "bar"]
2992 password = s3kr3t
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08002993----
2994
Johan Bjork3e5ee302012-01-27 17:59:54 +01002995File `etc/peer_keys`
2996--------------------
2997
2998The optional file `'$site_path'/etc/peer_keys` controls who can
2999login as the 'Gerrit Code Review' user, required for the link:cmd-suexec.html[suexec]
3000command.
3001
3002The format is one Base-64 encoded public key per line.
3003
3004
Shawn O. Pearce7b405712009-05-08 18:27:53 -07003005Database system_config
3006----------------------
3007
3008Several columns in the `system_config` table within the metadata
3009database may be set to control how Gerrit behaves.
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08003010
3011[NOTE]
3012The contents of the `system_config` table are cached at startup
3013by Gerrit. If you modify any columns in this table, Gerrit needs
3014to be restarted before it will use the new values.
3015
Shawn O. Pearce7b405712009-05-08 18:27:53 -07003016Configurable Parameters
3017~~~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08003018
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07003019site_path::
3020+
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08003021Local filesystem directory holding the site customization assets.
3022Placing this directory under version control and/or backup is a
3023good idea.
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07003024+
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08003025Files in this directory provide additional configuration.
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07003026+
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08003027Other files support site customization.
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07003028+
Dave Borowitz1e49e142013-04-09 12:14:57 -07003029* link:config-themes.html[Themes]
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08003030
Shawn O. Pearce5500e692009-05-28 15:55:01 -07003031GERRIT
3032------
3033Part of link:index.html[Gerrit Code Review]
Yuxuan 'fishy' Wang99cb68d2013-10-31 17:26:00 -07003034
3035SEARCHBOX
3036---------