blob: 9bcbdf415f7b51b82d9a62258aaa054181bc9421 [file] [log] [blame]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001= Gerrit Code Review - Configuration
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08002
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08003== File `etc/gerrit.config`
Shawn O. Pearce51967cd2009-05-08 19:46:57 -07004
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08005The optional file `'$site_path'/etc/gerrit.config` is a Git-style
6config file that controls many host specific settings for Gerrit.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -07007
8[NOTE]
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08009The contents of the `etc/gerrit.config` file are cached at startup
Brandon Casey4a21add2011-07-05 13:14:18 -050010by Gerrit. If you modify any properties in this file, Gerrit needs
Shawn O. Pearce51967cd2009-05-08 19:46:57 -070011to be restarted before it will use the new values.
12
Shawn O. Pearcec5fed822009-11-17 16:10:10 -080013Sample `etc/gerrit.config`:
Shawn O. Pearce51967cd2009-05-08 19:46:57 -070014----
15[core]
Shawn O. Pearce9d342a42009-12-16 15:49:05 -080016 packedGitLimit = 200 m
Shawn O. Pearce51967cd2009-05-08 19:46:57 -070017
18[cache]
Shawn O. Pearce9d342a42009-12-16 15:49:05 -080019 directory = /var/cache/gerrit2
Shawn O. Pearce51967cd2009-05-08 19:46:57 -070020----
21
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -080022[[accounts]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080023=== Section accounts
Dave Borowitz45baa892012-02-23 16:43:05 -080024
Matthias Sohnf3360662012-04-05 15:42:52 +020025[[accounts.visibility]]accounts.visibility::
Dave Borowitz45baa892012-02-23 16:43:05 -080026+
27Controls visibility of other users' dashboard pages and
28completion suggestions to web users.
29+
30If `ALL`, all users are visible to all other users, even
31anonymous users.
32+
33If `SAME_GROUP`, only users who are also members of a group the
34current user is a member of are visible.
35+
36If `VISIBLE_GROUP`, only users who are members of at least one group
37that is visible to the current user are visible.
38+
39If `NONE`, no users other than the current user are visible.
40+
41Default is `ALL`.
42
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -080043[[addreviewer]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080044=== Section addreviewer
Edwin Kempin49cb3e12011-06-29 14:35:14 +020045
46[[addreviewer.maxWithoutConfirmation]]addreviewer.maxWithoutConfirmation::
47+
48The maximum number of reviewers a user can add at once by adding a
49group as reviewer without being asked to confirm the operation.
50+
51If set to 0, the user will never be asked to confirm adding a group
52as reviewer.
53+
54Default is 10.
Edwin Kempin5e65d9b2011-07-08 07:35:48 +020055+
David Pursehousea1d633b2014-05-02 17:21:02 +090056This setting only applies for adding reviewers in the Gerrit Web UI,
Edwin Kempin5e65d9b2011-07-08 07:35:48 +020057but is ignored when adding reviewers with the
Edwin Kempin33e92d02011-07-11 22:00:57 +020058link:cmd-set-reviewers.html[set-reviewers] command.
Edwin Kempin49cb3e12011-06-29 14:35:14 +020059
60[[addreviewer.maxAllowed]]addreviewer.maxAllowed::
61+
62The maximum number of reviewers a user can add at once by adding a
63group as reviewer.
64+
65If set to 0, there is no limit for the number of reviewers that can
66be added at once by adding a group as reviewer.
67+
68Default is 20.
69
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -080070[[auth]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080071=== Section auth
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -070072
73See also link:config-sso.html[SSO configuration].
74
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -070075[[auth.type]]auth.type::
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -070076+
Shawn O. Pearce2920ef32009-08-03 08:03:34 -070077Type of user authentication employed by Gerrit. The supported
78values are:
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -070079+
80* `OpenID`
81+
82The default setting. Gerrit uses any valid OpenID
83provider chosen by the end-user. For more information see
Shawn O. Pearce2920ef32009-08-03 08:03:34 -070084http://openid.net/[openid.net].
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -070085+
James E. Blairca8bc3b2011-12-21 18:12:26 +000086* `OpenID_SSO`
87+
88Supports OpenID from a single provider. There is no registration
89link, and the "Sign In" link sends the user directly to the provider's
90SSO entry point.
91+
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -070092* `HTTP`
93+
Shawn O. Pearce2920ef32009-08-03 08:03:34 -070094Gerrit relies upon data presented in the HTTP request. This includes
Edwin Kempinf1acbb82011-09-15 12:49:42 +020095HTTP basic authentication, or some types of commercial single-sign-on
Shawn O. Pearce2920ef32009-08-03 08:03:34 -070096solutions. With this setting enabled the authentication must
97take place in the web server or servlet container, and not from
98within Gerrit.
99+
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -0700100* `HTTP_LDAP`
101+
102Exactly like `HTTP` (above), but additionally Gerrit pre-populates
103a user's full name and email address based on information obtained
104from the user's account object in LDAP. The user's group membership
105is also pulled from LDAP, making any LDAP groups that a user is a
106member of available as groups in Gerrit.
107+
Sasa Zivkoveabc8972010-10-04 15:47:08 +0200108* `CLIENT_SSL_CERT_LDAP`
109+
110This authentication type is actually kind of SSO. Gerrit will configure
David Pursehouse221d4f62012-06-08 17:38:08 +0900111Jetty's SSL channel to request the client's SSL certificate. For this
Sasa Zivkoveabc8972010-10-04 15:47:08 +0200112authentication to work a Gerrit administrator has to import the root
113certificate of the trust chain used to issue the client's certificate
114into the <review-site>/etc/keystore.
115After the authentication is done Gerrit will obtain basic user
116registration (name and email) from LDAP, and some group memberships.
117Therefore, the "_LDAP" suffix in the name of this authentication type.
118This authentication type can only be used under hosted daemon mode, and
119the httpd.listenUrl must use https:// as the protocol.
Chulho Yangb72ff8f2013-07-04 02:35:53 -0400120Optionally, certificate revocation list file can be used
121at <review-site>/etc/crl.pem. For details, see httpd.sslCrl.
Sasa Zivkoveabc8972010-10-04 15:47:08 +0200122+
Shawn O. Pearcef7e065e2009-09-26 20:01:10 -0700123* `LDAP`
124+
125Gerrit prompts the user to enter a username and a password, which
126it then verifies by performing a simple bind against the configured
127<<ldap.server,ldap.server>>. In this configuration the web server
128is not involved in the user authentication process.
129+
Shawn O. Pearcec892d342010-02-17 17:00:50 -0800130The actual username used in the LDAP simple bind request is the
131account's full DN, which is discovered by first querying the
132directory using either an anonymous request, or the configured
Robin Rosenberga3baed02012-10-14 14:09:32 +0200133<<ldap.username,ldap.username>> identity. Gerrit can also use kerberos if
134<<ldap.authentication,ldap.authentication>> is set to `GSSAPI`.
Shawn O. Pearcec892d342010-02-17 17:00:50 -0800135
136* `LDAP_BIND`
137+
138Gerrit prompts the user to enter a username and a password, which
139it then verifies by performing a simple bind against the configured
140<<ldap.server,ldap.server>>. In this configuration the web server
141is not involved in the user authentication process.
142+
David Pursehouse42f42042013-08-01 14:02:25 +0900143Unlike `LDAP` above, the username used to perform the LDAP simple bind
David Pursehouse1344f5b2013-08-09 17:35:47 +0900144request is the exact string supplied in the dialog by the user.
Robin Rosenberg524a3032012-10-14 14:24:36 +0200145The configured <<ldap.username,ldap.username>> identity is not used to obtain
Shawn O. Pearcec892d342010-02-17 17:00:50 -0800146account information.
147+
Shawn O. Pearce2920ef32009-08-03 08:03:34 -0700148* `DEVELOPMENT_BECOME_ANY_ACCOUNT`
149+
150*DO NOT USE*. Only for use in a development environment.
151+
152When this is the configured authentication method a hyperlink titled
153`Become` appears in the top right corner of the page, taking the
154user to a form where they can enter the username of any existing
155user account, and immediately login as that account, without any
156authentication taking place. This form of authentication is only
157useful for the GWT hosted mode shell, where OpenID authentication
158redirects might be risky to the developer's host computer, and HTTP
159authentication is not possible.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700160
161+
162By default, OpenID.
163
Shawn O. Pearce533cafc2010-05-11 16:05:27 -0700164[[auth.allowedOpenID]]auth.allowedOpenID::
165+
166List of permitted OpenID providers. A user may only authenticate
167with an OpenID that matches this list. Only used if `auth.type`
David Pursehouse42f42042013-08-01 14:02:25 +0900168is set to `OpenID` (the default).
Shawn O. Pearce533cafc2010-05-11 16:05:27 -0700169+
Magnus Bäcke5611832011-02-02 08:57:15 +0100170Patterns may be either a
171link:http://download.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html[standard
172Java regular expression (java.util.regex)] (start with `^` and
Shawn O. Pearce533cafc2010-05-11 16:05:27 -0700173end with `$`) or be a simple prefix (any other string).
174+
175By default, the list contains two values, `http://` and `https://`,
176allowing users to authenticate with any OpenID provider.
177
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700178[[auth.trustedOpenID]]auth.trustedOpenID::
Shawn O. Pearced7c026d2009-08-05 20:11:22 -0700179+
David Pursehouse221d4f62012-06-08 17:38:08 +0900180List of trusted OpenID providers. Only used if `auth.type` is
David Pursehouse42f42042013-08-01 14:02:25 +0900181set to `OpenID` (the default).
Shawn O. Pearced7c026d2009-08-05 20:11:22 -0700182+
183In order for a user to take advantage of permissions beyond those
184granted to the `Anonymous Users` and `Registered Users` groups,
185the user account must only have OpenIDs which match at least one
186pattern from this list.
187+
Magnus Bäcke5611832011-02-02 08:57:15 +0100188Patterns may be either a
189link:http://download.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html[standard
190Java regular expression (java.util.regex)] (start with `^` and
Shawn O. Pearced7c026d2009-08-05 20:11:22 -0700191end with `$`) or be a simple prefix (any other string).
192+
193By default, the list contains two values, `http://` and `https://`,
194allowing Gerrit to trust any OpenID it receives.
195
Mike Goulined2ab0cd2012-12-18 11:20:53 +1100196[[auth.openIdDomain]]auth.openIdDomain::
197+
198List of allowed OpenID email address domains. Only used if
David Pursehouse42f42042013-08-01 14:02:25 +0900199`auth.type` is set to `OPENID` or `OPENID_SSO`.
Mike Goulined2ab0cd2012-12-18 11:20:53 +1100200+
201Domain is case insensitive and must be in the same form as it
202appears in the email address, for example, "example.com".
203+
204By default, any domain is accepted.
205
Shawn O. Pearce89030bc2010-04-24 17:25:29 -0700206[[auth.maxOpenIdSessionAge]]auth.maxOpenIdSessionAge::
207+
208Time in seconds before an OpenID provider must force the user
209to authenticate themselves again before authentication to this
210Gerrit server. Currently this is only a polite request, and users
211coming from providers that don't support the PAPE extension will
212be accepted anyway. In the future it may be enforced, rejecting
213users coming from providers that don't honor the max session age.
214+
215If set to 0, the provider will always force the user to authenticate
216(e.g. supply their password). Values should use common unit suffixes
217to express their setting:
218+
219* s, sec, second, seconds
220* m, min, minute, minutes
221* h, hr, hour, hours
222* d, day, days
223* w, week, weeks (`1 week` is treated as `7 days`)
224* mon, month, months (`1 month` is treated as `30 days`)
225* y, year, years (`1 year` is treated as `365 days`)
226
227+
228Default is -1, permitting infinite time between authentications.
229
Shawn O. Pearce34f38cf2011-06-16 19:18:54 -0700230[[auth.maxRegisterEmailTokenAge]]auth.maxRegisterEmailTokenAge::
231+
232Time in seconds before an email verification token sent to a user in
233order to validate their email address expires.
234+
235* s, sec, second, seconds
236* m, min, minute, minutes
237* h, hr, hour, hours
238* d, day, days
239* w, week, weeks (`1 week` is treated as `7 days`)
240* mon, month, months (`1 month` is treated as `30 days`)
241* y, year, years (`1 year` is treated as `365 days`)
242
243+
Shawn O. Pearced6bd00b2012-01-20 12:40:51 -0800244Default is 12 hours.
Shawn O. Pearce34f38cf2011-06-16 19:18:54 -0700245
James E. Blairca8bc3b2011-12-21 18:12:26 +0000246[[auth.openIdSsoUrl]]auth.openIdSsoUrl::
247+
David Pursehouse42f42042013-08-01 14:02:25 +0900248The SSO entry point URL. Only used if `auth.type` is set to
249`OpenID_SSO`.
James E. Blairca8bc3b2011-12-21 18:12:26 +0000250+
251The "Sign In" link will send users directly to this URL.
252
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700253[[auth.httpHeader]]auth.httpHeader::
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700254+
255HTTP header to trust the username from, or unset to select HTTP basic
David Pursehouse42f42042013-08-01 14:02:25 +0900256or digest authentication. Only used if `auth.type` is set to `HTTP`.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700257
Luca Milanesio384ed6c2013-07-30 09:10:07 +0100258[[auth.httpDisplaynameHeader]]auth.httpDisplaynameHeader::
259+
260HTTP header to retrieve the user's display name from. Only used if `auth.type`
261is set to `HTTP`.
262+
263If set, Gerrit trusts and enforces the user's full name using the HTTP header
264and disables the ability to manually modify the user's full name
265from the contact information page.
266
267[[auth.httpEmailHeader]]auth.httpEmailHeader::
268+
269HTTP header to retrieve the user's e-mail from. Only used if `auth.type`
270is set to `HTTP`.
271+
272If set, Gerrit trusts and enforces the user's e-mail using the HTTP header
273and disables the ability to manually modify or register other e-mails
274from the contact information page.
275
Luca Milanesio5185b042013-07-27 22:03:06 +0100276[[auth.loginUrl]]auth.loginUrl::
277+
278URL to redirect a browser to after the end-user has clicked on the
David Pursehouse42f42042013-08-01 14:02:25 +0900279login link in the upper right corner. Only used if `auth.type` is set
280to `HTTP` or `HTTP_LDAP`.
Luca Milanesio5185b042013-07-27 22:03:06 +0100281Organizations using an enterprise single-sign-on solution may want to
282redirect the browser to the SSO product's sign-in page for completing the
283login process and validate their credentials.
284+
David Pursehouse42f42042013-08-01 14:02:25 +0900285If set, Gerrit allows anonymous access until the end-user performs the login
286and provides a trusted identity through the HTTP header.
Luca Milanesio5185b042013-07-27 22:03:06 +0100287If not set, Gerrit requires the HTTP header with a trusted identity
David Pursehouse42f42042013-08-01 14:02:25 +0900288and returns the error page 'LoginRedirect.html' if such a header is not
289present.
Luca Milanesio5185b042013-07-27 22:03:06 +0100290
291[[auth.loginText]]auth.loginText::
292+
David Pursehouse42f42042013-08-01 14:02:25 +0900293Text displayed in the loginUrl link. Only used if `auth.loginUrl` is set.
Luca Milanesio5185b042013-07-27 22:03:06 +0100294+
David Pursehouse42f42042013-08-01 14:02:25 +0900295If not set, the "Sign In" text is used.
Luca Milanesio5185b042013-07-27 22:03:06 +0100296
Luca Milanesio111e0b72013-08-15 18:56:42 +0100297[[auth.registerPageUrl]]auth.registerPageUrl::
298+
David Pursehouse268744b2013-08-17 15:32:11 +0900299URL of the registration page to use when a new user logs in to Gerrit for
300the first time. Used only when `auth.type` is set to `HTTP`.
Luca Milanesio111e0b72013-08-15 18:56:42 +0100301+
302If not set, the standard Gerrit registration page `/#/register/` is displayed.
303
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700304[[auth.logoutUrl]]auth.logoutUrl::
Shawn O. Pearce12b5d842009-08-15 15:11:10 -0700305+
306URL to redirect a browser to after the end-user has clicked on the
307"Sign Out" link in the upper right corner. Organizations using an
308enterprise single-sign-on solution may want to redirect the browser
309to the SSO product's sign-out page.
310+
311If not set, the redirect returns to the list of all open changes.
312
Shawn O. Pearcec9d26b52009-12-16 08:05:27 -0800313[[auth.registerUrl]]auth.registerUrl::
314+
315Target for the "Register" link in the upper right corner. Used only
David Pursehouse42f42042013-08-01 14:02:25 +0900316when `auth.type` is `LDAP`.
Shawn O. Pearcec9d26b52009-12-16 08:05:27 -0800317+
318If not set, no "Register" link is displayed.
319
Chad Horohoe65897082012-11-10 10:26:25 -0800320[[auth.registerText]]auth.registerText::
321+
322Text for the "Register" link in the upper right corner. Used only
David Pursehouse42f42042013-08-01 14:02:25 +0900323when `auth.type` is `LDAP`.
Chad Horohoe65897082012-11-10 10:26:25 -0800324+
325If not set, defaults to "Register".
326
David Pursehouse3d604492013-01-25 17:41:53 +0900327[[auth.editFullNameUrl]]auth.editFullNameUrl::
328+
329Target for the "Edit" button when the user is allowed to edit their
330full name.
331
332[[auth.httpPasswordUrl]]auth.httpPasswordUrl::
333+
David Pursehouse42f42042013-08-01 14:02:25 +0900334Target for the "Obtain Password" link. Used only when `auth.type` is
David Pursehouse3d604492013-01-25 17:41:53 +0900335`LDAP`, `LDAP_BIND` or `CUSTOM_EXTENSION`.
Shawn Pearcee0cafe42013-08-29 23:28:13 -0700336
337[[auth.switchAccountUrl]]auth.switchAccountUrl::
David Pursehouse3d604492013-01-25 17:41:53 +0900338+
Shawn Pearcee0cafe42013-08-29 23:28:13 -0700339URL to switch user identities and login as a different account than
340the currently active account. This is disabled by default except when
341`auth.type` is `OPENID` and `DEVELOPMENT_BECOME_ANY_ACCOUNT`. If set
342the "Switch Account" link is displayed next to "Sign Out".
343+
344When `auth.type` does not normally enable this URL administrators may
345set this to `login/` or `$canonicalWebUrl/login`, allowing users to
346begin a new web session.
David Pursehouse3d604492013-01-25 17:41:53 +0900347
Piotr Sikora7cec2f82011-02-26 12:57:30 +0000348[[auth.cookiePath]]auth.cookiePath::
349+
350Sets "path" attribute of the authentication cookie.
351+
352If not set, HTTP request's path is used.
353
354[[auth.cookieSecure]]auth.cookieSecure::
355+
356Sets "secure" flag of the authentication cookie. If true, cookies
357will be transmitted only over HTTPS protocol.
358+
359By default, false.
360
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700361[[auth.emailFormat]]auth.emailFormat::
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700362+
363Optional format string to construct user email addresses out of
David Pursehouse42f42042013-08-01 14:02:25 +0900364user login names. Only used if `auth.type` is `HTTP`, `HTTP_LDAP`
Shawn O. Pearcef7e065e2009-09-26 20:01:10 -0700365or `LDAP`.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700366+
Shawn O. Pearce44221bf2011-06-27 10:37:30 -0700367This value can be set to a format string, where `{0}` is replaced
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700368with the login name. E.g. "\{0\}+gerrit@example.com" with a user
369login name of "foo" will produce "foo+gerrit@example.com" during
370the first time user "foo" registers.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -0700371+
Shawn O. Pearcef7e065e2009-09-26 20:01:10 -0700372If the site is using `HTTP_LDAP` or `LDAP`, using this option is
373discouraged. Setting `ldap.accountEmailAddress` and importing the
374email address from the LDAP directory is generally preferred.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700375
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700376[[auth.contributorAgreements]]auth.contributorAgreements::
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700377+
378Controls whether or not the contributor agreement features are
379enabled for the Gerrit site. If enabled a user must complete a
380contributor agreement before they can upload changes.
381+
Marc Petit-Hugueninbbb85492012-12-03 11:11:00 -0800382If enabled, the admin must also add one or more
383link:config-cla.html[contributor-agreement sections]
384in project.config and create agreement files under
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700385`'$site_path'/static`, so users can actually complete one or
Grzegorz Kossakowski28e4e1b2009-09-23 11:33:34 -0700386more agreements.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700387+
388By default this is false (no agreements are used).
Fredrik Luthandera3cf3542012-07-04 16:55:35 -0700389+
390To enable the actual usage of contributor agreement the project
391specific config option in the `project.config` must be set:
392link:config-project-config.html[receive.requireContributorAgreement].
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700393
Christian Halstricka3d88a52011-08-31 09:21:41 +0200394[[auth.trustContainerAuth]]auth.trustContainerAuth::
395+
396If true then it is the responsibility of the container hosting
397Gerrit to authenticate users. In this case Gerrit will blindly trust
398the container.
399+
400This parameter only affects git over http traffic. If set to false
401then Gerrit will do the authentication (using DIGEST authentication).
402+
403By default this is set to false.
404
Luca Milanesio42058842012-01-05 21:25:38 +0000405[[auth.gitBasicAuth]]auth.gitBasicAuth::
406+
407If true then Git over HTTP and HTTP/S traffic is authenticated using
Edwin Kempin4b9d9982014-04-16 11:27:46 +0200408standard BasicAuth and the credentials are validated using the same
409auth method as configured for the Gerrit Web UI.
Luca Milanesio42058842012-01-05 21:25:38 +0000410+
Edwin Kempin4b9d9982014-04-16 11:27:46 +0200411This parameter affects git over HTTP traffic and access to the REST
412API. If set to false then Gerrit will authenticate through DIGEST
413authentication and the randomly generated HTTP password in the Gerrit
414database.
Luca Milanesio42058842012-01-05 21:25:38 +0000415+
Edwin Kempinc5eb0032014-04-16 11:09:58 +0200416When `auth.type` is `LDAP`, service users that only exist in the Gerrit
417database are still authenticated by their HTTP passwords.
Luca Milanesio42058842012-01-05 21:25:38 +0000418+
419By default this is set to false.
420
Edwin Kempin4b9e5e72011-09-22 15:06:14 +0200421[[auth.userNameToLowerCase]]auth.userNameToLowerCase::
422+
423If set the username that is received to authenticate a git operation
424is converted to lower case for looking up the user account in Gerrit.
425+
426By setting this parameter a case insensitive authentication for the
427git operations can be achieved, if it is ensured that the usernames in
428Gerrit (scheme `username`) are stored in lower case (e.g. if the
429parameter link:#ldap.accountSshUserName[ldap.accountSshUserName] is
430set to `${sAMAccountName.toLowerCase}`). It is important that for all
431existing accounts this username is already in lower case. It is not
432possible to convert the usernames of the existing accounts to lower
433case because this would break the access to existing per-user
434branches.
435+
436This parameter only affects git over http and git over SSH traffic.
437+
438By default this is set to false.
439
Shawn Pearcea931fe12013-06-11 12:29:17 -0700440[[auth.enableRunAs]]auth.enableRunAs::
441+
442If true HTTP REST APIs will accept the `X-Gerrit-RunAs` HTTP request
443header from any users granted the link:access-control.html#capability_runAs[Run As]
444capability. The header and capability permit the authenticated user
445to impersonate another account.
446+
447If false the feature is disabled and cannot be re-enabled without
448editing gerrit.config and restarting the server.
449+
450Default is true.
451
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -0800452[[cache]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800453=== Section cache
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700454
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700455[[cache.directory]]cache.directory::
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700456+
457Path to a local directory where Gerrit can write cached entities for
Shawn O. Pearce4b212282009-08-05 19:45:56 -0700458future lookup. This local disk cache is used to retain potentially
459expensive to compute information across restarts. If the location
460does not exist, Gerrit will try to create it.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700461+
Shawn O. Pearce4b212282009-08-05 19:45:56 -0700462If not absolute, the path is resolved relative to `$site_path`.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700463+
Shawn O. Pearce4b212282009-08-05 19:45:56 -0700464Default is unset, no disk cache.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700465
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700466[[cache.name.maxAge]]cache.<name>.maxAge::
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700467+
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700468Maximum age to keep an entry in the cache. Entries are removed from
469the cache and refreshed from source data every maxAge interval.
Shawn O. Pearced9c403e2009-08-19 08:35:41 -0700470Values should use common unit suffixes to express their setting:
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700471+
Shawn O. Pearced9c403e2009-08-19 08:35:41 -0700472* s, sec, second, seconds
473* m, min, minute, minutes
474* h, hr, hour, hours
475* d, day, days
476* w, week, weeks (`1 week` is treated as `7 days`)
477* mon, month, months (`1 month` is treated as `30 days`)
478* y, year, years (`1 year` is treated as `365 days`)
479
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -0700480+
Edwin Kempinabcd5042013-03-12 16:04:37 +0100481If a unit suffix is not specified, `seconds` is assumed. If 0 is
Shawn O. Pearce3fdbf392009-09-04 18:08:26 -0700482supplied, the maximum age is infinite and items are never purged
483except when the cache is full.
Shawn O. Pearced9c403e2009-08-19 08:35:41 -0700484+
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700485Default is `0`, meaning store forever with no expire, except:
Shawn O. Pearced9c403e2009-08-19 08:35:41 -0700486+
Shawn O. Pearce05687e92011-04-04 17:29:03 -0400487* `"adv_bases"`: default is `10 minutes`
Shawn O. Pearced9c403e2009-08-19 08:35:41 -0700488* `"ldap_groups"`: default is `1 hour`
Shawn O. Pearced9c403e2009-08-19 08:35:41 -0700489* `"web_sessions"`: default is `12 hours`
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700490
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700491[[cache.name.memoryLimit]]cache.<name>.memoryLimit::
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700492+
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700493The total cost of entries to retain in memory. The cost computation
494varies by the cache. For most caches where the in-memory size of each
495entry is relatively the same, memoryLimit is currently defined to be
496the number of entries held by the cache (each entry costs 1).
497+
498For caches where the size of an entry can vary significantly between
499individual entries (notably `"diff"`, `"diff_intraline"`), memoryLimit
500is an approximation of the total number of bytes stored by the cache.
501Larger entries that represent bigger patch sets or longer source files
502will consume a bigger portion of the memoryLimit. For these caches the
503memoryLimit should be set to roughly the amount of RAM (in bytes) the
504administrator can dedicate to the cache.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700505+
Shawn O. Pearceefaf9792009-09-02 18:12:52 -0700506Default is 1024 for most caches, except:
507+
Shawn O. Pearce05687e92011-04-04 17:29:03 -0400508* `"adv_bases"`: default is `4096`
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700509* `"diff"`: default is `10m` (10 MiB of memory)
510* `"diff_intraline"`: default is `10m` (10 MiB of memory)
511* `"plugin_resources"`: default is 2m (2 MiB of memory)
512
513+
514If set to 0 the cache is disabled. Entries are removed immediately
515after being stored by the cache. This is primarily useful for testing.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700516
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700517[[cache.name.diskLimit]]cache.<name>.diskLimit::
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700518+
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700519Total size in bytes of the keys and values stored on disk. Caches that
520have grown bigger than this size are scanned daily at 1 AM local
521server time to trim the cache. Entries are removed in least recently
522accessed order until the cache fits within this limit. Caches may
523grow larger than this during the day, as the size check is only
524performed once every 24 hours.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700525+
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700526Default is 128 MiB per cache.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700527+
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700528If 0, disk storage for the cache is disabled.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700529
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800530==== [[cache_names]]Standard Caches
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700531
Shawn O. Pearce4a452712009-05-28 20:12:33 -0700532cache `"accounts"`::
533+
Shawn O. Pearce4dba9882009-08-05 19:55:15 -0700534Cache entries contain important details of an active user, including
535their display name, preferences, known email addresses, and group
536memberships. Entry information is obtained from the following
537database tables:
538+
539* `accounts`
540+
541* `account_group_members`
542+
543* `account_external_ids`
544
545+
546If direct updates are made to any of these database tables, this
547cache should be flushed.
548
549cache `"accounts_byemail"`::
550+
551Caches account identities keyed by email address, which is scanned
552from the `account_external_ids` database table. If updates are
553made to this table, this cache should be flushed.
Shawn O. Pearce4a452712009-05-28 20:12:33 -0700554
Shawn O. Pearce05687e92011-04-04 17:29:03 -0400555cache `"adv_bases"`::
556+
557Used only for push over smart HTTP when branch level access controls
David Pursehouse92463562013-06-24 10:16:28 +0900558are enabled. The cache entry contains all commits that are available
Shawn O. Pearce05687e92011-04-04 17:29:03 -0400559for the client to use as potential delta bases. Push over smart HTTP
560requires two HTTP requests, and this cache tries to carry state from
561the first request into the second to ensure it can complete.
562
Gustaf Lundh47ce4e32012-05-21 11:18:42 +0200563cache `"changes"`::
564+
Gustaf Lundh3353c362013-04-24 17:25:39 +0200565The size of `memoryLimit` determines the number of projects for which
566all changes will be cached. If the cache is set to 1024, this means all
567changes for up to 1024 projects can be held in the cache.
Gustaf Lundh53493772012-11-18 18:41:15 -0800568+
Gustaf Lundh3353c362013-04-24 17:25:39 +0200569Default value is 0 (disabled). It is disabled by default due to the fact
570that change updates are not communicated between Gerrit servers. Hence
571this cache should be disabled in an multi-master/multi-slave setup.
Gustaf Lundh53493772012-11-18 18:41:15 -0800572+
573The cache should be flushed whenever the database changes table is modified
Matt Baker8ce12fc2013-11-26 21:43:12 -0700574outside of Gerrit.
Gustaf Lundh47ce4e32012-05-21 11:18:42 +0200575
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700576cache `"diff"`::
577+
Shawn O. Pearceefaf9792009-09-02 18:12:52 -0700578Each item caches the differences between two commits, at both the
579directory and file levels. Gerrit uses this cache to accelerate
580the display of affected file names, as well as file contents.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700581+
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700582Entries in this cache are relatively large, so memoryLimit is an
583estimate in bytes of memory used. Administrators should try to target
584cache.diff.memoryLimit to fit all changes users will view in a 1 or 2
585day span.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700586
Shawn O. Pearcef0cfe532011-04-11 23:40:06 -0400587cache `"diff_intraline"`::
588+
589Each item caches the intraline difference of one file, when compared
590between two commits. Gerrit uses this cache to accelerate display of
591intraline differences when viewing a file.
592+
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700593Entries in this cache are relatively large, so memoryLimit is an
594estimate in bytes of memory used. Administrators should try to target
595cache.diff.memoryLimit to fit all files users will view in a 1 or 2
596day span.
Shawn O. Pearcef0cfe532011-04-11 23:40:06 -0400597
Shawn O. Pearce2d65d292011-06-24 08:12:02 -0700598cache `"git_tags"`::
599+
600If branch or reference level READ access controls are used, this
601cache tracks which tags are reachable from the branch tips of a
602repository. Gerrit uses this information to determine the set
603of tags that a client may access, derived from which tags are
604part of the history of a visible branch.
605+
606The cache is persisted to disk across server restarts as it can
607be expensive to compute (60 or more seconds for a large history
608like the Linux kernel repository).
609
Shawn O. Pearce4a452712009-05-28 20:12:33 -0700610cache `"groups"`::
611+
Shawn O. Pearce4dba9882009-08-05 19:55:15 -0700612Caches the basic group information from the `account_groups` table,
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -0700613including the group owner, name, and description.
614+
615Gerrit group membership obtained from the `account_group_members`
616table is cached under the `"accounts"` cache, above. External group
617membership obtained from LDAP is cached under `"ldap_groups"`.
618
Matt Fischer620255a2011-03-22 14:28:23 -0500619cache `"groups_byinclude"`::
620+
621Caches group inclusions in other groups. If direct updates are made
622to the `account_group_includes` table, this cache should be flushed.
623
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -0700624cache `"ldap_groups"`::
625+
626Caches the LDAP groups that a user belongs to, if LDAP has been
627configured on this server. This cache should be configured with a
628low maxAge setting, to ensure LDAP modifications are picked up in
629a timely fashion.
Shawn O. Pearce4a452712009-05-28 20:12:33 -0700630
Gustaf Lundh0919a492012-10-19 15:29:23 +0200631cache `"ldap_groups_byinclude"`::
632+
633Caches the hierarchical structure of LDAP groups.
634
Shawn O. Pearce6d26f4a2009-08-24 15:43:52 -0700635cache `"ldap_usernames"`::
636+
637Caches a mapping of LDAP username to Gerrit account identity. The
638cache automatically updates when a user first creates their account
639within Gerrit, so the cache expire time is largely irrelevant.
640
Shawn O. Pearce0c1abdb2011-06-24 11:01:25 -0700641cache `"permission_sort"`::
642+
David Pursehouse221d4f62012-06-08 17:38:08 +0900643Caches the order in which access control sections must be applied to a
Shawn O. Pearce0c1abdb2011-06-24 11:01:25 -0700644reference. Sorting the sections can be expensive when regular
645expressions are used, so this cache remembers the ordering for
646each branch.
647
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700648cache `"plugin_resources"`::
649+
650Caches formatted plugin resources, such as plugin documentation that
651has been converted from Markdown to HTML. The memoryLimit refers to
652the bytes of memory dedicated to storing the documentation.
653
Shawn O. Pearce4a452712009-05-28 20:12:33 -0700654cache `"projects"`::
655+
656Caches the project description records, from the `projects` table
657in the database. If a project record is updated or deleted, this
658cache should be flushed. Newly inserted projects do not require
659a cache flush, as they will be read upon first reference.
660
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700661cache `"sshkeys"`::
662+
663Caches unpacked versions of user SSH keys, so the internal SSH daemon
664can match against them during authentication. The unit of storage
665is per-user, so 1024 items translates to 1024 unique user accounts.
666As each individual user account may configure multiple SSH keys,
667the total number of keys may be larger than the item count.
Shawn O. Pearce4a452712009-05-28 20:12:33 -0700668+
669This cache is based off the `account_ssh_keys` table and the
670`accounts.ssh_user_name` column in the database. If either is
671modified directly, this cache should be flushed.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700672
Shawn O. Pearceb09322b2009-08-15 17:49:00 -0700673cache `"web_sessions"`::
674+
675Tracks the live user sessions coming in over HTTP. Flushing this
676cache would cause all users to be signed out immediately, forcing
Shawn O. Pearce727d80f2009-08-17 07:57:54 -0700677them to sign-in again. To avoid breaking active users, this cache
678is not flushed automatically by `gerrit flush-caches --all`, but
679instead must be explicitly requested.
680+
681If no disk cache is configured (or `cache.web_sessions.diskLimit`
682is set to 0) a server restart will force all users to sign-out,
683and need to sign-in again after the restart, as the cache was
684unable to persist the session information. Enabling a disk cache
685is strongly recommended.
686+
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700687Session storage is relatively inexpensive. The average entry in
688this cache is approximately 346 bytes.
Shawn O. Pearceb09322b2009-08-15 17:49:00 -0700689
Shawn O. Pearce4016a932009-05-28 15:12:40 -0700690See also link:cmd-flush-caches.html[gerrit flush-caches].
691
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800692==== [[cache_options]]Cache Options
Shawn O. Pearce29de4362010-03-03 17:51:26 -0800693
Edwin Kempin42d27432013-11-24 17:06:24 +0100694[[cache.diff_intraline.maxIdleWorkers]]cache.diff_intraline.maxIdleWorkers::
Shawn O. Pearce617aa392010-11-15 14:03:28 -0800695+
696Number of idle worker threads to maintain for the intraline difference
697computations. There is no upper bound on how many concurrent requests
698can occur at once, if additional threads are started to handle a peak
David Pursehouse221d4f62012-06-08 17:38:08 +0900699load, only this many will remain idle afterwards.
Shawn O. Pearce617aa392010-11-15 14:03:28 -0800700+
701Default is 1.5x number of available CPUs.
702
Edwin Kempin42d27432013-11-24 17:06:24 +0100703[[cache.diff_intraline.timeout]]cache.diff_intraline.timeout::
Shawn O. Pearce617aa392010-11-15 14:03:28 -0800704+
705Maximum number of milliseconds to wait for intraline difference data
706before giving up and disabling it for a particular file pair. This is
707a work around for an infinite loop bug in the intraline difference
David Pursehousee8c1fb92013-04-17 17:18:43 +0900708implementation.
709+
710If computation takes longer than the timeout, the worker thread is
711terminated, an error message is shown, and no intraline difference is
712displayed for the file pair.
Shawn O. Pearce617aa392010-11-15 14:03:28 -0800713+
714Values should use common unit suffixes to express their setting:
715+
716* ms, milliseconds
717* s, sec, second, seconds
718* m, min, minute, minutes
719* h, hr, hour, hours
720
721+
722If a unit suffix is not specified, `milliseconds` is assumed.
723+
724Default is 5 seconds.
725
Edwin Kempin42d27432013-11-24 17:06:24 +0100726[[cache.diff_intraline.enabled]]cache.diff_intraline.enabled::
Shawn O. Pearce29de4362010-03-03 17:51:26 -0800727+
728Boolean to enable or disable the computation of intraline differences
Shawn O. Pearce307dd4e2010-11-15 12:12:20 -0800729when populating a diff cache entry. This flag is provided primarily
730as a backdoor to disable the intraline difference feature if
David Pursehouse92463562013-06-24 10:16:28 +0900731necessary. To maintain backwards compatibility with prior versions,
Shawn O. Pearce307dd4e2010-11-15 12:12:20 -0800732this setting will fallback to `cache.diff.intraline` if not set in the
733configuration.
Shawn O. Pearce29de4362010-03-03 17:51:26 -0800734+
735Default is true, enabled.
736
Edwin Kempin42d27432013-11-24 17:06:24 +0100737[[cache.projects.checkFrequency]]cache.projects.checkFrequency::
Shawn O. Pearceb8e4e352011-05-19 18:09:01 -0700738+
739How often project configuration should be checked for update from Git.
740Gerrit Code Review caches project access rules and configuration in
741memory, checking the refs/meta/config branch every checkFrequency
742minutes to see if a new revision should be loaded and used for future
743access. Values can be specified using standard time unit abbreviations
744('ms', 'sec', 'min', etc.).
745+
746If set to 0, checks occur every time, which may slow down operations.
Shawn Pearcec825ef12013-02-20 11:29:46 -0800747If set to 'disabled' or 'off', no check will ever be done.
Shawn O. Pearceb8e4e352011-05-19 18:09:01 -0700748Administrators may force the cache to flush with
749link:cmd-flush-caches.html[gerrit flush-caches].
750+
751Default is 5 minutes.
752
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -0800753[[change]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800754=== Section change
Shawn Pearceb9ebb662013-07-19 19:45:25 -0700755
Edwin Kempin662e55f2013-11-23 12:50:29 +0100756[[change.largeChange]]change.largeChange::
757+
758Number of changed lines from which on a change is considered as a large
759change. The number of changed lines of a change is the sum of the lines
760that were inserted and deleted in the change.
761+
David Pursehousea1d633b2014-05-02 17:21:02 +0900762The specified value is used to visualize the change sizes in the Web UI
Edwin Kempin662e55f2013-11-23 12:50:29 +0100763in change tables and user dashboards.
764+
765By default 500.
766
Shawn Pearceb9ebb662013-07-19 19:45:25 -0700767[[change.updateDelay]]change.updateDelay::
768+
769How often in seconds the web interface should poll for updates to the
770currently open change. The poller relies on the client's browser
771cache to use If-Modified-Since and respect `304 Not Modified` HTTP
Matt Baker8ce12fc2013-11-26 21:43:12 -0700772responses. This allows for fast polls, often under 8 milliseconds.
Shawn Pearceb9ebb662013-07-19 19:45:25 -0700773+
774With a configured 30 second delay a server with 4900 active users will
775typically need to dedicate 1 CPU to the update check. 4900 users
776divided by an average delay of 30 seconds is 163 requests arriving per
Edwin Kempin720eebe2014-07-16 13:44:04 +0200777second. If requests are served at \~6 ms response time, 1 CPU is
Shawn Pearceb9ebb662013-07-19 19:45:25 -0700778necessary to keep up with the update request traffic. On a smaller
779user base of 500 active users, the default 30 second delay is only 17
780requests per second and requires ~10% CPU.
781+
782If 0 the update polling is disabled.
783+
784Default is 30 seconds.
785
David Ostrovsky1b61dc72014-01-28 18:40:48 +0100786[[change.allowDrafts]]change.allowDrafts::
787+
788Allow drafts workflow. If set to false, drafts cannot be created,
789deleted or published.
790+
791Default is true.
792
David Ostrovsky9933eb32014-05-20 16:08:20 +0200793[[change.submitLabel]]change.submitLabel::
794+
795Label name for the submit button.
796+
797Default is "Submit".
798
799[[change.submitTooltip]]change.submitTooltip::
800+
801Tooltip for the submit button. Variables available for replacement
802include `${patchSet}` for the current patch set number (1, 2, 3),
803`${branch}` for the branch name ("master") and `${commit}` for the
804abbreviated commit SHA-1 (`c9c0edb`).
805+
806Default is "Submit patch set ${patchSet} into ${branch}".
807
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -0800808[[changeMerge]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800809=== Section changeMerge
carloseduardo.baldacin14246de2011-07-14 17:52:22 -0300810
Edwin Kempin42d27432013-11-24 17:06:24 +0100811[[changeMerge.checkFrequency]]changeMerge.checkFrequency::
Dave Borowitz204669c22012-10-11 11:06:08 -0700812+
813How often the database should be rescanned for changes that have been
814submitted but not merged due to transient errors. Values can be
815specified using standard time unit abbreviations ('ms', 'sec', 'min',
816etc.). Set to 0 to disable periodic rescanning, only scanning once on
817master node startup.
818+
819Default is 300 seconds (5 minutes).
820
Edwin Kempinf8be8fd2013-11-18 14:12:20 +0100821[[changeMerge.threadPoolSize]]changeMerge.threadPoolSize::
822+
Dave Borowitz0916cc32014-10-23 10:24:01 -0700823_Deprecated:_ Formerly used to control thread pool size for background
824mergeability checks. These checks were moved to the indexing threadpool,
825so this value is now used for
826link:#index.batchThreads[index.batchThreads], only if that value is not
827provided.
Edwin Kempinf8be8fd2013-11-18 14:12:20 +0100828+
Dave Borowitz0916cc32014-10-23 10:24:01 -0700829This option may be removed in a future version.
Edwin Kempinf8be8fd2013-11-18 14:12:20 +0100830
Dave Borowitz6ea964a2014-03-26 16:49:45 -0700831[[changeMerge.interactiveThreadPoolSize]]changeMerge.interactiveThreadPoolSize::
832+
Dave Borowitz0916cc32014-10-23 10:24:01 -0700833_Deprecated:_ Formerly used to control thread pool size for interactive
834mergeability checks. These checks were moved to the indexing threadpool,
835so this value is now used for link:#index.threads[index.threads], only
836if that value is not provided.
Dave Borowitz6ea964a2014-03-26 16:49:45 -0700837+
Dave Borowitz0916cc32014-10-23 10:24:01 -0700838This option may be removed in a future version.
Dave Borowitz6ea964a2014-03-26 16:49:45 -0700839
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -0800840[[commentlink]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800841=== Section commentlink
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -0800842
Brad Larson991a31b2009-11-03 14:30:26 -0600843Comment links are find/replace strings applied to change descriptions,
Chris Harris63c7cdd2012-11-23 12:17:36 -0500844patch comments, in-line code comments and approval category value descriptions
845to turn set strings into hyperlinks. One common use is for linking to
846bug-tracking systems.
Brad Larson991a31b2009-11-03 14:30:26 -0600847
848In the following example configuration the 'changeid' comment link
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800849will match typical Gerrit Change-Id values and create a hyperlink
850to changes which reference it. The second configuration 'bugzilla'
851will hyperlink terms such as 'bug 42' to an external bug tracker,
852supplying the argument record number '42' for display. The third
David Pursehouse221d4f62012-06-08 17:38:08 +0900853configuration 'tracker' uses raw HTML to more precisely control
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800854how the replacement is displayed to the user.
Brad Larson991a31b2009-11-03 14:30:26 -0600855
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800856----
857[commentlink "changeid"]
858 match = (I[0-9a-f]{8,40})
Dave Borowitz86caf9e2014-02-10 15:58:20 -0800859 link = "#q,$1"
Brad Larson991a31b2009-11-03 14:30:26 -0600860
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800861[commentlink "bugzilla"]
Shawn O. Pearcec99630a2010-02-21 19:11:56 -0800862 match = "(bug\\s+#?)(\\d+)"
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800863 link = http://bugs.example.com/show_bug.cgi?id=$2
Brad Larson991a31b2009-11-03 14:30:26 -0600864
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800865[commentlink "tracker"]
866 match = ([Bb]ug:\\s+)(\\d+)
867 html = $1<a href=\"http://trak.example.com/$2\">$2</a>
868----
869
Dave Borowitz13b38002013-04-08 12:03:29 -0700870Comment links can also be specified in `project.config` and sections in
871children override those in parents. The only restriction is that to
872avoid injecting arbitrary user-supplied HTML in the page, comment links
873defined in `project.config` may only supply `link`, not `html`.
874
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800875[[commentlink.name.match]]commentlink.<name>.match::
Brad Larson991a31b2009-11-03 14:30:26 -0600876+
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800877A JavaScript regular expression to match positions to be replaced
878with a hyperlink. Subexpressions of the matched string can be
879stored using groups and accessed with `$'n'` syntax, where 'n'
880is the group number, starting from 1.
Brad Larson991a31b2009-11-03 14:30:26 -0600881+
Shawn O. Pearcec99630a2010-02-21 19:11:56 -0800882The configuration file parser eats one level of backslashes, so the
883character class `\s` requires `\\s` in the configuration file. The
884parser also terminates the line at the first `#`, so a match
885expression containing # must be wrapped in double quotes.
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800886+
Shawn O. Pearce665beaa2010-02-21 22:41:03 -0800887To match case insensitive strings, a character class with both the
888upper and lower case character for each position must be used. For
889example, to match the string `bug` in a case insensitive way the match
890pattern `[bB][uU][gG]` needs to be used.
891+
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800892A common pattern to match is `bug\\s+(\\d+)`.
Brad Larson991a31b2009-11-03 14:30:26 -0600893
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800894[[commentlink.name.link]]commentlink.<name>.link::
Brad Larson991a31b2009-11-03 14:30:26 -0600895+
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800896The URL to direct the user to whenever the regular expression is
897matched. Groups in the match expression may be accessed as `$'n'`.
898+
899The link property is used only when the html property is not present.
900
901[[commentlink.name.html]]commentlink.<name>.html::
902+
903HTML to replace the entire matched string with. If present,
904this property overrides the link property above. Groups in the
905match expression may be accessed as `$'n'`.
906+
907The configuration file eats double quotes, so escaping them as
908`\"` is necessary to protect them from the parser.
Brad Larson991a31b2009-11-03 14:30:26 -0600909
Dave Borowitz82d79c02013-04-08 15:45:12 -0700910[[commentlink.name.enabled]]commentlink.<name>.enabled::
911+
912Whether the comment link is enabled. A child project may override a
913section in a parent or the site-wide config that is disabled by
914specifying `enabled = true`.
915+
916Disabling sections in `gerrit.config` can be used by site administrators
917to create a library of comment links with `html` set that are not
918user-supplied and thus can be verified to be XSS-free, but are only
919enabled for a subset of projects.
920+
David Pursehouse6f1af472013-12-11 19:23:33 +0900921By default, true.
922+
Dave Borowitz82d79c02013-04-08 15:45:12 -0700923Note that the names and contents of disabled sections are visible even
924to anonymous users via the
925link:rest-api-projects.html#get-config[REST API].
926
Brad Larson991a31b2009-11-03 14:30:26 -0600927
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -0800928[[contactstore]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800929=== Section contactstore
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700930
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700931[[contactstore.url]]contactstore.url::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700932+
933URL of the web based contact store Gerrit will send any offline
934contact information to when it collects the data from users as part
935of a contributor agreement.
936+
937See link:config-contact.html[Contact Information].
938
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700939[[contactstore.appsec]]contactstore.appsec::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700940+
941Shared secret of the web based contact store.
942
Shawn O. Pearcee24c71fb2009-12-07 20:32:40 -0800943
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -0800944[[container]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800945=== Section container
Shawn O. Pearcee24c71fb2009-12-07 20:32:40 -0800946
947These settings are applied only if Gerrit is started as the container
948process through Gerrit's 'gerrit.sh' rc.d compatible wrapper script.
949
950[[container.heapLimit]]container.heapLimit::
951+
952Maximum heap size of the Java process running Gerrit, in bytes.
953This property is translated into the '-Xmx' flag for the JVM.
954+
955Default is platform and JVM specific.
956+
957Common unit suffixes of 'k', 'm', or 'g' are supported.
958
959[[container.javaHome]]container.javaHome::
960+
961Path of the JRE/JDK installation to run Gerrit with. If not set, the
962Gerrit startup script will attempt to search your system and guess
963a suitable JRE. Overrides the environment variable 'JAVA_HOME'.
964
965[[container.javaOptions]]container.javaOptions::
966+
967Additional options to pass along to the Java runtime. If multiple
968values are configured, they are passed in order on the command line,
969separated by spaces. These options are appended onto 'JAVA_OPTIONS'.
970
David Ostrovskyc772bd82013-10-03 10:37:51 +0200971For example, it is possible to overwrite Gerrit's default log4j
972configuration:
973
974----
975 javaOptions = -Dlog4j.configuration=file:///home/gerrit/site/etc/log4j.properties
976----
977
Fredrik Luthanderb8f7d6d2010-05-18 21:11:22 +0200978[[container.slave]]container.slave::
979+
980Used on Gerrit slave installations. If set to true the Gerrit JVM is
981called with the '--slave' switch, enabling slave mode. If no value is
Matt Baker8ce12fc2013-11-26 21:43:12 -0700982set (or any other value), Gerrit defaults to master mode.
Fredrik Luthanderb8f7d6d2010-05-18 21:11:22 +0200983
Shawn O. Pearcee24c71fb2009-12-07 20:32:40 -0800984[[container.user]]container.user::
985+
986Login name (or UID) of the operating system user the Gerrit JVM
987will execute as. If not set, defaults to the user who launched
988the 'gerrit.sh' wrapper script.
989
990[[container.war]]container.war::
991+
992Path of the JAR file to start daemon execution with. This should
993be the path of the local 'gerrit.war' archive. Overrides the
994environment variable 'GERRIT_WAR'.
995+
996If not set, defaults to '$site_path/bin/gerrit.war', or to
997'$HOME/gerrit.war'.
998
999
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08001000[[core]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001001=== Section core
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -07001002
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001003[[core.packedGitWindowSize]]core.packedGitWindowSize::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -07001004+
1005Number of bytes of a pack file to load into memory in a single
1006read operation. This is the "page size" of the JGit buffer cache,
1007used for all pack access operations. All disk IO occurs as single
1008window reads. Setting this too large may cause the process to load
1009more data than is required; setting this too small may increase
1010the frequency of `read()` system calls.
1011+
1012Default on JGit is 8 KiB on all platforms.
1013+
1014Common unit suffixes of 'k', 'm', or 'g' are supported.
1015
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001016[[core.packedGitLimit]]core.packedGitLimit::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -07001017+
1018Maximum number of bytes to load and cache in memory from pack files.
1019If JGit needs to access more than this many bytes it will unload less
1020frequently used windows to reclaim memory space within the process.
1021As this buffer must be shared with the rest of the JVM heap, it
1022should be a fraction of the total memory available.
1023+
1024Default on JGit is 10 MiB on all platforms.
1025+
1026Common unit suffixes of 'k', 'm', or 'g' are supported.
1027
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001028[[core.deltaBaseCaseLimit]]core.deltaBaseCacheLimit::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -07001029+
1030Maximum number of bytes to reserve for caching base objects
1031that multiple deltafied objects reference. By storing the entire
1032decompressed base object in a cache Git is able to avoid unpacking
1033and decompressing frequently used base objects multiple times.
1034+
1035Default on JGit is 10 MiB on all platforms. You probably do not
1036need to adjust this value.
1037+
1038Common unit suffixes of 'k', 'm', or 'g' are supported.
1039
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001040[[core.packedGitOpenFiles]]core.packedGitOpenFiles::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -07001041+
1042Maximum number of pack files to have open at once. A pack file
1043must be opened in order for any of its data to be available in
1044a cached window.
1045+
1046If you increase this to a larger setting you may need to also adjust
1047the ulimit on file descriptors for the host JVM, as Gerrit needs
1048additional file descriptors available for network sockets and other
1049repository data manipulation.
1050+
1051Default on JGit is 128 file descriptors on all platforms.
1052
Shawn O. Pearce329fe792010-09-03 15:44:23 -07001053[[core.streamFileThreshold]]core.streamFileThreshold::
1054+
1055Largest object size, in bytes, that JGit will allocate as a
1056contiguous byte array. Any file revision larger than this threshold
1057will have to be streamed, typically requiring the use of temporary
David Pursehouse92463562013-06-24 10:16:28 +09001058files under '$GIT_DIR/objects' to implement pseudo-random access
Shawn O. Pearce329fe792010-09-03 15:44:23 -07001059during delta decompression.
1060+
1061Servers with very high traffic should set this to be larger than
1062the size of their common big files. For example a server managing
1063the Android platform typically has to deal with ~10-12 MiB XML
1064files, so `15 m` would be a reasonable setting in that environment.
1065Setting this too high may cause the JVM to run out of heap space
1066when handling very big binary files, such as device firmware or
1067CD-ROM ISO images.
1068+
Shawn O. Pearcee3febd92010-10-13 21:17:53 -07001069Default is 50 MiB on all platforms. Prior to Gerrit 2.1.6,
Shawn O. Pearce329fe792010-09-03 15:44:23 -07001070this value was effectively 2047 MiB.
1071+
1072Common unit suffixes of 'k', 'm', or 'g' are supported.
1073
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001074[[core.packedGitMmap]]core.packedGitMmap::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -07001075+
1076When true, JGit will use `mmap()` rather than `malloc()+read()`
1077to load data from pack files. The use of mmap can be problematic
1078on some JVMs as the garbage collector must deduce that a memory
1079mapped segment is no longer in use before a call to `munmap()`
1080can be made by the JVM native code.
1081+
1082In server applications (such as Gerrit) that need to access many
David Pursehouse92463562013-06-24 10:16:28 +09001083pack files, setting this to true risks artificially running out
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -07001084of virtual address space, as the garbage collector cannot reclaim
1085unused mapped spaces fast enough.
1086+
1087Default on JGit is false. Although potentially slower, it yields
1088much more predictable behavior.
1089
Sasa Zivkovf69aeb12012-06-11 14:05:14 +02001090[[core.asyncLoggingBufferSize]]core.asyncLoggingBufferSize::
1091+
1092Size of the buffer to store logging events for asynchronous logging.
1093Putting a larger value can protect threads from stalling when the
1094AsyncAppender threads are not fast enough to consume the logging events
1095from the buffer. It also protects from loosing log entries in this case.
1096+
1097Default is 64 entries.
1098
Dave Borowitz1bec65a2013-03-13 10:59:01 -07001099[[core.useRecursiveMerge]]core.useRecursiveMerge::
1100+
Edwin Kempin71831d22014-07-15 08:54:29 +02001101Use JGit's recursive merger for three-way merges. This only affects
1102projects configured to automatically resolve conflicts.
1103+
1104As explained in this
1105link:http://codicesoftware.blogspot.com/2011/09/merge-recursive-strategy.html[
1106blog], the recursive merge produces better results if the two commits
1107that are merged have more than one common predecessor.
Dave Borowitz1bec65a2013-03-13 10:59:01 -07001108+
Edwin Kempin7853c5b2014-07-15 08:57:17 +02001109Default is true.
Dave Borowitz1bec65a2013-03-13 10:59:01 -07001110
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08001111[[database]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001112=== Section database
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001113
1114The database section configures where Gerrit stores its metadata
1115records about user accounts and change reviews.
1116
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001117----
1118[database]
Shawn O. Pearce1be39062009-12-19 14:11:52 -08001119 type = POSTGRESQL
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001120 hostname = localhost
1121 database = reviewdb
1122 username = gerrit2
1123 password = s3kr3t
1124----
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001125
1126[[database.type]]database.type::
1127+
1128Type of database server to connect to. If set this value will be
1129used to automatically create correct database.driver and database.url
1130values to open the connection.
1131+
Shawn O. Pearce1be39062009-12-19 14:11:52 -08001132* `POSTGRESQL`
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001133+
1134Connect to a PostgreSQL database server.
1135+
1136* `H2`
1137+
Shawn O. Pearce1be39062009-12-19 14:11:52 -08001138Connect to a local embedded H2 database.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001139+
Shawn O. Pearce1be39062009-12-19 14:11:52 -08001140* `MYSQL`
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001141+
1142Connect to a MySQL database server.
Shawn O. Pearce1be39062009-12-19 14:11:52 -08001143+
1144* `JDBC`
1145+
1146Connect using a JDBC driver class name and URL.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001147
1148+
1149If not specified, database.driver and database.url are used as-is,
1150and if they are also not specified, defaults to H2.
1151
1152[[database.hostname]]database.hostname::
1153+
1154Hostname of the database server. Defaults to 'localhost'.
1155
1156[[database.port]]database.port::
1157+
1158Port number of the database server. Defaults to the default port
1159of the server named by database.type.
1160
1161[[database.database]]database.database::
1162+
Shawn O. Pearce1be39062009-12-19 14:11:52 -08001163For POSTGRESQL or MYSQL, the name of the database on the server.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001164+
1165For H2, this is the path to the database, and if not absolute is
Shawn O. Pearce1be39062009-12-19 14:11:52 -08001166relative to `'$site_path'`.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001167
1168[[database.username]]database.username::
1169+
1170Username to connect to the database server as.
1171
1172[[database.password]]database.password::
1173+
1174Password to authenticate to the database server with.
1175
1176[[database.driver]]database.driver::
1177+
Shawn O. Pearce1be39062009-12-19 14:11:52 -08001178Name of the JDBC driver class to connect to the database with.
1179Setting this usually isn't necessary as it can be derived from
1180database.type or database.url for any supported database.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001181
1182[[database.url]]database.url::
1183+
Shawn O. Pearce1be39062009-12-19 14:11:52 -08001184'jdbc:' URL for the database. Setting this variable usually
1185isn't necessary as it can be constructed from the all of the
1186above properties.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001187
Christian Aistleitner851072a2013-05-05 15:04:09 +02001188[[database.connectionPool]]database.connectionPool::
1189+
1190If true, use connection pooling for database connections. Otherwise, a
1191new database connection is opened for each request.
1192+
1193Default is false for MySQL, and true for other database backends.
1194
Shawn O. Pearce07f35177d2010-02-23 09:47:10 -08001195[[database.poolLimit]]database.poolLimit::
1196+
1197Maximum number of open database connections. If the server needs
1198more than this number, request processing threads will wait up
1199to <<database.poolMaxWait, poolMaxWait>> seconds for a
1200connection to be released before they abort with an exception.
1201This limit must be several units higher than the total number of
1202httpd and sshd threads as some request processing code paths may
1203need multiple connections.
1204+
1205Default is 8.
Christian Aistleitner851072a2013-05-05 15:04:09 +02001206+
1207This setting only applies if
1208<<database.connectionPool,database.connectionPool>> is true.
Shawn O. Pearce07f35177d2010-02-23 09:47:10 -08001209
Shawn O. Pearcef458bf62010-02-25 09:03:03 -08001210[[database.poolMinIdle]]database.poolMinIdle::
Shawn O. Pearce07f35177d2010-02-23 09:47:10 -08001211+
1212Minimum number of connections to keep idle in the pool.
1213Default is 4.
Christian Aistleitner851072a2013-05-05 15:04:09 +02001214+
1215This setting only applies if
1216<<database.connectionPool,database.connectionPool>> is true.
Shawn O. Pearce07f35177d2010-02-23 09:47:10 -08001217
Shawn O. Pearcef458bf62010-02-25 09:03:03 -08001218[[database.poolMaxIdle]]database.poolMaxIdle::
Shawn O. Pearce07f35177d2010-02-23 09:47:10 -08001219+
1220Maximum number of connections to keep idle in the pool. If there
1221are more idle connections, connections will be closed instead of
1222being returned back to the pool.
1223Default is 4.
Christian Aistleitner851072a2013-05-05 15:04:09 +02001224+
1225This setting only applies if
1226<<database.connectionPool,database.connectionPool>> is true.
Shawn O. Pearce07f35177d2010-02-23 09:47:10 -08001227
1228[[database.poolMaxWait]]database.poolMaxWait::
1229+
1230Maximum amount of time a request processing thread will wait to
1231acquire a database connection from the pool. If no connection is
1232released within this time period, the processing thread will abort
1233its current operations and return an error to the client.
1234Values should use common unit suffixes to express their setting:
1235+
1236* ms, milliseconds
1237* s, sec, second, seconds
1238* m, min, minute, minutes
1239* h, hr, hour, hours
1240
1241+
1242If a unit suffix is not specified, `milliseconds` is assumed.
1243+
1244Default is `30 seconds`.
Christian Aistleitner851072a2013-05-05 15:04:09 +02001245+
1246This setting only applies if
1247<<database.connectionPool,database.connectionPool>> is true.
Shawn O. Pearce07f35177d2010-02-23 09:47:10 -08001248
David Ostrovsky38a6f6c2014-01-11 13:56:09 +01001249[[database.dataSourceInterceptorClass]]database.dataSourceInterceptorClass::
1250
1251Class that implements DataSourceInterceptor interface to monitor SQL activity.
1252This class must have default constructor and be available on Gerrit's bootstrap
1253classpath, e. g. in `$gerrit_site/lib` directory. Example implementation of
1254SQL monitoring can be found in javamelody-plugin.
1255
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08001256[[download]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001257=== Section download
monica.dionisio3f630442010-06-29 15:42:57 -03001258
1259----
1260[download]
Edwin Kempin08b03a22012-09-14 16:32:57 +02001261 command = checkout
1262 command = cherry_pick
1263 command = pull
1264 command = format_patch
monica.dionisio3f630442010-06-29 15:42:57 -03001265 scheme = ssh
1266 scheme = http
1267 scheme = anon_http
1268 scheme = anon_git
1269 scheme = repo_download
1270----
1271
1272The download section configures the allowed download methods.
1273
Edwin Kempin08b03a22012-09-14 16:32:57 +02001274[[download.command]]download.command::
1275+
1276Commands that should be offered to download changes.
1277+
1278Multiple commands are supported:
1279+
1280* `checkout`
1281+
1282Command to fetch and checkout the patch set.
1283+
1284* `cherry_pick`
1285+
1286Command to fetch the patch set and to cherry-pick it onto the current
1287commit.
1288+
1289* `pull`
1290+
1291Command to pull the patch set.
1292+
1293* `format_patch`
1294+
1295Command to fetch the patch set and to feed it into the `format-patch`
1296command.
1297
1298+
1299If `download.command` is not specified, all download commands are
1300offered.
1301
monica.dionisio3f630442010-06-29 15:42:57 -03001302[[download.scheme]]download.scheme::
1303+
1304Schemes that should be used to download changes.
1305+
1306Multiple schemes are supported:
1307+
1308* `http`
1309+
Shawn O. Pearce5c46a072010-08-23 08:33:32 -07001310Authenticated HTTP download is allowed.
monica.dionisio3f630442010-06-29 15:42:57 -03001311+
1312* `ssh`
1313+
Shawn O. Pearce5c46a072010-08-23 08:33:32 -07001314Authenticated SSH download is allowed.
monica.dionisio3f630442010-06-29 15:42:57 -03001315+
1316* `anon_http`
1317+
1318Anonymous HTTP download is allowed.
1319+
1320* `anon_git`
1321+
Shawn O. Pearce5c46a072010-08-23 08:33:32 -07001322Anonymous Git download is allowed. This is not default, it is also
1323necessary to set <<gerrit.canonicalGitUrl,gerrit.canonicalGitUrl>>
1324variable.
monica.dionisio3f630442010-06-29 15:42:57 -03001325+
1326* `repo_download`
1327+
Shawn O. Pearce5c46a072010-08-23 08:33:32 -07001328Gerrit advertises patch set downloads with the `repo download`
1329command, assuming that all projects managed by this instance are
1330generally worked on with the repo multi-repository tool. This is
1331not default, as not all instances will deploy repo.
monica.dionisio3f630442010-06-29 15:42:57 -03001332
1333+
Edwin Kempin08b03a22012-09-14 16:32:57 +02001334If `download.scheme` is not specified, SSH, HTTP and Anonymous HTTP
Shawn O. Pearce5c46a072010-08-23 08:33:32 -07001335downloads are allowed.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001336
David Ostrovskyfc9cdf02014-03-26 14:46:45 -07001337[[download.archive]]download.archive::
1338+
1339Specifies which archive formats, if any, should be offered on the change
1340screen:
1341+
1342----
1343[download]
1344 archive = tar
1345 archive = tbz2
1346 archive = tgz
1347 archive = txz
1348----
1349
Shawn Pearce6edde312014-03-26 22:00:26 -07001350If `download.archive` is not specified defaults to all archive
1351commands. Set to `off` or empty string to disable.
David Ostrovskyfc9cdf02014-03-26 14:46:45 -07001352
Matthias Sohn0fb2c992014-06-03 01:42:59 +02001353[[gc]]
1354=== Section gc
1355
1356This section allows to configure the git garbage collection and schedules it
1357to run periodically. It will be triggered and executed sequentially for all
1358projects.
1359
1360[[gc.startTime]]gc.startTime::
1361+
1362Start time to define the first execution of the git garbage collection.
1363If the configured `'gc.interval'` is shorter than `'gc.startTime - now'`
1364the start time will be preponed by the maximum integral multiple of
1365`'gc.interval'` so that the start time is still in the future.
1366+
1367----
1368<day of week> <hours>:<minutes>
1369or
1370<hours>:<minutes>
1371
1372<day of week> : Mon, Tue, Wed, Thu, Fri, Sat, Sun
1373<hours> : 00-23
1374<minutes> : 0-59
1375----
1376
1377
1378[[gc.interval]]gc.interval::
1379+
1380Interval for periodic repetition of triggering the git garbage collection.
1381The interval must be larger than zero. The following suffixes are supported
1382to define the time unit for the interval:
1383+
1384* `s, sec, second, seconds`
1385* `m, min, minute, minutes`
1386* `h, hr, hour, hours`
1387* `d, day, days`
1388* `w, week, weeks` (`1 week` is treated as `7 days`)
1389* `mon, month, months` (`1 month` is treated as `30 days`)
1390* `y, year, years` (`1 year` is treated as `365 days`)
1391
1392Examples::
1393+
1394----
1395gc.startTime = Fri 10:30
1396gc.interval = 2 day
1397----
1398+
1399Assuming the server is started on Mon 7:00 -> `'startTime - now = 4 days 3:30 hours'`.
1400This is larger than the interval hence prepone the start time
1401by the maximum integral multiple of the interval so that start
1402time is still in the future, i.e. prepone by 4 days. This yields
1403a start time of Mon 10:30, next executions are Wed 10:30, Fri 10:30
1404etc.
1405+
1406----
1407gc.startTime = 6:00
1408gc.interval = 1 day
1409----
1410+
1411Assuming the server is started on Mon 7:00 this yields the first run on next Tuesday
1412at 6:00 and a repetition interval of 1 day.
1413
1414
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08001415[[gerrit]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001416=== Section gerrit
Shawn O. Pearceeb7f8ce2009-06-01 09:57:15 -07001417
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001418[[gerrit.basePath]]gerrit.basePath::
Shawn O. Pearce9743d0b2009-06-01 10:10:06 -07001419+
1420Local filesystem directory holding all Git repositories that
1421Gerrit knows about and can process changes for. A project
1422entity in Gerrit maps to a local Git repository by creating
Edwin Kempincdb0e002011-09-08 14:23:30 +02001423the path string `"${basePath}/${project_name}.git"`.
Shawn O. Pearce9743d0b2009-06-01 10:10:06 -07001424+
1425If relative, the path is resolved relative to `'$site_path'`.
1426
Shawn O. Pearce897d9212011-06-16 16:59:59 -07001427[[gerrit.allProjects]]gerrit.allProjects::
1428+
1429Name of the permissions-only project defining global server
1430access controls and settings. These are inherited into every
1431other project managed by the running server. The name is
1432relative to `gerrit.basePath`.
1433+
1434Defaults to `All-Projects` if not set.
1435
Edwin Kempin2bf5edd2014-03-25 22:21:23 +01001436[[gerrit.allUsers]]gerrit.allUsers::
1437+
1438Name of the project in which meta data of all users is stored.
1439The name is relative to `gerrit.basePath`.
1440+
1441Defaults to `All-Users` if not set.
1442
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001443[[gerrit.canonicalWebUrl]]gerrit.canonicalWebUrl::
Shawn O. Pearceeb7f8ce2009-06-01 09:57:15 -07001444+
1445The default URL for Gerrit to be accessed through.
1446+
1447Typically this would be set to "http://review.example.com/" or
1448"http://example.com/gerrit/" so Gerrit can output links that point
1449back to itself.
1450+
1451Setting this is highly recommended, as its necessary for the upload
1452code invoked by "git push" or "repo upload" to output hyperlinks
1453to the newly uploaded changes.
1454
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001455[[gerrit.canonicalGitUrl]]gerrit.canonicalGitUrl::
Shawn O. Pearceeb7f8ce2009-06-01 09:57:15 -07001456+
1457Optional base URL for repositories available over the anonymous git
1458protocol. For example, set this to `git://mirror.example.com/base/`
1459to have Gerrit display patch set download URLs in the UI. Gerrit
1460automatically appends the project name onto the end of the URL.
1461+
1462By default unset, as the git daemon must be configured externally
1463by the system administrator, and might not even be running on the
1464same host as Gerrit.
1465
Dave Borowitz76ab1a12013-05-10 17:01:29 +01001466[[gerrit.installCommitMsgHookCommand]]gerrit.installCommitMsgHookCommand::
1467+
1468Optional command to install the `commit-msg` hook. Typically of the
1469form:
1470----
1471fetch-cmd some://url/to/commit-msg .git/hooks/commit-msg ; chmod +x .git/hooks/commit-msg
1472----
Shawn Pearce6d731f52013-09-24 12:13:50 -07001473
Dave Borowitz76ab1a12013-05-10 17:01:29 +01001474+
1475By default unset; falls back to using scp from the canonical SSH host,
1476or curl from the canonical HTTP URL for the server. Only necessary if a
1477proxy or other server/network configuration prevents clients from
1478fetching from the default location.
1479
Shawn O. Pearce5d6de522011-10-07 18:00:16 -07001480[[gerrit.gitHttpUrl]]gerrit.gitHttpUrl::
1481+
1482Optional base URL for repositories available over the HTTP
1483protocol. For example, set this to `http://mirror.example.com/base/`
1484to have Gerrit display URLs from this server, rather than itself.
1485+
1486By default unset, as the HTTP daemon must be configured externally
1487by the system administrator, and might not even be running on the
1488same host as Gerrit.
1489
Shawn O. Pearceb8bea1b2012-08-16 17:18:58 -07001490[[gerrit.reportBugUrl]]gerrit.reportBugUrl::
1491+
1492URL to direct users to when they need to report a bug about the
1493Gerrit service. By default this links to the upstream Gerrit
1494Code Review's own bug tracker but could be directed to the system
1495administrator's ticket queue.
1496
David Pursehouse753ca332013-12-10 15:36:29 +09001497[[gerrit.reportBugText]]gerrit.reportBugText::
1498+
1499Text to be displayed in the link to the bug report URL.
1500+
1501Defaults to "Report Bug".
1502
Shawn Pearce6d731f52013-09-24 12:13:50 -07001503[[gerrit.changeScreen]]gerrit.changeScreen::
1504+
1505Default change screen UI to direct users to. Valid values are
David Ostrovskybbb688e2013-11-09 12:10:19 +01001506`OLD_UI` and `CHANGE_SCREEN2`. Default is `CHANGE_SCREEN2`.
Shawn Pearce6d731f52013-09-24 12:13:50 -07001507
Dariusz Luksza45ee73e2014-08-20 09:38:09 +02001508[[gerrit.disableReverseDnsLookup]]gerrit.disableReverseDnsLookup::
1509+
1510Disables reverse DNS lookup during computing ref log entry for identified user.
1511+
1512Defaults to false.
1513
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08001514[[gitweb]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001515=== Section gitweb
Shawn O. Pearced7ba11f2009-06-01 09:35:41 -07001516
Shawn O. Pearce618dae22010-03-12 19:07:43 -08001517Gerrit can forward requests to either an internally managed gitweb
1518(which allows Gerrit to enforce some access controls), or to an
1519externally managed gitweb (where the web server manages access).
Shawn O. Pearced7ba11f2009-06-01 09:35:41 -07001520See also link:config-gitweb.html[Gitweb Integration].
1521
Shawn O. Pearce618dae22010-03-12 19:07:43 -08001522[[gitweb.cgi]]gitweb.cgi::
1523+
1524Path to the locally installed `gitweb.cgi` executable. This CGI will
1525be called by Gerrit Code Review when the URL `/gitweb` is accessed.
1526Project level access controls are enforced prior to calling the CGI.
1527+
1528Defaults to `/usr/lib/cgi-bin/gitweb.cgi` if gitweb.url is not set.
1529
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001530[[gitweb.url]]gitweb.url::
Shawn O. Pearced7ba11f2009-06-01 09:35:41 -07001531+
1532Optional URL of an affiliated gitweb service. Defines the
1533web location where a `gitweb.cgi` is installed to browse
Shawn O. Pearce9743d0b2009-06-01 10:10:06 -07001534gerrit.basePath and the repositories it contains.
Shawn O. Pearced7ba11f2009-06-01 09:35:41 -07001535+
1536Gerrit appends any necessary query arguments onto the end of this URL.
1537For example, "?p=$project.git;h=$commit".
1538
Shane Mc Cormack27868a42009-12-28 04:49:39 +00001539[[gitweb.type]]gitweb.type::
1540+
1541Optional type of affiliated gitweb service. This allows using
Shawn O. Pearce2b11da02011-09-06 16:18:12 -07001542alternatives to gitweb, such as cgit. If set to disabled there
1543is no gitweb hyperlinking support.
Shane Mc Cormack27868a42009-12-28 04:49:39 +00001544+
Shawn O. Pearce2b11da02011-09-06 16:18:12 -07001545Valid values are `gitweb`, `cgit`, `disabled` or `custom`.
Shane Mc Cormack27868a42009-12-28 04:49:39 +00001546
Edwin Kempind86909c2012-03-26 10:36:29 +02001547[[gitweb.revision]]gitweb.revision::
Shane Mc Cormack27868a42009-12-28 04:49:39 +00001548+
1549Optional pattern to use for constructing the gitweb URL when pointing
1550at a specific commit when `custom` is used above.
1551+
Edwin Kempincdb0e002011-09-08 14:23:30 +02001552Valid replacements are `${project}` for the project name in Gerrit
1553and `${commit}` for the SHA1 hash for the commit.
Shane Mc Cormack27868a42009-12-28 04:49:39 +00001554
Edwin Kempind86909c2012-03-26 10:36:29 +02001555[[gitweb.project]]gitweb.project::
Shane Mc Cormack27868a42009-12-28 04:49:39 +00001556+
1557Optional pattern to use for constructing the gitweb URL when pointing
1558at a specific project when `custom` is used above.
1559+
Edwin Kempincdb0e002011-09-08 14:23:30 +02001560Valid replacements are `${project}` for the project name in Gerrit.
Shane Mc Cormack27868a42009-12-28 04:49:39 +00001561
Edwin Kempind86909c2012-03-26 10:36:29 +02001562[[gitweb.branch]]gitweb.branch::
Shane Mc Cormack27868a42009-12-28 04:49:39 +00001563+
1564Optional pattern to use for constructing the gitweb URL when pointing
1565at a specific branch when `custom` is used above.
1566+
Edwin Kempincdb0e002011-09-08 14:23:30 +02001567Valid replacements are `${project}` for the project name in Gerrit
1568and `${branch}` for the name of the branch.
Shane Mc Cormack27868a42009-12-28 04:49:39 +00001569
Colby Ranger79d4ebe2013-12-16 14:19:18 -08001570[[gitweb.roottree]]gitweb.roottree::
1571+
1572Optional pattern to use for constructing the gitweb URL when pointing
1573at the contents of the root tree in a specific commit when `custom` is
1574used above.
1575+
1576Valid replacements are `${project}` for the project name in Gerrit
1577and `${commit}` for the SHA1 hash for the commit.
1578
1579[[gitweb.file]]gitweb.file::
1580+
1581Optional pattern to use for constructing the gitweb URL when pointing
1582at the contents of a file in a specific commit when `custom` is used
1583above.
1584+
1585Valid replacements are `${project}` for the project name in Gerrit,
1586`${file}` for the file name and `${commit}` for the SHA1 hash for
1587the commit.
1588
Edwin Kempin64011562012-03-26 10:50:12 +02001589[[gitweb.filehistory]]gitweb.filehistory::
1590+
1591Optional pattern to use for constructing the gitweb URL when pointing
1592at the history of a file in a specific branch when `custom` is used
1593above.
1594+
1595Valid replacements are `${project}` for the project name in Gerrit,
1596`${file}` for the file name and `${branch}` for the name of the
1597branch.
1598
Gustaf Lundha07d2e72011-10-27 15:26:35 -07001599[[gitweb.linkname]]gitweb.linkname::
1600+
1601Optional setting for modifying the link name presented to the user
1602in the Gerrit web-UI.
1603+
1604Default linkname for custom type is "gitweb".
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001605
Adrian Goerlerf2007072011-11-10 08:39:55 +01001606[[gitweb.pathSeparator]]gitweb.pathSeparator::
1607+
1608Optional character to substitute the standard path separator (slash) in
1609project names and branch names.
1610+
1611By default, Gerrit will use hexadecimal encoding for slashes in project and
1612branch names. Some web servers, such as Tomcat, reject this hexadecimal
1613encoding in the URL.
1614+
1615Some alternative gitweb services, such as link:http://gitblit.com[Gitblit],
1616allow using an alternative path separator character. In Gitblit, this can be
1617configured through the property link:http://gitblit.com/properties.html[web.forwardSlashCharacter].
1618In Gerrit, the alternative path separator can be configured correspondingly
1619using the property 'gitweb.pathSeparator'.
1620+
1621Valid values are the characters '*', '(' and ')'.
1622
Luca Milanesio25312032013-10-11 11:34:39 +01001623[[gitweb.linkDrafts]]gitweb.urlEncode::
1624+
1625Whether or not Gerrit should encode the generated viewer URL.
1626+
1627Gerrit composes the viewer URL using information about the project, branch, file
1628or commit of the target object to be displayed. Typically viewers such as CGit
1629and GitWeb do need those parts to be encoded, including the '/' in project's name,
1630for being correctly parsed.
1631However other viewers could instead require an unencoded URL (e.g. GitHub web
1632based viewer)
1633+
1634Valid values are "true" and "false," default is "true."
1635
Chad Horohoe1dfe36c2013-04-12 14:52:56 -04001636[[gitweb.linkDrafts]]gitweb.linkDrafts::
1637+
1638Whether or not Gerrit should provide links to gitweb on draft patch sets.
1639+
1640By default, Gerrit will show links to gitweb on all patch sets. If gitweb
1641only allows publicly viewable references, set this to false to remove
1642the links to draft patch sets from the change review screen.
1643+
Luca Milanesio25312032013-10-11 11:34:39 +01001644Valid values are "true" and "false," default is "true".
Chad Horohoe1dfe36c2013-04-12 14:52:56 -04001645
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08001646[[groups]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001647=== Section groups
Edwin Kempin4bbff702013-01-11 09:59:53 +01001648
1649[[groups.newGroupsVisibleToAll]]groups.newGroupsVisibleToAll::
1650+
1651Controls whether newly created groups should be by default visible to
1652all registered users.
1653+
1654By default, false.
1655
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08001656[[hooks]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001657=== Section hooks
Shane Mc Cormack6c2b6772010-01-12 21:56:44 +00001658
1659See also link:config-hooks.html[Hooks].
1660
1661[[hooks.path]]hooks.path::
1662+
1663Optional path to hooks, if not specified then `'$site_path'/hooks` will be used.
1664
1665[[hooks.patchsetCreatedHook]]hooks.patchsetCreatedHook::
1666+
1667Optional filename for the patchset created hook, if not specified then
1668`patchset-created` will be used.
1669
David Pursehoused556c192012-06-12 18:34:37 +09001670[[hooks.draftPublishedHook]]hooks.draftPublishedHook::
1671+
1672Optional filename for the draft published hook, if not specified then
1673`draft-published` will be used.
1674
Shane Mc Cormack6c2b6772010-01-12 21:56:44 +00001675[[hooks.commentAddedHook]]hooks.commentAddedHook::
1676+
1677Optional filename for the comment added hook, if not specified then
1678`comment-added` will be used.
1679
1680[[hooks.changeMergedHook]]hooks.changeMergedHook::
1681+
1682Optional filename for the change merged hook, if not specified then
1683`change-merged` will be used.
1684
David Pursehousef9f3b272012-09-28 19:58:59 +09001685[[hooks.mergeFailedHook]]hooks.mergeFailedHook::
1686+
1687Optional filename for the merge failed hook, if not specified then
1688`merge-failed` will be used.
1689
Shane Mc Cormack6c2b6772010-01-12 21:56:44 +00001690[[hooks.changeAbandonedHook]]hooks.changeAbandonedHook::
1691+
1692Optional filename for the change abandoned hook, if not specified then
1693`change-abandoned` will be used.
1694
David Pursehousea93c9302012-06-15 16:29:26 +09001695[[hooks.changeRestoredHook]]hooks.changeRestoredHook::
1696+
1697Optional filename for the change restored hook, if not specified then
1698`change-restored` will be used.
1699
1700[[hooks.refUpdatedHook]]hooks.refUpdatedHook::
1701+
1702Optional filename for the ref updated hook, if not specified then
1703`ref-updated` will be used.
1704
David Pursehouse2336bd82012-09-21 12:50:19 +09001705[[hooks.reviewerAddedHook]]hooks.reviewerAddedHook::
1706+
1707Optional filename for the reviewer added hook, if not specified then
1708`reviewer-added` will be used.
1709
David Pursehouseba3e28d2013-07-12 14:48:51 +09001710[[hooks.topicChangedHook]]hooks.topicChangedHook::
1711+
1712Optional filename for the topic changed hook, if not specified then
1713`topic-changed` will be used.
1714
David Pursehousea93c9302012-06-15 16:29:26 +09001715[[hooks.claSignedHook]]hooks.claSignedHook::
1716+
1717Optional filename for the CLA signed hook, if not specified then
1718`cla-signed` will be used.
1719
Chris Harrisf736d6c2012-11-21 09:35:56 -05001720[[hooks.refUpdateHook]]hooks.refUpdateHook::
1721+
1722Optional filename for the ref update hook, if not specified then
1723`ref-update` will be used.
1724
David Pursehousecb2e4852014-09-12 15:09:12 +02001725[[hooks.hashtagsChangedHook]]hooks.hashtagsChangedHook::
1726+
1727Optional filename for the hashtags changed hook, if not specified then
1728`hashtags-changed` will be used.
1729
Chris Harrisf736d6c2012-11-21 09:35:56 -05001730[[hooks.syncHookTimeout]]hooks.syncHookTimeout::
David Pursehouse6fdc8d92012-11-28 12:34:18 +09001731+
1732Optional timeout value in seconds for synchronous hooks, if not specified
Chris Harrisf736d6c2012-11-21 09:35:56 -05001733then 30 seconds will be used.
1734
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08001735[[http]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001736=== Section http
Shawn O. Pearce309d8d32009-11-17 16:03:16 -08001737
1738[[http.proxy]]http.proxy::
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001739+
1740URL of the proxy server when making outgoing HTTP
1741connections for OpenID login transactions. Syntax
1742should be `http://`'hostname'`:`'port'.
Shawn O. Pearce309d8d32009-11-17 16:03:16 -08001743
1744[[http.proxyUsername]]http.proxyUsername::
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001745+
1746Optional username to authenticate to the HTTP proxy with.
Robin Rosenberg524a3032012-10-14 14:24:36 +02001747This property is honored only if the username does not
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001748appear in the http.proxy property above.
Shawn O. Pearce309d8d32009-11-17 16:03:16 -08001749
1750[[http.proxyPassword]]http.proxyPassword::
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001751+
1752Optional password to authenticate to the HTTP proxy with.
Robin Rosenberg524a3032012-10-14 14:24:36 +02001753This property is honored only if the password does not
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001754appear in the http.proxy property above.
Shawn O. Pearce309d8d32009-11-17 16:03:16 -08001755
Hugo Arès88e33ac2014-03-03 13:52:45 -05001756[[http.addUserAsRequestAttribute]]http.addUserAsRequestAttribute::
1757+
1758If true, 'User' attribute will be added to the request attributes so it
1759can be accessed outside the request scope (will be set to username or id
1760if username not configured).
1761+
1762This attribute can be used by the servlet container to log user in the
1763http access log.
1764+
1765When running the embedded servlet container, this attribute is used to
1766print user in the httpd_log.
1767+
1768* `%{User}r`
1769+
1770Pattern to print user in Tomcat AccessLog.
1771
1772+
1773Default value is true.
Shawn O. Pearce309d8d32009-11-17 16:03:16 -08001774
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08001775[[httpd]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001776=== Section httpd
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08001777
1778The httpd section configures the embedded servlet container.
1779
1780[[httpd.listenUrl]]httpd.listenUrl::
1781+
1782Specifies the URLs the internal HTTP daemon should listen for
Edwin Kempincdb0e002011-09-08 14:23:30 +02001783connections on. The special hostname '*' may be used to listen
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08001784on all local addresses. A context path may optionally be included,
1785placing Gerrit Code Review's web address within a subdirectory of
1786the server.
1787+
1788Multiple protocol schemes are supported:
1789+
1790* `http://`'hostname'`:`'port'
1791+
1792Plain-text HTTP protocol. If port is not supplied, defaults to 80,
1793the standard HTTP port.
1794+
1795* `https://`'hostname'`:`'port'
1796+
1797SSL encrypted HTTP protocol. If port is not supplied, defaults to
1798443, the standard HTTPS port.
1799+
1800Externally facing production sites are encouraged to use a reverse
1801proxy configuration and `proxy-https://` (below), rather than using
1802the embedded servlet container to implement the SSL processing.
1803The proxy server with SSL support is probably easier to configure,
1804provides more configuration options to control cipher usage, and
1805is likely using natively compiled encryption algorithms, resulting
1806in higher throughput.
1807+
1808* `proxy-http://`'hostname'`:`'port'
1809+
1810Plain-text HTTP relayed from a reverse proxy. If port is not
1811supplied, defaults to 8080.
1812+
1813Like http, but additional header parsing features are
1814enabled to honor X-Forwarded-For, X-Forwarded-Host and
1815X-Forwarded-Server. These headers are typically set by Apache's
1816link:http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#x-headers[mod_proxy].
1817+
1818* `proxy-https://`'hostname'`:`'port'
1819+
1820Plain text HTTP relayed from a reverse proxy that has already
1821handled the SSL encryption/decryption. If port is not supplied,
1822defaults to 8080.
1823+
1824Behaves exactly like proxy-http, but also sets the scheme to assume
1825'https://' is the proper URL back to the server.
1826
1827+
1828If multiple values are supplied, the daemon will listen on all
1829of them.
1830+
1831By default, http://*:8080.
1832
1833[[httpd.reuseAddress]]httpd.reuseAddress::
1834+
1835If true, permits the daemon to bind to the port even if the port
1836is already in use. If false, the daemon ensures the port is not
1837in use before starting. Busy sites may need to set this to true
1838to permit fast restarts.
1839+
1840By default, true.
1841
1842[[httpd.requestHeaderSize]]httpd.requestHeaderSize::
1843+
1844Size, in bytes, of the buffer used to parse the HTTP headers of an
1845incoming HTTP request. The entire request headers, including any
1846cookies sent by the browser, must fit within this buffer, otherwise
1847the server aborts with the response '413 Request Entity Too Large'.
1848+
1849One buffer of this size is allocated per active connection.
1850Allocating a buffer that is too large wastes memory that cannot be
1851reclaimed, allocating a buffer that is too small may cause unexpected
1852errors caused by very long Referer URLs or large cookie values.
1853+
1854By default, 16384 (16 K), which is sufficient for most OpenID and
1855other web-based single-sign-on integrations.
1856
Chulho Yangb72ff8f2013-07-04 02:35:53 -04001857[[httpd.sslCrl]]httpd.sslCrl::
1858+
1859Path of the certificate revocation list file in PEM format. This
1860crl file is optional, and available for CLIENT_SSL_CERT_LDAP
1861authentication.
1862+
1863To create and view a crl using openssl:
1864+
1865----
1866openssl ca -gencrl -out crl.pem
1867openssl crl -in crl.pem -text
1868----
1869+
1870If not absolute, the path is resolved relative to `$site_path`.
1871+
1872By default, `$site_path/etc/crl.pem`.
1873
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08001874[[httpd.sslKeyStore]]httpd.sslKeyStore::
1875+
1876Path of the Java keystore containing the server's SSL certificate
1877and private key. This keystore is required for `https://` in URL.
1878+
1879To create a self-signed certificate for simple internal usage:
1880+
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001881----
1882keytool -keystore keystore -alias jetty -genkey -keyalg RSA
1883chmod 600 keystore
1884----
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08001885+
1886If not absolute, the path is resolved relative to `$site_path`.
1887+
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08001888By default, `$site_path/etc/keystore`.
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08001889
1890[[httpd.sslKeyPassword]]httpd.sslKeyPassword::
1891+
1892Password used to decrypt the private portion of the sslKeyStore.
David Pursehouse221d4f62012-06-08 17:38:08 +09001893Java keystores require a password, even if the administrator
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08001894doesn't want to enable one.
1895+
1896If set to the empty string the embedded server will prompt for the
1897password during startup.
1898+
1899By default, `gerrit`.
1900
Shawn O. Pearce1766f502010-01-15 10:49:46 -08001901[[httpd.requestLog]]httpd.requestLog::
1902+
1903Enable (or disable) the `'$site_path'/logs/httpd_log` request log.
1904If enabled, an NCSA combined log format request log file is written
1905out by the internal HTTP daemon.
1906+
David Ostrovsky8e4a9902013-11-19 23:57:48 +01001907`log4j.appender` with the name `httpd_log` can be configured to overwrite
1908programmatic configuration.
1909+
Shawn O. Pearce1766f502010-01-15 10:49:46 -08001910By default, true if httpd.listenUrl uses http:// or https://,
1911and false if httpd.listenUrl uses proxy-http:// or proxy-https://.
1912
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08001913[[httpd.acceptorThreads]]httpd.acceptorThreads::
1914+
1915Number of worker threads dedicated to accepting new incoming TCP
David Pursehouse221d4f62012-06-08 17:38:08 +09001916connections and allocating them connection-specific resources.
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08001917+
1918By default, 2, which should be suitable for most high-traffic sites.
1919
1920[[httpd.minThreads]]httpd.minThreads::
1921+
1922Minimum number of spare threads to keep in the worker thread pool.
1923This number must be at least 1 larger than httpd.acceptorThreads
David Pursehouse92463562013-06-24 10:16:28 +09001924multiplied by the number of httpd.listenUrls configured.
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08001925+
1926By default, 5, suitable for most lower-volume traffic sites.
1927
1928[[httpd.maxThreads]]httpd.maxThreads::
1929+
1930Maximum number of threads to permit in the worker thread pool.
1931+
1932By default 25, suitable for most lower-volume traffic sites.
1933
1934[[httpd.maxQueued]]httpd.maxQueued::
1935+
1936Maximum number of client connections which can enter the worker
1937thread pool waiting for a worker thread to become available.
David Ostrovsky14fe8bc2014-03-26 06:03:44 -070019380 sets the queue size to the Integer.MAX_VALUE.
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08001939+
1940By default 50.
1941
Shawn O. Pearcee5452b72010-01-15 14:32:50 -08001942[[httpd.maxWait]]httpd.maxWait::
1943+
David Pursehouse221d4f62012-06-08 17:38:08 +09001944Maximum amount of time a client will wait for an available
Shawn O. Pearcee5452b72010-01-15 14:32:50 -08001945thread to handle a project clone, fetch or push request over the
1946smart HTTP transport.
1947+
1948Values should use common unit suffixes to express their setting:
1949+
1950* s, sec, second, seconds
1951* m, min, minute, minutes
1952* h, hr, hour, hours
1953* d, day, days
1954* w, week, weeks (`1 week` is treated as `7 days`)
1955* mon, month, months (`1 month` is treated as `30 days`)
1956* y, year, years (`1 year` is treated as `365 days`)
1957
1958+
1959If a unit suffix is not specified, `minutes` is assumed. If 0
1960is supplied, the maximum age is infinite and connections will not
1961abort until the client disconnects.
1962+
1963By default, 5 minutes.
1964
Luca Milanesioce7b7452013-06-18 11:40:49 +01001965[[httpd.filterClass]]httpd.filterClass::
1966+
1967Class that implements the javax.servlet.Filter interface
1968for filtering any HTTP related traffic going through the Gerrit
1969HTTP protocol.
1970Class is loaded and configured in the Gerrit Jetty container
1971and run in front of all Gerrit URL handlers, allowing the filter
1972to inspect, modify, allow or reject each request.
1973It needs to be provided as JAR library
1974under $GERRIT_SITE/lib as it is resolved using the default Gerrit class
1975loader and cannot be dynamically loaded by a plugin.
1976+
1977Failing to load the Filter class would result in a Gerrit start-up
1978failure, as this class is supposed to provide mandatory filtering
1979in front of Gerrit HTTP protocol.
1980+
David Pursehouse42f42042013-08-01 14:02:25 +09001981Typical usage is in conjunction with the `auth.type=HTTP` as replacement
Luca Milanesioce7b7452013-06-18 11:40:49 +01001982of an Apache HTTP proxy layer as security enforcement on top of Gerrit
1983by returning a trusted username as HTTP Header.
1984+
1985Example of using a security library secure.jar under $GERRIT_SITE/lib
1986that provides a org.anyorg.MySecureFilter Servlet Filter that enforces
1987a trusted username in the `TRUSTED_USER` HTTP Header:
1988
1989----
1990[auth]
1991type = HTTP
1992httpHeader = TRUSTED_USER
1993
1994[http]
1995filterClass = org.anyorg.MySecureFilter
1996----
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08001997
Juan Hernandezec512562013-08-06 16:30:50 +02001998[[httpd.robotsFile]]httpd.robotsFile::
1999+
2000Location of an external robots.txt file to be used instead of the one
2001bundled with the .war of the application.
2002+
2003If not absolute, the path is resolved relative to `$site_path`.
2004+
2005If the file doesn't exist or can't be read the default robots.txt file
2006bundled with the .war will be used instead.
2007
Dariusz Luksza011cfed2014-04-03 10:23:35 +02002008[[httpd.registerMBeans]]httpd.registerMBeans::
2009+
2010Enable (or disable) registration of Jetty MBeans for Java JMX.
2011+
2012By default, false.
2013
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08002014[[index]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002015=== Section index
David Pursehouse6d458432013-08-23 16:17:18 +09002016
2017The index section configures the secondary index.
2018
David Pursehouse3fc5ee32014-03-17 18:35:32 +09002019Note that after enabling the secondary index, the index must be built
2020using the link:pgm-reindex.html[reindex program] before restarting the
2021Gerrit server.
2022
David Pursehouse6d458432013-08-23 16:17:18 +09002023[[index.type]]index.type::
2024+
2025Type of secondary indexing employed by Gerrit. The supported
2026values are:
2027+
2028* `LUCENE`
2029+
2030A link:http://lucene.apache.org/[Lucene] index is used.
2031+
2032* `SOLR`
2033+
David Pursehouse396e09d2014-02-06 15:39:59 +09002034A link:https://cwiki.apache.org/confluence/display/solr/SolrCloud[
2035SolrCloud] index is used.
David Pursehouse6d458432013-08-23 16:17:18 +09002036
2037+
Shawn Pearced4ae3a162013-11-24 17:00:31 -08002038By default, `LUCENE`.
David Pursehouse6d458432013-08-23 16:17:18 +09002039
David Pursehouse904db302014-03-17 18:55:38 +09002040[[index.threads]]index.threads::
2041+
Dave Borowitz787af5f2014-10-22 16:26:00 -07002042Number of threads to use for indexing in normal interactive operations.
David Pursehouse904db302014-03-17 18:55:38 +09002043+
Dave Borowitz0916cc32014-10-23 10:24:01 -07002044Defaults to 1 if not set, or set to a negative value (unless
2045link:#changeMerge.interactiveThreadPoolSize[changeMerge.interactiveThreadPoolSize]
2046is iset).
David Pursehouse00c82142014-01-22 17:41:09 +09002047
Dave Borowitz787af5f2014-10-22 16:26:00 -07002048[[index.batchThreads]]index.batchThreads::
2049+
2050Number of threads to use for indexing in background operations, such as
2051online schema upgrades.
2052+
2053If not set or set to a negative value, defaults to using the same
Dave Borowitz0916cc32014-10-23 10:24:01 -07002054thread pool as interactive operations (unless
2055link:#changeMerge.threadPoolSize[changeMerge.threadPoolSize] is set).
Dave Borowitz787af5f2014-10-22 16:26:00 -07002056
David Pursehouse902b3ee2014-07-09 16:17:49 +09002057==== Lucene configuration
2058
2059Open and closed changes are indexed in separate indexes named
2060'open' and 'closed' respectively.
2061
2062The following settings are only used when the index type is `LUCENE`.
David Pursehouseac88c362014-02-06 12:01:34 +09002063
David Pursehouse00c82142014-01-22 17:41:09 +09002064[[index.name.ramBufferSize]]index.name.ramBufferSize::
2065+
David Pursehouse00c82142014-01-22 17:41:09 +09002066Determines the amount of RAM that may be used for buffering added documents
2067and deletions before they are flushed to the index. See the
2068link:http://lucene.apache.org/core/4_6_0/core/org/apache/lucene/index/LiveIndexWriterConfig.html#setRAMBufferSizeMB(double)[
2069Lucene documentation] for further details.
2070+
2071Defaults to 16M.
2072
2073[[index.name.maxBufferedDocs]]index.name.maxBufferedDocs::
2074+
David Pursehouse00c82142014-01-22 17:41:09 +09002075Determines the minimal number of documents required before the buffered
2076in-memory documents are flushed to the index. Large values generally
2077give faster indexing. See the
2078link:http://lucene.apache.org/core/4_6_0/core/org/apache/lucene/index/LiveIndexWriterConfig.html#setMaxBufferedDocs(int)[
2079Lucene documentation] for further details.
2080+
2081Defaults to -1, meaning no maximum is set and the writer will flush
2082according to RAM usage.
2083
Dave Borowitzd08b0452014-02-13 11:56:03 -08002084[[index.name.commitWithin]]index.name.commitWithin::
2085+
Dave Borowitzd08b0452014-02-13 11:56:03 -08002086Determines the period at which changes are automatically committed to
2087stable store on disk. This is a costly operation and may block
2088additional index writes, so lower with caution.
2089+
Bruce Zuaf058e62014-03-21 10:03:05 +08002090If zero, changes are committed after every write. This is very costly
2091but may be useful if offline reindexing is infeasible, or for development
2092servers.
Dave Borowitzd08b0452014-02-13 11:56:03 -08002093+
Bruce Zuaf058e62014-03-21 10:03:05 +08002094Values can be specified using standard time unit abbreviations (`ms`, `sec`,
2095`min`, etc.).
David Pursehouse9354c1a2014-03-22 12:23:43 -07002096+
Bruce Zuaf058e62014-03-21 10:03:05 +08002097If negative, `commitWithin` is disabled. Changes are flushed to disk when
2098the in-memory buffer fills, but only committed and guaranteed to be synced
2099to disk when the process finishes.
David Pursehouse902b3ee2014-07-09 16:17:49 +09002100+
Dave Borowitzd08b0452014-02-13 11:56:03 -08002101Defaults to 300000 ms (5 minutes).
2102
David Pursehouse902b3ee2014-07-09 16:17:49 +09002103Sample Lucene index configuration:
David Pursehouse00c82142014-01-22 17:41:09 +09002104----
2105[index]
2106 type = LUCENE
2107
2108[index "changes_open"]
2109 ramBufferSize = 60 m
2110 maxBufferedDocs = 3000
2111
2112[index "changes_closed"]
2113 ramBufferSize = 20 m
2114 maxBufferedDocs = 500
2115----
2116
David Pursehouse902b3ee2014-07-09 16:17:49 +09002117==== Solr configuration
2118
2119Open and closed changes are indexed in separate indexes named
2120'changes_open' and 'changes_closed' respectively.
2121
2122The following settings are only used when the index type is `SOLR`.
2123
2124[[index.url]]index.url::
2125+
2126URL of the index server.
2127
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08002128[[ldap]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002129=== Section ldap
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002130
David Pursehouse221d4f62012-06-08 17:38:08 +09002131LDAP integration is only enabled if `auth.type` is set to
Sasa Zivkoveabc8972010-10-04 15:47:08 +02002132`HTTP_LDAP`, `LDAP` or `CLIENT_SSL_CERT_LDAP`. See above for a
David Pursehouse42f42042013-08-01 14:02:25 +09002133detailed description of the `auth.type` settings and their
Sasa Zivkoveabc8972010-10-04 15:47:08 +02002134implications.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002135
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07002136An example LDAP configuration follows, and then discussion of
2137the parameters introduced here. Suitable defaults for most
2138parameters are automatically guessed based on the type of server
2139detected during startup. The guessed defaults support both
2140link:http://www.ietf.org/rfc/rfc2307.txt[RFC 2307] and Active
2141Directory.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002142
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08002143----
2144[ldap]
2145 server = ldap://ldap.example.com
2146
2147 accountBase = ou=people,dc=example,dc=com
2148 accountPattern = (&(objectClass=person)(uid=${username}))
2149 accountFullName = displayName
2150 accountEmailAddress = mail
2151
2152 groupBase = ou=groups,dc=example,dc=com
2153 groupMemberPattern = (&(objectClass=group)(member=${dn}))
2154----
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002155
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002156[[ldap.server]]ldap.server::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002157+
2158URL of the organization's LDAP server to query for user information
2159and group membership from. Must be of the form `ldap://host` or
2160`ldaps://host` to bind with either a plaintext or SSL connection.
Shawn O. Pearcef7e065e2009-09-26 20:01:10 -07002161+
David Pursehouse42f42042013-08-01 14:02:25 +09002162If `auth.type` is `LDAP` this setting should use `ldaps://` to
Shawn O. Pearcef7e065e2009-09-26 20:01:10 -07002163ensure the end user's plaintext password is transmitted only over
2164an encrypted connection.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002165
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07002166[[ldap.sslVerify]]ldap.sslVerify::
2167+
2168If false and ldap.server is an `ldaps://` style URL, Gerrit
2169will not verify the server certificate when it connects to
2170perform a query.
2171+
2172By default, true, requiring the certificate to be verified.
2173
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002174[[ldap.username]]ldap.username::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002175+
2176_(Optional)_ Username to bind to the LDAP server with. If not set,
2177an anonymous connection to the LDAP server is attempted.
2178
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002179[[ldap.password]]ldap.password::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002180+
2181_(Optional)_ Password for the user identified by `ldap.username`.
2182If not set, an anonymous (or passwordless) connection to the LDAP
2183server is attempted.
2184
Ben Wu0410a152010-06-04 16:17:24 +08002185[[ldap.referral]]ldap.referral::
2186+
2187_(Optional)_ How an LDAP referral should be handled if it is
2188encountered during directory traversal. Set to `follow` to
James Y Knight1244ed02011-01-04 02:40:32 -05002189automatically follow any referrals, or `ignore` to ignore the
2190referrals.
Ben Wu0410a152010-06-04 16:17:24 +08002191+
2192By default, `ignore`.
2193
Sasa Zivkov100bd4b2011-11-07 14:58:46 +01002194[[ldap.readTimeout]]ldap.readTimeout::
2195+
2196_(Optional)_ The read timeout for an LDAP operation. The value is
2197in the usual time-unit format like "1 s", "100 ms", etc...
2198A timeout can be used to avoid blocking all of the SSH command start
David Pursehouse221d4f62012-06-08 17:38:08 +09002199threads in case the LDAP server becomes slow.
Sasa Zivkov100bd4b2011-11-07 14:58:46 +01002200+
2201By default there is no timeout and Gerrit will wait for the LDAP
2202server to respond until the TCP connection times out.
2203
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002204[[ldap.accountBase]]ldap.accountBase::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002205+
2206Root of the tree containing all user accounts. This is typically
2207of the form `ou=people,dc=example,dc=com`.
2208
Shawn O. Pearce304ccdb2009-08-25 12:25:27 -07002209[[ldap.accountScope]]ldap.accountScope::
2210+
2211Scope of the search performed for accounts. Must be one of:
2212+
2213* `one`: Search only one level below accountBase, but not recursive
2214* `sub` or `subtree`: Search recursively below accountBase
2215* `base` or `object`: Search exactly accountBase; probably not desired
2216
2217+
2218Default is `subtree` as many directories have several levels.
2219
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002220[[ldap.accountPattern]]ldap.accountPattern::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002221+
2222Query pattern to use when searching for a user account. This may be
2223any valid LDAP query expression, including the standard `(&...)` and
David Pursehouse42f42042013-08-01 14:02:25 +09002224`(|...)` operators. If `auth.type` is `HTTP_LDAP` then the variable
Edwin Kempincdb0e002011-09-08 14:23:30 +02002225`${username}` is replaced with a parameter set to the username
David Pursehouse42f42042013-08-01 14:02:25 +09002226that was supplied by the HTTP server. If `auth.type` is `LDAP` then
Edwin Kempincdb0e002011-09-08 14:23:30 +02002227the variable `${username}` is replaced by the string entered by
Shawn O. Pearcef7e065e2009-09-26 20:01:10 -07002228the end user.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002229+
2230This pattern is used to search the objects contained directly under
2231the `ldap.accountBase` tree. A typical setting for this parameter
Edwin Kempincdb0e002011-09-08 14:23:30 +02002232is `(uid=${username})` or `(cn=${username})`, but the proper
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002233setting depends on the LDAP schema used by the directory server.
2234+
Edwin Kempincdb0e002011-09-08 14:23:30 +02002235Default is `(uid=${username})` for RFC 2307 servers,
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07002236and `(&(objectClass=user)(sAMAccountName=${username}))`
2237for Active Directory.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002238
Shawn O. Pearce37dc1f82009-08-19 09:49:07 -07002239[[ldap.accountFullName]]ldap.accountFullName::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002240+
2241_(Optional)_ Name of an attribute on the user account object which
2242contains the initial value for the user's full name field in Gerrit.
2243Typically this is the `displayName` property in LDAP, but could
2244also be `legalName` or `cn`.
2245+
David Pursehouse221d4f62012-06-08 17:38:08 +09002246Attribute values may be concatenated with literal strings. For
2247example to join given name and surname together, use the pattern
Edwin Kempincdb0e002011-09-08 14:23:30 +02002248`${givenName} ${SN}`.
Shawn O. Pearceb86ae002009-09-26 16:54:05 -07002249+
Shawn O. Pearce3ca1dcf2009-08-20 08:56:23 -07002250If set, users will be unable to modify their full name field, as
2251Gerrit will populate it only from the LDAP data.
2252+
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07002253Default is `displayName` for RFC 2307 servers,
2254and `${givenName} ${sn}` for Active Directory.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002255
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002256[[ldap.accountEmailAddress]]ldap.accountEmailAddress::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002257+
2258_(Optional)_ Name of an attribute on the user account object which
2259contains the user's Internet email address, as defined by this
2260LDAP server.
2261+
Shawn O. Pearceb86ae002009-09-26 16:54:05 -07002262Attribute values may be concatenated with literal strings,
2263for example to set the email address to the lowercase form
2264of sAMAccountName followed by a constant domain name, use
Edwin Kempincdb0e002011-09-08 14:23:30 +02002265`${sAMAccountName.toLowerCase}@example.com`.
Shawn O. Pearceb86ae002009-09-26 16:54:05 -07002266+
Shawn O. Pearce3ca1dcf2009-08-20 08:56:23 -07002267If set, the preferred email address will be prefilled from LDAP,
David Pursehouse221d4f62012-06-08 17:38:08 +09002268but users may still be able to register additional email addresses,
Shawn O. Pearce3ca1dcf2009-08-20 08:56:23 -07002269and select a different preferred email address.
2270+
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07002271Default is `mail`.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002272
Shawn O. Pearce59e09222009-08-19 09:04:49 -07002273[[ldap.accountSshUserName]]ldap.accountSshUserName::
2274+
2275_(Optional)_ Name of an attribute on the user account object which
2276contains the initial value for the user's SSH username field in
2277Gerrit. Typically this is the `uid` property in LDAP, but could
2278also be `cn`. Administrators should prefer to match the attribute
2279corresponding to the user's workstation username, as this is what
2280SSH clients will default to.
2281+
Shawn O. Pearceb86ae002009-09-26 16:54:05 -07002282Attribute values may also be forced to lowercase, or to uppercase in
Edwin Kempincdb0e002011-09-08 14:23:30 +02002283an expression. For example, `${sAMAccountName.toLowerCase}` will
Shawn O. Pearceb86ae002009-09-26 16:54:05 -07002284force the value of sAMAccountName, if defined, to be all lowercase.
2285The suffix `.toUpperCase` can be used for the other direction.
2286The suffix `.localPart` can be used to split attribute values of
2287the form 'user@example.com' and return only the left hand side, for
Edwin Kempincdb0e002011-09-08 14:23:30 +02002288example `${userPrincipalName.localPart}` would provide only 'user'.
Shawn O. Pearceb86ae002009-09-26 16:54:05 -07002289+
Shawn O. Pearce3ca1dcf2009-08-20 08:56:23 -07002290If set, users will be unable to modify their SSH username field, as
2291Gerrit will populate it only from the LDAP data.
2292+
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07002293Default is `uid` for RFC 2307 servers,
2294and `${sAMAccountName.toLowerCase}` for Active Directory.
Shawn O. Pearce59e09222009-08-19 09:04:49 -07002295
Shawn O. Pearce7d25f782009-10-30 08:01:03 -07002296[[ldap.accountMemberField]]ldap.accountMemberField::
Anthony93de7db2009-10-03 10:01:50 -04002297+
2298_(Optional)_ Name of an attribute on the user account object which
Shawn O. Pearce7d25f782009-10-30 08:01:03 -07002299contains the groups the user is part of. Typically used for Active
2300Directory servers.
Anthony93de7db2009-10-03 10:01:50 -04002301+
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07002302Default is unset for RFC 2307 servers (disabled)
2303and `memberOf` for Active Directory.
Anthony93de7db2009-10-03 10:01:50 -04002304
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002305[[ldap.groupBase]]ldap.groupBase::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002306+
2307Root of the tree containing all group objects. This is typically
2308of the form `ou=groups,dc=example,dc=com`.
2309
Shawn O. Pearce304ccdb2009-08-25 12:25:27 -07002310[[ldap.groupScope]]ldap.groupScope::
2311+
2312Scope of the search performed for group objects. Must be one of:
2313+
2314* `one`: Search only one level below groupBase, but not recursive
2315* `sub` or `subtree`: Search recursively below groupBase
2316* `base` or `object`: Search exactly groupBase; probably not desired
2317
2318+
2319Default is `subtree` as many directories have several levels.
2320
Shawn O. Pearce7d25f782009-10-30 08:01:03 -07002321[[ldap.groupPattern]]ldap.groupPattern::
2322+
2323Query pattern used when searching for an LDAP group to connect
2324to a Gerrit group. This may be any valid LDAP query expression,
2325including the standard `(&...)` and `(|...)` operators. The variable
Edwin Kempincdb0e002011-09-08 14:23:30 +02002326`${groupname}` is replaced with the search term supplied by the
Shawn O. Pearce7d25f782009-10-30 08:01:03 -07002327group owner.
2328+
Edwin Kempincdb0e002011-09-08 14:23:30 +02002329Default is `(cn=${groupname})` for RFC 2307,
2330and `(&(objectClass=group)(cn=${groupname}))` for Active Directory.
Shawn O. Pearce7d25f782009-10-30 08:01:03 -07002331
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002332[[ldap.groupMemberPattern]]ldap.groupMemberPattern::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002333+
2334Query pattern to use when searching for the groups that a user
2335account is currently a member of. This may be any valid LDAP query
2336expression, including the standard `(&...)` and `(|...)` operators.
2337+
David Pursehouse42f42042013-08-01 14:02:25 +09002338If `auth.type` is `HTTP_LDAP` then the variable `${username}` is
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002339replaced with a parameter set to the username that was supplied
2340by the HTTP server. Other variables appearing in the pattern,
Edwin Kempincdb0e002011-09-08 14:23:30 +02002341such as `${fooBarAttribute}`, are replaced with the value of the
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002342corresponding attribute (in this case, `fooBarAttribute`) as read
2343from the user's account object matched under `ldap.accountBase`.
Edwin Kempincdb0e002011-09-08 14:23:30 +02002344Attributes such as `${dn}` or `${uidNumber}` may be useful.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002345+
Scott Dial50457502013-08-11 16:52:51 -04002346Default is `(|(memberUid=${username})(gidNumber=${gidNumber}))` for
2347RFC 2307, and unset (disabled) for Active Directory.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002348
Auke Schrijnen57809132012-09-26 21:05:39 +02002349[[ldap.groupName]]ldap.groupName::
2350+
David Pursehouse39489ae2012-10-12 13:50:04 +09002351_(Optional)_ Name of the attribute on the group object which contains
2352the value to use as the group name in Gerrit.
Auke Schrijnen57809132012-09-26 21:05:39 +02002353+
David Pursehouse39489ae2012-10-12 13:50:04 +09002354Typically the attribute name is `cn` for RFC 2307 and Active Directory
2355servers. For other servers the attribute name may differ, for example
2356`apple-group-realname` on Apple MacOS X Server.
Auke Schrijnen57809132012-09-26 21:05:39 +02002357+
David Pursehouse39489ae2012-10-12 13:50:04 +09002358It is also possible to specify a literal string containing a pattern of
2359attribute values. For example to create a Gerrit group name consisting of
2360LDAP group name and group ID, use the pattern `${cn} (${gidNumber})`.
2361+
2362Default is `cn`.
Auke Schrijnen57809132012-09-26 21:05:39 +02002363
Edwin Kempinb3b0d292011-09-14 14:17:34 +02002364[[ldap.localUsernameToLowerCase]]ldap.localUsernameToLowerCase::
2365+
2366Converts the local username, that is used to login into the Gerrit
David Pursehousea1d633b2014-05-02 17:21:02 +09002367Web UI, to lower case before doing the LDAP authentication. By setting
2368this parameter to true, a case insensitive login to the Gerrit Web UI
Edwin Kempinb3b0d292011-09-14 14:17:34 +02002369can be achieved.
2370+
2371If set, it must be ensured that the local usernames for all existing
2372accounts are converted to lower case, otherwise a user that has a
David Pursehouse221d4f62012-06-08 17:38:08 +09002373local username that contains upper case characters will not be able to login
Edwin Kempinb3b0d292011-09-14 14:17:34 +02002374anymore. The local usernames for the existing accounts can be
2375converted to lower case by running the server program
2376link:pgm-LocalUsernamesToLowerCase.html[LocalUsernamesToLowerCase].
2377Please be aware that the conversion of the local usernames to lower
2378case can't be undone. For newly created accounts the local username
2379will be directly stored in lower case.
2380+
2381By default, unset/false.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07002382
Robin Rosenberga3baed02012-10-14 14:09:32 +02002383[[ldap.authentication]]ldap.authentication::
2384+
2385Defines how Gerrit authenticates with the server. When set to `GSSAPI`
2386Gerrit will use Kerberos. To use kerberos the
2387`java.security.auth.login.config` system property must point to a
2388login to a JAAS configuration file and, if Java 6 is used, the system
2389property `java.security.krb5.conf` must point to the appropriate
2390krb5.ini file with references to the KDC.
2391
2392Typical jaas.conf.
2393
2394----
2395KerberosLogin {
2396 com.sun.security.auth.module.Krb5LoginModule
2397 required
2398 useTicketCache=true
2399 doNotPrompt=true
2400 renewTGT=true;
2401};
2402----
2403
2404See Java documentation on how to create the krb5.ini file.
2405
2406Note the `renewTGT` property to make sure the TGT does not expire,
2407and `useTicketCache` to use the TGT supplied by the operating system. As
2408the whole point of using GSSAPI is to have passwordless authentication
David Pursehouse92463562013-06-24 10:16:28 +09002409to the LDAP service, this option does not acquire a new TGT on its own.
Robin Rosenberga3baed02012-10-14 14:09:32 +02002410
2411On Windows servers the registry key `HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\Kerberos\Parameters`
2412must have the DWORD value `allowtgtsessionkey` set to 1 and the account must not
2413have local administrator privileges.
2414
Bruce Zucd04bbc2014-07-25 15:48:09 +08002415[[ldap.useConnectionPooling]]ldap.useConnectionPooling::
2416+
2417_(Optional)_ Enable the LDAP connection pooling or not.
2418+
2419If it is true, the LDAP service provider maintains a pool of (possibly)
2420previously used connections and assigns them to a Context instance as
2421needed. When a Context instance is done with a connection (closed or
2422garbage collected), the connection is returned to the pool for future use.
2423+
2424For details, see link:http://docs.oracle.com/javase/tutorial/jndi/ldap/pool.html[
2425LDAP connection management (Pool)] and link:http://docs.oracle.com/javase/tutorial/jndi/ldap/config.html[
2426LDAP connection management (Configuration)]
2427+
2428By default, false.
2429
2430[[ldap.connectTimeout]]ldap.connectTimeout::
2431+
2432_(Optional)_ Specify how long to wait for a pooled connection.
2433This is also used to specify a timeout period for establishment
2434of the LDAP connection.
2435+
2436The value is in the usual time-unit format like "1 s", "100 ms",
2437etc...
2438+
2439By default there is no timeout and Gerrit will wait indefinitely.
2440
2441[[ldap.poolAuthentication]]ldap.poolAuthentication::
2442+
2443_(Optional)_ A list of space-separated authentication types of
2444connections that may be pooled. Valid types are "none", "simple",
2445and "DIGEST-MD5".
2446+
2447Default is "none simple".
2448
2449[[ldap.poolDebug]]ldap.poolDebug::
2450+
2451_(Optional)_ A string that indicates the level of debug output
2452to produce. Valid values are "fine" (trace connection creation
2453and removal) and "all" (all debugging information).
2454
2455[[ldap.poolInitsize]]ldap.poolInitsize::
2456+
2457_(Optional)_ The string representation of an integer that
2458represents the number of connections per connection identity
2459to create when initially creating a connection for the identity.
2460+
2461Default is 1.
2462
2463[[ldap.poolMaxsize]]ldap.poolMaxsize::
2464+
2465_(Optional)_ The string representation of an integer that
2466represents the maximum number of connections per connection
2467identity that can be maintained concurrently.
2468+
2469Default is 0, means that there is no maximum size: A request for
2470a pooled connection will use an existing pooled idle connection
2471or a newly created pooled connection.
2472
2473[[ldap.poolPrefsize]]ldap.poolPrefsize::
2474+
2475_(Optional)_ The string representation of an integer that
2476represents the preferred number of connections per connection
2477identity that should be maintained concurrently.
2478+
2479Default is 0, means that there is no preferred size: A request
2480for a pooled connection will result in a newly created connection
2481only if no idle ones are available.
2482
2483[[ldap.poolProtocol]]ldap.poolProtocol::
2484+
2485_(Optional)_ A list of space-separated protocol types of
2486connections that may be pooled. Valid types are "plain" and "ssl".
2487+
2488Default is "plain".
2489
2490[[ldap.poolTimeout]]ldap.poolTimeout::
2491+
2492_(Optional)_ Specify how long an idle connection may remain
2493in the pool without being closed and removed from the pool.
2494+
2495The value is in the usual time-unit format like "1 s", "100 ms",
2496etc...
2497+
2498By default there is no timeout.
2499
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08002500[[mimetype]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002501=== Section mimetype
Shawn O. Pearce01cb11902009-07-15 08:19:01 -07002502
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002503[[mimetype.name.safe]]mimetype.<name>.safe::
Shawn O. Pearce01cb11902009-07-15 08:19:01 -07002504+
2505If set to true, files with the MIME type `<name>` will be sent as
2506direct downloads to the user's browser, rather than being wrapped up
2507inside of zipped archives. The type name may be a complete type
Edwin Kempincdb0e002011-09-08 14:23:30 +02002508name, e.g. `image/gif`, a generic media type, e.g. `image/*`,
2509or the wildcard `*/*` to match all types.
Shawn O. Pearce01cb11902009-07-15 08:19:01 -07002510+
2511By default, false for all MIME types.
2512
2513Common examples:
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08002514----
2515[mimetype "image/*"]
2516 safe = true
2517
2518[mimetype "application/pdf"]
2519 safe = true
2520
2521[mimetype "application/msword"]
2522 safe = true
2523
2524[mimetype "application/vnd.ms-excel"]
2525 safe = true
2526----
Shawn O. Pearce01cb11902009-07-15 08:19:01 -07002527
Shawn O. Pearce5f11b292010-08-05 17:57:35 -07002528
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08002529[[pack]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002530=== Section pack
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08002531
Shawn O. Pearce5f11b292010-08-05 17:57:35 -07002532Global settings controlling how Gerrit Code Review creates pack
2533streams for Git clients running clone, fetch, or pull. Most of these
2534variables are per-client request, and thus should be carefully set
2535given the expected concurrent request load and available CPU and
2536memory resources.
2537
2538[[pack.deltacompression]]pack.deltacompression::
2539+
2540If true, delta compression between objects is enabled. This may
2541result in a smaller overall transfer for the client, but requires
2542more server memory and CPU time.
2543+
2544False (off) by default, matching Gerrit Code Review 2.1.4.
2545
2546[[pack.threads]]pack.threads::
2547+
2548Maximum number of threads to use for delta compression (if enabled).
2549This is per-client request. If set to 0 then the number of CPUs is
2550auto-detected and one thread per CPU is used, per client request.
2551+
2552By default, 1.
2553
2554
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08002555[[plugins]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002556=== Section plugins
Shawn O. Pearce5ad16ea2012-05-09 14:24:25 -07002557
2558[[plugins.checkFrequency]]plugins.checkFrequency::
2559+
2560How often plugins should be examined for new plugins to load, removed
2561plugins to be unloaded, or updated plugins to be reloaded. Values can
2562be specified using standard time unit abbreviations ('ms', 'sec',
2563'min', etc.).
2564+
2565If set to 0, automatic plugin reloading is disabled. Administrators
2566may force reloading with link:cmd-plugin.html[gerrit plugin reload].
2567+
2568Default is 1 minute.
2569
Shawn Pearcefd033502014-02-14 16:42:35 -08002570[[plugins.allowRemoteAdmin]]plugins.allowRemoteAdmin::
2571+
2572Enable remote installation, enable and disable of plugins over HTTP
2573and SSH. If set to true Administrators can install new plugins
2574remotely, or disable existing plugins. Defaults to false.
2575
Shawn O. Pearce5ad16ea2012-05-09 14:24:25 -07002576
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08002577[[receive]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002578=== Section receive
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08002579
Sasa Zivkov59d89c32011-11-18 15:32:35 +01002580This section is used to set who can execute the 'receive-pack' and
2581to limit the maximum Git object size that 'receive-pack' will accept.
2582'receive-pack' is what runs on the server during a user's push or
Dave Borowitz234734a2012-03-01 14:22:29 -08002583repo upload command. It also contains some advanced options for tuning the
2584behavior of Gerrit's 'receive-pack' mechanism.
lincoln2be11602010-07-05 10:53:25 -03002585
2586----
2587[receive]
2588 allowGroup = GROUP_ALLOWED_TO_EXECUTE
2589 allowGroup = YET_ANOTHER_GROUP_ALLOWED_TO_EXECUTE
Sasa Zivkov59d89c32011-11-18 15:32:35 +01002590 maxObjectSizeLimit = 40 m
lincoln2be11602010-07-05 10:53:25 -03002591----
2592
Shawn Pearce5cb31bf2013-02-27 16:20:26 -08002593[[receive.checkMagicRefs]]receive.checkMagicRefs::
2594+
2595If true, Gerrit will verify the destination repository has
2596no references under the magic 'refs/drafts', 'refs/for', or
2597'refs/publish' branch namespaces. Names under these locations
2598confuse clients when trying to upload code reviews so Gerrit
2599requires them to be empty.
2600+
2601If false Gerrit skips the sanity check and assumes administrators
2602have ensured the repository does not contain any magic references.
2603Setting to false to skip the check can decrease latency during push.
2604+
2605Default is true.
2606
Gustaf Lundh9062fd62013-02-14 17:23:11 +01002607[[receive.checkReferencedObjectsAreReachable]]receive.checkReferencedObjectsAreReachable::
2608+
2609If set to true, Gerrit will validate that all referenced objects that
2610are not included in the received pack are reachable by the user.
2611+
2612Carrying out this check on gits with many refs and commits can be a
2613very CPU-heavy operation. For non public Gerrit-servers this check may
2614be overkill.
2615+
2616Only disable this check if you trust the clients not to forge SHA1
2617references to access commits intended to be hidden from the user.
2618+
2619Default is true.
2620
lincoln2be11602010-07-05 10:53:25 -03002621[[receive.allowGroup]]receive.allowGroup::
2622+
2623Name of the groups of users that are allowed to execute
2624'receive-pack' on the server. One or more groups can be set.
2625+
2626If no groups are added, any user will be allowed to execute
2627'receive-pack' on the server.
2628
Sasa Zivkov59d89c32011-11-18 15:32:35 +01002629[[receive.maxObjectSizeLimit]]receive.maxObjectSizeLimit::
2630+
2631Maximum allowed Git object size that 'receive-pack' will accept.
2632If an object is larger than the given size the pack-parsing will abort
2633and the push operation will fail. If set to zero then there is no
2634limit.
2635+
David Pursehouse221d4f62012-06-08 17:38:08 +09002636Gerrit administrators can use this setting to prevent developers
Sasa Zivkov59d89c32011-11-18 15:32:35 +01002637from pushing objects which are too large to Gerrit.
2638+
Fredrik Luthandera3cf3542012-07-04 16:55:35 -07002639This setting can also be set in the `project.config`
2640link:config-project-config.html[receive.maxObjectSizeLimit] in order
2641to further reduce the global setting. The project specific setting is
2642only honored when it further reduces the global limit.
Sasa Zivkov5a708a82013-06-28 17:07:55 +02002643+
Sasa Zivkov59d89c32011-11-18 15:32:35 +01002644Default is zero.
2645+
2646Common unit suffixes of 'k', 'm', or 'g' are supported.
2647
Bruce Zue13b65d2014-07-30 14:50:01 +08002648[[receive.maxBatchChanges]]receive.maxBatchChanges::
2649+
2650The maximum number of changes that Gerrit allows to be pushed
2651in a batch for review. When this number is exceeded Gerrit rejects
2652the push with an error message.
2653
2654This setting can be used to prevent users from uploading large
2655number of changes for review by mistake.
2656
2657Default is zero, no limit.
2658
Dave Borowitz234734a2012-03-01 14:22:29 -08002659[[receive.threadPoolSize]]receive.threadPoolSize::
2660+
2661Maximum size of the thread pool in which the change data in received packs is
2662processed.
2663+
2664Defaults to the number of available CPUs according to the Java runtime.
2665
Shawn O. Pearcec545c092012-07-27 16:38:55 -07002666[[receive.changeUpdateThreads]]receive.changeUpdateThreads::
2667+
2668Number of threads to perform change creation or patch set updates
2669concurrently. Each thread uses its own database connection from
2670the database connection pool, and if all threads are busy then
2671main receive thread will also perform a change creation or patch
2672set update.
2673+
2674Defaults to 1, using only the main receive thread. This feature is for
David Pursehouse92463562013-06-24 10:16:28 +09002675databases with very high latency that can benefit from concurrent
Shawn O. Pearcec545c092012-07-27 16:38:55 -07002676operations when multiple changes are impacted at once.
2677
Dave Borowitz1c401362012-03-02 17:39:17 -08002678[[receive.timeout]]receive.timeout::
2679+
Shawn O. Pearce00dd12d2012-03-12 15:52:11 -07002680Overall timeout on the time taken to process the change data in
2681received packs. Only includes the time processing Gerrit changes
2682and updating references, not the time to index the pack. Values can
2683be specified using standard time unit abbreviations ('ms', 'sec',
2684'min', etc.).
Dave Borowitz1c401362012-03-02 17:39:17 -08002685+
David Pursehouse92463562013-06-24 10:16:28 +09002686Default is 2 minutes. If no unit is specified, milliseconds
Shawn O. Pearce00dd12d2012-03-12 15:52:11 -07002687is assumed.
Dave Borowitz1c401362012-03-02 17:39:17 -08002688
lincoln2be11602010-07-05 10:53:25 -03002689
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08002690[[repository]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002691=== Section repository
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08002692
Hugo Josefson072b4702010-04-21 19:27:11 +02002693Repositories in this sense are the same as projects.
2694
Shawn O. Pearce897d9212011-06-16 16:59:59 -07002695In the following example configuration `Registered Users` is set
2696to be the default owner of new projects.
Hugo Josefson072b4702010-04-21 19:27:11 +02002697
2698----
2699[repository "*"]
Hugo Josefson072b4702010-04-21 19:27:11 +02002700 ownerGroup = Registered Users
2701----
2702
2703[NOTE]
2704Currently only the repository name `*` is supported.
2705This is a wildcard designating all repositories.
2706
Edwin Kempina79ea552013-11-19 11:24:37 +01002707[[repository.name.defaultSubmitType]]repository.<name>.defaultSubmitType::
2708+
2709The default submit type for newly created projects. Supported values
2710are `MERGE_IF_NECESSARY`, `FAST_FORWARD_ONLY`, `REBASE_IF_NECESSARY`,
2711`MERGE_ALWAYS` and `CHERRY_PICK`.
2712+
2713By default, `MERGE_IF_NECESSARY`.
2714
Hugo Josefson072b4702010-04-21 19:27:11 +02002715[[repository.name.ownerGroup]]repository.<name>.ownerGroup::
2716+
2717A name of a group which exists in the database. Zero, one or many
2718groups are allowed. Each on its own line. Groups which don't exist
2719in the database are ignored.
Hugo Josefson072b4702010-04-21 19:27:11 +02002720
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08002721[[rules]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002722=== Section rules
Shawn O. Pearce94860ee2011-09-29 13:11:08 -07002723
2724[[rules.enable]]rules.enable::
2725+
Matt Baker8ce12fc2013-11-26 21:43:12 -07002726If true, Gerrit will load and execute 'rules.pl' files in each
Shawn O. Pearce94860ee2011-09-29 13:11:08 -07002727project's refs/meta/config branch, if present. When set to false,
2728only the default internal rules will be used.
2729+
2730Default is true, to execute project specific rules.
2731
David Pursehouse511a35b2014-04-04 10:27:13 +09002732[[execution]]
2733=== Section execution
Bruce Zua7e34312014-04-01 17:35:41 +08002734
2735[[execution.defaultThreadPoolSize]]execution.defaultThreadPoolSize::
2736+
2737The default size of the background execution thread pool in
2738which miscellaneous tasks are handled.
2739+
2740Default is 1.
2741
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08002742[[sendemail]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002743=== Section sendemail
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07002744
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002745[[sendemail.enable]]sendemail.enable::
Shawn O. Pearce2e4573b2009-06-02 09:09:50 -07002746+
2747If false Gerrit will not send email messages, for any reason,
2748and all other properties of section sendemail are ignored.
2749+
2750By default, true, allowing notifications to be sent.
2751
Bruce Zua7e34312014-04-01 17:35:41 +08002752[[sendemail.connectTimeout]]sendemail.connectTimeout::
2753+
2754The connection timeout of opening a socket connected to a
2755remote SMTP server.
2756+
2757Values can be specified using standard time unit abbreviations
2758('ms', 'sec', 'min', etc.).
2759If no unit is specified, milliseconds is assumed.
2760+
2761Default is 0. A timeout of zero is interpreted as an infinite
2762timeout. The connection will then block until established or
2763an error occurs.
2764
2765[[sendemail.threadPoolSize]]sendemail.threadPoolSize::
2766+
2767Maximum size of thread pool in which the review comments
2768notifications are sent out asynchronously.
2769+
2770By default, 1.
2771
Shawn O. Pearce5c31bd72009-09-10 18:13:33 -07002772[[sendemail.from]]sendemail.from::
2773+
2774Designates what name and address Gerrit will place in the From
2775field of any generated email messages. The supported values are:
2776+
2777* `USER`
2778+
2779Gerrit will set the From header to use the current user's
David Pursehouse92463562013-06-24 10:16:28 +09002780Full Name and Preferred Email. This may cause messages to be
Shawn O. Pearce5c31bd72009-09-10 18:13:33 -07002781classified as spam if the user's domain has SPF or DKIM enabled
2782and <<sendemail.smtpServer,sendemail.smtpServer>> is not a trusted
2783relay for that domain.
2784+
2785* `MIXED`
2786+
Edwin Kempincdb0e002011-09-08 14:23:30 +02002787Shorthand for `${user} (Code Review) <review@example.com>` where
Shawn O. Pearce5c31bd72009-09-10 18:13:33 -07002788`review@example.com` is the same as <<user.email,user.email>>.
2789See below for a description of how the replacement is handled.
2790+
2791* `SERVER`
2792+
2793Gerrit will set the From header to the same name and address
2794it records in any commits Gerrit creates. This is set by
2795<<user.name,user.name>> and <<user.email,user.email>>, or guessed
2796from the local operating system.
2797+
2798* 'Code Review' `<`'review'`@`'example.com'`>`
2799+
2800If set to a name and email address in brackets, Gerrit will use
2801this name and email address for any messages, overriding the name
2802that may have been selected for commits by user.name and user.email.
Edwin Kempincdb0e002011-09-08 14:23:30 +02002803Optionally, the name portion may contain the placeholder `${user}`,
Shawn O. Pearce5c31bd72009-09-10 18:13:33 -07002804which is replaced by the Full Name of the current user.
2805
2806+
2807By default, MIXED.
2808
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002809[[sendemail.smtpServer]]sendemail.smtpServer::
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07002810+
2811Hostname (or IP address) of a SMTP server that will relay
2812messages generated by Gerrit to end users.
2813+
2814By default, 127.0.0.1 (aka localhost).
2815
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002816[[sendemail.smtpServerPort]]sendemail.smtpServerPort::
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07002817+
2818Port number of the SMTP server in sendemail.smtpserver.
2819+
Shawn O. Pearce6e9a83f2009-11-02 10:30:48 -08002820By default, 25, or 465 if smtpEncryption is 'ssl'.
2821
2822[[sendemail.smtpEncryption]]sendemail.smtpEncryption::
2823+
2824Specify the encryption to use, either 'ssl' or 'tls'.
2825+
2826By default, 'none', indicating no encryption is used.
2827
2828[[sendemail.sslVerify]]sendemail.sslVerify::
2829+
2830If false and sendemail.smtpEncryption is 'ssl' or 'tls', Gerrit
2831will not verify the server certificate when it connects to send
2832an email message.
2833+
2834By default, true, requiring the certificate to be verified.
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07002835
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002836[[sendemail.smtpUser]]sendemail.smtpUser::
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07002837+
2838User name to authenticate with, if required for relay.
2839
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002840[[sendemail.smtpPass]]sendemail.smtpPass::
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07002841+
2842Password for the account named by sendemail.smtpUser.
2843
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002844[[sendemail.allowrcpt]]sendemail.allowrcpt::
Shawn O. Pearce219a8ee2009-06-01 18:13:57 -07002845+
2846If present, each value adds one entry to the whitelist of email
2847addresses that Gerrit can send email to. If set to a complete
2848email address, that one address is added to the white list.
2849If set to a domain name, any address at that domain can receive
2850email from Gerrit.
2851+
2852By default, unset, permitting delivery to any email address.
2853
Shawn O. Pearce02aacbc2012-06-12 13:44:22 -07002854[[sendemail.includeDiff]]sendemail.includeDiff::
2855+
Bruce Zueb00ff32012-11-27 17:38:10 +08002856If true, new change emails and merged change emails from Gerrit
2857will include the complete unified diff of the change.
2858Variable maxmimumDiffSize places an upper limit on how large the
2859email can get when this option is enabled.
Shawn O. Pearce02aacbc2012-06-12 13:44:22 -07002860+
2861By default, false.
2862
Shawn O. Pearce28a950b2012-06-12 14:36:34 -07002863[[sendemail.maximumDiffSize]]sendemail.maximumDiffSize::
2864+
2865Largest size of unified diff output to include in an email. When
2866the diff exceeds this size the file paths will be listed instead.
2867Standard byte unit suffixes are supported.
2868+
2869By default, 256 KiB.
2870
Alex Blewitt9cca7402011-02-11 01:39:30 +00002871[[sendemail.importance]]sendemail.importance::
2872+
2873If present, emails sent from Gerrit will have the given level
2874of importance. Valid values include 'high' and 'low', which
2875email clients will render in different ways.
2876+
2877By default, unset, so no Importance header is generated.
2878
2879[[sendemail.expiryDays]]sendemail.expiryDays::
2880+
2881If present, emails sent from Gerrit will expire after the given
2882number of days. This will add the Expiry-Date header and
2883email clients may expire or expunge mails whose Expiry-Date
2884header is in the past. This should be a positive non-zero
2885number indicating how many days in the future the mails
2886should expire.
2887+
2888By default, unset, so no Expiry-Date header is generated.
2889
Shawn O. Pearcedba97642011-09-07 20:12:31 -07002890
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08002891[[site]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002892=== Section site
Shawn O. Pearcedba97642011-09-07 20:12:31 -07002893
Shawn O. Pearcedba97642011-09-07 20:12:31 -07002894[[site.refreshHeaderFooter]]site.refreshHeaderFooter::
2895+
2896If true the server checks the site header, footer and CSS files for
2897updated versions. If false, a server restart is required to change
2898any of these resources. Default is true, allowing automatic reloads.
2899
Shawn O. Pearce6bd04fd2012-04-05 14:39:22 -07002900[[site.enableDeprecatedQuery]]site.enableDeprecatedQuery::
2901+
2902If true the deprecated `/query` URL is available to return JSON
2903and text results for changes. If false, the URL is disabled and
2904returns 404 to clients. Default is true, enabling `/query`.
2905
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08002906[[ssh-alias]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002907=== Section ssh-alias
Shawn O. Pearce521380a2012-05-11 14:57:56 -07002908
2909Variables in section ssh-alias permit the site administrator to alias
2910another command from Gerrit or a plugin into the `gerrit` command
2911namespace. To alias `replication start` to `gerrit replicate`:
2912
2913----
2914[ssh-alias]
2915 replicate = replication start
2916----
Shawn O. Pearcedba97642011-09-07 20:12:31 -07002917
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08002918[[sshd]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002919=== Section sshd
Shawn O. Pearce9410f2c2009-05-14 10:26:47 -07002920
David Ostrovskydc7318b2014-03-13 00:14:44 +01002921[[sshd.backend]]sshd.backend::
2922+
2923Starting from version 0.9.0 Apache SSHD project added support for NIO2
2924IoSession. To use the new NIO2 session the `backend` option must be set
2925to `NIO2`.
2926+
2927By default, `MINA`.
2928
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002929[[sshd.listenAddress]]sshd.listenAddress::
Shawn O. Pearce1d3cb4442009-05-30 14:03:31 -07002930+
2931Specifies the local addresses the internal SSHD should listen
2932for connections on. The following forms may be used to specify
2933an address. In any form, `:'port'` may be omitted to use the
2934default of 29418.
2935+
2936* 'hostname':'port' (for example `review.example.com:29418`)
2937* 'IPv4':'port' (for example `10.0.0.1:29418`)
2938* ['IPv6']:'port' (for example `[ff02::1]:29418`)
Edwin Kempincdb0e002011-09-08 14:23:30 +02002939* *:'port' (for example `*:29418`)
Shawn O. Pearce1d3cb4442009-05-30 14:03:31 -07002940
2941+
2942If multiple values are supplied, the daemon will listen on all
2943of them.
2944+
Shawn O. Pearce6af6f5f2010-06-08 17:38:43 -07002945To disable the internal SSHD, set listenAddress to `off`.
2946+
Shawn O. Pearce1d3cb4442009-05-30 14:03:31 -07002947By default, *:29418.
2948
James Y Knight910bd862011-01-11 20:05:56 -05002949[[sshd.advertisedAddress]]sshd.advertisedAddress::
2950+
2951Specifies the addresses clients should be told to connect to.
2952This may differ from sshd.listenAddress if a firewall based port
2953redirector is being used, making Gerrit appear to answer on port
295422. The following forms may be used to specify an address. In any
2955form, `:'port'` may be omitted to use the default SSH port of 22.
2956+
2957* 'hostname':'port' (for example `review.example.com:22`)
2958* 'IPv4':'port' (for example `10.0.0.1:29418`)
2959* ['IPv6']:'port' (for example `[ff02::1]:29418`)
2960
2961+
2962If multiple values are supplied, the daemon will advertise all
2963of them.
2964+
2965By default, sshd.listenAddress.
2966
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002967[[sshd.tcpKeepAlive]]sshd.tcpKeepAlive::
Shawn O. Pearcefc9081f2009-05-14 10:26:59 -07002968+
2969If true, enables TCP keepalive messages to the other side, so
2970the daemon can terminate connections if the peer disappears.
2971+
David Ostrovskye5b7f1a2013-10-23 21:10:39 +02002972Only effective when `sshd.backend` is set to `MINA`.
2973+
Shawn O. Pearcefc9081f2009-05-14 10:26:59 -07002974By default, true.
2975
Shawn O. Pearce1a4580b2009-11-19 17:37:10 -08002976[[sshd.threads]]sshd.threads::
2977+
2978Number of threads to use when executing SSH command requests.
2979If additional requests are received while all threads are busy they
David Pursehouse221d4f62012-06-08 17:38:08 +09002980are queued and serviced in a first-come-first-served order.
Shawn O. Pearce1a4580b2009-11-19 17:37:10 -08002981+
2982By default, 1.5x the number of CPUs available to the JVM.
2983
Nico Sallembienfc53f7f2010-05-18 16:40:10 -07002984[[sshd.batchThreads]]sshd.batchThreads::
2985+
2986Number of threads to allocate for SSH command requests from
Fredrik Luthander46843022012-03-13 16:11:02 +01002987link:access-control.html#non-interactive_users[non-interactive users].
2988If equals to 0, then all non-interactive requests are executed in the same
2989queue as interactive requests.
Nico Sallembienfc53f7f2010-05-18 16:40:10 -07002990+
2991Any other value will remove the number of threads from the queue
2992allocated to interactive users, and create a separate thread pool
2993of the requested size, which will be used to run commands from
2994non-interactive users.
2995+
2996If the number of threads requested for non-interactive users is larger
2997than the total number of threads allocated in sshd.threads, then the
David Pursehouse92463562013-06-24 10:16:28 +09002998value of sshd.threads is increased to accommodate the requested value.
Nico Sallembienfc53f7f2010-05-18 16:40:10 -07002999+
3000By default, 0.
3001
Kenny Root15ac1b82010-02-24 00:29:20 -08003002[[sshd.streamThreads]]sshd.streamThreads::
3003+
3004Number of threads to use when formatting events to asynchronous
3005streaming clients. Event formatting is multiplexed onto this thread
3006pool by a simple FIFO scheduling system.
3007+
3008By default, 1 plus the number of CPUs available to the JVM.
3009
Edwin Kempinb5df3b82011-10-10 11:31:14 +02003010[[sshd.commandStartThreads]]sshd.commandStartThreads::
Shawn O. Pearced6296552011-05-15 13:56:30 -07003011+
3012Number of threads used to parse a command line submitted by a client
3013over SSH for execution, create the internal data structures used by
3014that command, and schedule it for execution on another thread.
3015+
3016By default, 2.
3017
Shawn O. Pearce8a0bf362010-11-05 17:49:41 -07003018[[sshd.maxAuthTries]]sshd.maxAuthTries::
3019+
3020Maximum number of authentication attempts before the server
3021disconnects the client. Each public key that a client has loaded
3022into its local agent counts as one auth request. Users can work
3023around the server's limit by loading less keys into their agent,
3024or selecting a specific key in their `~/.ssh/config` file with
3025the `IdentityFile` option.
3026+
3027By default, 6.
3028
3029[[sshd.loginGraceTime]]sshd.loginGraceTime::
3030+
3031Time in seconds that a client has to authenticate before the server
3032automatically terminates their connection. Values should use common
3033unit suffixes to express their setting:
3034+
3035* s, sec, second, seconds
3036* m, min, minute, minutes
3037* h, hr, hour, hours
3038* d, day, days
3039
3040+
3041By default, 2 minutes.
3042
Christian Aistleitner3d794592013-04-08 00:19:40 +02003043[[sshd.idleTimeout]]sshd.idleTimeout::
3044+
3045Time in seconds after which the server automatically terminates idle
3046connections (or 0 to disable closing of idle connections). Values
3047should use common unit suffixes to express their setting:
3048+
3049* s, sec, second, seconds
3050* m, min, minute, minutes
3051* h, hr, hour, hours
3052* d, day, days
3053
3054+
3055By default, 0.
3056
Shawn O. Pearce8a0bf362010-11-05 17:49:41 -07003057[[sshd.maxConnectionsPerUser]]sshd.maxConnectionsPerUser::
3058+
3059Maximum number of concurrent SSH sessions that a user account
3060may open at one time. This is the number of distinct SSH logins
David Pursehouse221d4f62012-06-08 17:38:08 +09003061that each user may have active at one time, and is not related to
Shawn O. Pearce8a0bf362010-11-05 17:49:41 -07003062the number of commands a user may issue over a single connection.
3063If set to 0, there is no limit.
3064+
3065By default, 64.
3066
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07003067[[sshd.cipher]]sshd.cipher::
Shawn O. Pearce0bf2f522009-05-14 11:02:03 -07003068+
3069Available ciphers. To permit multiple ciphers, specify multiple
3070`sshd.cipher` keys in the configuration file, one cipher name
3071per key. Cipher names starting with `+` are enabled in addition
3072to the default ciphers, cipher names starting with `-` are removed
3073from the default cipher set.
3074+
3075Supported ciphers: aes128-cbc, aes128-cbc, aes256-cbc, blowfish-cbc,
30763des-cbc, none.
3077+
3078By default, all supported ciphers except `none` are available.
3079
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07003080[[sshd.mac]]sshd.mac::
Shawn O. Pearce0bf2f522009-05-14 11:02:03 -07003081+
3082Available MAC (message authentication code) algorithms. To permit
3083multiple algorithms, specify multiple `sshd.mac` keys in the
3084configuration file, one MAC per key. MAC names starting with `+`
3085are enabled in addition to the default MACs, MAC names starting with
3086`-` are removed from the default MACs.
3087+
3088Supported MACs: hmac-md5, hmac-md5-96, hmac-sha1, hmac-sha1-96.
3089+
3090By default, all supported MACs are available.
3091
Alex Blewitt7efb06f2013-04-01 12:46:48 -04003092[[sshd.kerberosKeytab]]sshd.kerberosKeytab::
3093+
3094Enable kerberos authentication for SSH connections. To permit
3095kerberos authentication, the server must have a host principal
3096(see `sshd.kerberosPrincipal`) which is acquired from a keytab.
3097This must be provisioned by the kerberos administrators, and is
3098typically installed into `/etc/krb5.keytab` on host machines.
3099+
3100The keytab must contain at least one `host/` principal, typically
3101using the host's canonical name. If it does not use the
3102canonical name, the `sshd.kerberosPrincipal` should be configured
3103with the correct name.
3104+
3105By default, not set and so kerberos authentication is not enabled.
3106
3107[[sshd.kerberosPrincipal]]sshd.kerberosPrincipal::
3108+
3109If kerberos authentication is enabled with `sshd.kerberosKeytab`,
3110instead use the given principal name instead of the default.
3111If the principal does not begin with `host/` a warning message is
3112printed and may prevent successful authentication.
3113+
3114This may be useful if the host is behind an IP load balancer or
3115other SSH forwarding systems, since the principal name is constructed
3116by the client and must match for kerberos authentication to work.
3117+
3118By default, `host/canonical.host.name`
3119
Shawn Pearce318bfca2013-10-17 22:15:38 -07003120[[sshd.requestLog]]sshd.requestLog::
3121+
3122Enable (or disable) the `'$site_path'/logs/sshd_log` request log.
3123If enabled, a request log file is written out by the SSH daemon.
3124+
David Ostrovsky8e4a9902013-11-19 23:57:48 +01003125`log4j.appender` with the name `sshd_log` can be configured to overwrite
3126programmatic configuration.
3127+
Shawn Pearce318bfca2013-10-17 22:15:38 -07003128By default, true.
3129
Gustaf Lundh6f721702014-10-06 16:31:57 +02003130[[sshd.rekeyBytesLimit]]sshd.rekeyBytesLimit::
3131+
3132Sshd Mina will issue a rekeying after a certain amount of data.
3133This configuration option allows you to tweak that setting.
3134+
3135By default, 1073741824 (bytes, 1GB).
3136+
3137The rekeyBytesLimit cannot be set to lower than 32.
3138
3139[[sshd.rekeyTimeLimit]]sshd.rekeyTimeLimit::
3140+
3141Sshd Mina will issue a rekeying after a certain amount of time.
3142This configuration option allows you to tweak that setting.
3143+
3144By default, 1h.
3145+
3146Set to 0 to disable this check.
3147
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08003148[[suggest]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08003149=== Section suggest
Shawn O. Pearce07bd6fb2011-04-29 19:15:47 -07003150
Dave Borowitz1ae8c532012-03-09 18:39:40 -08003151[[suggest.accounts]]suggest.accounts::
Shawn O. Pearce07bd6fb2011-04-29 19:15:47 -07003152+
Dave Borowitz45baa892012-02-23 16:43:05 -08003153If `true`, visible user accounts (according to the value of
3154`accounts.visibility`) will be offered as completion suggestions
3155when adding a reviewer to a change, or a user to a group.
Shawn O. Pearce07bd6fb2011-04-29 19:15:47 -07003156+
Dave Borowitz45baa892012-02-23 16:43:05 -08003157If `false`, account suggestion is disabled.
Shawn O. Pearce07bd6fb2011-04-29 19:15:47 -07003158+
Dave Borowitz45baa892012-02-23 16:43:05 -08003159Older configurations may also have one of the `accounts.visibility`
3160values for this field, including `OFF` as a synonym for `NONE`. If
3161`accounts.visibility` is also set, that value overrides this one;
3162otherwise, this value applies to both `suggest.accounts` and
3163`accounts.visibility`.
Edwin Kempin42488812011-05-20 03:11:43 +02003164+
Dave Borowitz45baa892012-02-23 16:43:05 -08003165New configurations should prefer the boolean value for this field
3166and an enum value for `accounts.visibility`.
Shawn O. Pearce07bd6fb2011-04-29 19:15:47 -07003167
Sven Selberg42d9d292014-08-13 11:20:11 +02003168[[suggest.maxSuggestedReviewers]]suggest.maxSuggestedReviewers::
3169+
3170The maximum numbers of reviewers suggested.
3171+
3172By default 10.
3173
3174[[suggest.fullTextSearch]]suggest.fullTextSearch::
3175+
3176If 'true' the reviewer completion suggestions will be based on a full text search.
3177
Edwin Kempinf957dc22012-10-19 20:41:18 +02003178[[suggest.from]]suggest.from::
3179+
3180The number of characters that a user must have typed before suggestions
3181are provided. If set to 0, suggestions are always provided.
3182+
3183By default 0.
3184
Sven Selberg42d9d292014-08-13 11:20:11 +02003185[[suggest.fullTextSearchMaxMatches]]suggest.fullTextSearchMaxMatches::
3186+
3187The maximum number of matches evaluated for change access when using full text search.
3188+
3189Making this number too high could have a negative impact on performance.
3190+
3191By default 100.
3192
3193
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08003194[[theme]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08003195=== Section theme
Shawn O. Pearce2ba3ab42010-02-25 12:10:10 -08003196
3197[[theme.backgroundColor]]theme.backgroundColor::
3198+
3199Background color for the page, and major data tables like the all
3200open changes table or the account dashboard. The value must be a
3201valid HTML hex color code, or standard color name.
3202+
Chad Horohoebbdf7482012-11-13 18:23:15 -08003203By default white, `FFFFFF`.
Shawn O. Pearce2ba3ab42010-02-25 12:10:10 -08003204
3205[[theme.topMenuColor]]theme.topMenuColor::
3206+
3207This is the color of the main menu bar at the top of the page.
3208The value must be a valid HTML hex color code, or standard color
Chad Horohoebbdf7482012-11-13 18:23:15 -08003209name.
3210+
3211By default white, `FFFFFF`.
Shawn O. Pearce2ba3ab42010-02-25 12:10:10 -08003212
3213[[theme.textColor]]theme.textColor::
3214+
3215Text color for the page, and major data tables like the all
3216open changes table or the account dashboard. The value must be a
3217valid HTML hex color code, or standard color name.
3218+
Chad Horohoebbdf7482012-11-13 18:23:15 -08003219By default dark grey, `353535`.
Shawn O. Pearce2ba3ab42010-02-25 12:10:10 -08003220
3221[[theme.trimColor]]theme.trimColor::
3222+
3223Primary color used as a background color behind text. This is
3224the color of the main menu bar at the top, of table headers,
3225and of major UI areas that we want to offset from other portions
3226of the page. The value must be a valid HTML hex color code, or
3227standard color name.
3228+
Chad Horohoebbdf7482012-11-13 18:23:15 -08003229By default a light grey, `EEEEEE`.
Shawn O. Pearce2ba3ab42010-02-25 12:10:10 -08003230
3231[[theme.selectionColor]]theme.selectionColor::
3232+
3233Background color used within a trimColor area to denote the currently
3234selected tab, or the background color used in a table to denote the
3235currently selected row. The value must be a valid HTML hex color
3236code, or standard color name.
3237+
Chad Horohoebbdf7482012-11-13 18:23:15 -08003238By default a pale blue, `D8EDF9`.
Shawn O. Pearce2ba3ab42010-02-25 12:10:10 -08003239
Andrew Hutchingscfd7abb2012-06-29 10:57:05 +01003240[[theme.changeTableOutdatedColor]]theme.changeTableOutdatedColor::
3241+
3242Background color used for patch outdated messages. The value must be
3243a valid HTML hex color code, or standard color name.
3244+
Edwin Kempinb0347332012-07-17 10:14:32 +02003245By default a shade of red, `F08080`.
Andrew Hutchingscfd7abb2012-06-29 10:57:05 +01003246
3247[[theme.tableOddRowColor]]theme.tableOddRowColor::
3248+
3249Background color for tables such as lists of open reviews for odd
3250rows. This is so you can have a different color for odd and even
3251rows of the table. The value must be a valid HTML hex color code,
3252or standard color name.
3253+
3254By default transparent.
3255
3256[[theme.tableEvenRowColor]]theme.tableEvenRowColor::
3257+
3258Background color for tables such as lists of open reviews for even
3259rows. This is so you can have a different color for odd and even
3260rows of the table. The value must be a valid HTML hex color code,
3261or standard color name.
3262+
3263By default transparent.
3264
Shawn O. Pearcea83bb1c2011-05-20 08:46:48 -07003265A different theme may be used for signed-in vs. signed-out user status
3266by using the "signed-in" and "signed-out" theme sections. Variables
3267not specified in a section are inherited from the default theme.
3268
3269----
3270[theme]
3271 backgroundColor = FFFFFF
3272[theme "signed-in"]
3273 backgroundColor = C0C0C0
3274[theme "signed-out"]
3275 backgroundColor = 00FFFF
3276----
3277
David Ostrovsky117c6032013-08-09 00:44:56 +02003278As example, here is the theme configuration to have the old green look:
3279
3280----
3281[theme]
3282 backgroundColor = FCFEEF
3283 textColor = 000000
3284 trimColor = D4E9A9
3285 selectionColor = FFFFCC
3286 topMenuColor = D4E9A9
3287 changeTableOutdatedColor = F08080
3288[theme "signed-in"]
3289 backgroundColor = FFFFFF
3290----
3291
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08003292[[trackingid]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08003293=== Section trackingid
Goran Lungberg04132a12010-06-15 17:20:37 -07003294
Shawn O. Pearcee800b1e2010-06-16 17:33:43 -07003295Tagged footer lines containing references to external
3296tracking systems, parsed out of the commit message and
Shawn Pearceff61c8a2013-10-07 19:35:53 -07003297saved in Gerrit's database.
3298
3299After making changes to this section, existing changes
Shawn Pearce9f4de522013-11-29 11:57:53 -08003300must be reindexed with link:pgm-reindex.html[reindex].
Goran Lungberg04132a12010-06-15 17:20:37 -07003301
Edwin Kempinbb421f12011-08-25 11:19:00 +02003302The tracking ids are searchable using tr:<tracking id> or
Shawn O. Pearce91763a02010-06-16 15:39:33 -07003303bug:<tracking id>.
Goran Lungberg04132a12010-06-15 17:20:37 -07003304
3305----
3306[trackingid "jira-bug"]
3307 footer = Bugfix:
3308 match = JRA\\d{2,8}
3309 system = JIRA
3310
3311[trackingid "jira-feature"]
3312 footer = Feature
3313 match = JRA(\\d{2,8})
3314 system = JIRA
3315----
3316
3317[[trackingid.name.footer]]trackingid.<name>.footer::
3318+
3319A prefix tag that identify the footer line to parse for tracking ids.
Kevin Degi9af42ea2011-08-01 15:54:42 -06003320Several trackingid entries can have the same footer tag. A single
3321trackingid entry can have multiple footer tags. If multiple footer
3322tags are specified, each tag will be parsed separately.
Goran Lungberg04132a12010-06-15 17:20:37 -07003323(the trailing ":" is optional)
3324
3325[[trackingid.name.match]]trackingid.<name>.match::
3326+
Magnus Bäcke5611832011-02-02 08:57:15 +01003327A link:http://download.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html[standard
3328Java regular expression (java.util.regex)] used to match the
3329external tracking id part of the footer line. The match can
3330result in several entries in the DB. If grouping is used in the
3331regex the first group will be interpreted as the tracking id.
Christian Aistleitner5cec3682013-03-16 23:02:37 +01003332Tracking ids longer than 32 characters will be ignored.
Goran Lungberg04132a12010-06-15 17:20:37 -07003333+
3334The configuration file parser eats one level of backslashes, so the
3335character class `\s` requires `\\s` in the configuration file. The
3336parser also terminates the line at the first `#`, so a match
3337expression containing # must be wrapped in double quotes.
3338
3339[[trackingid.name.system]]trackingid.<name>.system::
3340+
David Pursehouse221d4f62012-06-08 17:38:08 +09003341The name of the external tracking system (maximum 10 characters).
Goran Lungberg04132a12010-06-15 17:20:37 -07003342It is possible to have several trackingid entries for the same
3343tracking system.
3344
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08003345[[transfer]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08003346=== Section transfer
Shawn O. Pearce6e4dfdd2010-05-12 17:26:08 -07003347
3348[[transfer.timeout]]transfer.timeout::
3349+
3350Number of seconds to wait for a single network read or write
3351to complete before giving up and declaring the remote side is
3352not responding. If 0, there is no timeout, and this server will
3353wait indefinitely for a transfer to finish.
3354+
3355A timeout should be large enough to mostly transfer the objects to
3356the other side. 1 second may be too small for larger projects,
3357especially over a WAN link, while 10-30 seconds is a much more
3358reasonable timeout value.
3359+
3360Defaults to 0 seconds, wait indefinitely.
3361
lincoln2be11602010-07-05 10:53:25 -03003362
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08003363[[upload]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08003364=== Section upload
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08003365
lincoln2be11602010-07-05 10:53:25 -03003366Sets the group of users allowed to execute 'upload-pack' on the
3367server, 'upload-pack' is what runs on the server during a user's
3368fetch, clone or repo sync command.
3369
3370----
3371[upload]
3372 allowGroup = GROUP_ALLOWED_TO_EXECUTE
3373 allowGroup = YET_ANOTHER_GROUP_ALLOWED_TO_EXECUTE
3374----
3375
3376[[upload.allowGroup]]upload.allowGroup::
3377+
3378Name of the groups of users that are allowed to execute 'upload-pack'
3379on the server. One or more groups can be set.
3380+
3381If no groups are added, any user will be allowed to execute
3382'upload-pack' on the server.
3383
3384
Yuxuan 'fishy' Wang3fba03a2013-12-10 15:08:11 -08003385[[user]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08003386=== Section user
Shawn O. Pearce0a351912009-06-01 08:14:46 -07003387
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07003388[[user.name]]user.name::
Shawn O. Pearce0a351912009-06-01 08:14:46 -07003389+
3390Name that Gerrit calls itself in Git when it creates a new Git
3391commit, such as a merge during change submission.
3392+
3393By default this is "Gerrit Code Review".
3394
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07003395[[user.email]]user.email::
Shawn O. Pearce0a351912009-06-01 08:14:46 -07003396+
3397Email address that Gerrit refers to itself as when it creates a
3398new Git commit, such as a merge commit during change submission.
3399+
3400If not set, Gerrit generates this as "gerrit@`hostname`", where
3401`hostname` is the hostname of the system Gerrit is running on.
3402+
3403By default, not set, generating the value at startup.
3404
Edwin Kempin0e02ded2011-09-16 15:10:14 +02003405[[user.anonymousCoward]]user.anonymousCoward::
3406+
David Pursehousea1d633b2014-05-02 17:21:02 +09003407Username that is displayed in the Gerrit Web UI and in e-mail
Edwin Kempin0e02ded2011-09-16 15:10:14 +02003408notifications if the full name of the user is not set.
3409+
3410By default "Anonymous Coward" is used.
3411
Shawn O. Pearce0bf2f522009-05-14 11:02:03 -07003412
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08003413== File `etc/secure.config`
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08003414The optional file `'$site_path'/etc/secure.config` overrides (or
3415supplements) the settings supplied by `'$site_path'/etc/gerrit.config`.
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08003416The file should be readable only by the daemon process and can be
3417used to contain private configuration entries that wouldn't normally
3418be exposed to everyone.
3419
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08003420Sample `etc/secure.config`:
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08003421----
Shawn O. Pearce34f38cf2011-06-16 19:18:54 -07003422[auth]
3423 registerEmailPrivateKey = 2zHNrXE2bsoylzUqDxZp0H1cqUmjgWb6
Brad Larson3a6f0772012-07-25 11:41:22 -05003424 restTokenPrivateKey = 7e40PzCjlUKOnXATvcBNXH6oyiu+r0dFk2c=
Shawn O. Pearce34f38cf2011-06-16 19:18:54 -07003425
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08003426[database]
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08003427 username = webuser
3428 password = s3kr3t
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08003429
3430[ldap]
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08003431 password = l3tm3srch
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08003432
3433[httpd]
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08003434 sslKeyPassword = g3rr1t
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08003435
3436[sendemail]
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08003437 smtpPass = sp@m
Shawn O. Pearce7929d872011-05-15 13:33:15 -07003438
3439[remote "bar"]
3440 password = s3kr3t
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08003441----
3442
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08003443== File `etc/peer_keys`
Johan Bjork3e5ee302012-01-27 17:59:54 +01003444
3445The optional file `'$site_path'/etc/peer_keys` controls who can
3446login as the 'Gerrit Code Review' user, required for the link:cmd-suexec.html[suexec]
3447command.
3448
3449The format is one Base-64 encoded public key per line.
3450
3451
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08003452== Database system_config
Shawn O. Pearce7b405712009-05-08 18:27:53 -07003453
3454Several columns in the `system_config` table within the metadata
3455database may be set to control how Gerrit behaves.
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08003456
3457[NOTE]
3458The contents of the `system_config` table are cached at startup
3459by Gerrit. If you modify any columns in this table, Gerrit needs
3460to be restarted before it will use the new values.
3461
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08003462=== Configurable Parameters
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08003463
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07003464site_path::
3465+
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08003466Local filesystem directory holding the site customization assets.
3467Placing this directory under version control and/or backup is a
3468good idea.
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07003469+
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08003470Files in this directory provide additional configuration.
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07003471+
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08003472Other files support site customization.
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07003473+
Dave Borowitz1e49e142013-04-09 12:14:57 -07003474* link:config-themes.html[Themes]
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08003475
Shawn O. Pearce5500e692009-05-28 15:55:01 -07003476GERRIT
3477------
3478Part of link:index.html[Gerrit Code Review]
Yuxuan 'fishy' Wang99cb68d2013-10-31 17:26:00 -07003479
3480SEARCHBOX
3481---------