blob: 135c3025176e8f72107fe8562569ba2e80eb84a4 [file] [log] [blame]
Shawn O. Pearcee31d02c2009-12-08 12:21:37 -08001Gerrit Code Review - Configuration
2==================================
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08003
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08004File `etc/gerrit.config`
5------------------------
Shawn O. Pearce51967cd2009-05-08 19:46:57 -07006
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08007The optional file `'$site_path'/etc/gerrit.config` is a Git-style
8config file that controls many host specific settings for Gerrit.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -07009
10[NOTE]
Shawn O. Pearcec5fed822009-11-17 16:10:10 -080011The contents of the `etc/gerrit.config` file are cached at startup
Brandon Casey4a21add2011-07-05 13:14:18 -050012by Gerrit. If you modify any properties in this file, Gerrit needs
Shawn O. Pearce51967cd2009-05-08 19:46:57 -070013to be restarted before it will use the new values.
14
Shawn O. Pearcec5fed822009-11-17 16:10:10 -080015Sample `etc/gerrit.config`:
Shawn O. Pearce51967cd2009-05-08 19:46:57 -070016----
17[core]
Shawn O. Pearce9d342a42009-12-16 15:49:05 -080018 packedGitLimit = 200 m
Shawn O. Pearce51967cd2009-05-08 19:46:57 -070019
20[cache]
Shawn O. Pearce9d342a42009-12-16 15:49:05 -080021 directory = /var/cache/gerrit2
Shawn O. Pearce51967cd2009-05-08 19:46:57 -070022----
23
Dave Borowitz45baa892012-02-23 16:43:05 -080024[[accounts]]Section accounts
25~~~~~~~~~~~~~~~~~~~~~~~~~~~~
26
Matthias Sohnf3360662012-04-05 15:42:52 +020027[[accounts.visibility]]accounts.visibility::
Dave Borowitz45baa892012-02-23 16:43:05 -080028+
29Controls visibility of other users' dashboard pages and
30completion suggestions to web users.
31+
32If `ALL`, all users are visible to all other users, even
33anonymous users.
34+
35If `SAME_GROUP`, only users who are also members of a group the
36current user is a member of are visible.
37+
38If `VISIBLE_GROUP`, only users who are members of at least one group
39that is visible to the current user are visible.
40+
41If `NONE`, no users other than the current user are visible.
42+
43Default is `ALL`.
44
Edwin Kempin49cb3e12011-06-29 14:35:14 +020045[[addreviewer]]Section addreviewer
46~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
47
48[[addreviewer.maxWithoutConfirmation]]addreviewer.maxWithoutConfirmation::
49+
50The maximum number of reviewers a user can add at once by adding a
51group as reviewer without being asked to confirm the operation.
52+
53If set to 0, the user will never be asked to confirm adding a group
54as reviewer.
55+
56Default is 10.
Edwin Kempin5e65d9b2011-07-08 07:35:48 +020057+
58This setting only applies for adding reviewers in the Gerrit WebUI,
59but is ignored when adding reviewers with the
Edwin Kempin33e92d02011-07-11 22:00:57 +020060link:cmd-set-reviewers.html[set-reviewers] command.
Edwin Kempin49cb3e12011-06-29 14:35:14 +020061
62[[addreviewer.maxAllowed]]addreviewer.maxAllowed::
63+
64The maximum number of reviewers a user can add at once by adding a
65group as reviewer.
66+
67If set to 0, there is no limit for the number of reviewers that can
68be added at once by adding a group as reviewer.
69+
70Default is 20.
71
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -070072[[auth]]Section auth
73~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -070074
75See also link:config-sso.html[SSO configuration].
76
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -070077[[auth.type]]auth.type::
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -070078+
Shawn O. Pearce2920ef32009-08-03 08:03:34 -070079Type of user authentication employed by Gerrit. The supported
80values are:
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -070081+
82* `OpenID`
83+
84The default setting. Gerrit uses any valid OpenID
85provider chosen by the end-user. For more information see
Shawn O. Pearce2920ef32009-08-03 08:03:34 -070086http://openid.net/[openid.net].
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -070087+
James E. Blairca8bc3b2011-12-21 18:12:26 +000088* `OpenID_SSO`
89+
90Supports OpenID from a single provider. There is no registration
91link, and the "Sign In" link sends the user directly to the provider's
92SSO entry point.
93+
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -070094* `HTTP`
95+
Shawn O. Pearce2920ef32009-08-03 08:03:34 -070096Gerrit relies upon data presented in the HTTP request. This includes
Edwin Kempinf1acbb82011-09-15 12:49:42 +020097HTTP basic authentication, or some types of commercial single-sign-on
Shawn O. Pearce2920ef32009-08-03 08:03:34 -070098solutions. With this setting enabled the authentication must
99take place in the web server or servlet container, and not from
100within Gerrit.
101+
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -0700102* `HTTP_LDAP`
103+
104Exactly like `HTTP` (above), but additionally Gerrit pre-populates
105a user's full name and email address based on information obtained
106from the user's account object in LDAP. The user's group membership
107is also pulled from LDAP, making any LDAP groups that a user is a
108member of available as groups in Gerrit.
109+
Sasa Zivkoveabc8972010-10-04 15:47:08 +0200110* `CLIENT_SSL_CERT_LDAP`
111+
112This authentication type is actually kind of SSO. Gerrit will configure
David Pursehouse221d4f62012-06-08 17:38:08 +0900113Jetty's SSL channel to request the client's SSL certificate. For this
Sasa Zivkoveabc8972010-10-04 15:47:08 +0200114authentication to work a Gerrit administrator has to import the root
115certificate of the trust chain used to issue the client's certificate
116into the <review-site>/etc/keystore.
117After the authentication is done Gerrit will obtain basic user
118registration (name and email) from LDAP, and some group memberships.
119Therefore, the "_LDAP" suffix in the name of this authentication type.
120This authentication type can only be used under hosted daemon mode, and
121the httpd.listenUrl must use https:// as the protocol.
122+
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+
143Unlike LDAP above, the username used to perform the LDAP simple bind
144request is the exact string supplied by 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 Pursehouse221d4f62012-06-08 17:38:08 +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
Shawn O. Pearced7c026d2009-08-05 20:11:22 -0700181set to OpenID (the default).
182+
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
199`auth.type` is set to "OPENID" or "OPENID_SSO".
200+
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+
248The SSO entry point URL. Only used if `auth.type` was set to
249OpenID_SSO.
250+
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 Pursehouse221d4f62012-06-08 17:38:08 +0900256or digest authentication. Only used if `auth.type` is set to HTTP.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700257
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700258[[auth.logoutUrl]]auth.logoutUrl::
Shawn O. Pearce12b5d842009-08-15 15:11:10 -0700259+
260URL to redirect a browser to after the end-user has clicked on the
261"Sign Out" link in the upper right corner. Organizations using an
262enterprise single-sign-on solution may want to redirect the browser
263to the SSO product's sign-out page.
264+
265If not set, the redirect returns to the list of all open changes.
266
Shawn O. Pearcec9d26b52009-12-16 08:05:27 -0800267[[auth.registerUrl]]auth.registerUrl::
268+
269Target for the "Register" link in the upper right corner. Used only
270when auth.type is `LDAP`.
271+
272If not set, no "Register" link is displayed.
273
Chad Horohoe65897082012-11-10 10:26:25 -0800274[[auth.registerText]]auth.registerText::
275+
276Text for the "Register" link in the upper right corner. Used only
277when auth.type is `LDAP`.
278+
279If not set, defaults to "Register".
280
David Pursehouse3d604492013-01-25 17:41:53 +0900281[[auth.editFullNameUrl]]auth.editFullNameUrl::
282+
283Target for the "Edit" button when the user is allowed to edit their
284full name.
285
286[[auth.httpPasswordUrl]]auth.httpPasswordUrl::
287+
288Target for the "Obtain Password" link. Used only when auth.type is
289`LDAP`, `LDAP_BIND` or `CUSTOM_EXTENSION`.
290+
291
Piotr Sikora7cec2f82011-02-26 12:57:30 +0000292[[auth.cookiePath]]auth.cookiePath::
293+
294Sets "path" attribute of the authentication cookie.
295+
296If not set, HTTP request's path is used.
297
298[[auth.cookieSecure]]auth.cookieSecure::
299+
300Sets "secure" flag of the authentication cookie. If true, cookies
301will be transmitted only over HTTPS protocol.
302+
303By default, false.
304
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700305[[auth.emailFormat]]auth.emailFormat::
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700306+
307Optional format string to construct user email addresses out of
Shawn O. Pearcef7e065e2009-09-26 20:01:10 -0700308user login names. Only used if auth.type is `HTTP`, `HTTP_LDAP`
309or `LDAP`.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700310+
Shawn O. Pearce44221bf2011-06-27 10:37:30 -0700311This value can be set to a format string, where `{0}` is replaced
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700312with the login name. E.g. "\{0\}+gerrit@example.com" with a user
313login name of "foo" will produce "foo+gerrit@example.com" during
314the first time user "foo" registers.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -0700315+
Shawn O. Pearcef7e065e2009-09-26 20:01:10 -0700316If the site is using `HTTP_LDAP` or `LDAP`, using this option is
317discouraged. Setting `ldap.accountEmailAddress` and importing the
318email address from the LDAP directory is generally preferred.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700319
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700320[[auth.contributorAgreements]]auth.contributorAgreements::
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700321+
322Controls whether or not the contributor agreement features are
323enabled for the Gerrit site. If enabled a user must complete a
324contributor agreement before they can upload changes.
325+
Marc Petit-Hugueninbbb85492012-12-03 11:11:00 -0800326If enabled, the admin must also add one or more
327link:config-cla.html[contributor-agreement sections]
328in project.config and create agreement files under
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700329`'$site_path'/static`, so users can actually complete one or
Grzegorz Kossakowski28e4e1b2009-09-23 11:33:34 -0700330more agreements.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700331+
332By default this is false (no agreements are used).
333
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700334auth.allowGoogleAccountUpgrade::
335+
Shawn O. Pearce48eea072009-08-31 10:53:12 -0700336Allows Google Account users to automatically update their Gerrit
337account when/if their Google Account OpenID identity token changes.
338Identity tokens can change if the server changes hostnames, or
339for other reasons known only to Google. The upgrade path works
340by matching users by email address if the identity is not present,
341and then changing the identity.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700342+
Shawn O. Pearce48eea072009-08-31 10:53:12 -0700343This setting also permits old Gerrit 1.x users to seamlessly upgrade
344from Google Accounts on Google App Engine to OpenID authentication.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700345+
Shawn O. Pearce48eea072009-08-31 10:53:12 -0700346Having this enabled incurs an extra database query when Google
Shawn O. Pearcee31d02c2009-12-08 12:21:37 -0800347Account users register with the Gerrit server.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700348+
349By default, unset/false.
350
Christian Halstricka3d88a52011-08-31 09:21:41 +0200351[[auth.trustContainerAuth]]auth.trustContainerAuth::
352+
353If true then it is the responsibility of the container hosting
354Gerrit to authenticate users. In this case Gerrit will blindly trust
355the container.
356+
357This parameter only affects git over http traffic. If set to false
358then Gerrit will do the authentication (using DIGEST authentication).
359+
360By default this is set to false.
361
Luca Milanesio42058842012-01-05 21:25:38 +0000362[[auth.gitBasicAuth]]auth.gitBasicAuth::
363+
364If true then Git over HTTP and HTTP/S traffic is authenticated using
365standard BasicAuth and credentials validated using the same auth
366method configured for Gerrit Web UI.
367+
368This parameter only affects git over http traffic. If set to false
369then Gerrit will authenticate through DIGEST authentication and
370the randomly generated HTTP password in Gerrit DB.
371+
372By default this is set to false.
373
Edwin Kempin4b9e5e72011-09-22 15:06:14 +0200374[[auth.userNameToLowerCase]]auth.userNameToLowerCase::
375+
376If set the username that is received to authenticate a git operation
377is converted to lower case for looking up the user account in Gerrit.
378+
379By setting this parameter a case insensitive authentication for the
380git operations can be achieved, if it is ensured that the usernames in
381Gerrit (scheme `username`) are stored in lower case (e.g. if the
382parameter link:#ldap.accountSshUserName[ldap.accountSshUserName] is
383set to `${sAMAccountName.toLowerCase}`). It is important that for all
384existing accounts this username is already in lower case. It is not
385possible to convert the usernames of the existing accounts to lower
386case because this would break the access to existing per-user
387branches.
388+
389This parameter only affects git over http and git over SSH traffic.
390+
391By default this is set to false.
392
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -0700393[[cache]]Section cache
394~~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700395
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700396[[cache.directory]]cache.directory::
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700397+
398Path to a local directory where Gerrit can write cached entities for
Shawn O. Pearce4b212282009-08-05 19:45:56 -0700399future lookup. This local disk cache is used to retain potentially
400expensive to compute information across restarts. If the location
401does not exist, Gerrit will try to create it.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700402+
Shawn O. Pearce4b212282009-08-05 19:45:56 -0700403If not absolute, the path is resolved relative to `$site_path`.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700404+
Shawn O. Pearce4b212282009-08-05 19:45:56 -0700405Default is unset, no disk cache.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700406
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700407[[cache.name.maxAge]]cache.<name>.maxAge::
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700408+
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700409Maximum age to keep an entry in the cache. Entries are removed from
410the cache and refreshed from source data every maxAge interval.
Shawn O. Pearced9c403e2009-08-19 08:35:41 -0700411Values should use common unit suffixes to express their setting:
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700412+
Shawn O. Pearced9c403e2009-08-19 08:35:41 -0700413* s, sec, second, seconds
414* m, min, minute, minutes
415* h, hr, hour, hours
416* d, day, days
417* w, week, weeks (`1 week` is treated as `7 days`)
418* mon, month, months (`1 month` is treated as `30 days`)
419* y, year, years (`1 year` is treated as `365 days`)
420
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -0700421+
Shawn O. Pearce3fdbf392009-09-04 18:08:26 -0700422If a unit suffix is not specified, `minutes` is assumed. If 0 is
423supplied, the maximum age is infinite and items are never purged
424except when the cache is full.
Shawn O. Pearced9c403e2009-08-19 08:35:41 -0700425+
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700426Default is `0`, meaning store forever with no expire, except:
Shawn O. Pearced9c403e2009-08-19 08:35:41 -0700427+
Shawn O. Pearce05687e92011-04-04 17:29:03 -0400428* `"adv_bases"`: default is `10 minutes`
Shawn O. Pearced9c403e2009-08-19 08:35:41 -0700429* `"ldap_groups"`: default is `1 hour`
Shawn O. Pearced9c403e2009-08-19 08:35:41 -0700430* `"web_sessions"`: default is `12 hours`
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700431
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700432[[cache.name.memoryLimit]]cache.<name>.memoryLimit::
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700433+
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700434The total cost of entries to retain in memory. The cost computation
435varies by the cache. For most caches where the in-memory size of each
436entry is relatively the same, memoryLimit is currently defined to be
437the number of entries held by the cache (each entry costs 1).
438+
439For caches where the size of an entry can vary significantly between
440individual entries (notably `"diff"`, `"diff_intraline"`), memoryLimit
441is an approximation of the total number of bytes stored by the cache.
442Larger entries that represent bigger patch sets or longer source files
443will consume a bigger portion of the memoryLimit. For these caches the
444memoryLimit should be set to roughly the amount of RAM (in bytes) the
445administrator can dedicate to the cache.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700446+
Shawn O. Pearceefaf9792009-09-02 18:12:52 -0700447Default is 1024 for most caches, except:
448+
Shawn O. Pearce05687e92011-04-04 17:29:03 -0400449* `"adv_bases"`: default is `4096`
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700450* `"diff"`: default is `10m` (10 MiB of memory)
451* `"diff_intraline"`: default is `10m` (10 MiB of memory)
452* `"plugin_resources"`: default is 2m (2 MiB of memory)
453
454+
455If set to 0 the cache is disabled. Entries are removed immediately
456after being stored by the cache. This is primarily useful for testing.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700457
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700458[[cache.name.diskLimit]]cache.<name>.diskLimit::
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700459+
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700460Total size in bytes of the keys and values stored on disk. Caches that
461have grown bigger than this size are scanned daily at 1 AM local
462server time to trim the cache. Entries are removed in least recently
463accessed order until the cache fits within this limit. Caches may
464grow larger than this during the day, as the size check is only
465performed once every 24 hours.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700466+
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700467Default is 128 MiB per cache.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700468+
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700469If 0, disk storage for the cache is disabled.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700470
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -0700471[[cache_names]]Standard Caches
Shawn O. Pearce4016a932009-05-28 15:12:40 -0700472^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700473
Shawn O. Pearce4a452712009-05-28 20:12:33 -0700474cache `"accounts"`::
475+
Shawn O. Pearce4dba9882009-08-05 19:55:15 -0700476Cache entries contain important details of an active user, including
477their display name, preferences, known email addresses, and group
478memberships. Entry information is obtained from the following
479database tables:
480+
481* `accounts`
482+
483* `account_group_members`
484+
485* `account_external_ids`
486
487+
488If direct updates are made to any of these database tables, this
489cache should be flushed.
490
491cache `"accounts_byemail"`::
492+
493Caches account identities keyed by email address, which is scanned
494from the `account_external_ids` database table. If updates are
495made to this table, this cache should be flushed.
Shawn O. Pearce4a452712009-05-28 20:12:33 -0700496
Shawn O. Pearce05687e92011-04-04 17:29:03 -0400497cache `"adv_bases"`::
498+
499Used only for push over smart HTTP when branch level access controls
500are enabled. The cache entry contains all commits that are avaliable
501for the client to use as potential delta bases. Push over smart HTTP
502requires two HTTP requests, and this cache tries to carry state from
503the first request into the second to ensure it can complete.
504
Gustaf Lundh47ce4e32012-05-21 11:18:42 +0200505cache `"changes"`::
506+
Gustaf Lundh53493772012-11-18 18:41:15 -0800507The size determines the number of projects that will have all its changes
508cached. If the cache is set to 1024, this means all changes for up to
5091024 projects can be held in the cache.
510+
511Default size is 0 (disabled). It is disabled by default due to the fact
512that change updates are not communicated between Gerrit servers.
513Hence this cache should be disabled in an multi-master/multi-slave setup.
514+
515The cache should be flushed whenever the database changes table is modified
Gustaf Lundh47ce4e32012-05-21 11:18:42 +0200516outside of gerrit.
517
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700518cache `"diff"`::
519+
Shawn O. Pearceefaf9792009-09-02 18:12:52 -0700520Each item caches the differences between two commits, at both the
521directory and file levels. Gerrit uses this cache to accelerate
522the display of affected file names, as well as file contents.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700523+
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700524Entries in this cache are relatively large, so memoryLimit is an
525estimate in bytes of memory used. Administrators should try to target
526cache.diff.memoryLimit to fit all changes users will view in a 1 or 2
527day span.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700528
Shawn O. Pearcef0cfe532011-04-11 23:40:06 -0400529cache `"diff_intraline"`::
530+
531Each item caches the intraline difference of one file, when compared
532between two commits. Gerrit uses this cache to accelerate display of
533intraline differences when viewing a file.
534+
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700535Entries in this cache are relatively large, so memoryLimit is an
536estimate in bytes of memory used. Administrators should try to target
537cache.diff.memoryLimit to fit all files users will view in a 1 or 2
538day span.
Shawn O. Pearcef0cfe532011-04-11 23:40:06 -0400539
Shawn O. Pearce2d65d292011-06-24 08:12:02 -0700540cache `"git_tags"`::
541+
542If branch or reference level READ access controls are used, this
543cache tracks which tags are reachable from the branch tips of a
544repository. Gerrit uses this information to determine the set
545of tags that a client may access, derived from which tags are
546part of the history of a visible branch.
547+
548The cache is persisted to disk across server restarts as it can
549be expensive to compute (60 or more seconds for a large history
550like the Linux kernel repository).
551
Shawn O. Pearce4a452712009-05-28 20:12:33 -0700552cache `"groups"`::
553+
Shawn O. Pearce4dba9882009-08-05 19:55:15 -0700554Caches the basic group information from the `account_groups` table,
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -0700555including the group owner, name, and description.
556+
557Gerrit group membership obtained from the `account_group_members`
558table is cached under the `"accounts"` cache, above. External group
559membership obtained from LDAP is cached under `"ldap_groups"`.
560
Matt Fischer620255a2011-03-22 14:28:23 -0500561cache `"groups_byinclude"`::
562+
563Caches group inclusions in other groups. If direct updates are made
564to the `account_group_includes` table, this cache should be flushed.
565
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -0700566cache `"ldap_groups"`::
567+
568Caches the LDAP groups that a user belongs to, if LDAP has been
569configured on this server. This cache should be configured with a
570low maxAge setting, to ensure LDAP modifications are picked up in
571a timely fashion.
Shawn O. Pearce4a452712009-05-28 20:12:33 -0700572
Gustaf Lundh0919a492012-10-19 15:29:23 +0200573cache `"ldap_groups_byinclude"`::
574+
575Caches the hierarchical structure of LDAP groups.
576
Shawn O. Pearce6d26f4a2009-08-24 15:43:52 -0700577cache `"ldap_usernames"`::
578+
579Caches a mapping of LDAP username to Gerrit account identity. The
580cache automatically updates when a user first creates their account
581within Gerrit, so the cache expire time is largely irrelevant.
582
Shawn O. Pearce0c1abdb2011-06-24 11:01:25 -0700583cache `"permission_sort"`::
584+
David Pursehouse221d4f62012-06-08 17:38:08 +0900585Caches the order in which access control sections must be applied to a
Shawn O. Pearce0c1abdb2011-06-24 11:01:25 -0700586reference. Sorting the sections can be expensive when regular
587expressions are used, so this cache remembers the ordering for
588each branch.
589
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700590cache `"plugin_resources"`::
591+
592Caches formatted plugin resources, such as plugin documentation that
593has been converted from Markdown to HTML. The memoryLimit refers to
594the bytes of memory dedicated to storing the documentation.
595
Shawn O. Pearce4a452712009-05-28 20:12:33 -0700596cache `"projects"`::
597+
598Caches the project description records, from the `projects` table
599in the database. If a project record is updated or deleted, this
600cache should be flushed. Newly inserted projects do not require
601a cache flush, as they will be read upon first reference.
602
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700603cache `"sshkeys"`::
604+
605Caches unpacked versions of user SSH keys, so the internal SSH daemon
606can match against them during authentication. The unit of storage
607is per-user, so 1024 items translates to 1024 unique user accounts.
608As each individual user account may configure multiple SSH keys,
609the total number of keys may be larger than the item count.
Shawn O. Pearce4a452712009-05-28 20:12:33 -0700610+
611This cache is based off the `account_ssh_keys` table and the
612`accounts.ssh_user_name` column in the database. If either is
613modified directly, this cache should be flushed.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700614
Shawn O. Pearceb09322b2009-08-15 17:49:00 -0700615cache `"web_sessions"`::
616+
617Tracks the live user sessions coming in over HTTP. Flushing this
618cache would cause all users to be signed out immediately, forcing
Shawn O. Pearce727d80f2009-08-17 07:57:54 -0700619them to sign-in again. To avoid breaking active users, this cache
620is not flushed automatically by `gerrit flush-caches --all`, but
621instead must be explicitly requested.
622+
623If no disk cache is configured (or `cache.web_sessions.diskLimit`
624is set to 0) a server restart will force all users to sign-out,
625and need to sign-in again after the restart, as the cache was
626unable to persist the session information. Enabling a disk cache
627is strongly recommended.
628+
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700629Session storage is relatively inexpensive. The average entry in
630this cache is approximately 346 bytes.
Shawn O. Pearceb09322b2009-08-15 17:49:00 -0700631
Shawn O. Pearce4016a932009-05-28 15:12:40 -0700632See also link:cmd-flush-caches.html[gerrit flush-caches].
633
Shawn O. Pearce29de4362010-03-03 17:51:26 -0800634[[cache_options]]Cache Options
635^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
636
Shawn O. Pearce617aa392010-11-15 14:03:28 -0800637cache.diff_intraline.maxIdleWorkers::
638+
639Number of idle worker threads to maintain for the intraline difference
640computations. There is no upper bound on how many concurrent requests
641can occur at once, if additional threads are started to handle a peak
David Pursehouse221d4f62012-06-08 17:38:08 +0900642load, only this many will remain idle afterwards.
Shawn O. Pearce617aa392010-11-15 14:03:28 -0800643+
644Default is 1.5x number of available CPUs.
645
646cache.diff_intraline.timeout::
647+
648Maximum number of milliseconds to wait for intraline difference data
649before giving up and disabling it for a particular file pair. This is
650a work around for an infinite loop bug in the intraline difference
651implementation. If computation takes longer than the timeout the
652worker thread is terminated and no intraline difference is displayed.
653+
654Values should use common unit suffixes to express their setting:
655+
656* ms, milliseconds
657* s, sec, second, seconds
658* m, min, minute, minutes
659* h, hr, hour, hours
660
661+
662If a unit suffix is not specified, `milliseconds` is assumed.
663+
664Default is 5 seconds.
665
Shawn O. Pearce307dd4e2010-11-15 12:12:20 -0800666cache.diff_intraline.enabled::
Shawn O. Pearce29de4362010-03-03 17:51:26 -0800667+
668Boolean to enable or disable the computation of intraline differences
Shawn O. Pearce307dd4e2010-11-15 12:12:20 -0800669when populating a diff cache entry. This flag is provided primarily
670as a backdoor to disable the intraline difference feature if
671necessary. To maintain backwards compatability with prior versions,
672this setting will fallback to `cache.diff.intraline` if not set in the
673configuration.
Shawn O. Pearce29de4362010-03-03 17:51:26 -0800674+
675Default is true, enabled.
676
Shawn O. Pearceb8e4e352011-05-19 18:09:01 -0700677cache.projects.checkFrequency::
678+
679How often project configuration should be checked for update from Git.
680Gerrit Code Review caches project access rules and configuration in
681memory, checking the refs/meta/config branch every checkFrequency
682minutes to see if a new revision should be loaded and used for future
683access. Values can be specified using standard time unit abbreviations
684('ms', 'sec', 'min', etc.).
685+
686If set to 0, checks occur every time, which may slow down operations.
687Administrators may force the cache to flush with
688link:cmd-flush-caches.html[gerrit flush-caches].
689+
690Default is 5 minutes.
691
carloseduardo.baldacin14246de2011-07-14 17:52:22 -0300692[[changeMerge]]Section changeMerge
Remy Bohmer203eea32012-02-19 21:21:36 +0100693~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
carloseduardo.baldacin14246de2011-07-14 17:52:22 -0300694
Dave Borowitz204669c22012-10-11 11:06:08 -0700695changeMerge.checkFrequency::
696+
697How often the database should be rescanned for changes that have been
698submitted but not merged due to transient errors. Values can be
699specified using standard time unit abbreviations ('ms', 'sec', 'min',
700etc.). Set to 0 to disable periodic rescanning, only scanning once on
701master node startup.
702+
703Default is 300 seconds (5 minutes).
704
705changeMerge.test::
706+
carloseduardo.baldacin14246de2011-07-14 17:52:22 -0300707Controls whether or not the mergeability test of changes is
708enabled. If enabled, when the change page is loaded, the test is
709triggered. The submit button will be enabled or disabled according to
710the result.
Dave Borowitz204669c22012-10-11 11:06:08 -0700711+
carloseduardo.baldacin14246de2011-07-14 17:52:22 -0300712By default this is false (test is not enabled).
713
Brad Larson991a31b2009-11-03 14:30:26 -0600714[[commentlink]]Section commentlink
Remy Bohmer203eea32012-02-19 21:21:36 +0100715~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Brad Larson991a31b2009-11-03 14:30:26 -0600716Comment links are find/replace strings applied to change descriptions,
Chris Harris63c7cdd2012-11-23 12:17:36 -0500717patch comments, in-line code comments and approval category value descriptions
718to turn set strings into hyperlinks. One common use is for linking to
719bug-tracking systems.
Brad Larson991a31b2009-11-03 14:30:26 -0600720
721In the following example configuration the 'changeid' comment link
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800722will match typical Gerrit Change-Id values and create a hyperlink
723to changes which reference it. The second configuration 'bugzilla'
724will hyperlink terms such as 'bug 42' to an external bug tracker,
725supplying the argument record number '42' for display. The third
David Pursehouse221d4f62012-06-08 17:38:08 +0900726configuration 'tracker' uses raw HTML to more precisely control
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800727how the replacement is displayed to the user.
Brad Larson991a31b2009-11-03 14:30:26 -0600728
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800729----
730[commentlink "changeid"]
731 match = (I[0-9a-f]{8,40})
732 link = "#q,$1,n,z"
Brad Larson991a31b2009-11-03 14:30:26 -0600733
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800734[commentlink "bugzilla"]
Shawn O. Pearcec99630a2010-02-21 19:11:56 -0800735 match = "(bug\\s+#?)(\\d+)"
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800736 link = http://bugs.example.com/show_bug.cgi?id=$2
Brad Larson991a31b2009-11-03 14:30:26 -0600737
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800738[commentlink "tracker"]
739 match = ([Bb]ug:\\s+)(\\d+)
740 html = $1<a href=\"http://trak.example.com/$2\">$2</a>
741----
742
743[[commentlink.name.match]]commentlink.<name>.match::
Brad Larson991a31b2009-11-03 14:30:26 -0600744+
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800745A JavaScript regular expression to match positions to be replaced
746with a hyperlink. Subexpressions of the matched string can be
747stored using groups and accessed with `$'n'` syntax, where 'n'
748is the group number, starting from 1.
Brad Larson991a31b2009-11-03 14:30:26 -0600749+
Shawn O. Pearcec99630a2010-02-21 19:11:56 -0800750The configuration file parser eats one level of backslashes, so the
751character class `\s` requires `\\s` in the configuration file. The
752parser also terminates the line at the first `#`, so a match
753expression containing # must be wrapped in double quotes.
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800754+
Shawn O. Pearce665beaa2010-02-21 22:41:03 -0800755To match case insensitive strings, a character class with both the
756upper and lower case character for each position must be used. For
757example, to match the string `bug` in a case insensitive way the match
758pattern `[bB][uU][gG]` needs to be used.
759+
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800760A common pattern to match is `bug\\s+(\\d+)`.
Brad Larson991a31b2009-11-03 14:30:26 -0600761
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800762[[commentlink.name.link]]commentlink.<name>.link::
Brad Larson991a31b2009-11-03 14:30:26 -0600763+
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800764The URL to direct the user to whenever the regular expression is
765matched. Groups in the match expression may be accessed as `$'n'`.
766+
767The link property is used only when the html property is not present.
768
769[[commentlink.name.html]]commentlink.<name>.html::
770+
771HTML to replace the entire matched string with. If present,
772this property overrides the link property above. Groups in the
773match expression may be accessed as `$'n'`.
774+
775The configuration file eats double quotes, so escaping them as
776`\"` is necessary to protect them from the parser.
Brad Larson991a31b2009-11-03 14:30:26 -0600777
778
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -0700779[[contactstore]]Section contactstore
780~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700781
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700782[[contactstore.url]]contactstore.url::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700783+
784URL of the web based contact store Gerrit will send any offline
785contact information to when it collects the data from users as part
786of a contributor agreement.
787+
788See link:config-contact.html[Contact Information].
789
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700790[[contactstore.appsec]]contactstore.appsec::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700791+
792Shared secret of the web based contact store.
793
Shawn O. Pearcee24c71fb2009-12-07 20:32:40 -0800794
795[[container]]Section container
796~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
797
798These settings are applied only if Gerrit is started as the container
799process through Gerrit's 'gerrit.sh' rc.d compatible wrapper script.
800
801[[container.heapLimit]]container.heapLimit::
802+
803Maximum heap size of the Java process running Gerrit, in bytes.
804This property is translated into the '-Xmx' flag for the JVM.
805+
806Default is platform and JVM specific.
807+
808Common unit suffixes of 'k', 'm', or 'g' are supported.
809
810[[container.javaHome]]container.javaHome::
811+
812Path of the JRE/JDK installation to run Gerrit with. If not set, the
813Gerrit startup script will attempt to search your system and guess
814a suitable JRE. Overrides the environment variable 'JAVA_HOME'.
815
816[[container.javaOptions]]container.javaOptions::
817+
818Additional options to pass along to the Java runtime. If multiple
819values are configured, they are passed in order on the command line,
820separated by spaces. These options are appended onto 'JAVA_OPTIONS'.
821
Fredrik Luthanderb8f7d6d2010-05-18 21:11:22 +0200822[[container.slave]]container.slave::
823+
824Used on Gerrit slave installations. If set to true the Gerrit JVM is
825called with the '--slave' switch, enabling slave mode. If no value is
826set (or any other value), gerrit defaults to master mode.
827
Shawn O. Pearcee24c71fb2009-12-07 20:32:40 -0800828[[container.user]]container.user::
829+
830Login name (or UID) of the operating system user the Gerrit JVM
831will execute as. If not set, defaults to the user who launched
832the 'gerrit.sh' wrapper script.
833
834[[container.war]]container.war::
835+
836Path of the JAR file to start daemon execution with. This should
837be the path of the local 'gerrit.war' archive. Overrides the
838environment variable 'GERRIT_WAR'.
839+
840If not set, defaults to '$site_path/bin/gerrit.war', or to
841'$HOME/gerrit.war'.
842
843
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -0700844[[core]]Section core
845~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700846
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700847[[core.packedGitWindowSize]]core.packedGitWindowSize::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700848+
849Number of bytes of a pack file to load into memory in a single
850read operation. This is the "page size" of the JGit buffer cache,
851used for all pack access operations. All disk IO occurs as single
852window reads. Setting this too large may cause the process to load
853more data than is required; setting this too small may increase
854the frequency of `read()` system calls.
855+
856Default on JGit is 8 KiB on all platforms.
857+
858Common unit suffixes of 'k', 'm', or 'g' are supported.
859
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700860[[core.packedGitLimit]]core.packedGitLimit::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700861+
862Maximum number of bytes to load and cache in memory from pack files.
863If JGit needs to access more than this many bytes it will unload less
864frequently used windows to reclaim memory space within the process.
865As this buffer must be shared with the rest of the JVM heap, it
866should be a fraction of the total memory available.
867+
868Default on JGit is 10 MiB on all platforms.
869+
870Common unit suffixes of 'k', 'm', or 'g' are supported.
871
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700872[[core.deltaBaseCaseLimit]]core.deltaBaseCacheLimit::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700873+
874Maximum number of bytes to reserve for caching base objects
875that multiple deltafied objects reference. By storing the entire
876decompressed base object in a cache Git is able to avoid unpacking
877and decompressing frequently used base objects multiple times.
878+
879Default on JGit is 10 MiB on all platforms. You probably do not
880need to adjust this value.
881+
882Common unit suffixes of 'k', 'm', or 'g' are supported.
883
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700884[[core.packedGitOpenFiles]]core.packedGitOpenFiles::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700885+
886Maximum number of pack files to have open at once. A pack file
887must be opened in order for any of its data to be available in
888a cached window.
889+
890If you increase this to a larger setting you may need to also adjust
891the ulimit on file descriptors for the host JVM, as Gerrit needs
892additional file descriptors available for network sockets and other
893repository data manipulation.
894+
895Default on JGit is 128 file descriptors on all platforms.
896
Shawn O. Pearce329fe792010-09-03 15:44:23 -0700897[[core.streamFileThreshold]]core.streamFileThreshold::
898+
899Largest object size, in bytes, that JGit will allocate as a
900contiguous byte array. Any file revision larger than this threshold
901will have to be streamed, typically requiring the use of temporary
902files under '$GIT_DIR/objects' to implement psuedo-random access
903during delta decompression.
904+
905Servers with very high traffic should set this to be larger than
906the size of their common big files. For example a server managing
907the Android platform typically has to deal with ~10-12 MiB XML
908files, so `15 m` would be a reasonable setting in that environment.
909Setting this too high may cause the JVM to run out of heap space
910when handling very big binary files, such as device firmware or
911CD-ROM ISO images.
912+
Shawn O. Pearcee3febd92010-10-13 21:17:53 -0700913Default is 50 MiB on all platforms. Prior to Gerrit 2.1.6,
Shawn O. Pearce329fe792010-09-03 15:44:23 -0700914this value was effectively 2047 MiB.
915+
916Common unit suffixes of 'k', 'm', or 'g' are supported.
917
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700918[[core.packedGitMmap]]core.packedGitMmap::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700919+
920When true, JGit will use `mmap()` rather than `malloc()+read()`
921to load data from pack files. The use of mmap can be problematic
922on some JVMs as the garbage collector must deduce that a memory
923mapped segment is no longer in use before a call to `munmap()`
924can be made by the JVM native code.
925+
926In server applications (such as Gerrit) that need to access many
927pack files, setting this to true risks artifically running out
928of virtual address space, as the garbage collector cannot reclaim
929unused mapped spaces fast enough.
930+
931Default on JGit is false. Although potentially slower, it yields
932much more predictable behavior.
933
Sasa Zivkovf69aeb12012-06-11 14:05:14 +0200934[[core.asyncLoggingBufferSize]]core.asyncLoggingBufferSize::
935+
936Size of the buffer to store logging events for asynchronous logging.
937Putting a larger value can protect threads from stalling when the
938AsyncAppender threads are not fast enough to consume the logging events
939from the buffer. It also protects from loosing log entries in this case.
940+
941Default is 64 entries.
942
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -0800943[[database]]Section database
944~~~~~~~~~~~~~~~~~~~~~~~~~~~~
945
946The database section configures where Gerrit stores its metadata
947records about user accounts and change reviews.
948
Shawn O. Pearce9d342a42009-12-16 15:49:05 -0800949----
950[database]
Shawn O. Pearce1be39062009-12-19 14:11:52 -0800951 type = POSTGRESQL
Shawn O. Pearce9d342a42009-12-16 15:49:05 -0800952 hostname = localhost
953 database = reviewdb
954 username = gerrit2
955 password = s3kr3t
956----
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -0800957
958[[database.type]]database.type::
959+
960Type of database server to connect to. If set this value will be
961used to automatically create correct database.driver and database.url
962values to open the connection.
963+
Shawn O. Pearce1be39062009-12-19 14:11:52 -0800964* `POSTGRESQL`
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -0800965+
966Connect to a PostgreSQL database server.
967+
968* `H2`
969+
Shawn O. Pearce1be39062009-12-19 14:11:52 -0800970Connect to a local embedded H2 database.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -0800971+
Shawn O. Pearce1be39062009-12-19 14:11:52 -0800972* `MYSQL`
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -0800973+
974Connect to a MySQL database server.
Shawn O. Pearce1be39062009-12-19 14:11:52 -0800975+
976* `JDBC`
977+
978Connect using a JDBC driver class name and URL.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -0800979
980+
981If not specified, database.driver and database.url are used as-is,
982and if they are also not specified, defaults to H2.
983
984[[database.hostname]]database.hostname::
985+
986Hostname of the database server. Defaults to 'localhost'.
987
988[[database.port]]database.port::
989+
990Port number of the database server. Defaults to the default port
991of the server named by database.type.
992
993[[database.database]]database.database::
994+
Shawn O. Pearce1be39062009-12-19 14:11:52 -0800995For POSTGRESQL or MYSQL, the name of the database on the server.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -0800996+
997For H2, this is the path to the database, and if not absolute is
Shawn O. Pearce1be39062009-12-19 14:11:52 -0800998relative to `'$site_path'`.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -0800999
1000[[database.username]]database.username::
1001+
1002Username to connect to the database server as.
1003
1004[[database.password]]database.password::
1005+
1006Password to authenticate to the database server with.
1007
1008[[database.driver]]database.driver::
1009+
Shawn O. Pearce1be39062009-12-19 14:11:52 -08001010Name of the JDBC driver class to connect to the database with.
1011Setting this usually isn't necessary as it can be derived from
1012database.type or database.url for any supported database.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001013
1014[[database.url]]database.url::
1015+
Shawn O. Pearce1be39062009-12-19 14:11:52 -08001016'jdbc:' URL for the database. Setting this variable usually
1017isn't necessary as it can be constructed from the all of the
1018above properties.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001019
Shawn O. Pearce07f35177d2010-02-23 09:47:10 -08001020[[database.poolLimit]]database.poolLimit::
1021+
1022Maximum number of open database connections. If the server needs
1023more than this number, request processing threads will wait up
1024to <<database.poolMaxWait, poolMaxWait>> seconds for a
1025connection to be released before they abort with an exception.
1026This limit must be several units higher than the total number of
1027httpd and sshd threads as some request processing code paths may
1028need multiple connections.
1029+
1030Default is 8.
1031
Shawn O. Pearcef458bf62010-02-25 09:03:03 -08001032[[database.poolMinIdle]]database.poolMinIdle::
Shawn O. Pearce07f35177d2010-02-23 09:47:10 -08001033+
1034Minimum number of connections to keep idle in the pool.
1035Default is 4.
1036
Shawn O. Pearcef458bf62010-02-25 09:03:03 -08001037[[database.poolMaxIdle]]database.poolMaxIdle::
Shawn O. Pearce07f35177d2010-02-23 09:47:10 -08001038+
1039Maximum number of connections to keep idle in the pool. If there
1040are more idle connections, connections will be closed instead of
1041being returned back to the pool.
1042Default is 4.
1043
1044[[database.poolMaxWait]]database.poolMaxWait::
1045+
1046Maximum amount of time a request processing thread will wait to
1047acquire a database connection from the pool. If no connection is
1048released within this time period, the processing thread will abort
1049its current operations and return an error to the client.
1050Values should use common unit suffixes to express their setting:
1051+
1052* ms, milliseconds
1053* s, sec, second, seconds
1054* m, min, minute, minutes
1055* h, hr, hour, hours
1056
1057+
1058If a unit suffix is not specified, `milliseconds` is assumed.
1059+
1060Default is `30 seconds`.
1061
monica.dionisio3f630442010-06-29 15:42:57 -03001062[[download]]Section download
Nasser Grainawib9a50372010-08-10 07:57:47 -06001063~~~~~~~~~~~~~~~~~~~~~~~~~~~~
monica.dionisio3f630442010-06-29 15:42:57 -03001064
1065----
1066[download]
Edwin Kempin08b03a22012-09-14 16:32:57 +02001067 command = checkout
1068 command = cherry_pick
1069 command = pull
1070 command = format_patch
monica.dionisio3f630442010-06-29 15:42:57 -03001071 scheme = ssh
1072 scheme = http
1073 scheme = anon_http
1074 scheme = anon_git
1075 scheme = repo_download
1076----
1077
1078The download section configures the allowed download methods.
1079
Edwin Kempin08b03a22012-09-14 16:32:57 +02001080[[download.command]]download.command::
1081+
1082Commands that should be offered to download changes.
1083+
1084Multiple commands are supported:
1085+
1086* `checkout`
1087+
1088Command to fetch and checkout the patch set.
1089+
1090* `cherry_pick`
1091+
1092Command to fetch the patch set and to cherry-pick it onto the current
1093commit.
1094+
1095* `pull`
1096+
1097Command to pull the patch set.
1098+
1099* `format_patch`
1100+
1101Command to fetch the patch set and to feed it into the `format-patch`
1102command.
1103
1104+
1105If `download.command` is not specified, all download commands are
1106offered.
1107
monica.dionisio3f630442010-06-29 15:42:57 -03001108[[download.scheme]]download.scheme::
1109+
1110Schemes that should be used to download changes.
1111+
1112Multiple schemes are supported:
1113+
1114* `http`
1115+
Shawn O. Pearce5c46a072010-08-23 08:33:32 -07001116Authenticated HTTP download is allowed.
monica.dionisio3f630442010-06-29 15:42:57 -03001117+
1118* `ssh`
1119+
Shawn O. Pearce5c46a072010-08-23 08:33:32 -07001120Authenticated SSH download is allowed.
monica.dionisio3f630442010-06-29 15:42:57 -03001121+
1122* `anon_http`
1123+
1124Anonymous HTTP download is allowed.
1125+
1126* `anon_git`
1127+
Shawn O. Pearce5c46a072010-08-23 08:33:32 -07001128Anonymous Git download is allowed. This is not default, it is also
1129necessary to set <<gerrit.canonicalGitUrl,gerrit.canonicalGitUrl>>
1130variable.
monica.dionisio3f630442010-06-29 15:42:57 -03001131+
1132* `repo_download`
1133+
Shawn O. Pearce5c46a072010-08-23 08:33:32 -07001134Gerrit advertises patch set downloads with the `repo download`
1135command, assuming that all projects managed by this instance are
1136generally worked on with the repo multi-repository tool. This is
1137not default, as not all instances will deploy repo.
monica.dionisio3f630442010-06-29 15:42:57 -03001138
1139+
Edwin Kempin08b03a22012-09-14 16:32:57 +02001140If `download.scheme` is not specified, SSH, HTTP and Anonymous HTTP
Shawn O. Pearce5c46a072010-08-23 08:33:32 -07001141downloads are allowed.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001142
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -07001143[[gerrit]]Section gerrit
1144~~~~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearceeb7f8ce2009-06-01 09:57:15 -07001145
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001146[[gerrit.basePath]]gerrit.basePath::
Shawn O. Pearce9743d0b2009-06-01 10:10:06 -07001147+
1148Local filesystem directory holding all Git repositories that
1149Gerrit knows about and can process changes for. A project
1150entity in Gerrit maps to a local Git repository by creating
Edwin Kempincdb0e002011-09-08 14:23:30 +02001151the path string `"${basePath}/${project_name}.git"`.
Shawn O. Pearce9743d0b2009-06-01 10:10:06 -07001152+
1153If relative, the path is resolved relative to `'$site_path'`.
1154
Shawn O. Pearce897d9212011-06-16 16:59:59 -07001155[[gerrit.allProjects]]gerrit.allProjects::
1156+
1157Name of the permissions-only project defining global server
1158access controls and settings. These are inherited into every
1159other project managed by the running server. The name is
1160relative to `gerrit.basePath`.
1161+
1162Defaults to `All-Projects` if not set.
1163
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001164[[gerrit.canonicalWebUrl]]gerrit.canonicalWebUrl::
Shawn O. Pearceeb7f8ce2009-06-01 09:57:15 -07001165+
1166The default URL for Gerrit to be accessed through.
1167+
1168Typically this would be set to "http://review.example.com/" or
1169"http://example.com/gerrit/" so Gerrit can output links that point
1170back to itself.
1171+
1172Setting this is highly recommended, as its necessary for the upload
1173code invoked by "git push" or "repo upload" to output hyperlinks
1174to the newly uploaded changes.
1175
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001176[[gerrit.canonicalGitUrl]]gerrit.canonicalGitUrl::
Shawn O. Pearceeb7f8ce2009-06-01 09:57:15 -07001177+
1178Optional base URL for repositories available over the anonymous git
1179protocol. For example, set this to `git://mirror.example.com/base/`
1180to have Gerrit display patch set download URLs in the UI. Gerrit
1181automatically appends the project name onto the end of the URL.
1182+
1183By default unset, as the git daemon must be configured externally
1184by the system administrator, and might not even be running on the
1185same host as Gerrit.
1186
Shawn O. Pearce5d6de522011-10-07 18:00:16 -07001187[[gerrit.gitHttpUrl]]gerrit.gitHttpUrl::
1188+
1189Optional base URL for repositories available over the HTTP
1190protocol. For example, set this to `http://mirror.example.com/base/`
1191to have Gerrit display URLs from this server, rather than itself.
1192+
1193By default unset, as the HTTP daemon must be configured externally
1194by the system administrator, and might not even be running on the
1195same host as Gerrit.
1196
Shawn O. Pearceb8bea1b2012-08-16 17:18:58 -07001197[[gerrit.reportBugUrl]]gerrit.reportBugUrl::
1198+
1199URL to direct users to when they need to report a bug about the
1200Gerrit service. By default this links to the upstream Gerrit
1201Code Review's own bug tracker but could be directed to the system
1202administrator's ticket queue.
1203
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -07001204[[gitweb]]Section gitweb
1205~~~~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearced7ba11f2009-06-01 09:35:41 -07001206
Shawn O. Pearce618dae22010-03-12 19:07:43 -08001207Gerrit can forward requests to either an internally managed gitweb
1208(which allows Gerrit to enforce some access controls), or to an
1209externally managed gitweb (where the web server manages access).
Shawn O. Pearced7ba11f2009-06-01 09:35:41 -07001210See also link:config-gitweb.html[Gitweb Integration].
1211
Shawn O. Pearce618dae22010-03-12 19:07:43 -08001212[[gitweb.cgi]]gitweb.cgi::
1213+
1214Path to the locally installed `gitweb.cgi` executable. This CGI will
1215be called by Gerrit Code Review when the URL `/gitweb` is accessed.
1216Project level access controls are enforced prior to calling the CGI.
1217+
1218Defaults to `/usr/lib/cgi-bin/gitweb.cgi` if gitweb.url is not set.
1219
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001220[[gitweb.url]]gitweb.url::
Shawn O. Pearced7ba11f2009-06-01 09:35:41 -07001221+
1222Optional URL of an affiliated gitweb service. Defines the
1223web location where a `gitweb.cgi` is installed to browse
Shawn O. Pearce9743d0b2009-06-01 10:10:06 -07001224gerrit.basePath and the repositories it contains.
Shawn O. Pearced7ba11f2009-06-01 09:35:41 -07001225+
1226Gerrit appends any necessary query arguments onto the end of this URL.
1227For example, "?p=$project.git;h=$commit".
1228
Shane Mc Cormack27868a42009-12-28 04:49:39 +00001229[[gitweb.type]]gitweb.type::
1230+
1231Optional type of affiliated gitweb service. This allows using
Shawn O. Pearce2b11da02011-09-06 16:18:12 -07001232alternatives to gitweb, such as cgit. If set to disabled there
1233is no gitweb hyperlinking support.
Shane Mc Cormack27868a42009-12-28 04:49:39 +00001234+
Shawn O. Pearce2b11da02011-09-06 16:18:12 -07001235Valid values are `gitweb`, `cgit`, `disabled` or `custom`.
Shane Mc Cormack27868a42009-12-28 04:49:39 +00001236
Edwin Kempind86909c2012-03-26 10:36:29 +02001237[[gitweb.revision]]gitweb.revision::
Shane Mc Cormack27868a42009-12-28 04:49:39 +00001238+
1239Optional pattern to use for constructing the gitweb URL when pointing
1240at a specific commit when `custom` is used above.
1241+
Edwin Kempincdb0e002011-09-08 14:23:30 +02001242Valid replacements are `${project}` for the project name in Gerrit
1243and `${commit}` for the SHA1 hash for the commit.
Shane Mc Cormack27868a42009-12-28 04:49:39 +00001244
Edwin Kempind86909c2012-03-26 10:36:29 +02001245[[gitweb.project]]gitweb.project::
Shane Mc Cormack27868a42009-12-28 04:49:39 +00001246+
1247Optional pattern to use for constructing the gitweb URL when pointing
1248at a specific project when `custom` is used above.
1249+
Edwin Kempincdb0e002011-09-08 14:23:30 +02001250Valid replacements are `${project}` for the project name in Gerrit.
Shane Mc Cormack27868a42009-12-28 04:49:39 +00001251
Edwin Kempind86909c2012-03-26 10:36:29 +02001252[[gitweb.branch]]gitweb.branch::
Shane Mc Cormack27868a42009-12-28 04:49:39 +00001253+
1254Optional pattern to use for constructing the gitweb URL when pointing
1255at a specific branch when `custom` is used above.
1256+
Edwin Kempincdb0e002011-09-08 14:23:30 +02001257Valid replacements are `${project}` for the project name in Gerrit
1258and `${branch}` for the name of the branch.
Shane Mc Cormack27868a42009-12-28 04:49:39 +00001259
Edwin Kempin64011562012-03-26 10:50:12 +02001260[[gitweb.filehistory]]gitweb.filehistory::
1261+
1262Optional pattern to use for constructing the gitweb URL when pointing
1263at the history of a file in a specific branch when `custom` is used
1264above.
1265+
1266Valid replacements are `${project}` for the project name in Gerrit,
1267`${file}` for the file name and `${branch}` for the name of the
1268branch.
1269
Gustaf Lundha07d2e72011-10-27 15:26:35 -07001270[[gitweb.linkname]]gitweb.linkname::
1271+
1272Optional setting for modifying the link name presented to the user
1273in the Gerrit web-UI.
1274+
1275Default linkname for custom type is "gitweb".
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001276
Adrian Goerlerf2007072011-11-10 08:39:55 +01001277[[gitweb.pathSeparator]]gitweb.pathSeparator::
1278+
1279Optional character to substitute the standard path separator (slash) in
1280project names and branch names.
1281+
1282By default, Gerrit will use hexadecimal encoding for slashes in project and
1283branch names. Some web servers, such as Tomcat, reject this hexadecimal
1284encoding in the URL.
1285+
1286Some alternative gitweb services, such as link:http://gitblit.com[Gitblit],
1287allow using an alternative path separator character. In Gitblit, this can be
1288configured through the property link:http://gitblit.com/properties.html[web.forwardSlashCharacter].
1289In Gerrit, the alternative path separator can be configured correspondingly
1290using the property 'gitweb.pathSeparator'.
1291+
1292Valid values are the characters '*', '(' and ')'.
1293
Edwin Kempin4bbff702013-01-11 09:59:53 +01001294[[groups]]Section groups
1295~~~~~~~~~~~~~~~~~~~~~~~~
1296
1297[[groups.newGroupsVisibleToAll]]groups.newGroupsVisibleToAll::
1298+
1299Controls whether newly created groups should be by default visible to
1300all registered users.
1301+
1302By default, false.
1303
Shane Mc Cormack6c2b6772010-01-12 21:56:44 +00001304[[hooks]]Section hooks
Remy Bohmer203eea32012-02-19 21:21:36 +01001305~~~~~~~~~~~~~~~~~~~~~~
Shane Mc Cormack6c2b6772010-01-12 21:56:44 +00001306
1307See also link:config-hooks.html[Hooks].
1308
1309[[hooks.path]]hooks.path::
1310+
1311Optional path to hooks, if not specified then `'$site_path'/hooks` will be used.
1312
1313[[hooks.patchsetCreatedHook]]hooks.patchsetCreatedHook::
1314+
1315Optional filename for the patchset created hook, if not specified then
1316`patchset-created` will be used.
1317
David Pursehoused556c192012-06-12 18:34:37 +09001318[[hooks.draftPublishedHook]]hooks.draftPublishedHook::
1319+
1320Optional filename for the draft published hook, if not specified then
1321`draft-published` will be used.
1322
Shane Mc Cormack6c2b6772010-01-12 21:56:44 +00001323[[hooks.commentAddedHook]]hooks.commentAddedHook::
1324+
1325Optional filename for the comment added hook, if not specified then
1326`comment-added` will be used.
1327
1328[[hooks.changeMergedHook]]hooks.changeMergedHook::
1329+
1330Optional filename for the change merged hook, if not specified then
1331`change-merged` will be used.
1332
David Pursehousef9f3b272012-09-28 19:58:59 +09001333[[hooks.mergeFailedHook]]hooks.mergeFailedHook::
1334+
1335Optional filename for the merge failed hook, if not specified then
1336`merge-failed` will be used.
1337
Shane Mc Cormack6c2b6772010-01-12 21:56:44 +00001338[[hooks.changeAbandonedHook]]hooks.changeAbandonedHook::
1339+
1340Optional filename for the change abandoned hook, if not specified then
1341`change-abandoned` will be used.
1342
David Pursehousea93c9302012-06-15 16:29:26 +09001343[[hooks.changeRestoredHook]]hooks.changeRestoredHook::
1344+
1345Optional filename for the change restored hook, if not specified then
1346`change-restored` will be used.
1347
1348[[hooks.refUpdatedHook]]hooks.refUpdatedHook::
1349+
1350Optional filename for the ref updated hook, if not specified then
1351`ref-updated` will be used.
1352
David Pursehouse2336bd82012-09-21 12:50:19 +09001353[[hooks.reviewerAddedHook]]hooks.reviewerAddedHook::
1354+
1355Optional filename for the reviewer added hook, if not specified then
1356`reviewer-added` will be used.
1357
David Pursehousea93c9302012-06-15 16:29:26 +09001358[[hooks.claSignedHook]]hooks.claSignedHook::
1359+
1360Optional filename for the CLA signed hook, if not specified then
1361`cla-signed` will be used.
1362
Chris Harrisf736d6c2012-11-21 09:35:56 -05001363[[hooks.refUpdateHook]]hooks.refUpdateHook::
1364+
1365Optional filename for the ref update hook, if not specified then
1366`ref-update` will be used.
1367
1368[[hooks.syncHookTimeout]]hooks.syncHookTimeout::
David Pursehouse6fdc8d92012-11-28 12:34:18 +09001369+
1370Optional timeout value in seconds for synchronous hooks, if not specified
Chris Harrisf736d6c2012-11-21 09:35:56 -05001371then 30 seconds will be used.
1372
Shawn O. Pearce309d8d32009-11-17 16:03:16 -08001373[[http]]Section http
1374~~~~~~~~~~~~~~~~~~~~
1375
1376[[http.proxy]]http.proxy::
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001377+
1378URL of the proxy server when making outgoing HTTP
1379connections for OpenID login transactions. Syntax
1380should be `http://`'hostname'`:`'port'.
Shawn O. Pearce309d8d32009-11-17 16:03:16 -08001381
1382[[http.proxyUsername]]http.proxyUsername::
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001383+
1384Optional username to authenticate to the HTTP proxy with.
Robin Rosenberg524a3032012-10-14 14:24:36 +02001385This property is honored only if the username does not
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001386appear in the http.proxy property above.
Shawn O. Pearce309d8d32009-11-17 16:03:16 -08001387
1388[[http.proxyPassword]]http.proxyPassword::
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001389+
1390Optional password to authenticate to the HTTP proxy with.
Robin Rosenberg524a3032012-10-14 14:24:36 +02001391This property is honored only if the password does not
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001392appear in the http.proxy property above.
Shawn O. Pearce309d8d32009-11-17 16:03:16 -08001393
1394
1395[[httpd]]Section httpd
1396~~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08001397
1398The httpd section configures the embedded servlet container.
1399
1400[[httpd.listenUrl]]httpd.listenUrl::
1401+
1402Specifies the URLs the internal HTTP daemon should listen for
Edwin Kempincdb0e002011-09-08 14:23:30 +02001403connections on. The special hostname '*' may be used to listen
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08001404on all local addresses. A context path may optionally be included,
1405placing Gerrit Code Review's web address within a subdirectory of
1406the server.
1407+
1408Multiple protocol schemes are supported:
1409+
1410* `http://`'hostname'`:`'port'
1411+
1412Plain-text HTTP protocol. If port is not supplied, defaults to 80,
1413the standard HTTP port.
1414+
1415* `https://`'hostname'`:`'port'
1416+
1417SSL encrypted HTTP protocol. If port is not supplied, defaults to
1418443, the standard HTTPS port.
1419+
1420Externally facing production sites are encouraged to use a reverse
1421proxy configuration and `proxy-https://` (below), rather than using
1422the embedded servlet container to implement the SSL processing.
1423The proxy server with SSL support is probably easier to configure,
1424provides more configuration options to control cipher usage, and
1425is likely using natively compiled encryption algorithms, resulting
1426in higher throughput.
1427+
1428* `proxy-http://`'hostname'`:`'port'
1429+
1430Plain-text HTTP relayed from a reverse proxy. If port is not
1431supplied, defaults to 8080.
1432+
1433Like http, but additional header parsing features are
1434enabled to honor X-Forwarded-For, X-Forwarded-Host and
1435X-Forwarded-Server. These headers are typically set by Apache's
1436link:http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#x-headers[mod_proxy].
1437+
1438* `proxy-https://`'hostname'`:`'port'
1439+
1440Plain text HTTP relayed from a reverse proxy that has already
1441handled the SSL encryption/decryption. If port is not supplied,
1442defaults to 8080.
1443+
1444Behaves exactly like proxy-http, but also sets the scheme to assume
1445'https://' is the proper URL back to the server.
1446
1447+
1448If multiple values are supplied, the daemon will listen on all
1449of them.
1450+
1451By default, http://*:8080.
1452
1453[[httpd.reuseAddress]]httpd.reuseAddress::
1454+
1455If true, permits the daemon to bind to the port even if the port
1456is already in use. If false, the daemon ensures the port is not
1457in use before starting. Busy sites may need to set this to true
1458to permit fast restarts.
1459+
1460By default, true.
1461
1462[[httpd.requestHeaderSize]]httpd.requestHeaderSize::
1463+
1464Size, in bytes, of the buffer used to parse the HTTP headers of an
1465incoming HTTP request. The entire request headers, including any
1466cookies sent by the browser, must fit within this buffer, otherwise
1467the server aborts with the response '413 Request Entity Too Large'.
1468+
1469One buffer of this size is allocated per active connection.
1470Allocating a buffer that is too large wastes memory that cannot be
1471reclaimed, allocating a buffer that is too small may cause unexpected
1472errors caused by very long Referer URLs or large cookie values.
1473+
1474By default, 16384 (16 K), which is sufficient for most OpenID and
1475other web-based single-sign-on integrations.
1476
1477[[httpd.sslKeyStore]]httpd.sslKeyStore::
1478+
1479Path of the Java keystore containing the server's SSL certificate
1480and private key. This keystore is required for `https://` in URL.
1481+
1482To create a self-signed certificate for simple internal usage:
1483+
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001484----
1485keytool -keystore keystore -alias jetty -genkey -keyalg RSA
1486chmod 600 keystore
1487----
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08001488+
1489If not absolute, the path is resolved relative to `$site_path`.
1490+
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08001491By default, `$site_path/etc/keystore`.
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08001492
1493[[httpd.sslKeyPassword]]httpd.sslKeyPassword::
1494+
1495Password used to decrypt the private portion of the sslKeyStore.
David Pursehouse221d4f62012-06-08 17:38:08 +09001496Java keystores require a password, even if the administrator
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08001497doesn't want to enable one.
1498+
1499If set to the empty string the embedded server will prompt for the
1500password during startup.
1501+
1502By default, `gerrit`.
1503
Shawn O. Pearce1766f502010-01-15 10:49:46 -08001504[[httpd.requestLog]]httpd.requestLog::
1505+
1506Enable (or disable) the `'$site_path'/logs/httpd_log` request log.
1507If enabled, an NCSA combined log format request log file is written
1508out by the internal HTTP daemon.
1509+
1510By default, true if httpd.listenUrl uses http:// or https://,
1511and false if httpd.listenUrl uses proxy-http:// or proxy-https://.
1512
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08001513[[httpd.acceptorThreads]]httpd.acceptorThreads::
1514+
1515Number of worker threads dedicated to accepting new incoming TCP
David Pursehouse221d4f62012-06-08 17:38:08 +09001516connections and allocating them connection-specific resources.
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08001517+
1518By default, 2, which should be suitable for most high-traffic sites.
1519
1520[[httpd.minThreads]]httpd.minThreads::
1521+
1522Minimum number of spare threads to keep in the worker thread pool.
1523This number must be at least 1 larger than httpd.acceptorThreads
1524multipled by the number of httpd.listenUrls configured.
1525+
1526By default, 5, suitable for most lower-volume traffic sites.
1527
1528[[httpd.maxThreads]]httpd.maxThreads::
1529+
1530Maximum number of threads to permit in the worker thread pool.
1531+
1532By default 25, suitable for most lower-volume traffic sites.
1533
1534[[httpd.maxQueued]]httpd.maxQueued::
1535+
1536Maximum number of client connections which can enter the worker
1537thread pool waiting for a worker thread to become available.
15380 disables the queue and permits infinite number of connections.
1539+
1540By default 50.
1541
Shawn O. Pearcee5452b72010-01-15 14:32:50 -08001542[[httpd.maxWait]]httpd.maxWait::
1543+
David Pursehouse221d4f62012-06-08 17:38:08 +09001544Maximum amount of time a client will wait for an available
Shawn O. Pearcee5452b72010-01-15 14:32:50 -08001545thread to handle a project clone, fetch or push request over the
1546smart HTTP transport.
1547+
1548Values should use common unit suffixes to express their setting:
1549+
1550* s, sec, second, seconds
1551* m, min, minute, minutes
1552* h, hr, hour, hours
1553* d, day, days
1554* w, week, weeks (`1 week` is treated as `7 days`)
1555* mon, month, months (`1 month` is treated as `30 days`)
1556* y, year, years (`1 year` is treated as `365 days`)
1557
1558+
1559If a unit suffix is not specified, `minutes` is assumed. If 0
1560is supplied, the maximum age is infinite and connections will not
1561abort until the client disconnects.
1562+
1563By default, 5 minutes.
1564
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08001565
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -07001566[[ldap]]Section ldap
1567~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001568
David Pursehouse221d4f62012-06-08 17:38:08 +09001569LDAP integration is only enabled if `auth.type` is set to
Sasa Zivkoveabc8972010-10-04 15:47:08 +02001570`HTTP_LDAP`, `LDAP` or `CLIENT_SSL_CERT_LDAP`. See above for a
1571detailed description of the auth.type settings and their
1572implications.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001573
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07001574An example LDAP configuration follows, and then discussion of
1575the parameters introduced here. Suitable defaults for most
1576parameters are automatically guessed based on the type of server
1577detected during startup. The guessed defaults support both
1578link:http://www.ietf.org/rfc/rfc2307.txt[RFC 2307] and Active
1579Directory.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001580
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001581----
1582[ldap]
1583 server = ldap://ldap.example.com
1584
1585 accountBase = ou=people,dc=example,dc=com
1586 accountPattern = (&(objectClass=person)(uid=${username}))
1587 accountFullName = displayName
1588 accountEmailAddress = mail
1589
1590 groupBase = ou=groups,dc=example,dc=com
1591 groupMemberPattern = (&(objectClass=group)(member=${dn}))
1592----
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001593
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001594[[ldap.server]]ldap.server::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001595+
1596URL of the organization's LDAP server to query for user information
1597and group membership from. Must be of the form `ldap://host` or
1598`ldaps://host` to bind with either a plaintext or SSL connection.
Shawn O. Pearcef7e065e2009-09-26 20:01:10 -07001599+
1600If auth.type is `LDAP` this setting should use `ldaps://` to
1601ensure the end user's plaintext password is transmitted only over
1602an encrypted connection.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001603
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07001604[[ldap.sslVerify]]ldap.sslVerify::
1605+
1606If false and ldap.server is an `ldaps://` style URL, Gerrit
1607will not verify the server certificate when it connects to
1608perform a query.
1609+
1610By default, true, requiring the certificate to be verified.
1611
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001612[[ldap.username]]ldap.username::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001613+
1614_(Optional)_ Username to bind to the LDAP server with. If not set,
1615an anonymous connection to the LDAP server is attempted.
1616
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001617[[ldap.password]]ldap.password::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001618+
1619_(Optional)_ Password for the user identified by `ldap.username`.
1620If not set, an anonymous (or passwordless) connection to the LDAP
1621server is attempted.
1622
Ben Wu0410a152010-06-04 16:17:24 +08001623[[ldap.referral]]ldap.referral::
1624+
1625_(Optional)_ How an LDAP referral should be handled if it is
1626encountered during directory traversal. Set to `follow` to
James Y Knight1244ed02011-01-04 02:40:32 -05001627automatically follow any referrals, or `ignore` to ignore the
1628referrals.
Ben Wu0410a152010-06-04 16:17:24 +08001629+
1630By default, `ignore`.
1631
Sasa Zivkov100bd4b2011-11-07 14:58:46 +01001632[[ldap.readTimeout]]ldap.readTimeout::
1633+
1634_(Optional)_ The read timeout for an LDAP operation. The value is
1635in the usual time-unit format like "1 s", "100 ms", etc...
1636A timeout can be used to avoid blocking all of the SSH command start
David Pursehouse221d4f62012-06-08 17:38:08 +09001637threads in case the LDAP server becomes slow.
Sasa Zivkov100bd4b2011-11-07 14:58:46 +01001638+
1639By default there is no timeout and Gerrit will wait for the LDAP
1640server to respond until the TCP connection times out.
1641
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001642[[ldap.accountBase]]ldap.accountBase::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001643+
1644Root of the tree containing all user accounts. This is typically
1645of the form `ou=people,dc=example,dc=com`.
1646
Shawn O. Pearce304ccdb2009-08-25 12:25:27 -07001647[[ldap.accountScope]]ldap.accountScope::
1648+
1649Scope of the search performed for accounts. Must be one of:
1650+
1651* `one`: Search only one level below accountBase, but not recursive
1652* `sub` or `subtree`: Search recursively below accountBase
1653* `base` or `object`: Search exactly accountBase; probably not desired
1654
1655+
1656Default is `subtree` as many directories have several levels.
1657
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001658[[ldap.accountPattern]]ldap.accountPattern::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001659+
1660Query pattern to use when searching for a user account. This may be
1661any valid LDAP query expression, including the standard `(&...)` and
1662`(|...)` operators. If auth.type is `HTTP_LDAP` then the variable
Edwin Kempincdb0e002011-09-08 14:23:30 +02001663`${username}` is replaced with a parameter set to the username
Shawn O. Pearcef7e065e2009-09-26 20:01:10 -07001664that was supplied by the HTTP server. If auth.type is `LDAP` then
Edwin Kempincdb0e002011-09-08 14:23:30 +02001665the variable `${username}` is replaced by the string entered by
Shawn O. Pearcef7e065e2009-09-26 20:01:10 -07001666the end user.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001667+
1668This pattern is used to search the objects contained directly under
1669the `ldap.accountBase` tree. A typical setting for this parameter
Edwin Kempincdb0e002011-09-08 14:23:30 +02001670is `(uid=${username})` or `(cn=${username})`, but the proper
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001671setting depends on the LDAP schema used by the directory server.
1672+
Edwin Kempincdb0e002011-09-08 14:23:30 +02001673Default is `(uid=${username})` for RFC 2307 servers,
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07001674and `(&(objectClass=user)(sAMAccountName=${username}))`
1675for Active Directory.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001676
Shawn O. Pearce37dc1f82009-08-19 09:49:07 -07001677[[ldap.accountFullName]]ldap.accountFullName::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001678+
1679_(Optional)_ Name of an attribute on the user account object which
1680contains the initial value for the user's full name field in Gerrit.
1681Typically this is the `displayName` property in LDAP, but could
1682also be `legalName` or `cn`.
1683+
David Pursehouse221d4f62012-06-08 17:38:08 +09001684Attribute values may be concatenated with literal strings. For
1685example to join given name and surname together, use the pattern
Edwin Kempincdb0e002011-09-08 14:23:30 +02001686`${givenName} ${SN}`.
Shawn O. Pearceb86ae002009-09-26 16:54:05 -07001687+
Shawn O. Pearce3ca1dcf2009-08-20 08:56:23 -07001688If set, users will be unable to modify their full name field, as
1689Gerrit will populate it only from the LDAP data.
1690+
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07001691Default is `displayName` for RFC 2307 servers,
1692and `${givenName} ${sn}` for Active Directory.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001693
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001694[[ldap.accountEmailAddress]]ldap.accountEmailAddress::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001695+
1696_(Optional)_ Name of an attribute on the user account object which
1697contains the user's Internet email address, as defined by this
1698LDAP server.
1699+
Shawn O. Pearceb86ae002009-09-26 16:54:05 -07001700Attribute values may be concatenated with literal strings,
1701for example to set the email address to the lowercase form
1702of sAMAccountName followed by a constant domain name, use
Edwin Kempincdb0e002011-09-08 14:23:30 +02001703`${sAMAccountName.toLowerCase}@example.com`.
Shawn O. Pearceb86ae002009-09-26 16:54:05 -07001704+
Shawn O. Pearce3ca1dcf2009-08-20 08:56:23 -07001705If set, the preferred email address will be prefilled from LDAP,
David Pursehouse221d4f62012-06-08 17:38:08 +09001706but users may still be able to register additional email addresses,
Shawn O. Pearce3ca1dcf2009-08-20 08:56:23 -07001707and select a different preferred email address.
1708+
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07001709Default is `mail`.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001710
Shawn O. Pearce59e09222009-08-19 09:04:49 -07001711[[ldap.accountSshUserName]]ldap.accountSshUserName::
1712+
1713_(Optional)_ Name of an attribute on the user account object which
1714contains the initial value for the user's SSH username field in
1715Gerrit. Typically this is the `uid` property in LDAP, but could
1716also be `cn`. Administrators should prefer to match the attribute
1717corresponding to the user's workstation username, as this is what
1718SSH clients will default to.
1719+
Shawn O. Pearceb86ae002009-09-26 16:54:05 -07001720Attribute values may also be forced to lowercase, or to uppercase in
Edwin Kempincdb0e002011-09-08 14:23:30 +02001721an expression. For example, `${sAMAccountName.toLowerCase}` will
Shawn O. Pearceb86ae002009-09-26 16:54:05 -07001722force the value of sAMAccountName, if defined, to be all lowercase.
1723The suffix `.toUpperCase` can be used for the other direction.
1724The suffix `.localPart` can be used to split attribute values of
1725the form 'user@example.com' and return only the left hand side, for
Edwin Kempincdb0e002011-09-08 14:23:30 +02001726example `${userPrincipalName.localPart}` would provide only 'user'.
Shawn O. Pearceb86ae002009-09-26 16:54:05 -07001727+
Shawn O. Pearce3ca1dcf2009-08-20 08:56:23 -07001728If set, users will be unable to modify their SSH username field, as
1729Gerrit will populate it only from the LDAP data.
1730+
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07001731Default is `uid` for RFC 2307 servers,
1732and `${sAMAccountName.toLowerCase}` for Active Directory.
Shawn O. Pearce59e09222009-08-19 09:04:49 -07001733
Shawn O. Pearce7d25f782009-10-30 08:01:03 -07001734[[ldap.accountMemberField]]ldap.accountMemberField::
Anthony93de7db2009-10-03 10:01:50 -04001735+
1736_(Optional)_ Name of an attribute on the user account object which
Shawn O. Pearce7d25f782009-10-30 08:01:03 -07001737contains the groups the user is part of. Typically used for Active
1738Directory servers.
Anthony93de7db2009-10-03 10:01:50 -04001739+
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07001740Default is unset for RFC 2307 servers (disabled)
1741and `memberOf` for Active Directory.
Anthony93de7db2009-10-03 10:01:50 -04001742
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001743[[ldap.groupBase]]ldap.groupBase::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001744+
1745Root of the tree containing all group objects. This is typically
1746of the form `ou=groups,dc=example,dc=com`.
1747
Shawn O. Pearce304ccdb2009-08-25 12:25:27 -07001748[[ldap.groupScope]]ldap.groupScope::
1749+
1750Scope of the search performed for group objects. Must be one of:
1751+
1752* `one`: Search only one level below groupBase, but not recursive
1753* `sub` or `subtree`: Search recursively below groupBase
1754* `base` or `object`: Search exactly groupBase; probably not desired
1755
1756+
1757Default is `subtree` as many directories have several levels.
1758
Shawn O. Pearce7d25f782009-10-30 08:01:03 -07001759[[ldap.groupPattern]]ldap.groupPattern::
1760+
1761Query pattern used when searching for an LDAP group to connect
1762to a Gerrit group. This may be any valid LDAP query expression,
1763including the standard `(&...)` and `(|...)` operators. The variable
Edwin Kempincdb0e002011-09-08 14:23:30 +02001764`${groupname}` is replaced with the search term supplied by the
Shawn O. Pearce7d25f782009-10-30 08:01:03 -07001765group owner.
1766+
Edwin Kempincdb0e002011-09-08 14:23:30 +02001767Default is `(cn=${groupname})` for RFC 2307,
1768and `(&(objectClass=group)(cn=${groupname}))` for Active Directory.
Shawn O. Pearce7d25f782009-10-30 08:01:03 -07001769
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001770[[ldap.groupMemberPattern]]ldap.groupMemberPattern::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001771+
1772Query pattern to use when searching for the groups that a user
1773account is currently a member of. This may be any valid LDAP query
1774expression, including the standard `(&...)` and `(|...)` operators.
1775+
Edwin Kempincdb0e002011-09-08 14:23:30 +02001776If auth.type is `HTTP_LDAP` then the variable `${username}` is
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001777replaced with a parameter set to the username that was supplied
1778by the HTTP server. Other variables appearing in the pattern,
Edwin Kempincdb0e002011-09-08 14:23:30 +02001779such as `${fooBarAttribute}`, are replaced with the value of the
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001780corresponding attribute (in this case, `fooBarAttribute`) as read
1781from the user's account object matched under `ldap.accountBase`.
Edwin Kempincdb0e002011-09-08 14:23:30 +02001782Attributes such as `${dn}` or `${uidNumber}` may be useful.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001783+
Edwin Kempincdb0e002011-09-08 14:23:30 +02001784Default is `(memberUid=${username})` for RFC 2307,
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07001785and unset (disabled) for Active Directory.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001786
Auke Schrijnen57809132012-09-26 21:05:39 +02001787[[ldap.groupName]]ldap.groupName::
1788+
David Pursehouse39489ae2012-10-12 13:50:04 +09001789_(Optional)_ Name of the attribute on the group object which contains
1790the value to use as the group name in Gerrit.
Auke Schrijnen57809132012-09-26 21:05:39 +02001791+
David Pursehouse39489ae2012-10-12 13:50:04 +09001792Typically the attribute name is `cn` for RFC 2307 and Active Directory
1793servers. For other servers the attribute name may differ, for example
1794`apple-group-realname` on Apple MacOS X Server.
Auke Schrijnen57809132012-09-26 21:05:39 +02001795+
David Pursehouse39489ae2012-10-12 13:50:04 +09001796It is also possible to specify a literal string containing a pattern of
1797attribute values. For example to create a Gerrit group name consisting of
1798LDAP group name and group ID, use the pattern `${cn} (${gidNumber})`.
1799+
1800Default is `cn`.
Auke Schrijnen57809132012-09-26 21:05:39 +02001801
Edwin Kempinb3b0d292011-09-14 14:17:34 +02001802[[ldap.localUsernameToLowerCase]]ldap.localUsernameToLowerCase::
1803+
1804Converts the local username, that is used to login into the Gerrit
1805WebUI, to lower case before doing the LDAP authentication. By setting
1806this parameter to true, a case insensitive login to the Gerrit WebUI
1807can be achieved.
1808+
1809If set, it must be ensured that the local usernames for all existing
1810accounts are converted to lower case, otherwise a user that has a
David Pursehouse221d4f62012-06-08 17:38:08 +09001811local username that contains upper case characters will not be able to login
Edwin Kempinb3b0d292011-09-14 14:17:34 +02001812anymore. The local usernames for the existing accounts can be
1813converted to lower case by running the server program
1814link:pgm-LocalUsernamesToLowerCase.html[LocalUsernamesToLowerCase].
1815Please be aware that the conversion of the local usernames to lower
1816case can't be undone. For newly created accounts the local username
1817will be directly stored in lower case.
1818+
1819By default, unset/false.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001820
Robin Rosenberga3baed02012-10-14 14:09:32 +02001821[[ldap.authentication]]ldap.authentication::
1822+
1823Defines how Gerrit authenticates with the server. When set to `GSSAPI`
1824Gerrit will use Kerberos. To use kerberos the
1825`java.security.auth.login.config` system property must point to a
1826login to a JAAS configuration file and, if Java 6 is used, the system
1827property `java.security.krb5.conf` must point to the appropriate
1828krb5.ini file with references to the KDC.
1829
1830Typical jaas.conf.
1831
1832----
1833KerberosLogin {
1834 com.sun.security.auth.module.Krb5LoginModule
1835 required
1836 useTicketCache=true
1837 doNotPrompt=true
1838 renewTGT=true;
1839};
1840----
1841
1842See Java documentation on how to create the krb5.ini file.
1843
1844Note the `renewTGT` property to make sure the TGT does not expire,
1845and `useTicketCache` to use the TGT supplied by the operating system. As
1846the whole point of using GSSAPI is to have passwordless authentication
1847to the LDAP service, this option does not aquire a new TGT on its own.
1848
1849On Windows servers the registry key `HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\Kerberos\Parameters`
1850must have the DWORD value `allowtgtsessionkey` set to 1 and the account must not
1851have local administrator privileges.
1852
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -07001853[[mimetype]]Section mimetype
1854~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearce01cb11902009-07-15 08:19:01 -07001855
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001856[[mimetype.name.safe]]mimetype.<name>.safe::
Shawn O. Pearce01cb11902009-07-15 08:19:01 -07001857+
1858If set to true, files with the MIME type `<name>` will be sent as
1859direct downloads to the user's browser, rather than being wrapped up
1860inside of zipped archives. The type name may be a complete type
Edwin Kempincdb0e002011-09-08 14:23:30 +02001861name, e.g. `image/gif`, a generic media type, e.g. `image/*`,
1862or the wildcard `*/*` to match all types.
Shawn O. Pearce01cb11902009-07-15 08:19:01 -07001863+
1864By default, false for all MIME types.
1865
1866Common examples:
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001867----
1868[mimetype "image/*"]
1869 safe = true
1870
1871[mimetype "application/pdf"]
1872 safe = true
1873
1874[mimetype "application/msword"]
1875 safe = true
1876
1877[mimetype "application/vnd.ms-excel"]
1878 safe = true
1879----
Shawn O. Pearce01cb11902009-07-15 08:19:01 -07001880
Shawn O. Pearce5f11b292010-08-05 17:57:35 -07001881
1882[[pack]]Section pack
1883~~~~~~~~~~~~~~~~~~~~
1884Global settings controlling how Gerrit Code Review creates pack
1885streams for Git clients running clone, fetch, or pull. Most of these
1886variables are per-client request, and thus should be carefully set
1887given the expected concurrent request load and available CPU and
1888memory resources.
1889
1890[[pack.deltacompression]]pack.deltacompression::
1891+
1892If true, delta compression between objects is enabled. This may
1893result in a smaller overall transfer for the client, but requires
1894more server memory and CPU time.
1895+
1896False (off) by default, matching Gerrit Code Review 2.1.4.
1897
1898[[pack.threads]]pack.threads::
1899+
1900Maximum number of threads to use for delta compression (if enabled).
1901This is per-client request. If set to 0 then the number of CPUs is
1902auto-detected and one thread per CPU is used, per client request.
1903+
1904By default, 1.
1905
1906
Shawn O. Pearce5ad16ea2012-05-09 14:24:25 -07001907[[plugins]]Section plugins
1908~~~~~~~~~~~~~~~~~~~~~~~~~~
1909
1910[[plugins.checkFrequency]]plugins.checkFrequency::
1911+
1912How often plugins should be examined for new plugins to load, removed
1913plugins to be unloaded, or updated plugins to be reloaded. Values can
1914be specified using standard time unit abbreviations ('ms', 'sec',
1915'min', etc.).
1916+
1917If set to 0, automatic plugin reloading is disabled. Administrators
1918may force reloading with link:cmd-plugin.html[gerrit plugin reload].
1919+
1920Default is 1 minute.
1921
1922
lincoln2be11602010-07-05 10:53:25 -03001923[[receive]]Section receive
1924~~~~~~~~~~~~~~~~~~~~~~~~~~
Sasa Zivkov59d89c32011-11-18 15:32:35 +01001925This section is used to set who can execute the 'receive-pack' and
1926to limit the maximum Git object size that 'receive-pack' will accept.
1927'receive-pack' is what runs on the server during a user's push or
Dave Borowitz234734a2012-03-01 14:22:29 -08001928repo upload command. It also contains some advanced options for tuning the
1929behavior of Gerrit's 'receive-pack' mechanism.
lincoln2be11602010-07-05 10:53:25 -03001930
1931----
1932[receive]
1933 allowGroup = GROUP_ALLOWED_TO_EXECUTE
1934 allowGroup = YET_ANOTHER_GROUP_ALLOWED_TO_EXECUTE
Sasa Zivkov59d89c32011-11-18 15:32:35 +01001935 maxObjectSizeLimit = 40 m
lincoln2be11602010-07-05 10:53:25 -03001936----
1937
1938[[receive.allowGroup]]receive.allowGroup::
1939+
1940Name of the groups of users that are allowed to execute
1941'receive-pack' on the server. One or more groups can be set.
1942+
1943If no groups are added, any user will be allowed to execute
1944'receive-pack' on the server.
1945
Sasa Zivkov59d89c32011-11-18 15:32:35 +01001946[[receive.maxObjectSizeLimit]]receive.maxObjectSizeLimit::
1947+
1948Maximum allowed Git object size that 'receive-pack' will accept.
1949If an object is larger than the given size the pack-parsing will abort
1950and the push operation will fail. If set to zero then there is no
1951limit.
1952+
David Pursehouse221d4f62012-06-08 17:38:08 +09001953Gerrit administrators can use this setting to prevent developers
Sasa Zivkov59d89c32011-11-18 15:32:35 +01001954from pushing objects which are too large to Gerrit.
1955+
1956Default is zero.
1957+
1958Common unit suffixes of 'k', 'm', or 'g' are supported.
1959
Dave Borowitz234734a2012-03-01 14:22:29 -08001960[[receive.threadPoolSize]]receive.threadPoolSize::
1961+
1962Maximum size of the thread pool in which the change data in received packs is
1963processed.
1964+
1965Defaults to the number of available CPUs according to the Java runtime.
1966
Shawn O. Pearcec545c092012-07-27 16:38:55 -07001967[[receive.changeUpdateThreads]]receive.changeUpdateThreads::
1968+
1969Number of threads to perform change creation or patch set updates
1970concurrently. Each thread uses its own database connection from
1971the database connection pool, and if all threads are busy then
1972main receive thread will also perform a change creation or patch
1973set update.
1974+
1975Defaults to 1, using only the main receive thread. This feature is for
1976databases with very high latency that can benfit from concurrent
1977operations when multiple changes are impacted at once.
1978
Dave Borowitz1c401362012-03-02 17:39:17 -08001979[[receive.timeout]]receive.timeout::
1980+
Shawn O. Pearce00dd12d2012-03-12 15:52:11 -07001981Overall timeout on the time taken to process the change data in
1982received packs. Only includes the time processing Gerrit changes
1983and updating references, not the time to index the pack. Values can
1984be specified using standard time unit abbreviations ('ms', 'sec',
1985'min', etc.).
Dave Borowitz1c401362012-03-02 17:39:17 -08001986+
Shawn O. Pearce00dd12d2012-03-12 15:52:11 -07001987Default is 2 minutes. If no unit is specified, millisconds
1988is assumed.
Dave Borowitz1c401362012-03-02 17:39:17 -08001989
lincoln2be11602010-07-05 10:53:25 -03001990
Hugo Josefson072b4702010-04-21 19:27:11 +02001991[[repository]]Section repository
1992~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1993Repositories in this sense are the same as projects.
1994
Shawn O. Pearce897d9212011-06-16 16:59:59 -07001995In the following example configuration `Registered Users` is set
1996to be the default owner of new projects.
Hugo Josefson072b4702010-04-21 19:27:11 +02001997
1998----
1999[repository "*"]
Hugo Josefson072b4702010-04-21 19:27:11 +02002000 ownerGroup = Registered Users
2001----
2002
2003[NOTE]
2004Currently only the repository name `*` is supported.
2005This is a wildcard designating all repositories.
2006
Hugo Josefson072b4702010-04-21 19:27:11 +02002007[[repository.name.ownerGroup]]repository.<name>.ownerGroup::
2008+
2009A name of a group which exists in the database. Zero, one or many
2010groups are allowed. Each on its own line. Groups which don't exist
2011in the database are ignored.
Hugo Josefson072b4702010-04-21 19:27:11 +02002012
Shawn O. Pearce94860ee2011-09-29 13:11:08 -07002013[[rules]]Section rules
2014~~~~~~~~~~~~~~~~~~~~~~
2015
2016[[rules.enable]]rules.enable::
2017+
2018If true, Gerrit will load and excute 'rules.pl' files in each
2019project's refs/meta/config branch, if present. When set to false,
2020only the default internal rules will be used.
2021+
2022Default is true, to execute project specific rules.
2023
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -07002024[[sendemail]]Section sendemail
2025~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07002026
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002027[[sendemail.enable]]sendemail.enable::
Shawn O. Pearce2e4573b2009-06-02 09:09:50 -07002028+
2029If false Gerrit will not send email messages, for any reason,
2030and all other properties of section sendemail are ignored.
2031+
2032By default, true, allowing notifications to be sent.
2033
Shawn O. Pearce5c31bd72009-09-10 18:13:33 -07002034[[sendemail.from]]sendemail.from::
2035+
2036Designates what name and address Gerrit will place in the From
2037field of any generated email messages. The supported values are:
2038+
2039* `USER`
2040+
2041Gerrit will set the From header to use the current user's
2042Full Name and Preferred Email. This may cause messsages to be
2043classified as spam if the user's domain has SPF or DKIM enabled
2044and <<sendemail.smtpServer,sendemail.smtpServer>> is not a trusted
2045relay for that domain.
2046+
2047* `MIXED`
2048+
Edwin Kempincdb0e002011-09-08 14:23:30 +02002049Shorthand for `${user} (Code Review) <review@example.com>` where
Shawn O. Pearce5c31bd72009-09-10 18:13:33 -07002050`review@example.com` is the same as <<user.email,user.email>>.
2051See below for a description of how the replacement is handled.
2052+
2053* `SERVER`
2054+
2055Gerrit will set the From header to the same name and address
2056it records in any commits Gerrit creates. This is set by
2057<<user.name,user.name>> and <<user.email,user.email>>, or guessed
2058from the local operating system.
2059+
2060* 'Code Review' `<`'review'`@`'example.com'`>`
2061+
2062If set to a name and email address in brackets, Gerrit will use
2063this name and email address for any messages, overriding the name
2064that may have been selected for commits by user.name and user.email.
Edwin Kempincdb0e002011-09-08 14:23:30 +02002065Optionally, the name portion may contain the placeholder `${user}`,
Shawn O. Pearce5c31bd72009-09-10 18:13:33 -07002066which is replaced by the Full Name of the current user.
2067
2068+
2069By default, MIXED.
2070
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002071[[sendemail.smtpServer]]sendemail.smtpServer::
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07002072+
2073Hostname (or IP address) of a SMTP server that will relay
2074messages generated by Gerrit to end users.
2075+
2076By default, 127.0.0.1 (aka localhost).
2077
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002078[[sendemail.smtpServerPort]]sendemail.smtpServerPort::
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07002079+
2080Port number of the SMTP server in sendemail.smtpserver.
2081+
Shawn O. Pearce6e9a83f2009-11-02 10:30:48 -08002082By default, 25, or 465 if smtpEncryption is 'ssl'.
2083
2084[[sendemail.smtpEncryption]]sendemail.smtpEncryption::
2085+
2086Specify the encryption to use, either 'ssl' or 'tls'.
2087+
2088By default, 'none', indicating no encryption is used.
2089
2090[[sendemail.sslVerify]]sendemail.sslVerify::
2091+
2092If false and sendemail.smtpEncryption is 'ssl' or 'tls', Gerrit
2093will not verify the server certificate when it connects to send
2094an email message.
2095+
2096By default, true, requiring the certificate to be verified.
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07002097
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002098[[sendemail.smtpUser]]sendemail.smtpUser::
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07002099+
2100User name to authenticate with, if required for relay.
2101
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002102[[sendemail.smtpPass]]sendemail.smtpPass::
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07002103+
2104Password for the account named by sendemail.smtpUser.
2105
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002106[[sendemail.allowrcpt]]sendemail.allowrcpt::
Shawn O. Pearce219a8ee2009-06-01 18:13:57 -07002107+
2108If present, each value adds one entry to the whitelist of email
2109addresses that Gerrit can send email to. If set to a complete
2110email address, that one address is added to the white list.
2111If set to a domain name, any address at that domain can receive
2112email from Gerrit.
2113+
2114By default, unset, permitting delivery to any email address.
2115
Shawn O. Pearce02aacbc2012-06-12 13:44:22 -07002116[[sendemail.includeDiff]]sendemail.includeDiff::
2117+
Bruce Zueb00ff32012-11-27 17:38:10 +08002118If true, new change emails and merged change emails from Gerrit
2119will include the complete unified diff of the change.
2120Variable maxmimumDiffSize places an upper limit on how large the
2121email can get when this option is enabled.
Shawn O. Pearce02aacbc2012-06-12 13:44:22 -07002122+
2123By default, false.
2124
Shawn O. Pearce28a950b2012-06-12 14:36:34 -07002125[[sendemail.maximumDiffSize]]sendemail.maximumDiffSize::
2126+
2127Largest size of unified diff output to include in an email. When
2128the diff exceeds this size the file paths will be listed instead.
2129Standard byte unit suffixes are supported.
2130+
2131By default, 256 KiB.
2132
Alex Blewitt9cca7402011-02-11 01:39:30 +00002133[[sendemail.importance]]sendemail.importance::
2134+
2135If present, emails sent from Gerrit will have the given level
2136of importance. Valid values include 'high' and 'low', which
2137email clients will render in different ways.
2138+
2139By default, unset, so no Importance header is generated.
2140
2141[[sendemail.expiryDays]]sendemail.expiryDays::
2142+
2143If present, emails sent from Gerrit will expire after the given
2144number of days. This will add the Expiry-Date header and
2145email clients may expire or expunge mails whose Expiry-Date
2146header is in the past. This should be a positive non-zero
2147number indicating how many days in the future the mails
2148should expire.
2149+
2150By default, unset, so no Expiry-Date header is generated.
2151
Shawn O. Pearcedba97642011-09-07 20:12:31 -07002152
2153[[site]]Section site
2154~~~~~~~~~~~~~~~~~~~~
2155
2156[[site.checkUserAgent]]site.checkUserAgent::
2157+
2158If true the server checks the User-Agent HTTP header and sends the
2159correct JavaScript to the client as part of the initial page load.
2160This usually reduces a round-trip for the client, allowing the UI to
2161start more quickly. If false, a tiny JavaScript loader is sent to the
2162client instead to determine the correct code to use. Default is true.
2163
2164[[site.refreshHeaderFooter]]site.refreshHeaderFooter::
2165+
2166If true the server checks the site header, footer and CSS files for
2167updated versions. If false, a server restart is required to change
2168any of these resources. Default is true, allowing automatic reloads.
2169
Shawn O. Pearce6bd04fd2012-04-05 14:39:22 -07002170[[site.enableDeprecatedQuery]]site.enableDeprecatedQuery::
2171+
2172If true the deprecated `/query` URL is available to return JSON
2173and text results for changes. If false, the URL is disabled and
2174returns 404 to clients. Default is true, enabling `/query`.
2175
Sasa Zivkovde980a42012-06-14 14:57:53 +02002176[[site.upgradeSchemaOnStartup]]site.upgradeSchemaOnStartup::
2177+
2178Control whether schema upgrade should be done on Gerrit startup. The following
2179values are supported:
2180+
2181* `OFF`
2182+
2183No automatic schema upgrade on startup.
2184+
2185* `AUTO`
2186+
2187Perform schema migration on startup, if necessary. If, as a result of
2188schema migration, there would be any unused database objects they will
2189be dropped automatically.
2190+
2191* `AUTO_NO_PRUNE`
2192+
2193Like `AUTO` but unused database objects will not be pruned.
2194
2195+
2196The default is `OFF`.
2197
Shawn O. Pearce521380a2012-05-11 14:57:56 -07002198[[ssh-alias]] Section ssh-alias
2199~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2200
2201Variables in section ssh-alias permit the site administrator to alias
2202another command from Gerrit or a plugin into the `gerrit` command
2203namespace. To alias `replication start` to `gerrit replicate`:
2204
2205----
2206[ssh-alias]
2207 replicate = replication start
2208----
Shawn O. Pearcedba97642011-09-07 20:12:31 -07002209
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -07002210[[sshd]] Section sshd
Shawn O. Pearcea758fef2009-08-19 08:29:32 -07002211~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearce9410f2c2009-05-14 10:26:47 -07002212
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002213[[sshd.listenAddress]]sshd.listenAddress::
Shawn O. Pearce1d3cb4442009-05-30 14:03:31 -07002214+
2215Specifies the local addresses the internal SSHD should listen
2216for connections on. The following forms may be used to specify
2217an address. In any form, `:'port'` may be omitted to use the
2218default of 29418.
2219+
2220* 'hostname':'port' (for example `review.example.com:29418`)
2221* 'IPv4':'port' (for example `10.0.0.1:29418`)
2222* ['IPv6']:'port' (for example `[ff02::1]:29418`)
Edwin Kempincdb0e002011-09-08 14:23:30 +02002223* *:'port' (for example `*:29418`)
Shawn O. Pearce1d3cb4442009-05-30 14:03:31 -07002224
2225+
2226If multiple values are supplied, the daemon will listen on all
2227of them.
2228+
Shawn O. Pearce6af6f5f2010-06-08 17:38:43 -07002229To disable the internal SSHD, set listenAddress to `off`.
2230+
Shawn O. Pearce1d3cb4442009-05-30 14:03:31 -07002231By default, *:29418.
2232
James Y Knight910bd862011-01-11 20:05:56 -05002233[[sshd.advertisedAddress]]sshd.advertisedAddress::
2234+
2235Specifies the addresses clients should be told to connect to.
2236This may differ from sshd.listenAddress if a firewall based port
2237redirector is being used, making Gerrit appear to answer on port
223822. The following forms may be used to specify an address. In any
2239form, `:'port'` may be omitted to use the default SSH port of 22.
2240+
2241* 'hostname':'port' (for example `review.example.com:22`)
2242* 'IPv4':'port' (for example `10.0.0.1:29418`)
2243* ['IPv6']:'port' (for example `[ff02::1]:29418`)
2244
2245+
2246If multiple values are supplied, the daemon will advertise all
2247of them.
2248+
2249By default, sshd.listenAddress.
2250
Shawn O. Pearce149238a2009-09-10 12:25:20 -07002251[[sshd.reuseAddress]]sshd.reuseAddress::
Shawn O. Pearce9410f2c2009-05-14 10:26:47 -07002252+
2253If true, permits the daemon to bind to the port even if the port
2254is already in use. If false, the daemon ensures the port is not
2255in use before starting. Busy sites may need to set this to true
2256to permit fast restarts.
2257+
2258By default, true.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -07002259
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002260[[sshd.tcpKeepAlive]]sshd.tcpKeepAlive::
Shawn O. Pearcefc9081f2009-05-14 10:26:59 -07002261+
2262If true, enables TCP keepalive messages to the other side, so
2263the daemon can terminate connections if the peer disappears.
2264+
2265By default, true.
2266
Shawn O. Pearce1a4580b2009-11-19 17:37:10 -08002267[[sshd.threads]]sshd.threads::
2268+
2269Number of threads to use when executing SSH command requests.
2270If additional requests are received while all threads are busy they
David Pursehouse221d4f62012-06-08 17:38:08 +09002271are queued and serviced in a first-come-first-served order.
Shawn O. Pearce1a4580b2009-11-19 17:37:10 -08002272+
2273By default, 1.5x the number of CPUs available to the JVM.
2274
Nico Sallembienfc53f7f2010-05-18 16:40:10 -07002275[[sshd.batchThreads]]sshd.batchThreads::
2276+
2277Number of threads to allocate for SSH command requests from
Fredrik Luthander46843022012-03-13 16:11:02 +01002278link:access-control.html#non-interactive_users[non-interactive users].
2279If equals to 0, then all non-interactive requests are executed in the same
2280queue as interactive requests.
Nico Sallembienfc53f7f2010-05-18 16:40:10 -07002281+
2282Any other value will remove the number of threads from the queue
2283allocated to interactive users, and create a separate thread pool
2284of the requested size, which will be used to run commands from
2285non-interactive users.
2286+
2287If the number of threads requested for non-interactive users is larger
2288than the total number of threads allocated in sshd.threads, then the
2289value of sshd.threads is increased to accomodate the requested value.
2290+
2291By default, 0.
2292
Kenny Root15ac1b82010-02-24 00:29:20 -08002293[[sshd.streamThreads]]sshd.streamThreads::
2294+
2295Number of threads to use when formatting events to asynchronous
2296streaming clients. Event formatting is multiplexed onto this thread
2297pool by a simple FIFO scheduling system.
2298+
2299By default, 1 plus the number of CPUs available to the JVM.
2300
Edwin Kempinb5df3b82011-10-10 11:31:14 +02002301[[sshd.commandStartThreads]]sshd.commandStartThreads::
Shawn O. Pearced6296552011-05-15 13:56:30 -07002302+
2303Number of threads used to parse a command line submitted by a client
2304over SSH for execution, create the internal data structures used by
2305that command, and schedule it for execution on another thread.
2306+
2307By default, 2.
2308
Shawn O. Pearce8a0bf362010-11-05 17:49:41 -07002309[[sshd.maxAuthTries]]sshd.maxAuthTries::
2310+
2311Maximum number of authentication attempts before the server
2312disconnects the client. Each public key that a client has loaded
2313into its local agent counts as one auth request. Users can work
2314around the server's limit by loading less keys into their agent,
2315or selecting a specific key in their `~/.ssh/config` file with
2316the `IdentityFile` option.
2317+
2318By default, 6.
2319
2320[[sshd.loginGraceTime]]sshd.loginGraceTime::
2321+
2322Time in seconds that a client has to authenticate before the server
2323automatically terminates their connection. Values should use common
2324unit suffixes to express their setting:
2325+
2326* s, sec, second, seconds
2327* m, min, minute, minutes
2328* h, hr, hour, hours
2329* d, day, days
2330
2331+
2332By default, 2 minutes.
2333
2334[[sshd.maxConnectionsPerUser]]sshd.maxConnectionsPerUser::
2335+
2336Maximum number of concurrent SSH sessions that a user account
2337may open at one time. This is the number of distinct SSH logins
David Pursehouse221d4f62012-06-08 17:38:08 +09002338that each user may have active at one time, and is not related to
Shawn O. Pearce8a0bf362010-11-05 17:49:41 -07002339the number of commands a user may issue over a single connection.
2340If set to 0, there is no limit.
2341+
2342By default, 64.
2343
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002344[[sshd.cipher]]sshd.cipher::
Shawn O. Pearce0bf2f522009-05-14 11:02:03 -07002345+
2346Available ciphers. To permit multiple ciphers, specify multiple
2347`sshd.cipher` keys in the configuration file, one cipher name
2348per key. Cipher names starting with `+` are enabled in addition
2349to the default ciphers, cipher names starting with `-` are removed
2350from the default cipher set.
2351+
2352Supported ciphers: aes128-cbc, aes128-cbc, aes256-cbc, blowfish-cbc,
23533des-cbc, none.
2354+
2355By default, all supported ciphers except `none` are available.
2356
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002357[[sshd.mac]]sshd.mac::
Shawn O. Pearce0bf2f522009-05-14 11:02:03 -07002358+
2359Available MAC (message authentication code) algorithms. To permit
2360multiple algorithms, specify multiple `sshd.mac` keys in the
2361configuration file, one MAC per key. MAC names starting with `+`
2362are enabled in addition to the default MACs, MAC names starting with
2363`-` are removed from the default MACs.
2364+
2365Supported MACs: hmac-md5, hmac-md5-96, hmac-sha1, hmac-sha1-96.
2366+
2367By default, all supported MACs are available.
2368
Shawn O. Pearce07bd6fb2011-04-29 19:15:47 -07002369[[suggest]] Section suggest
2370~~~~~~~~~~~~~~~~~~~~~~~~~~~
2371
Dave Borowitz1ae8c532012-03-09 18:39:40 -08002372[[suggest.accounts]]suggest.accounts::
Shawn O. Pearce07bd6fb2011-04-29 19:15:47 -07002373+
Dave Borowitz45baa892012-02-23 16:43:05 -08002374If `true`, visible user accounts (according to the value of
2375`accounts.visibility`) will be offered as completion suggestions
2376when adding a reviewer to a change, or a user to a group.
Shawn O. Pearce07bd6fb2011-04-29 19:15:47 -07002377+
Dave Borowitz45baa892012-02-23 16:43:05 -08002378If `false`, account suggestion is disabled.
Shawn O. Pearce07bd6fb2011-04-29 19:15:47 -07002379+
Dave Borowitz45baa892012-02-23 16:43:05 -08002380Older configurations may also have one of the `accounts.visibility`
2381values for this field, including `OFF` as a synonym for `NONE`. If
2382`accounts.visibility` is also set, that value overrides this one;
2383otherwise, this value applies to both `suggest.accounts` and
2384`accounts.visibility`.
Edwin Kempin42488812011-05-20 03:11:43 +02002385+
Dave Borowitz45baa892012-02-23 16:43:05 -08002386New configurations should prefer the boolean value for this field
2387and an enum value for `accounts.visibility`.
Shawn O. Pearce07bd6fb2011-04-29 19:15:47 -07002388
Edwin Kempinf957dc22012-10-19 20:41:18 +02002389[[suggest.from]]suggest.from::
2390+
2391The number of characters that a user must have typed before suggestions
2392are provided. If set to 0, suggestions are always provided.
2393+
2394By default 0.
2395
Shawn O. Pearce2ba3ab42010-02-25 12:10:10 -08002396[[theme]] Section theme
2397~~~~~~~~~~~~~~~~~~~~~~~
2398
2399[[theme.backgroundColor]]theme.backgroundColor::
2400+
2401Background color for the page, and major data tables like the all
2402open changes table or the account dashboard. The value must be a
2403valid HTML hex color code, or standard color name.
2404+
Chad Horohoebbdf7482012-11-13 18:23:15 -08002405By default white, `FFFFFF`.
Shawn O. Pearce2ba3ab42010-02-25 12:10:10 -08002406
2407[[theme.topMenuColor]]theme.topMenuColor::
2408+
2409This is the color of the main menu bar at the top of the page.
2410The value must be a valid HTML hex color code, or standard color
Chad Horohoebbdf7482012-11-13 18:23:15 -08002411name.
2412+
2413By default white, `FFFFFF`.
Shawn O. Pearce2ba3ab42010-02-25 12:10:10 -08002414
2415[[theme.textColor]]theme.textColor::
2416+
2417Text color for the page, and major data tables like the all
2418open changes table or the account dashboard. The value must be a
2419valid HTML hex color code, or standard color name.
2420+
Chad Horohoebbdf7482012-11-13 18:23:15 -08002421By default dark grey, `353535`.
Shawn O. Pearce2ba3ab42010-02-25 12:10:10 -08002422
2423[[theme.trimColor]]theme.trimColor::
2424+
2425Primary color used as a background color behind text. This is
2426the color of the main menu bar at the top, of table headers,
2427and of major UI areas that we want to offset from other portions
2428of the page. The value must be a valid HTML hex color code, or
2429standard color name.
2430+
Chad Horohoebbdf7482012-11-13 18:23:15 -08002431By default a light grey, `EEEEEE`.
Shawn O. Pearce2ba3ab42010-02-25 12:10:10 -08002432
2433[[theme.selectionColor]]theme.selectionColor::
2434+
2435Background color used within a trimColor area to denote the currently
2436selected tab, or the background color used in a table to denote the
2437currently selected row. The value must be a valid HTML hex color
2438code, or standard color name.
2439+
Chad Horohoebbdf7482012-11-13 18:23:15 -08002440By default a pale blue, `D8EDF9`.
Shawn O. Pearce2ba3ab42010-02-25 12:10:10 -08002441
Andrew Hutchingscfd7abb2012-06-29 10:57:05 +01002442[[theme.changeTableOutdatedColor]]theme.changeTableOutdatedColor::
2443+
2444Background color used for patch outdated messages. The value must be
2445a valid HTML hex color code, or standard color name.
2446+
Edwin Kempinb0347332012-07-17 10:14:32 +02002447By default a shade of red, `F08080`.
Andrew Hutchingscfd7abb2012-06-29 10:57:05 +01002448
2449[[theme.tableOddRowColor]]theme.tableOddRowColor::
2450+
2451Background color for tables such as lists of open reviews for odd
2452rows. This is so you can have a different color for odd and even
2453rows of the table. The value must be a valid HTML hex color code,
2454or standard color name.
2455+
2456By default transparent.
2457
2458[[theme.tableEvenRowColor]]theme.tableEvenRowColor::
2459+
2460Background color for tables such as lists of open reviews for even
2461rows. This is so you can have a different color for odd and even
2462rows of the table. The value must be a valid HTML hex color code,
2463or standard color name.
2464+
2465By default transparent.
2466
Shawn O. Pearcea83bb1c2011-05-20 08:46:48 -07002467A different theme may be used for signed-in vs. signed-out user status
2468by using the "signed-in" and "signed-out" theme sections. Variables
2469not specified in a section are inherited from the default theme.
2470
2471----
2472[theme]
2473 backgroundColor = FFFFFF
2474[theme "signed-in"]
2475 backgroundColor = C0C0C0
2476[theme "signed-out"]
2477 backgroundColor = 00FFFF
2478----
2479
Goran Lungberg04132a12010-06-15 17:20:37 -07002480[[trackingid]] Section trackingid
Shawn O. Pearce91763a02010-06-16 15:39:33 -07002481~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Goran Lungberg04132a12010-06-15 17:20:37 -07002482
Shawn O. Pearcee800b1e2010-06-16 17:33:43 -07002483Tagged footer lines containing references to external
2484tracking systems, parsed out of the commit message and
2485saved in Gerrit's database. After making changes to
2486this section, existing changes must be reindexed with the
2487link:pgm-ScanTrackingIds.html[ScanTrackingIds] program.
Goran Lungberg04132a12010-06-15 17:20:37 -07002488
Edwin Kempinbb421f12011-08-25 11:19:00 +02002489The tracking ids are searchable using tr:<tracking id> or
Shawn O. Pearce91763a02010-06-16 15:39:33 -07002490bug:<tracking id>.
Goran Lungberg04132a12010-06-15 17:20:37 -07002491
2492----
2493[trackingid "jira-bug"]
2494 footer = Bugfix:
2495 match = JRA\\d{2,8}
2496 system = JIRA
2497
2498[trackingid "jira-feature"]
2499 footer = Feature
2500 match = JRA(\\d{2,8})
2501 system = JIRA
2502----
2503
2504[[trackingid.name.footer]]trackingid.<name>.footer::
2505+
2506A prefix tag that identify the footer line to parse for tracking ids.
Kevin Degi9af42ea2011-08-01 15:54:42 -06002507Several trackingid entries can have the same footer tag. A single
2508trackingid entry can have multiple footer tags. If multiple footer
2509tags are specified, each tag will be parsed separately.
Goran Lungberg04132a12010-06-15 17:20:37 -07002510(the trailing ":" is optional)
2511
2512[[trackingid.name.match]]trackingid.<name>.match::
2513+
Magnus Bäcke5611832011-02-02 08:57:15 +01002514A link:http://download.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html[standard
2515Java regular expression (java.util.regex)] used to match the
2516external tracking id part of the footer line. The match can
2517result in several entries in the DB. If grouping is used in the
2518regex the first group will be interpreted as the tracking id.
David Pursehouse221d4f62012-06-08 17:38:08 +09002519Tracking ids longer than 20 characters will be ignored.
Goran Lungberg04132a12010-06-15 17:20:37 -07002520+
2521The configuration file parser eats one level of backslashes, so the
2522character class `\s` requires `\\s` in the configuration file. The
2523parser also terminates the line at the first `#`, so a match
2524expression containing # must be wrapped in double quotes.
2525
2526[[trackingid.name.system]]trackingid.<name>.system::
2527+
David Pursehouse221d4f62012-06-08 17:38:08 +09002528The name of the external tracking system (maximum 10 characters).
Goran Lungberg04132a12010-06-15 17:20:37 -07002529It is possible to have several trackingid entries for the same
2530tracking system.
2531
Shawn O. Pearce6e4dfdd2010-05-12 17:26:08 -07002532[[transfer]] Section transfer
2533~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2534
2535[[transfer.timeout]]transfer.timeout::
2536+
2537Number of seconds to wait for a single network read or write
2538to complete before giving up and declaring the remote side is
2539not responding. If 0, there is no timeout, and this server will
2540wait indefinitely for a transfer to finish.
2541+
2542A timeout should be large enough to mostly transfer the objects to
2543the other side. 1 second may be too small for larger projects,
2544especially over a WAN link, while 10-30 seconds is a much more
2545reasonable timeout value.
2546+
2547Defaults to 0 seconds, wait indefinitely.
2548
lincoln2be11602010-07-05 10:53:25 -03002549
2550[[upload]]Section upload
Remy Bohmer203eea32012-02-19 21:21:36 +01002551~~~~~~~~~~~~~~~~~~~~~~~~
lincoln2be11602010-07-05 10:53:25 -03002552Sets the group of users allowed to execute 'upload-pack' on the
2553server, 'upload-pack' is what runs on the server during a user's
2554fetch, clone or repo sync command.
2555
2556----
2557[upload]
2558 allowGroup = GROUP_ALLOWED_TO_EXECUTE
2559 allowGroup = YET_ANOTHER_GROUP_ALLOWED_TO_EXECUTE
2560----
2561
2562[[upload.allowGroup]]upload.allowGroup::
2563+
2564Name of the groups of users that are allowed to execute 'upload-pack'
2565on the server. One or more groups can be set.
2566+
2567If no groups are added, any user will be allowed to execute
2568'upload-pack' on the server.
2569
2570
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -07002571[[user]] Section user
Shawn O. Pearcea758fef2009-08-19 08:29:32 -07002572~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearce0a351912009-06-01 08:14:46 -07002573
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002574[[user.name]]user.name::
Shawn O. Pearce0a351912009-06-01 08:14:46 -07002575+
2576Name that Gerrit calls itself in Git when it creates a new Git
2577commit, such as a merge during change submission.
2578+
2579By default this is "Gerrit Code Review".
2580
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002581[[user.email]]user.email::
Shawn O. Pearce0a351912009-06-01 08:14:46 -07002582+
2583Email address that Gerrit refers to itself as when it creates a
2584new Git commit, such as a merge commit during change submission.
2585+
2586If not set, Gerrit generates this as "gerrit@`hostname`", where
2587`hostname` is the hostname of the system Gerrit is running on.
2588+
2589By default, not set, generating the value at startup.
2590
Edwin Kempin0e02ded2011-09-16 15:10:14 +02002591[[user.anonymousCoward]]user.anonymousCoward::
2592+
2593Username that this displayed in the Gerrit WebUI and in e-mail
2594notifications if the full name of the user is not set.
2595+
2596By default "Anonymous Coward" is used.
2597
Shawn O. Pearce0bf2f522009-05-14 11:02:03 -07002598
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08002599File `etc/secure.config`
Remy Bohmer203eea32012-02-19 21:21:36 +01002600------------------------
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08002601The optional file `'$site_path'/etc/secure.config` overrides (or
2602supplements) the settings supplied by `'$site_path'/etc/gerrit.config`.
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08002603The file should be readable only by the daemon process and can be
2604used to contain private configuration entries that wouldn't normally
2605be exposed to everyone.
2606
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08002607Sample `etc/secure.config`:
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08002608----
Shawn O. Pearce34f38cf2011-06-16 19:18:54 -07002609[auth]
2610 registerEmailPrivateKey = 2zHNrXE2bsoylzUqDxZp0H1cqUmjgWb6
Brad Larson3a6f0772012-07-25 11:41:22 -05002611 restTokenPrivateKey = 7e40PzCjlUKOnXATvcBNXH6oyiu+r0dFk2c=
Shawn O. Pearce34f38cf2011-06-16 19:18:54 -07002612
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08002613[database]
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08002614 username = webuser
2615 password = s3kr3t
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08002616
2617[ldap]
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08002618 password = l3tm3srch
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08002619
2620[httpd]
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08002621 sslKeyPassword = g3rr1t
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08002622
2623[sendemail]
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08002624 smtpPass = sp@m
Shawn O. Pearce7929d872011-05-15 13:33:15 -07002625
2626[remote "bar"]
2627 password = s3kr3t
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08002628----
2629
Johan Bjork3e5ee302012-01-27 17:59:54 +01002630File `etc/peer_keys`
2631--------------------
2632
2633The optional file `'$site_path'/etc/peer_keys` controls who can
2634login as the 'Gerrit Code Review' user, required for the link:cmd-suexec.html[suexec]
2635command.
2636
2637The format is one Base-64 encoded public key per line.
2638
2639
Shawn O. Pearce7b405712009-05-08 18:27:53 -07002640Database system_config
2641----------------------
2642
2643Several columns in the `system_config` table within the metadata
2644database may be set to control how Gerrit behaves.
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08002645
2646[NOTE]
2647The contents of the `system_config` table are cached at startup
2648by Gerrit. If you modify any columns in this table, Gerrit needs
2649to be restarted before it will use the new values.
2650
Shawn O. Pearce7b405712009-05-08 18:27:53 -07002651Configurable Parameters
2652~~~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08002653
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07002654site_path::
2655+
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08002656Local filesystem directory holding the site customization assets.
2657Placing this directory under version control and/or backup is a
2658good idea.
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07002659+
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08002660Files in this directory provide additional configuration.
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07002661+
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08002662Other files support site customization.
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07002663+
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08002664* link:config-headerfooter.html[Site Header/Footer]
2665
Shawn O. Pearce5500e692009-05-28 15:55:01 -07002666GERRIT
2667------
2668Part of link:index.html[Gerrit Code Review]