blob: 0f234f7648c965b429e83c84f5c09a52e5af54ea [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[cache "diff"]
Shawn O. Pearce9d342a42009-12-16 15:49:05 -080024 diskbuffer = 10 m
Shawn O. Pearce51967cd2009-05-08 19:46:57 -070025----
26
Dave Borowitz45baa892012-02-23 16:43:05 -080027[[accounts]]Section accounts
28~~~~~~~~~~~~~~~~~~~~~~~~~~~~
29
Matthias Sohnf3360662012-04-05 15:42:52 +020030[[accounts.visibility]]accounts.visibility::
Dave Borowitz45baa892012-02-23 16:43:05 -080031+
32Controls visibility of other users' dashboard pages and
33completion suggestions to web users.
34+
35If `ALL`, all users are visible to all other users, even
36anonymous users.
37+
38If `SAME_GROUP`, only users who are also members of a group the
39current user is a member of are visible.
40+
41If `VISIBLE_GROUP`, only users who are members of at least one group
42that is visible to the current user are visible.
43+
44If `NONE`, no users other than the current user are visible.
45+
46Default is `ALL`.
47
Edwin Kempin49cb3e12011-06-29 14:35:14 +020048[[addreviewer]]Section addreviewer
49~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
50
51[[addreviewer.maxWithoutConfirmation]]addreviewer.maxWithoutConfirmation::
52+
53The maximum number of reviewers a user can add at once by adding a
54group as reviewer without being asked to confirm the operation.
55+
56If set to 0, the user will never be asked to confirm adding a group
57as reviewer.
58+
59Default is 10.
Edwin Kempin5e65d9b2011-07-08 07:35:48 +020060+
61This setting only applies for adding reviewers in the Gerrit WebUI,
62but is ignored when adding reviewers with the
Edwin Kempin33e92d02011-07-11 22:00:57 +020063link:cmd-set-reviewers.html[set-reviewers] command.
Edwin Kempin49cb3e12011-06-29 14:35:14 +020064
65[[addreviewer.maxAllowed]]addreviewer.maxAllowed::
66+
67The maximum number of reviewers a user can add at once by adding a
68group as reviewer.
69+
70If set to 0, there is no limit for the number of reviewers that can
71be added at once by adding a group as reviewer.
72+
73Default is 20.
74
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -070075[[auth]]Section auth
76~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -070077
78See also link:config-sso.html[SSO configuration].
79
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -070080[[auth.type]]auth.type::
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -070081+
Shawn O. Pearce2920ef32009-08-03 08:03:34 -070082Type of user authentication employed by Gerrit. The supported
83values are:
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -070084+
85* `OpenID`
86+
87The default setting. Gerrit uses any valid OpenID
88provider chosen by the end-user. For more information see
Shawn O. Pearce2920ef32009-08-03 08:03:34 -070089http://openid.net/[openid.net].
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -070090+
James E. Blairca8bc3b2011-12-21 18:12:26 +000091* `OpenID_SSO`
92+
93Supports OpenID from a single provider. There is no registration
94link, and the "Sign In" link sends the user directly to the provider's
95SSO entry point.
96+
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -070097* `HTTP`
98+
Shawn O. Pearce2920ef32009-08-03 08:03:34 -070099Gerrit relies upon data presented in the HTTP request. This includes
Edwin Kempinf1acbb82011-09-15 12:49:42 +0200100HTTP basic authentication, or some types of commercial single-sign-on
Shawn O. Pearce2920ef32009-08-03 08:03:34 -0700101solutions. With this setting enabled the authentication must
102take place in the web server or servlet container, and not from
103within Gerrit.
104+
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -0700105* `HTTP_LDAP`
106+
107Exactly like `HTTP` (above), but additionally Gerrit pre-populates
108a user's full name and email address based on information obtained
109from the user's account object in LDAP. The user's group membership
110is also pulled from LDAP, making any LDAP groups that a user is a
111member of available as groups in Gerrit.
112+
Sasa Zivkoveabc8972010-10-04 15:47:08 +0200113* `CLIENT_SSL_CERT_LDAP`
114+
115This authentication type is actually kind of SSO. Gerrit will configure
David Pursehouse221d4f62012-06-08 17:38:08 +0900116Jetty's SSL channel to request the client's SSL certificate. For this
Sasa Zivkoveabc8972010-10-04 15:47:08 +0200117authentication to work a Gerrit administrator has to import the root
118certificate of the trust chain used to issue the client's certificate
119into the <review-site>/etc/keystore.
120After the authentication is done Gerrit will obtain basic user
121registration (name and email) from LDAP, and some group memberships.
122Therefore, the "_LDAP" suffix in the name of this authentication type.
123This authentication type can only be used under hosted daemon mode, and
124the httpd.listenUrl must use https:// as the protocol.
125+
Shawn O. Pearcef7e065e2009-09-26 20:01:10 -0700126* `LDAP`
127+
128Gerrit prompts the user to enter a username and a password, which
129it then verifies by performing a simple bind against the configured
130<<ldap.server,ldap.server>>. In this configuration the web server
131is not involved in the user authentication process.
132+
Shawn O. Pearcec892d342010-02-17 17:00:50 -0800133The actual username used in the LDAP simple bind request is the
134account's full DN, which is discovered by first querying the
135directory using either an anonymous request, or the configured
136<<ldap.username>> identity.
137
138* `LDAP_BIND`
139+
140Gerrit prompts the user to enter a username and a password, which
141it then verifies by performing a simple bind against the configured
142<<ldap.server,ldap.server>>. In this configuration the web server
143is not involved in the user authentication process.
144+
145Unlike LDAP above, the username used to perform the LDAP simple bind
146request is the exact string supplied by in the dialog by the user.
147The configured <<ldap.username>> identity is not used to obtain
148account information.
149+
Shawn O. Pearce2920ef32009-08-03 08:03:34 -0700150* `DEVELOPMENT_BECOME_ANY_ACCOUNT`
151+
152*DO NOT USE*. Only for use in a development environment.
153+
154When this is the configured authentication method a hyperlink titled
155`Become` appears in the top right corner of the page, taking the
156user to a form where they can enter the username of any existing
157user account, and immediately login as that account, without any
158authentication taking place. This form of authentication is only
159useful for the GWT hosted mode shell, where OpenID authentication
160redirects might be risky to the developer's host computer, and HTTP
161authentication is not possible.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700162
163+
164By default, OpenID.
165
Shawn O. Pearce533cafc2010-05-11 16:05:27 -0700166[[auth.allowedOpenID]]auth.allowedOpenID::
167+
168List of permitted OpenID providers. A user may only authenticate
169with an OpenID that matches this list. Only used if `auth.type`
David Pursehouse221d4f62012-06-08 17:38:08 +0900170is set to OpenID (the default).
Shawn O. Pearce533cafc2010-05-11 16:05:27 -0700171+
Magnus Bäcke5611832011-02-02 08:57:15 +0100172Patterns may be either a
173link:http://download.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html[standard
174Java regular expression (java.util.regex)] (start with `^` and
Shawn O. Pearce533cafc2010-05-11 16:05:27 -0700175end with `$`) or be a simple prefix (any other string).
176+
177By default, the list contains two values, `http://` and `https://`,
178allowing users to authenticate with any OpenID provider.
179
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700180[[auth.trustedOpenID]]auth.trustedOpenID::
Shawn O. Pearced7c026d2009-08-05 20:11:22 -0700181+
David Pursehouse221d4f62012-06-08 17:38:08 +0900182List of trusted OpenID providers. Only used if `auth.type` is
Shawn O. Pearced7c026d2009-08-05 20:11:22 -0700183set to OpenID (the default).
184+
185In order for a user to take advantage of permissions beyond those
186granted to the `Anonymous Users` and `Registered Users` groups,
187the user account must only have OpenIDs which match at least one
188pattern from this list.
189+
Magnus Bäcke5611832011-02-02 08:57:15 +0100190Patterns may be either a
191link:http://download.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html[standard
192Java regular expression (java.util.regex)] (start with `^` and
Shawn O. Pearced7c026d2009-08-05 20:11:22 -0700193end with `$`) or be a simple prefix (any other string).
194+
195By default, the list contains two values, `http://` and `https://`,
196allowing Gerrit to trust any OpenID it receives.
197
Shawn O. Pearce89030bc2010-04-24 17:25:29 -0700198[[auth.maxOpenIdSessionAge]]auth.maxOpenIdSessionAge::
199+
200Time in seconds before an OpenID provider must force the user
201to authenticate themselves again before authentication to this
202Gerrit server. Currently this is only a polite request, and users
203coming from providers that don't support the PAPE extension will
204be accepted anyway. In the future it may be enforced, rejecting
205users coming from providers that don't honor the max session age.
206+
207If set to 0, the provider will always force the user to authenticate
208(e.g. supply their password). Values should use common unit suffixes
209to express their setting:
210+
211* s, sec, second, seconds
212* m, min, minute, minutes
213* h, hr, hour, hours
214* d, day, days
215* w, week, weeks (`1 week` is treated as `7 days`)
216* mon, month, months (`1 month` is treated as `30 days`)
217* y, year, years (`1 year` is treated as `365 days`)
218
219+
220Default is -1, permitting infinite time between authentications.
221
Shawn O. Pearce34f38cf2011-06-16 19:18:54 -0700222[[auth.maxRegisterEmailTokenAge]]auth.maxRegisterEmailTokenAge::
223+
224Time in seconds before an email verification token sent to a user in
225order to validate their email address expires.
226+
227* s, sec, second, seconds
228* m, min, minute, minutes
229* h, hr, hour, hours
230* d, day, days
231* w, week, weeks (`1 week` is treated as `7 days`)
232* mon, month, months (`1 month` is treated as `30 days`)
233* y, year, years (`1 year` is treated as `365 days`)
234
235+
Shawn O. Pearced6bd00b2012-01-20 12:40:51 -0800236Default is 12 hours.
Shawn O. Pearce34f38cf2011-06-16 19:18:54 -0700237
James E. Blairca8bc3b2011-12-21 18:12:26 +0000238[[auth.openIdSsoUrl]]auth.openIdSsoUrl::
239+
240The SSO entry point URL. Only used if `auth.type` was set to
241OpenID_SSO.
242+
243The "Sign In" link will send users directly to this URL.
244
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700245[[auth.httpHeader]]auth.httpHeader::
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700246+
247HTTP header to trust the username from, or unset to select HTTP basic
David Pursehouse221d4f62012-06-08 17:38:08 +0900248or digest authentication. Only used if `auth.type` is set to HTTP.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700249
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700250[[auth.logoutUrl]]auth.logoutUrl::
Shawn O. Pearce12b5d842009-08-15 15:11:10 -0700251+
252URL to redirect a browser to after the end-user has clicked on the
253"Sign Out" link in the upper right corner. Organizations using an
254enterprise single-sign-on solution may want to redirect the browser
255to the SSO product's sign-out page.
256+
257If not set, the redirect returns to the list of all open changes.
258
Shawn O. Pearcec9d26b52009-12-16 08:05:27 -0800259[[auth.registerUrl]]auth.registerUrl::
260+
261Target for the "Register" link in the upper right corner. Used only
262when auth.type is `LDAP`.
263+
264If not set, no "Register" link is displayed.
265
Piotr Sikora7cec2f82011-02-26 12:57:30 +0000266[[auth.cookiePath]]auth.cookiePath::
267+
268Sets "path" attribute of the authentication cookie.
269+
270If not set, HTTP request's path is used.
271
272[[auth.cookieSecure]]auth.cookieSecure::
273+
274Sets "secure" flag of the authentication cookie. If true, cookies
275will be transmitted only over HTTPS protocol.
276+
277By default, false.
278
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700279[[auth.emailFormat]]auth.emailFormat::
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700280+
281Optional format string to construct user email addresses out of
Shawn O. Pearcef7e065e2009-09-26 20:01:10 -0700282user login names. Only used if auth.type is `HTTP`, `HTTP_LDAP`
283or `LDAP`.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700284+
Shawn O. Pearce44221bf2011-06-27 10:37:30 -0700285This value can be set to a format string, where `{0}` is replaced
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700286with the login name. E.g. "\{0\}+gerrit@example.com" with a user
287login name of "foo" will produce "foo+gerrit@example.com" during
288the first time user "foo" registers.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -0700289+
Shawn O. Pearcef7e065e2009-09-26 20:01:10 -0700290If the site is using `HTTP_LDAP` or `LDAP`, using this option is
291discouraged. Setting `ldap.accountEmailAddress` and importing the
292email address from the LDAP directory is generally preferred.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700293
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700294[[auth.contributorAgreements]]auth.contributorAgreements::
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700295+
296Controls whether or not the contributor agreement features are
297enabled for the Gerrit site. If enabled a user must complete a
298contributor agreement before they can upload changes.
299+
300If enabled, the admin must also insert one or more rows into
301`contributor_agreements` and create agreement files under
302`'$site_path'/static`, so users can actually complete one or
Grzegorz Kossakowski28e4e1b2009-09-23 11:33:34 -0700303more agreements.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700304+
305By default this is false (no agreements are used).
306
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700307auth.allowGoogleAccountUpgrade::
308+
Shawn O. Pearce48eea072009-08-31 10:53:12 -0700309Allows Google Account users to automatically update their Gerrit
310account when/if their Google Account OpenID identity token changes.
311Identity tokens can change if the server changes hostnames, or
312for other reasons known only to Google. The upgrade path works
313by matching users by email address if the identity is not present,
314and then changing the identity.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700315+
Shawn O. Pearce48eea072009-08-31 10:53:12 -0700316This setting also permits old Gerrit 1.x users to seamlessly upgrade
317from Google Accounts on Google App Engine to OpenID authentication.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700318+
Shawn O. Pearce48eea072009-08-31 10:53:12 -0700319Having this enabled incurs an extra database query when Google
Shawn O. Pearcee31d02c2009-12-08 12:21:37 -0800320Account users register with the Gerrit server.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700321+
322By default, unset/false.
323
Christian Halstricka3d88a52011-08-31 09:21:41 +0200324[[auth.trustContainerAuth]]auth.trustContainerAuth::
325+
326If true then it is the responsibility of the container hosting
327Gerrit to authenticate users. In this case Gerrit will blindly trust
328the container.
329+
330This parameter only affects git over http traffic. If set to false
331then Gerrit will do the authentication (using DIGEST authentication).
332+
333By default this is set to false.
334
Luca Milanesio42058842012-01-05 21:25:38 +0000335[[auth.gitBasicAuth]]auth.gitBasicAuth::
336+
337If true then Git over HTTP and HTTP/S traffic is authenticated using
338standard BasicAuth and credentials validated using the same auth
339method configured for Gerrit Web UI.
340+
341This parameter only affects git over http traffic. If set to false
342then Gerrit will authenticate through DIGEST authentication and
343the randomly generated HTTP password in Gerrit DB.
344+
345By default this is set to false.
346
Edwin Kempin4b9e5e72011-09-22 15:06:14 +0200347[[auth.userNameToLowerCase]]auth.userNameToLowerCase::
348+
349If set the username that is received to authenticate a git operation
350is converted to lower case for looking up the user account in Gerrit.
351+
352By setting this parameter a case insensitive authentication for the
353git operations can be achieved, if it is ensured that the usernames in
354Gerrit (scheme `username`) are stored in lower case (e.g. if the
355parameter link:#ldap.accountSshUserName[ldap.accountSshUserName] is
356set to `${sAMAccountName.toLowerCase}`). It is important that for all
357existing accounts this username is already in lower case. It is not
358possible to convert the usernames of the existing accounts to lower
359case because this would break the access to existing per-user
360branches.
361+
362This parameter only affects git over http and git over SSH traffic.
363+
364By default this is set to false.
365
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -0700366[[cache]]Section cache
367~~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700368
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700369[[cache.directory]]cache.directory::
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700370+
371Path to a local directory where Gerrit can write cached entities for
Shawn O. Pearce4b212282009-08-05 19:45:56 -0700372future lookup. This local disk cache is used to retain potentially
373expensive to compute information across restarts. If the location
374does not exist, Gerrit will try to create it.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700375+
Shawn O. Pearce4b212282009-08-05 19:45:56 -0700376If not absolute, the path is resolved relative to `$site_path`.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700377+
Shawn O. Pearce4b212282009-08-05 19:45:56 -0700378Default is unset, no disk cache.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700379
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700380[[cache.name.maxAge]]cache.<name>.maxAge::
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700381+
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700382Maximum age to keep an entry in the cache. Entries are removed from
383the cache and refreshed from source data every maxAge interval.
Shawn O. Pearced9c403e2009-08-19 08:35:41 -0700384Values should use common unit suffixes to express their setting:
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700385+
Shawn O. Pearced9c403e2009-08-19 08:35:41 -0700386* s, sec, second, seconds
387* m, min, minute, minutes
388* h, hr, hour, hours
389* d, day, days
390* w, week, weeks (`1 week` is treated as `7 days`)
391* mon, month, months (`1 month` is treated as `30 days`)
392* y, year, years (`1 year` is treated as `365 days`)
393
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -0700394+
Shawn O. Pearce3fdbf392009-09-04 18:08:26 -0700395If a unit suffix is not specified, `minutes` is assumed. If 0 is
396supplied, the maximum age is infinite and items are never purged
397except when the cache is full.
Shawn O. Pearced9c403e2009-08-19 08:35:41 -0700398+
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700399Default is `0`, meaning store forever with no expire, except:
Shawn O. Pearced9c403e2009-08-19 08:35:41 -0700400+
Shawn O. Pearce05687e92011-04-04 17:29:03 -0400401* `"adv_bases"`: default is `10 minutes`
Shawn O. Pearced9c403e2009-08-19 08:35:41 -0700402* `"ldap_groups"`: default is `1 hour`
Shawn O. Pearced9c403e2009-08-19 08:35:41 -0700403* `"web_sessions"`: default is `12 hours`
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700404
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700405[[cache.name.memoryLimit]]cache.<name>.memoryLimit::
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700406+
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700407The total cost of entries to retain in memory. The cost computation
408varies by the cache. For most caches where the in-memory size of each
409entry is relatively the same, memoryLimit is currently defined to be
410the number of entries held by the cache (each entry costs 1).
411+
412For caches where the size of an entry can vary significantly between
413individual entries (notably `"diff"`, `"diff_intraline"`), memoryLimit
414is an approximation of the total number of bytes stored by the cache.
415Larger entries that represent bigger patch sets or longer source files
416will consume a bigger portion of the memoryLimit. For these caches the
417memoryLimit should be set to roughly the amount of RAM (in bytes) the
418administrator can dedicate to the cache.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700419+
Shawn O. Pearceefaf9792009-09-02 18:12:52 -0700420Default is 1024 for most caches, except:
421+
Shawn O. Pearce05687e92011-04-04 17:29:03 -0400422* `"adv_bases"`: default is `4096`
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700423* `"diff"`: default is `10m` (10 MiB of memory)
424* `"diff_intraline"`: default is `10m` (10 MiB of memory)
425* `"plugin_resources"`: default is 2m (2 MiB of memory)
426
427+
428If set to 0 the cache is disabled. Entries are removed immediately
429after being stored by the cache. This is primarily useful for testing.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700430
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700431[[cache.name.diskLimit]]cache.<name>.diskLimit::
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700432+
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700433Total size in bytes of the keys and values stored on disk. Caches that
434have grown bigger than this size are scanned daily at 1 AM local
435server time to trim the cache. Entries are removed in least recently
436accessed order until the cache fits within this limit. Caches may
437grow larger than this during the day, as the size check is only
438performed once every 24 hours.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700439+
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700440Default is 128 MiB per cache.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700441+
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700442If 0, disk storage for the cache is disabled.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700443
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -0700444[[cache_names]]Standard Caches
Shawn O. Pearce4016a932009-05-28 15:12:40 -0700445^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700446
Shawn O. Pearce4a452712009-05-28 20:12:33 -0700447cache `"accounts"`::
448+
Shawn O. Pearce4dba9882009-08-05 19:55:15 -0700449Cache entries contain important details of an active user, including
450their display name, preferences, known email addresses, and group
451memberships. Entry information is obtained from the following
452database tables:
453+
454* `accounts`
455+
456* `account_group_members`
457+
458* `account_external_ids`
459
460+
461If direct updates are made to any of these database tables, this
462cache should be flushed.
463
464cache `"accounts_byemail"`::
465+
466Caches account identities keyed by email address, which is scanned
467from the `account_external_ids` database table. If updates are
468made to this table, this cache should be flushed.
Shawn O. Pearce4a452712009-05-28 20:12:33 -0700469
Shawn O. Pearce05687e92011-04-04 17:29:03 -0400470cache `"adv_bases"`::
471+
472Used only for push over smart HTTP when branch level access controls
473are enabled. The cache entry contains all commits that are avaliable
474for the client to use as potential delta bases. Push over smart HTTP
475requires two HTTP requests, and this cache tries to carry state from
476the first request into the second to ensure it can complete.
477
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700478cache `"diff"`::
479+
Shawn O. Pearceefaf9792009-09-02 18:12:52 -0700480Each item caches the differences between two commits, at both the
481directory and file levels. Gerrit uses this cache to accelerate
482the display of affected file names, as well as file contents.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700483+
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700484Entries in this cache are relatively large, so memoryLimit is an
485estimate in bytes of memory used. Administrators should try to target
486cache.diff.memoryLimit to fit all changes users will view in a 1 or 2
487day span.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700488
Shawn O. Pearcef0cfe532011-04-11 23:40:06 -0400489cache `"diff_intraline"`::
490+
491Each item caches the intraline difference of one file, when compared
492between two commits. Gerrit uses this cache to accelerate display of
493intraline differences when viewing a file.
494+
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700495Entries in this cache are relatively large, so memoryLimit is an
496estimate in bytes of memory used. Administrators should try to target
497cache.diff.memoryLimit to fit all files users will view in a 1 or 2
498day span.
Shawn O. Pearcef0cfe532011-04-11 23:40:06 -0400499
Shawn O. Pearce2d65d292011-06-24 08:12:02 -0700500cache `"git_tags"`::
501+
502If branch or reference level READ access controls are used, this
503cache tracks which tags are reachable from the branch tips of a
504repository. Gerrit uses this information to determine the set
505of tags that a client may access, derived from which tags are
506part of the history of a visible branch.
507+
508The cache is persisted to disk across server restarts as it can
509be expensive to compute (60 or more seconds for a large history
510like the Linux kernel repository).
511
Shawn O. Pearce4a452712009-05-28 20:12:33 -0700512cache `"groups"`::
513+
Shawn O. Pearce4dba9882009-08-05 19:55:15 -0700514Caches the basic group information from the `account_groups` table,
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -0700515including the group owner, name, and description.
516+
517Gerrit group membership obtained from the `account_group_members`
518table is cached under the `"accounts"` cache, above. External group
519membership obtained from LDAP is cached under `"ldap_groups"`.
520
Matt Fischer620255a2011-03-22 14:28:23 -0500521cache `"groups_byinclude"`::
522+
523Caches group inclusions in other groups. If direct updates are made
524to the `account_group_includes` table, this cache should be flushed.
525
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -0700526cache `"ldap_groups"`::
527+
528Caches the LDAP groups that a user belongs to, if LDAP has been
529configured on this server. This cache should be configured with a
530low maxAge setting, to ensure LDAP modifications are picked up in
531a timely fashion.
Shawn O. Pearce4a452712009-05-28 20:12:33 -0700532
Shawn O. Pearce6d26f4a2009-08-24 15:43:52 -0700533cache `"ldap_usernames"`::
534+
535Caches a mapping of LDAP username to Gerrit account identity. The
536cache automatically updates when a user first creates their account
537within Gerrit, so the cache expire time is largely irrelevant.
538
Shawn O. Pearce0c1abdb2011-06-24 11:01:25 -0700539cache `"permission_sort"`::
540+
David Pursehouse221d4f62012-06-08 17:38:08 +0900541Caches the order in which access control sections must be applied to a
Shawn O. Pearce0c1abdb2011-06-24 11:01:25 -0700542reference. Sorting the sections can be expensive when regular
543expressions are used, so this cache remembers the ordering for
544each branch.
545
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700546cache `"plugin_resources"`::
547+
548Caches formatted plugin resources, such as plugin documentation that
549has been converted from Markdown to HTML. The memoryLimit refers to
550the bytes of memory dedicated to storing the documentation.
551
Shawn O. Pearce4a452712009-05-28 20:12:33 -0700552cache `"projects"`::
553+
554Caches the project description records, from the `projects` table
555in the database. If a project record is updated or deleted, this
556cache should be flushed. Newly inserted projects do not require
557a cache flush, as they will be read upon first reference.
558
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700559cache `"sshkeys"`::
560+
561Caches unpacked versions of user SSH keys, so the internal SSH daemon
562can match against them during authentication. The unit of storage
563is per-user, so 1024 items translates to 1024 unique user accounts.
564As each individual user account may configure multiple SSH keys,
565the total number of keys may be larger than the item count.
Shawn O. Pearce4a452712009-05-28 20:12:33 -0700566+
567This cache is based off the `account_ssh_keys` table and the
568`accounts.ssh_user_name` column in the database. If either is
569modified directly, this cache should be flushed.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700570
Shawn O. Pearceb09322b2009-08-15 17:49:00 -0700571cache `"web_sessions"`::
572+
573Tracks the live user sessions coming in over HTTP. Flushing this
574cache would cause all users to be signed out immediately, forcing
Shawn O. Pearce727d80f2009-08-17 07:57:54 -0700575them to sign-in again. To avoid breaking active users, this cache
576is not flushed automatically by `gerrit flush-caches --all`, but
577instead must be explicitly requested.
578+
579If no disk cache is configured (or `cache.web_sessions.diskLimit`
580is set to 0) a server restart will force all users to sign-out,
581and need to sign-in again after the restart, as the cache was
582unable to persist the session information. Enabling a disk cache
583is strongly recommended.
584+
Shawn O. Pearce2e1cb2b2012-05-24 14:28:40 -0700585Session storage is relatively inexpensive. The average entry in
586this cache is approximately 346 bytes.
Shawn O. Pearceb09322b2009-08-15 17:49:00 -0700587
Shawn O. Pearce4016a932009-05-28 15:12:40 -0700588See also link:cmd-flush-caches.html[gerrit flush-caches].
589
Shawn O. Pearce29de4362010-03-03 17:51:26 -0800590[[cache_options]]Cache Options
591^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
592
Shawn O. Pearce617aa392010-11-15 14:03:28 -0800593cache.diff_intraline.maxIdleWorkers::
594+
595Number of idle worker threads to maintain for the intraline difference
596computations. There is no upper bound on how many concurrent requests
597can occur at once, if additional threads are started to handle a peak
David Pursehouse221d4f62012-06-08 17:38:08 +0900598load, only this many will remain idle afterwards.
Shawn O. Pearce617aa392010-11-15 14:03:28 -0800599+
600Default is 1.5x number of available CPUs.
601
602cache.diff_intraline.timeout::
603+
604Maximum number of milliseconds to wait for intraline difference data
605before giving up and disabling it for a particular file pair. This is
606a work around for an infinite loop bug in the intraline difference
607implementation. If computation takes longer than the timeout the
608worker thread is terminated and no intraline difference is displayed.
609+
610Values should use common unit suffixes to express their setting:
611+
612* ms, milliseconds
613* s, sec, second, seconds
614* m, min, minute, minutes
615* h, hr, hour, hours
616
617+
618If a unit suffix is not specified, `milliseconds` is assumed.
619+
620Default is 5 seconds.
621
Shawn O. Pearce307dd4e2010-11-15 12:12:20 -0800622cache.diff_intraline.enabled::
Shawn O. Pearce29de4362010-03-03 17:51:26 -0800623+
624Boolean to enable or disable the computation of intraline differences
Shawn O. Pearce307dd4e2010-11-15 12:12:20 -0800625when populating a diff cache entry. This flag is provided primarily
626as a backdoor to disable the intraline difference feature if
627necessary. To maintain backwards compatability with prior versions,
628this setting will fallback to `cache.diff.intraline` if not set in the
629configuration.
Shawn O. Pearce29de4362010-03-03 17:51:26 -0800630+
631Default is true, enabled.
632
Shawn O. Pearceb8e4e352011-05-19 18:09:01 -0700633cache.projects.checkFrequency::
634+
635How often project configuration should be checked for update from Git.
636Gerrit Code Review caches project access rules and configuration in
637memory, checking the refs/meta/config branch every checkFrequency
638minutes to see if a new revision should be loaded and used for future
639access. Values can be specified using standard time unit abbreviations
640('ms', 'sec', 'min', etc.).
641+
642If set to 0, checks occur every time, which may slow down operations.
643Administrators may force the cache to flush with
644link:cmd-flush-caches.html[gerrit flush-caches].
645+
646Default is 5 minutes.
647
carloseduardo.baldacin14246de2011-07-14 17:52:22 -0300648[[changeMerge]]Section changeMerge
Remy Bohmer203eea32012-02-19 21:21:36 +0100649~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
carloseduardo.baldacin14246de2011-07-14 17:52:22 -0300650
651Controls whether or not the mergeability test of changes is
652enabled. If enabled, when the change page is loaded, the test is
653triggered. The submit button will be enabled or disabled according to
654the result.
655
656----
657[changeMerge]
658 test = true
659----
660
carloseduardo.baldacin14246de2011-07-14 17:52:22 -0300661By default this is false (test is not enabled).
662
Brad Larson991a31b2009-11-03 14:30:26 -0600663[[commentlink]]Section commentlink
Remy Bohmer203eea32012-02-19 21:21:36 +0100664~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Brad Larson991a31b2009-11-03 14:30:26 -0600665Comment links are find/replace strings applied to change descriptions,
666patch comments, and in-line code comments to turn set strings into
667hyperlinks. One common use is for linking to bug-tracking systems.
668
669In the following example configuration the 'changeid' comment link
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800670will match typical Gerrit Change-Id values and create a hyperlink
671to changes which reference it. The second configuration 'bugzilla'
672will hyperlink terms such as 'bug 42' to an external bug tracker,
673supplying the argument record number '42' for display. The third
David Pursehouse221d4f62012-06-08 17:38:08 +0900674configuration 'tracker' uses raw HTML to more precisely control
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800675how the replacement is displayed to the user.
Brad Larson991a31b2009-11-03 14:30:26 -0600676
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800677----
678[commentlink "changeid"]
679 match = (I[0-9a-f]{8,40})
680 link = "#q,$1,n,z"
Brad Larson991a31b2009-11-03 14:30:26 -0600681
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800682[commentlink "bugzilla"]
Shawn O. Pearcec99630a2010-02-21 19:11:56 -0800683 match = "(bug\\s+#?)(\\d+)"
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800684 link = http://bugs.example.com/show_bug.cgi?id=$2
Brad Larson991a31b2009-11-03 14:30:26 -0600685
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800686[commentlink "tracker"]
687 match = ([Bb]ug:\\s+)(\\d+)
688 html = $1<a href=\"http://trak.example.com/$2\">$2</a>
689----
690
691[[commentlink.name.match]]commentlink.<name>.match::
Brad Larson991a31b2009-11-03 14:30:26 -0600692+
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800693A JavaScript regular expression to match positions to be replaced
694with a hyperlink. Subexpressions of the matched string can be
695stored using groups and accessed with `$'n'` syntax, where 'n'
696is the group number, starting from 1.
Brad Larson991a31b2009-11-03 14:30:26 -0600697+
Shawn O. Pearcec99630a2010-02-21 19:11:56 -0800698The configuration file parser eats one level of backslashes, so the
699character class `\s` requires `\\s` in the configuration file. The
700parser also terminates the line at the first `#`, so a match
701expression containing # must be wrapped in double quotes.
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800702+
Shawn O. Pearce665beaa2010-02-21 22:41:03 -0800703To match case insensitive strings, a character class with both the
704upper and lower case character for each position must be used. For
705example, to match the string `bug` in a case insensitive way the match
706pattern `[bB][uU][gG]` needs to be used.
707+
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800708A common pattern to match is `bug\\s+(\\d+)`.
Brad Larson991a31b2009-11-03 14:30:26 -0600709
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800710[[commentlink.name.link]]commentlink.<name>.link::
Brad Larson991a31b2009-11-03 14:30:26 -0600711+
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800712The URL to direct the user to whenever the regular expression is
713matched. Groups in the match expression may be accessed as `$'n'`.
714+
715The link property is used only when the html property is not present.
716
717[[commentlink.name.html]]commentlink.<name>.html::
718+
719HTML to replace the entire matched string with. If present,
720this property overrides the link property above. Groups in the
721match expression may be accessed as `$'n'`.
722+
723The configuration file eats double quotes, so escaping them as
724`\"` is necessary to protect them from the parser.
Brad Larson991a31b2009-11-03 14:30:26 -0600725
726
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -0700727[[contactstore]]Section contactstore
728~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700729
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700730[[contactstore.url]]contactstore.url::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700731+
732URL of the web based contact store Gerrit will send any offline
733contact information to when it collects the data from users as part
734of a contributor agreement.
735+
736See link:config-contact.html[Contact Information].
737
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700738[[contactstore.appsec]]contactstore.appsec::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700739+
740Shared secret of the web based contact store.
741
Shawn O. Pearcee24c71fb2009-12-07 20:32:40 -0800742
743[[container]]Section container
744~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
745
746These settings are applied only if Gerrit is started as the container
747process through Gerrit's 'gerrit.sh' rc.d compatible wrapper script.
748
749[[container.heapLimit]]container.heapLimit::
750+
751Maximum heap size of the Java process running Gerrit, in bytes.
752This property is translated into the '-Xmx' flag for the JVM.
753+
754Default is platform and JVM specific.
755+
756Common unit suffixes of 'k', 'm', or 'g' are supported.
757
758[[container.javaHome]]container.javaHome::
759+
760Path of the JRE/JDK installation to run Gerrit with. If not set, the
761Gerrit startup script will attempt to search your system and guess
762a suitable JRE. Overrides the environment variable 'JAVA_HOME'.
763
764[[container.javaOptions]]container.javaOptions::
765+
766Additional options to pass along to the Java runtime. If multiple
767values are configured, they are passed in order on the command line,
768separated by spaces. These options are appended onto 'JAVA_OPTIONS'.
769
Fredrik Luthanderb8f7d6d2010-05-18 21:11:22 +0200770[[container.slave]]container.slave::
771+
772Used on Gerrit slave installations. If set to true the Gerrit JVM is
773called with the '--slave' switch, enabling slave mode. If no value is
774set (or any other value), gerrit defaults to master mode.
775
Shawn O. Pearcee24c71fb2009-12-07 20:32:40 -0800776[[container.user]]container.user::
777+
778Login name (or UID) of the operating system user the Gerrit JVM
779will execute as. If not set, defaults to the user who launched
780the 'gerrit.sh' wrapper script.
781
782[[container.war]]container.war::
783+
784Path of the JAR file to start daemon execution with. This should
785be the path of the local 'gerrit.war' archive. Overrides the
786environment variable 'GERRIT_WAR'.
787+
788If not set, defaults to '$site_path/bin/gerrit.war', or to
789'$HOME/gerrit.war'.
790
791
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -0700792[[core]]Section core
793~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700794
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700795[[core.packedGitWindowSize]]core.packedGitWindowSize::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700796+
797Number of bytes of a pack file to load into memory in a single
798read operation. This is the "page size" of the JGit buffer cache,
799used for all pack access operations. All disk IO occurs as single
800window reads. Setting this too large may cause the process to load
801more data than is required; setting this too small may increase
802the frequency of `read()` system calls.
803+
804Default on JGit is 8 KiB on all platforms.
805+
806Common unit suffixes of 'k', 'm', or 'g' are supported.
807
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700808[[core.packedGitLimit]]core.packedGitLimit::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700809+
810Maximum number of bytes to load and cache in memory from pack files.
811If JGit needs to access more than this many bytes it will unload less
812frequently used windows to reclaim memory space within the process.
813As this buffer must be shared with the rest of the JVM heap, it
814should be a fraction of the total memory available.
815+
816Default on JGit is 10 MiB on all platforms.
817+
818Common unit suffixes of 'k', 'm', or 'g' are supported.
819
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700820[[core.deltaBaseCaseLimit]]core.deltaBaseCacheLimit::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700821+
822Maximum number of bytes to reserve for caching base objects
823that multiple deltafied objects reference. By storing the entire
824decompressed base object in a cache Git is able to avoid unpacking
825and decompressing frequently used base objects multiple times.
826+
827Default on JGit is 10 MiB on all platforms. You probably do not
828need to adjust this value.
829+
830Common unit suffixes of 'k', 'm', or 'g' are supported.
831
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700832[[core.packedGitOpenFiles]]core.packedGitOpenFiles::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700833+
834Maximum number of pack files to have open at once. A pack file
835must be opened in order for any of its data to be available in
836a cached window.
837+
838If you increase this to a larger setting you may need to also adjust
839the ulimit on file descriptors for the host JVM, as Gerrit needs
840additional file descriptors available for network sockets and other
841repository data manipulation.
842+
843Default on JGit is 128 file descriptors on all platforms.
844
Shawn O. Pearce329fe792010-09-03 15:44:23 -0700845[[core.streamFileThreshold]]core.streamFileThreshold::
846+
847Largest object size, in bytes, that JGit will allocate as a
848contiguous byte array. Any file revision larger than this threshold
849will have to be streamed, typically requiring the use of temporary
850files under '$GIT_DIR/objects' to implement psuedo-random access
851during delta decompression.
852+
853Servers with very high traffic should set this to be larger than
854the size of their common big files. For example a server managing
855the Android platform typically has to deal with ~10-12 MiB XML
856files, so `15 m` would be a reasonable setting in that environment.
857Setting this too high may cause the JVM to run out of heap space
858when handling very big binary files, such as device firmware or
859CD-ROM ISO images.
860+
Shawn O. Pearcee3febd92010-10-13 21:17:53 -0700861Default is 50 MiB on all platforms. Prior to Gerrit 2.1.6,
Shawn O. Pearce329fe792010-09-03 15:44:23 -0700862this value was effectively 2047 MiB.
863+
864Common unit suffixes of 'k', 'm', or 'g' are supported.
865
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700866[[core.packedGitMmap]]core.packedGitMmap::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700867+
868When true, JGit will use `mmap()` rather than `malloc()+read()`
869to load data from pack files. The use of mmap can be problematic
870on some JVMs as the garbage collector must deduce that a memory
871mapped segment is no longer in use before a call to `munmap()`
872can be made by the JVM native code.
873+
874In server applications (such as Gerrit) that need to access many
875pack files, setting this to true risks artifically running out
876of virtual address space, as the garbage collector cannot reclaim
877unused mapped spaces fast enough.
878+
879Default on JGit is false. Although potentially slower, it yields
880much more predictable behavior.
881
Sasa Zivkovf69aeb12012-06-11 14:05:14 +0200882[[core.asyncLoggingBufferSize]]core.asyncLoggingBufferSize::
883+
884Size of the buffer to store logging events for asynchronous logging.
885Putting a larger value can protect threads from stalling when the
886AsyncAppender threads are not fast enough to consume the logging events
887from the buffer. It also protects from loosing log entries in this case.
888+
889Default is 64 entries.
890
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -0800891[[database]]Section database
892~~~~~~~~~~~~~~~~~~~~~~~~~~~~
893
894The database section configures where Gerrit stores its metadata
895records about user accounts and change reviews.
896
Shawn O. Pearce9d342a42009-12-16 15:49:05 -0800897----
898[database]
Shawn O. Pearce1be39062009-12-19 14:11:52 -0800899 type = POSTGRESQL
Shawn O. Pearce9d342a42009-12-16 15:49:05 -0800900 hostname = localhost
901 database = reviewdb
902 username = gerrit2
903 password = s3kr3t
904----
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -0800905
906[[database.type]]database.type::
907+
908Type of database server to connect to. If set this value will be
909used to automatically create correct database.driver and database.url
910values to open the connection.
911+
Shawn O. Pearce1be39062009-12-19 14:11:52 -0800912* `POSTGRESQL`
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -0800913+
914Connect to a PostgreSQL database server.
915+
916* `H2`
917+
Shawn O. Pearce1be39062009-12-19 14:11:52 -0800918Connect to a local embedded H2 database.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -0800919+
Shawn O. Pearce1be39062009-12-19 14:11:52 -0800920* `MYSQL`
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -0800921+
922Connect to a MySQL database server.
Shawn O. Pearce1be39062009-12-19 14:11:52 -0800923+
924* `JDBC`
925+
926Connect using a JDBC driver class name and URL.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -0800927
928+
929If not specified, database.driver and database.url are used as-is,
930and if they are also not specified, defaults to H2.
931
932[[database.hostname]]database.hostname::
933+
934Hostname of the database server. Defaults to 'localhost'.
935
936[[database.port]]database.port::
937+
938Port number of the database server. Defaults to the default port
939of the server named by database.type.
940
941[[database.database]]database.database::
942+
Shawn O. Pearce1be39062009-12-19 14:11:52 -0800943For POSTGRESQL or MYSQL, the name of the database on the server.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -0800944+
945For H2, this is the path to the database, and if not absolute is
Shawn O. Pearce1be39062009-12-19 14:11:52 -0800946relative to `'$site_path'`.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -0800947
948[[database.username]]database.username::
949+
950Username to connect to the database server as.
951
952[[database.password]]database.password::
953+
954Password to authenticate to the database server with.
955
956[[database.driver]]database.driver::
957+
Shawn O. Pearce1be39062009-12-19 14:11:52 -0800958Name of the JDBC driver class to connect to the database with.
959Setting this usually isn't necessary as it can be derived from
960database.type or database.url for any supported database.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -0800961
962[[database.url]]database.url::
963+
Shawn O. Pearce1be39062009-12-19 14:11:52 -0800964'jdbc:' URL for the database. Setting this variable usually
965isn't necessary as it can be constructed from the all of the
966above properties.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -0800967
Shawn O. Pearce07f35177d2010-02-23 09:47:10 -0800968[[database.poolLimit]]database.poolLimit::
969+
970Maximum number of open database connections. If the server needs
971more than this number, request processing threads will wait up
972to <<database.poolMaxWait, poolMaxWait>> seconds for a
973connection to be released before they abort with an exception.
974This limit must be several units higher than the total number of
975httpd and sshd threads as some request processing code paths may
976need multiple connections.
977+
978Default is 8.
979
Shawn O. Pearcef458bf62010-02-25 09:03:03 -0800980[[database.poolMinIdle]]database.poolMinIdle::
Shawn O. Pearce07f35177d2010-02-23 09:47:10 -0800981+
982Minimum number of connections to keep idle in the pool.
983Default is 4.
984
Shawn O. Pearcef458bf62010-02-25 09:03:03 -0800985[[database.poolMaxIdle]]database.poolMaxIdle::
Shawn O. Pearce07f35177d2010-02-23 09:47:10 -0800986+
987Maximum number of connections to keep idle in the pool. If there
988are more idle connections, connections will be closed instead of
989being returned back to the pool.
990Default is 4.
991
992[[database.poolMaxWait]]database.poolMaxWait::
993+
994Maximum amount of time a request processing thread will wait to
995acquire a database connection from the pool. If no connection is
996released within this time period, the processing thread will abort
997its current operations and return an error to the client.
998Values should use common unit suffixes to express their setting:
999+
1000* ms, milliseconds
1001* s, sec, second, seconds
1002* m, min, minute, minutes
1003* h, hr, hour, hours
1004
1005+
1006If a unit suffix is not specified, `milliseconds` is assumed.
1007+
1008Default is `30 seconds`.
1009
monica.dionisio3f630442010-06-29 15:42:57 -03001010[[download]]Section download
Nasser Grainawib9a50372010-08-10 07:57:47 -06001011~~~~~~~~~~~~~~~~~~~~~~~~~~~~
monica.dionisio3f630442010-06-29 15:42:57 -03001012
1013----
1014[download]
1015 scheme = ssh
1016 scheme = http
1017 scheme = anon_http
1018 scheme = anon_git
1019 scheme = repo_download
1020----
1021
1022The download section configures the allowed download methods.
1023
1024[[download.scheme]]download.scheme::
1025+
1026Schemes that should be used to download changes.
1027+
1028Multiple schemes are supported:
1029+
1030* `http`
1031+
Shawn O. Pearce5c46a072010-08-23 08:33:32 -07001032Authenticated HTTP download is allowed.
monica.dionisio3f630442010-06-29 15:42:57 -03001033+
1034* `ssh`
1035+
Shawn O. Pearce5c46a072010-08-23 08:33:32 -07001036Authenticated SSH download is allowed.
monica.dionisio3f630442010-06-29 15:42:57 -03001037+
1038* `anon_http`
1039+
1040Anonymous HTTP download is allowed.
1041+
1042* `anon_git`
1043+
Shawn O. Pearce5c46a072010-08-23 08:33:32 -07001044Anonymous Git download is allowed. This is not default, it is also
1045necessary to set <<gerrit.canonicalGitUrl,gerrit.canonicalGitUrl>>
1046variable.
monica.dionisio3f630442010-06-29 15:42:57 -03001047+
1048* `repo_download`
1049+
Shawn O. Pearce5c46a072010-08-23 08:33:32 -07001050Gerrit advertises patch set downloads with the `repo download`
1051command, assuming that all projects managed by this instance are
1052generally worked on with the repo multi-repository tool. This is
1053not default, as not all instances will deploy repo.
monica.dionisio3f630442010-06-29 15:42:57 -03001054
1055+
Shawn O. Pearce5c46a072010-08-23 08:33:32 -07001056If download.scheme is not specified, SSH, HTTP and Anonymous HTTP
1057downloads are allowed.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -08001058
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -07001059[[gerrit]]Section gerrit
1060~~~~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearceeb7f8ce2009-06-01 09:57:15 -07001061
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001062[[gerrit.basePath]]gerrit.basePath::
Shawn O. Pearce9743d0b2009-06-01 10:10:06 -07001063+
1064Local filesystem directory holding all Git repositories that
1065Gerrit knows about and can process changes for. A project
1066entity in Gerrit maps to a local Git repository by creating
Edwin Kempincdb0e002011-09-08 14:23:30 +02001067the path string `"${basePath}/${project_name}.git"`.
Shawn O. Pearce9743d0b2009-06-01 10:10:06 -07001068+
1069If relative, the path is resolved relative to `'$site_path'`.
1070
Shawn O. Pearce897d9212011-06-16 16:59:59 -07001071[[gerrit.allProjects]]gerrit.allProjects::
1072+
1073Name of the permissions-only project defining global server
1074access controls and settings. These are inherited into every
1075other project managed by the running server. The name is
1076relative to `gerrit.basePath`.
1077+
1078Defaults to `All-Projects` if not set.
1079
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001080[[gerrit.canonicalWebUrl]]gerrit.canonicalWebUrl::
Shawn O. Pearceeb7f8ce2009-06-01 09:57:15 -07001081+
1082The default URL for Gerrit to be accessed through.
1083+
1084Typically this would be set to "http://review.example.com/" or
1085"http://example.com/gerrit/" so Gerrit can output links that point
1086back to itself.
1087+
1088Setting this is highly recommended, as its necessary for the upload
1089code invoked by "git push" or "repo upload" to output hyperlinks
1090to the newly uploaded changes.
1091
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001092[[gerrit.canonicalGitUrl]]gerrit.canonicalGitUrl::
Shawn O. Pearceeb7f8ce2009-06-01 09:57:15 -07001093+
1094Optional base URL for repositories available over the anonymous git
1095protocol. For example, set this to `git://mirror.example.com/base/`
1096to have Gerrit display patch set download URLs in the UI. Gerrit
1097automatically appends the project name onto the end of the URL.
1098+
1099By default unset, as the git daemon must be configured externally
1100by the system administrator, and might not even be running on the
1101same host as Gerrit.
1102
Shawn O. Pearce5d6de522011-10-07 18:00:16 -07001103[[gerrit.gitHttpUrl]]gerrit.gitHttpUrl::
1104+
1105Optional base URL for repositories available over the HTTP
1106protocol. For example, set this to `http://mirror.example.com/base/`
1107to have Gerrit display URLs from this server, rather than itself.
1108+
1109By default unset, as the HTTP daemon must be configured externally
1110by the system administrator, and might not even be running on the
1111same host as Gerrit.
1112
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -07001113[[gitweb]]Section gitweb
1114~~~~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearced7ba11f2009-06-01 09:35:41 -07001115
Shawn O. Pearce618dae22010-03-12 19:07:43 -08001116Gerrit can forward requests to either an internally managed gitweb
1117(which allows Gerrit to enforce some access controls), or to an
1118externally managed gitweb (where the web server manages access).
Shawn O. Pearced7ba11f2009-06-01 09:35:41 -07001119See also link:config-gitweb.html[Gitweb Integration].
1120
Shawn O. Pearce618dae22010-03-12 19:07:43 -08001121[[gitweb.cgi]]gitweb.cgi::
1122+
1123Path to the locally installed `gitweb.cgi` executable. This CGI will
1124be called by Gerrit Code Review when the URL `/gitweb` is accessed.
1125Project level access controls are enforced prior to calling the CGI.
1126+
1127Defaults to `/usr/lib/cgi-bin/gitweb.cgi` if gitweb.url is not set.
1128
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001129[[gitweb.url]]gitweb.url::
Shawn O. Pearced7ba11f2009-06-01 09:35:41 -07001130+
1131Optional URL of an affiliated gitweb service. Defines the
1132web location where a `gitweb.cgi` is installed to browse
Shawn O. Pearce9743d0b2009-06-01 10:10:06 -07001133gerrit.basePath and the repositories it contains.
Shawn O. Pearced7ba11f2009-06-01 09:35:41 -07001134+
1135Gerrit appends any necessary query arguments onto the end of this URL.
1136For example, "?p=$project.git;h=$commit".
1137
Shane Mc Cormack27868a42009-12-28 04:49:39 +00001138[[gitweb.type]]gitweb.type::
1139+
1140Optional type of affiliated gitweb service. This allows using
Shawn O. Pearce2b11da02011-09-06 16:18:12 -07001141alternatives to gitweb, such as cgit. If set to disabled there
1142is no gitweb hyperlinking support.
Shane Mc Cormack27868a42009-12-28 04:49:39 +00001143+
Shawn O. Pearce2b11da02011-09-06 16:18:12 -07001144Valid values are `gitweb`, `cgit`, `disabled` or `custom`.
Shane Mc Cormack27868a42009-12-28 04:49:39 +00001145
Edwin Kempind86909c2012-03-26 10:36:29 +02001146[[gitweb.revision]]gitweb.revision::
Shane Mc Cormack27868a42009-12-28 04:49:39 +00001147+
1148Optional pattern to use for constructing the gitweb URL when pointing
1149at a specific commit when `custom` is used above.
1150+
Edwin Kempincdb0e002011-09-08 14:23:30 +02001151Valid replacements are `${project}` for the project name in Gerrit
1152and `${commit}` for the SHA1 hash for the commit.
Shane Mc Cormack27868a42009-12-28 04:49:39 +00001153
Edwin Kempind86909c2012-03-26 10:36:29 +02001154[[gitweb.project]]gitweb.project::
Shane Mc Cormack27868a42009-12-28 04:49:39 +00001155+
1156Optional pattern to use for constructing the gitweb URL when pointing
1157at a specific project when `custom` is used above.
1158+
Edwin Kempincdb0e002011-09-08 14:23:30 +02001159Valid replacements are `${project}` for the project name in Gerrit.
Shane Mc Cormack27868a42009-12-28 04:49:39 +00001160
Edwin Kempind86909c2012-03-26 10:36:29 +02001161[[gitweb.branch]]gitweb.branch::
Shane Mc Cormack27868a42009-12-28 04:49:39 +00001162+
1163Optional pattern to use for constructing the gitweb URL when pointing
1164at a specific branch when `custom` is used above.
1165+
Edwin Kempincdb0e002011-09-08 14:23:30 +02001166Valid replacements are `${project}` for the project name in Gerrit
1167and `${branch}` for the name of the branch.
Shane Mc Cormack27868a42009-12-28 04:49:39 +00001168
Edwin Kempin64011562012-03-26 10:50:12 +02001169[[gitweb.filehistory]]gitweb.filehistory::
1170+
1171Optional pattern to use for constructing the gitweb URL when pointing
1172at the history of a file in a specific branch when `custom` is used
1173above.
1174+
1175Valid replacements are `${project}` for the project name in Gerrit,
1176`${file}` for the file name and `${branch}` for the name of the
1177branch.
1178
Gustaf Lundha07d2e72011-10-27 15:26:35 -07001179[[gitweb.linkname]]gitweb.linkname::
1180+
1181Optional setting for modifying the link name presented to the user
1182in the Gerrit web-UI.
1183+
1184Default linkname for custom type is "gitweb".
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001185
Adrian Goerlerf2007072011-11-10 08:39:55 +01001186[[gitweb.pathSeparator]]gitweb.pathSeparator::
1187+
1188Optional character to substitute the standard path separator (slash) in
1189project names and branch names.
1190+
1191By default, Gerrit will use hexadecimal encoding for slashes in project and
1192branch names. Some web servers, such as Tomcat, reject this hexadecimal
1193encoding in the URL.
1194+
1195Some alternative gitweb services, such as link:http://gitblit.com[Gitblit],
1196allow using an alternative path separator character. In Gitblit, this can be
1197configured through the property link:http://gitblit.com/properties.html[web.forwardSlashCharacter].
1198In Gerrit, the alternative path separator can be configured correspondingly
1199using the property 'gitweb.pathSeparator'.
1200+
1201Valid values are the characters '*', '(' and ')'.
1202
Shane Mc Cormack6c2b6772010-01-12 21:56:44 +00001203[[hooks]]Section hooks
Remy Bohmer203eea32012-02-19 21:21:36 +01001204~~~~~~~~~~~~~~~~~~~~~~
Shane Mc Cormack6c2b6772010-01-12 21:56:44 +00001205
1206See also link:config-hooks.html[Hooks].
1207
1208[[hooks.path]]hooks.path::
1209+
1210Optional path to hooks, if not specified then `'$site_path'/hooks` will be used.
1211
1212[[hooks.patchsetCreatedHook]]hooks.patchsetCreatedHook::
1213+
1214Optional filename for the patchset created hook, if not specified then
1215`patchset-created` will be used.
1216
David Pursehoused556c192012-06-12 18:34:37 +09001217[[hooks.draftPublishedHook]]hooks.draftPublishedHook::
1218+
1219Optional filename for the draft published hook, if not specified then
1220`draft-published` will be used.
1221
Shane Mc Cormack6c2b6772010-01-12 21:56:44 +00001222[[hooks.commentAddedHook]]hooks.commentAddedHook::
1223+
1224Optional filename for the comment added hook, if not specified then
1225`comment-added` will be used.
1226
1227[[hooks.changeMergedHook]]hooks.changeMergedHook::
1228+
1229Optional filename for the change merged hook, if not specified then
1230`change-merged` will be used.
1231
1232[[hooks.changeAbandonedHook]]hooks.changeAbandonedHook::
1233+
1234Optional filename for the change abandoned hook, if not specified then
1235`change-abandoned` will be used.
1236
David Pursehousea93c9302012-06-15 16:29:26 +09001237[[hooks.changeRestoredHook]]hooks.changeRestoredHook::
1238+
1239Optional filename for the change restored hook, if not specified then
1240`change-restored` will be used.
1241
1242[[hooks.refUpdatedHook]]hooks.refUpdatedHook::
1243+
1244Optional filename for the ref updated hook, if not specified then
1245`ref-updated` will be used.
1246
1247[[hooks.claSignedHook]]hooks.claSignedHook::
1248+
1249Optional filename for the CLA signed hook, if not specified then
1250`cla-signed` will be used.
1251
Shawn O. Pearce309d8d32009-11-17 16:03:16 -08001252[[http]]Section http
1253~~~~~~~~~~~~~~~~~~~~
1254
1255[[http.proxy]]http.proxy::
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001256+
1257URL of the proxy server when making outgoing HTTP
1258connections for OpenID login transactions. Syntax
1259should be `http://`'hostname'`:`'port'.
Shawn O. Pearce309d8d32009-11-17 16:03:16 -08001260
1261[[http.proxyUsername]]http.proxyUsername::
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001262+
1263Optional username to authenticate to the HTTP proxy with.
1264This property is honored only if the username does not
1265appear in the http.proxy property above.
Shawn O. Pearce309d8d32009-11-17 16:03:16 -08001266
1267[[http.proxyPassword]]http.proxyPassword::
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001268+
1269Optional password to authenticate to the HTTP proxy with.
1270This property is honored only if the password does not
1271appear in the http.proxy property above.
Shawn O. Pearce309d8d32009-11-17 16:03:16 -08001272
1273
1274[[httpd]]Section httpd
1275~~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08001276
1277The httpd section configures the embedded servlet container.
1278
1279[[httpd.listenUrl]]httpd.listenUrl::
1280+
1281Specifies the URLs the internal HTTP daemon should listen for
Edwin Kempincdb0e002011-09-08 14:23:30 +02001282connections on. The special hostname '*' may be used to listen
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08001283on all local addresses. A context path may optionally be included,
1284placing Gerrit Code Review's web address within a subdirectory of
1285the server.
1286+
1287Multiple protocol schemes are supported:
1288+
1289* `http://`'hostname'`:`'port'
1290+
1291Plain-text HTTP protocol. If port is not supplied, defaults to 80,
1292the standard HTTP port.
1293+
1294* `https://`'hostname'`:`'port'
1295+
1296SSL encrypted HTTP protocol. If port is not supplied, defaults to
1297443, the standard HTTPS port.
1298+
1299Externally facing production sites are encouraged to use a reverse
1300proxy configuration and `proxy-https://` (below), rather than using
1301the embedded servlet container to implement the SSL processing.
1302The proxy server with SSL support is probably easier to configure,
1303provides more configuration options to control cipher usage, and
1304is likely using natively compiled encryption algorithms, resulting
1305in higher throughput.
1306+
1307* `proxy-http://`'hostname'`:`'port'
1308+
1309Plain-text HTTP relayed from a reverse proxy. If port is not
1310supplied, defaults to 8080.
1311+
1312Like http, but additional header parsing features are
1313enabled to honor X-Forwarded-For, X-Forwarded-Host and
1314X-Forwarded-Server. These headers are typically set by Apache's
1315link:http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#x-headers[mod_proxy].
1316+
1317* `proxy-https://`'hostname'`:`'port'
1318+
1319Plain text HTTP relayed from a reverse proxy that has already
1320handled the SSL encryption/decryption. If port is not supplied,
1321defaults to 8080.
1322+
1323Behaves exactly like proxy-http, but also sets the scheme to assume
1324'https://' is the proper URL back to the server.
1325
1326+
1327If multiple values are supplied, the daemon will listen on all
1328of them.
1329+
1330By default, http://*:8080.
1331
1332[[httpd.reuseAddress]]httpd.reuseAddress::
1333+
1334If true, permits the daemon to bind to the port even if the port
1335is already in use. If false, the daemon ensures the port is not
1336in use before starting. Busy sites may need to set this to true
1337to permit fast restarts.
1338+
1339By default, true.
1340
1341[[httpd.requestHeaderSize]]httpd.requestHeaderSize::
1342+
1343Size, in bytes, of the buffer used to parse the HTTP headers of an
1344incoming HTTP request. The entire request headers, including any
1345cookies sent by the browser, must fit within this buffer, otherwise
1346the server aborts with the response '413 Request Entity Too Large'.
1347+
1348One buffer of this size is allocated per active connection.
1349Allocating a buffer that is too large wastes memory that cannot be
1350reclaimed, allocating a buffer that is too small may cause unexpected
1351errors caused by very long Referer URLs or large cookie values.
1352+
1353By default, 16384 (16 K), which is sufficient for most OpenID and
1354other web-based single-sign-on integrations.
1355
1356[[httpd.sslKeyStore]]httpd.sslKeyStore::
1357+
1358Path of the Java keystore containing the server's SSL certificate
1359and private key. This keystore is required for `https://` in URL.
1360+
1361To create a self-signed certificate for simple internal usage:
1362+
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001363----
1364keytool -keystore keystore -alias jetty -genkey -keyalg RSA
1365chmod 600 keystore
1366----
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08001367+
1368If not absolute, the path is resolved relative to `$site_path`.
1369+
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08001370By default, `$site_path/etc/keystore`.
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08001371
1372[[httpd.sslKeyPassword]]httpd.sslKeyPassword::
1373+
1374Password used to decrypt the private portion of the sslKeyStore.
David Pursehouse221d4f62012-06-08 17:38:08 +09001375Java keystores require a password, even if the administrator
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08001376doesn't want to enable one.
1377+
1378If set to the empty string the embedded server will prompt for the
1379password during startup.
1380+
1381By default, `gerrit`.
1382
Shawn O. Pearce1766f502010-01-15 10:49:46 -08001383[[httpd.requestLog]]httpd.requestLog::
1384+
1385Enable (or disable) the `'$site_path'/logs/httpd_log` request log.
1386If enabled, an NCSA combined log format request log file is written
1387out by the internal HTTP daemon.
1388+
1389By default, true if httpd.listenUrl uses http:// or https://,
1390and false if httpd.listenUrl uses proxy-http:// or proxy-https://.
1391
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08001392[[httpd.acceptorThreads]]httpd.acceptorThreads::
1393+
1394Number of worker threads dedicated to accepting new incoming TCP
David Pursehouse221d4f62012-06-08 17:38:08 +09001395connections and allocating them connection-specific resources.
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08001396+
1397By default, 2, which should be suitable for most high-traffic sites.
1398
1399[[httpd.minThreads]]httpd.minThreads::
1400+
1401Minimum number of spare threads to keep in the worker thread pool.
1402This number must be at least 1 larger than httpd.acceptorThreads
1403multipled by the number of httpd.listenUrls configured.
1404+
1405By default, 5, suitable for most lower-volume traffic sites.
1406
1407[[httpd.maxThreads]]httpd.maxThreads::
1408+
1409Maximum number of threads to permit in the worker thread pool.
1410+
1411By default 25, suitable for most lower-volume traffic sites.
1412
1413[[httpd.maxQueued]]httpd.maxQueued::
1414+
1415Maximum number of client connections which can enter the worker
1416thread pool waiting for a worker thread to become available.
14170 disables the queue and permits infinite number of connections.
1418+
1419By default 50.
1420
Shawn O. Pearcee5452b72010-01-15 14:32:50 -08001421[[httpd.maxWait]]httpd.maxWait::
1422+
David Pursehouse221d4f62012-06-08 17:38:08 +09001423Maximum amount of time a client will wait for an available
Shawn O. Pearcee5452b72010-01-15 14:32:50 -08001424thread to handle a project clone, fetch or push request over the
1425smart HTTP transport.
1426+
1427Values should use common unit suffixes to express their setting:
1428+
1429* s, sec, second, seconds
1430* m, min, minute, minutes
1431* h, hr, hour, hours
1432* d, day, days
1433* w, week, weeks (`1 week` is treated as `7 days`)
1434* mon, month, months (`1 month` is treated as `30 days`)
1435* y, year, years (`1 year` is treated as `365 days`)
1436
1437+
1438If a unit suffix is not specified, `minutes` is assumed. If 0
1439is supplied, the maximum age is infinite and connections will not
1440abort until the client disconnects.
1441+
1442By default, 5 minutes.
1443
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08001444
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -07001445[[ldap]]Section ldap
1446~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001447
David Pursehouse221d4f62012-06-08 17:38:08 +09001448LDAP integration is only enabled if `auth.type` is set to
Sasa Zivkoveabc8972010-10-04 15:47:08 +02001449`HTTP_LDAP`, `LDAP` or `CLIENT_SSL_CERT_LDAP`. See above for a
1450detailed description of the auth.type settings and their
1451implications.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001452
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07001453An example LDAP configuration follows, and then discussion of
1454the parameters introduced here. Suitable defaults for most
1455parameters are automatically guessed based on the type of server
1456detected during startup. The guessed defaults support both
1457link:http://www.ietf.org/rfc/rfc2307.txt[RFC 2307] and Active
1458Directory.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001459
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001460----
1461[ldap]
1462 server = ldap://ldap.example.com
1463
1464 accountBase = ou=people,dc=example,dc=com
1465 accountPattern = (&(objectClass=person)(uid=${username}))
1466 accountFullName = displayName
1467 accountEmailAddress = mail
1468
1469 groupBase = ou=groups,dc=example,dc=com
1470 groupMemberPattern = (&(objectClass=group)(member=${dn}))
1471----
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001472
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001473[[ldap.server]]ldap.server::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001474+
1475URL of the organization's LDAP server to query for user information
1476and group membership from. Must be of the form `ldap://host` or
1477`ldaps://host` to bind with either a plaintext or SSL connection.
Shawn O. Pearcef7e065e2009-09-26 20:01:10 -07001478+
1479If auth.type is `LDAP` this setting should use `ldaps://` to
1480ensure the end user's plaintext password is transmitted only over
1481an encrypted connection.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001482
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07001483[[ldap.sslVerify]]ldap.sslVerify::
1484+
1485If false and ldap.server is an `ldaps://` style URL, Gerrit
1486will not verify the server certificate when it connects to
1487perform a query.
1488+
1489By default, true, requiring the certificate to be verified.
1490
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001491[[ldap.username]]ldap.username::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001492+
1493_(Optional)_ Username to bind to the LDAP server with. If not set,
1494an anonymous connection to the LDAP server is attempted.
1495
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001496[[ldap.password]]ldap.password::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001497+
1498_(Optional)_ Password for the user identified by `ldap.username`.
1499If not set, an anonymous (or passwordless) connection to the LDAP
1500server is attempted.
1501
Ben Wu0410a152010-06-04 16:17:24 +08001502[[ldap.referral]]ldap.referral::
1503+
1504_(Optional)_ How an LDAP referral should be handled if it is
1505encountered during directory traversal. Set to `follow` to
James Y Knight1244ed02011-01-04 02:40:32 -05001506automatically follow any referrals, or `ignore` to ignore the
1507referrals.
Ben Wu0410a152010-06-04 16:17:24 +08001508+
1509By default, `ignore`.
1510
Sasa Zivkov100bd4b2011-11-07 14:58:46 +01001511[[ldap.readTimeout]]ldap.readTimeout::
1512+
1513_(Optional)_ The read timeout for an LDAP operation. The value is
1514in the usual time-unit format like "1 s", "100 ms", etc...
1515A timeout can be used to avoid blocking all of the SSH command start
David Pursehouse221d4f62012-06-08 17:38:08 +09001516threads in case the LDAP server becomes slow.
Sasa Zivkov100bd4b2011-11-07 14:58:46 +01001517+
1518By default there is no timeout and Gerrit will wait for the LDAP
1519server to respond until the TCP connection times out.
1520
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001521[[ldap.accountBase]]ldap.accountBase::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001522+
1523Root of the tree containing all user accounts. This is typically
1524of the form `ou=people,dc=example,dc=com`.
1525
Shawn O. Pearce304ccdb2009-08-25 12:25:27 -07001526[[ldap.accountScope]]ldap.accountScope::
1527+
1528Scope of the search performed for accounts. Must be one of:
1529+
1530* `one`: Search only one level below accountBase, but not recursive
1531* `sub` or `subtree`: Search recursively below accountBase
1532* `base` or `object`: Search exactly accountBase; probably not desired
1533
1534+
1535Default is `subtree` as many directories have several levels.
1536
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001537[[ldap.accountPattern]]ldap.accountPattern::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001538+
1539Query pattern to use when searching for a user account. This may be
1540any valid LDAP query expression, including the standard `(&...)` and
1541`(|...)` operators. If auth.type is `HTTP_LDAP` then the variable
Edwin Kempincdb0e002011-09-08 14:23:30 +02001542`${username}` is replaced with a parameter set to the username
Shawn O. Pearcef7e065e2009-09-26 20:01:10 -07001543that was supplied by the HTTP server. If auth.type is `LDAP` then
Edwin Kempincdb0e002011-09-08 14:23:30 +02001544the variable `${username}` is replaced by the string entered by
Shawn O. Pearcef7e065e2009-09-26 20:01:10 -07001545the end user.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001546+
1547This pattern is used to search the objects contained directly under
1548the `ldap.accountBase` tree. A typical setting for this parameter
Edwin Kempincdb0e002011-09-08 14:23:30 +02001549is `(uid=${username})` or `(cn=${username})`, but the proper
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001550setting depends on the LDAP schema used by the directory server.
1551+
Edwin Kempincdb0e002011-09-08 14:23:30 +02001552Default is `(uid=${username})` for RFC 2307 servers,
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07001553and `(&(objectClass=user)(sAMAccountName=${username}))`
1554for Active Directory.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001555
Shawn O. Pearce37dc1f82009-08-19 09:49:07 -07001556[[ldap.accountFullName]]ldap.accountFullName::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001557+
1558_(Optional)_ Name of an attribute on the user account object which
1559contains the initial value for the user's full name field in Gerrit.
1560Typically this is the `displayName` property in LDAP, but could
1561also be `legalName` or `cn`.
1562+
David Pursehouse221d4f62012-06-08 17:38:08 +09001563Attribute values may be concatenated with literal strings. For
1564example to join given name and surname together, use the pattern
Edwin Kempincdb0e002011-09-08 14:23:30 +02001565`${givenName} ${SN}`.
Shawn O. Pearceb86ae002009-09-26 16:54:05 -07001566+
Shawn O. Pearce3ca1dcf2009-08-20 08:56:23 -07001567If set, users will be unable to modify their full name field, as
1568Gerrit will populate it only from the LDAP data.
1569+
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07001570Default is `displayName` for RFC 2307 servers,
1571and `${givenName} ${sn}` for Active Directory.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001572
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001573[[ldap.accountEmailAddress]]ldap.accountEmailAddress::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001574+
1575_(Optional)_ Name of an attribute on the user account object which
1576contains the user's Internet email address, as defined by this
1577LDAP server.
1578+
Shawn O. Pearceb86ae002009-09-26 16:54:05 -07001579Attribute values may be concatenated with literal strings,
1580for example to set the email address to the lowercase form
1581of sAMAccountName followed by a constant domain name, use
Edwin Kempincdb0e002011-09-08 14:23:30 +02001582`${sAMAccountName.toLowerCase}@example.com`.
Shawn O. Pearceb86ae002009-09-26 16:54:05 -07001583+
Shawn O. Pearce3ca1dcf2009-08-20 08:56:23 -07001584If set, the preferred email address will be prefilled from LDAP,
David Pursehouse221d4f62012-06-08 17:38:08 +09001585but users may still be able to register additional email addresses,
Shawn O. Pearce3ca1dcf2009-08-20 08:56:23 -07001586and select a different preferred email address.
1587+
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07001588Default is `mail`.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001589
Shawn O. Pearce59e09222009-08-19 09:04:49 -07001590[[ldap.accountSshUserName]]ldap.accountSshUserName::
1591+
1592_(Optional)_ Name of an attribute on the user account object which
1593contains the initial value for the user's SSH username field in
1594Gerrit. Typically this is the `uid` property in LDAP, but could
1595also be `cn`. Administrators should prefer to match the attribute
1596corresponding to the user's workstation username, as this is what
1597SSH clients will default to.
1598+
Shawn O. Pearceb86ae002009-09-26 16:54:05 -07001599Attribute values may also be forced to lowercase, or to uppercase in
Edwin Kempincdb0e002011-09-08 14:23:30 +02001600an expression. For example, `${sAMAccountName.toLowerCase}` will
Shawn O. Pearceb86ae002009-09-26 16:54:05 -07001601force the value of sAMAccountName, if defined, to be all lowercase.
1602The suffix `.toUpperCase` can be used for the other direction.
1603The suffix `.localPart` can be used to split attribute values of
1604the form 'user@example.com' and return only the left hand side, for
Edwin Kempincdb0e002011-09-08 14:23:30 +02001605example `${userPrincipalName.localPart}` would provide only 'user'.
Shawn O. Pearceb86ae002009-09-26 16:54:05 -07001606+
Shawn O. Pearce3ca1dcf2009-08-20 08:56:23 -07001607If set, users will be unable to modify their SSH username field, as
1608Gerrit will populate it only from the LDAP data.
1609+
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07001610Default is `uid` for RFC 2307 servers,
1611and `${sAMAccountName.toLowerCase}` for Active Directory.
Shawn O. Pearce59e09222009-08-19 09:04:49 -07001612
Shawn O. Pearce7d25f782009-10-30 08:01:03 -07001613[[ldap.accountMemberField]]ldap.accountMemberField::
Anthony93de7db2009-10-03 10:01:50 -04001614+
1615_(Optional)_ Name of an attribute on the user account object which
Shawn O. Pearce7d25f782009-10-30 08:01:03 -07001616contains the groups the user is part of. Typically used for Active
1617Directory servers.
Anthony93de7db2009-10-03 10:01:50 -04001618+
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07001619Default is unset for RFC 2307 servers (disabled)
1620and `memberOf` for Active Directory.
Anthony93de7db2009-10-03 10:01:50 -04001621
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001622[[ldap.groupBase]]ldap.groupBase::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001623+
1624Root of the tree containing all group objects. This is typically
1625of the form `ou=groups,dc=example,dc=com`.
1626
Shawn O. Pearce304ccdb2009-08-25 12:25:27 -07001627[[ldap.groupScope]]ldap.groupScope::
1628+
1629Scope of the search performed for group objects. Must be one of:
1630+
1631* `one`: Search only one level below groupBase, but not recursive
1632* `sub` or `subtree`: Search recursively below groupBase
1633* `base` or `object`: Search exactly groupBase; probably not desired
1634
1635+
1636Default is `subtree` as many directories have several levels.
1637
Shawn O. Pearce7d25f782009-10-30 08:01:03 -07001638[[ldap.groupPattern]]ldap.groupPattern::
1639+
1640Query pattern used when searching for an LDAP group to connect
1641to a Gerrit group. This may be any valid LDAP query expression,
1642including the standard `(&...)` and `(|...)` operators. The variable
Edwin Kempincdb0e002011-09-08 14:23:30 +02001643`${groupname}` is replaced with the search term supplied by the
Shawn O. Pearce7d25f782009-10-30 08:01:03 -07001644group owner.
1645+
Edwin Kempincdb0e002011-09-08 14:23:30 +02001646Default is `(cn=${groupname})` for RFC 2307,
1647and `(&(objectClass=group)(cn=${groupname}))` for Active Directory.
Shawn O. Pearce7d25f782009-10-30 08:01:03 -07001648
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001649[[ldap.groupMemberPattern]]ldap.groupMemberPattern::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001650+
1651Query pattern to use when searching for the groups that a user
1652account is currently a member of. This may be any valid LDAP query
1653expression, including the standard `(&...)` and `(|...)` operators.
1654+
Edwin Kempincdb0e002011-09-08 14:23:30 +02001655If auth.type is `HTTP_LDAP` then the variable `${username}` is
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001656replaced with a parameter set to the username that was supplied
1657by the HTTP server. Other variables appearing in the pattern,
Edwin Kempincdb0e002011-09-08 14:23:30 +02001658such as `${fooBarAttribute}`, are replaced with the value of the
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001659corresponding attribute (in this case, `fooBarAttribute`) as read
1660from the user's account object matched under `ldap.accountBase`.
Edwin Kempincdb0e002011-09-08 14:23:30 +02001661Attributes such as `${dn}` or `${uidNumber}` may be useful.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001662+
Edwin Kempincdb0e002011-09-08 14:23:30 +02001663Default is `(memberUid=${username})` for RFC 2307,
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07001664and unset (disabled) for Active Directory.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001665
Edwin Kempinb3b0d292011-09-14 14:17:34 +02001666[[ldap.localUsernameToLowerCase]]ldap.localUsernameToLowerCase::
1667+
1668Converts the local username, that is used to login into the Gerrit
1669WebUI, to lower case before doing the LDAP authentication. By setting
1670this parameter to true, a case insensitive login to the Gerrit WebUI
1671can be achieved.
1672+
1673If set, it must be ensured that the local usernames for all existing
1674accounts are converted to lower case, otherwise a user that has a
David Pursehouse221d4f62012-06-08 17:38:08 +09001675local username that contains upper case characters will not be able to login
Edwin Kempinb3b0d292011-09-14 14:17:34 +02001676anymore. The local usernames for the existing accounts can be
1677converted to lower case by running the server program
1678link:pgm-LocalUsernamesToLowerCase.html[LocalUsernamesToLowerCase].
1679Please be aware that the conversion of the local usernames to lower
1680case can't be undone. For newly created accounts the local username
1681will be directly stored in lower case.
1682+
1683By default, unset/false.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001684
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -07001685[[mimetype]]Section mimetype
1686~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearce01cb11902009-07-15 08:19:01 -07001687
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001688[[mimetype.name.safe]]mimetype.<name>.safe::
Shawn O. Pearce01cb11902009-07-15 08:19:01 -07001689+
1690If set to true, files with the MIME type `<name>` will be sent as
1691direct downloads to the user's browser, rather than being wrapped up
1692inside of zipped archives. The type name may be a complete type
Edwin Kempincdb0e002011-09-08 14:23:30 +02001693name, e.g. `image/gif`, a generic media type, e.g. `image/*`,
1694or the wildcard `*/*` to match all types.
Shawn O. Pearce01cb11902009-07-15 08:19:01 -07001695+
1696By default, false for all MIME types.
1697
1698Common examples:
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001699----
1700[mimetype "image/*"]
1701 safe = true
1702
1703[mimetype "application/pdf"]
1704 safe = true
1705
1706[mimetype "application/msword"]
1707 safe = true
1708
1709[mimetype "application/vnd.ms-excel"]
1710 safe = true
1711----
Shawn O. Pearce01cb11902009-07-15 08:19:01 -07001712
Shawn O. Pearce5f11b292010-08-05 17:57:35 -07001713
1714[[pack]]Section pack
1715~~~~~~~~~~~~~~~~~~~~
1716Global settings controlling how Gerrit Code Review creates pack
1717streams for Git clients running clone, fetch, or pull. Most of these
1718variables are per-client request, and thus should be carefully set
1719given the expected concurrent request load and available CPU and
1720memory resources.
1721
1722[[pack.deltacompression]]pack.deltacompression::
1723+
1724If true, delta compression between objects is enabled. This may
1725result in a smaller overall transfer for the client, but requires
1726more server memory and CPU time.
1727+
1728False (off) by default, matching Gerrit Code Review 2.1.4.
1729
1730[[pack.threads]]pack.threads::
1731+
1732Maximum number of threads to use for delta compression (if enabled).
1733This is per-client request. If set to 0 then the number of CPUs is
1734auto-detected and one thread per CPU is used, per client request.
1735+
1736By default, 1.
1737
1738
Shawn O. Pearce5ad16ea2012-05-09 14:24:25 -07001739[[plugins]]Section plugins
1740~~~~~~~~~~~~~~~~~~~~~~~~~~
1741
1742[[plugins.checkFrequency]]plugins.checkFrequency::
1743+
1744How often plugins should be examined for new plugins to load, removed
1745plugins to be unloaded, or updated plugins to be reloaded. Values can
1746be specified using standard time unit abbreviations ('ms', 'sec',
1747'min', etc.).
1748+
1749If set to 0, automatic plugin reloading is disabled. Administrators
1750may force reloading with link:cmd-plugin.html[gerrit plugin reload].
1751+
1752Default is 1 minute.
1753
1754
lincoln2be11602010-07-05 10:53:25 -03001755[[receive]]Section receive
1756~~~~~~~~~~~~~~~~~~~~~~~~~~
Sasa Zivkov59d89c32011-11-18 15:32:35 +01001757This section is used to set who can execute the 'receive-pack' and
1758to limit the maximum Git object size that 'receive-pack' will accept.
1759'receive-pack' is what runs on the server during a user's push or
Dave Borowitz234734a2012-03-01 14:22:29 -08001760repo upload command. It also contains some advanced options for tuning the
1761behavior of Gerrit's 'receive-pack' mechanism.
lincoln2be11602010-07-05 10:53:25 -03001762
1763----
1764[receive]
1765 allowGroup = GROUP_ALLOWED_TO_EXECUTE
1766 allowGroup = YET_ANOTHER_GROUP_ALLOWED_TO_EXECUTE
Sasa Zivkov59d89c32011-11-18 15:32:35 +01001767 maxObjectSizeLimit = 40 m
lincoln2be11602010-07-05 10:53:25 -03001768----
1769
1770[[receive.allowGroup]]receive.allowGroup::
1771+
1772Name of the groups of users that are allowed to execute
1773'receive-pack' on the server. One or more groups can be set.
1774+
1775If no groups are added, any user will be allowed to execute
1776'receive-pack' on the server.
1777
Sasa Zivkov59d89c32011-11-18 15:32:35 +01001778[[receive.maxObjectSizeLimit]]receive.maxObjectSizeLimit::
1779+
1780Maximum allowed Git object size that 'receive-pack' will accept.
1781If an object is larger than the given size the pack-parsing will abort
1782and the push operation will fail. If set to zero then there is no
1783limit.
1784+
David Pursehouse221d4f62012-06-08 17:38:08 +09001785Gerrit administrators can use this setting to prevent developers
Sasa Zivkov59d89c32011-11-18 15:32:35 +01001786from pushing objects which are too large to Gerrit.
1787+
1788Default is zero.
1789+
1790Common unit suffixes of 'k', 'm', or 'g' are supported.
1791
Dave Borowitz234734a2012-03-01 14:22:29 -08001792[[receive.threadPoolSize]]receive.threadPoolSize::
1793+
1794Maximum size of the thread pool in which the change data in received packs is
1795processed.
1796+
1797Defaults to the number of available CPUs according to the Java runtime.
1798
Dave Borowitz1c401362012-03-02 17:39:17 -08001799[[receive.timeout]]receive.timeout::
1800+
Shawn O. Pearce00dd12d2012-03-12 15:52:11 -07001801Overall timeout on the time taken to process the change data in
1802received packs. Only includes the time processing Gerrit changes
1803and updating references, not the time to index the pack. Values can
1804be specified using standard time unit abbreviations ('ms', 'sec',
1805'min', etc.).
Dave Borowitz1c401362012-03-02 17:39:17 -08001806+
Shawn O. Pearce00dd12d2012-03-12 15:52:11 -07001807Default is 2 minutes. If no unit is specified, millisconds
1808is assumed.
Dave Borowitz1c401362012-03-02 17:39:17 -08001809
lincoln2be11602010-07-05 10:53:25 -03001810
Hugo Josefson072b4702010-04-21 19:27:11 +02001811[[repository]]Section repository
1812~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1813Repositories in this sense are the same as projects.
1814
Shawn O. Pearce897d9212011-06-16 16:59:59 -07001815In the following example configuration `Registered Users` is set
1816to be the default owner of new projects.
Hugo Josefson072b4702010-04-21 19:27:11 +02001817
1818----
1819[repository "*"]
Hugo Josefson072b4702010-04-21 19:27:11 +02001820 ownerGroup = Registered Users
1821----
1822
1823[NOTE]
1824Currently only the repository name `*` is supported.
1825This is a wildcard designating all repositories.
1826
Hugo Josefson072b4702010-04-21 19:27:11 +02001827[[repository.name.ownerGroup]]repository.<name>.ownerGroup::
1828+
1829A name of a group which exists in the database. Zero, one or many
1830groups are allowed. Each on its own line. Groups which don't exist
1831in the database are ignored.
Hugo Josefson072b4702010-04-21 19:27:11 +02001832
Shawn O. Pearce94860ee2011-09-29 13:11:08 -07001833[[rules]]Section rules
1834~~~~~~~~~~~~~~~~~~~~~~
1835
1836[[rules.enable]]rules.enable::
1837+
1838If true, Gerrit will load and excute 'rules.pl' files in each
1839project's refs/meta/config branch, if present. When set to false,
1840only the default internal rules will be used.
1841+
1842Default is true, to execute project specific rules.
1843
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -07001844[[sendemail]]Section sendemail
1845~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07001846
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001847[[sendemail.enable]]sendemail.enable::
Shawn O. Pearce2e4573b2009-06-02 09:09:50 -07001848+
1849If false Gerrit will not send email messages, for any reason,
1850and all other properties of section sendemail are ignored.
1851+
1852By default, true, allowing notifications to be sent.
1853
Shawn O. Pearce5c31bd72009-09-10 18:13:33 -07001854[[sendemail.from]]sendemail.from::
1855+
1856Designates what name and address Gerrit will place in the From
1857field of any generated email messages. The supported values are:
1858+
1859* `USER`
1860+
1861Gerrit will set the From header to use the current user's
1862Full Name and Preferred Email. This may cause messsages to be
1863classified as spam if the user's domain has SPF or DKIM enabled
1864and <<sendemail.smtpServer,sendemail.smtpServer>> is not a trusted
1865relay for that domain.
1866+
1867* `MIXED`
1868+
Edwin Kempincdb0e002011-09-08 14:23:30 +02001869Shorthand for `${user} (Code Review) <review@example.com>` where
Shawn O. Pearce5c31bd72009-09-10 18:13:33 -07001870`review@example.com` is the same as <<user.email,user.email>>.
1871See below for a description of how the replacement is handled.
1872+
1873* `SERVER`
1874+
1875Gerrit will set the From header to the same name and address
1876it records in any commits Gerrit creates. This is set by
1877<<user.name,user.name>> and <<user.email,user.email>>, or guessed
1878from the local operating system.
1879+
1880* 'Code Review' `<`'review'`@`'example.com'`>`
1881+
1882If set to a name and email address in brackets, Gerrit will use
1883this name and email address for any messages, overriding the name
1884that may have been selected for commits by user.name and user.email.
Edwin Kempincdb0e002011-09-08 14:23:30 +02001885Optionally, the name portion may contain the placeholder `${user}`,
Shawn O. Pearce5c31bd72009-09-10 18:13:33 -07001886which is replaced by the Full Name of the current user.
1887
1888+
1889By default, MIXED.
1890
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001891[[sendemail.smtpServer]]sendemail.smtpServer::
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07001892+
1893Hostname (or IP address) of a SMTP server that will relay
1894messages generated by Gerrit to end users.
1895+
1896By default, 127.0.0.1 (aka localhost).
1897
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001898[[sendemail.smtpServerPort]]sendemail.smtpServerPort::
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07001899+
1900Port number of the SMTP server in sendemail.smtpserver.
1901+
Shawn O. Pearce6e9a83f2009-11-02 10:30:48 -08001902By default, 25, or 465 if smtpEncryption is 'ssl'.
1903
1904[[sendemail.smtpEncryption]]sendemail.smtpEncryption::
1905+
1906Specify the encryption to use, either 'ssl' or 'tls'.
1907+
1908By default, 'none', indicating no encryption is used.
1909
1910[[sendemail.sslVerify]]sendemail.sslVerify::
1911+
1912If false and sendemail.smtpEncryption is 'ssl' or 'tls', Gerrit
1913will not verify the server certificate when it connects to send
1914an email message.
1915+
1916By default, true, requiring the certificate to be verified.
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07001917
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001918[[sendemail.smtpUser]]sendemail.smtpUser::
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07001919+
1920User name to authenticate with, if required for relay.
1921
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001922[[sendemail.smtpPass]]sendemail.smtpPass::
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07001923+
1924Password for the account named by sendemail.smtpUser.
1925
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001926[[sendemail.allowrcpt]]sendemail.allowrcpt::
Shawn O. Pearce219a8ee2009-06-01 18:13:57 -07001927+
1928If present, each value adds one entry to the whitelist of email
1929addresses that Gerrit can send email to. If set to a complete
1930email address, that one address is added to the white list.
1931If set to a domain name, any address at that domain can receive
1932email from Gerrit.
1933+
1934By default, unset, permitting delivery to any email address.
1935
Shawn O. Pearce02aacbc2012-06-12 13:44:22 -07001936[[sendemail.includeDiff]]sendemail.includeDiff::
1937+
1938If true, new change emails from Gerrit will include the complete
Shawn O. Pearce28a950b2012-06-12 14:36:34 -07001939unified diff of the change. Variable maxmimumDiffSize places an upper
1940limit on how large the email can get when this option is enabled.
Shawn O. Pearce02aacbc2012-06-12 13:44:22 -07001941+
1942By default, false.
1943
Shawn O. Pearce28a950b2012-06-12 14:36:34 -07001944[[sendemail.maximumDiffSize]]sendemail.maximumDiffSize::
1945+
1946Largest size of unified diff output to include in an email. When
1947the diff exceeds this size the file paths will be listed instead.
1948Standard byte unit suffixes are supported.
1949+
1950By default, 256 KiB.
1951
Alex Blewitt9cca7402011-02-11 01:39:30 +00001952[[sendemail.importance]]sendemail.importance::
1953+
1954If present, emails sent from Gerrit will have the given level
1955of importance. Valid values include 'high' and 'low', which
1956email clients will render in different ways.
1957+
1958By default, unset, so no Importance header is generated.
1959
1960[[sendemail.expiryDays]]sendemail.expiryDays::
1961+
1962If present, emails sent from Gerrit will expire after the given
1963number of days. This will add the Expiry-Date header and
1964email clients may expire or expunge mails whose Expiry-Date
1965header is in the past. This should be a positive non-zero
1966number indicating how many days in the future the mails
1967should expire.
1968+
1969By default, unset, so no Expiry-Date header is generated.
1970
Shawn O. Pearcedba97642011-09-07 20:12:31 -07001971
1972[[site]]Section site
1973~~~~~~~~~~~~~~~~~~~~
1974
1975[[site.checkUserAgent]]site.checkUserAgent::
1976+
1977If true the server checks the User-Agent HTTP header and sends the
1978correct JavaScript to the client as part of the initial page load.
1979This usually reduces a round-trip for the client, allowing the UI to
1980start more quickly. If false, a tiny JavaScript loader is sent to the
1981client instead to determine the correct code to use. Default is true.
1982
1983[[site.refreshHeaderFooter]]site.refreshHeaderFooter::
1984+
1985If true the server checks the site header, footer and CSS files for
1986updated versions. If false, a server restart is required to change
1987any of these resources. Default is true, allowing automatic reloads.
1988
Shawn O. Pearce6bd04fd2012-04-05 14:39:22 -07001989[[site.enableDeprecatedQuery]]site.enableDeprecatedQuery::
1990+
1991If true the deprecated `/query` URL is available to return JSON
1992and text results for changes. If false, the URL is disabled and
1993returns 404 to clients. Default is true, enabling `/query`.
1994
Sasa Zivkovde980a42012-06-14 14:57:53 +02001995[[site.upgradeSchemaOnStartup]]site.upgradeSchemaOnStartup::
1996+
1997Control whether schema upgrade should be done on Gerrit startup. The following
1998values are supported:
1999+
2000* `OFF`
2001+
2002No automatic schema upgrade on startup.
2003+
2004* `AUTO`
2005+
2006Perform schema migration on startup, if necessary. If, as a result of
2007schema migration, there would be any unused database objects they will
2008be dropped automatically.
2009+
2010* `AUTO_NO_PRUNE`
2011+
2012Like `AUTO` but unused database objects will not be pruned.
2013
2014+
2015The default is `OFF`.
2016
Shawn O. Pearce521380a2012-05-11 14:57:56 -07002017[[ssh-alias]] Section ssh-alias
2018~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2019
2020Variables in section ssh-alias permit the site administrator to alias
2021another command from Gerrit or a plugin into the `gerrit` command
2022namespace. To alias `replication start` to `gerrit replicate`:
2023
2024----
2025[ssh-alias]
2026 replicate = replication start
2027----
Shawn O. Pearcedba97642011-09-07 20:12:31 -07002028
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -07002029[[sshd]] Section sshd
Shawn O. Pearcea758fef2009-08-19 08:29:32 -07002030~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearce9410f2c2009-05-14 10:26:47 -07002031
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002032[[sshd.listenAddress]]sshd.listenAddress::
Shawn O. Pearce1d3cb4442009-05-30 14:03:31 -07002033+
2034Specifies the local addresses the internal SSHD should listen
2035for connections on. The following forms may be used to specify
2036an address. In any form, `:'port'` may be omitted to use the
2037default of 29418.
2038+
2039* 'hostname':'port' (for example `review.example.com:29418`)
2040* 'IPv4':'port' (for example `10.0.0.1:29418`)
2041* ['IPv6']:'port' (for example `[ff02::1]:29418`)
Edwin Kempincdb0e002011-09-08 14:23:30 +02002042* *:'port' (for example `*:29418`)
Shawn O. Pearce1d3cb4442009-05-30 14:03:31 -07002043
2044+
2045If multiple values are supplied, the daemon will listen on all
2046of them.
2047+
Shawn O. Pearce6af6f5f2010-06-08 17:38:43 -07002048To disable the internal SSHD, set listenAddress to `off`.
2049+
Shawn O. Pearce1d3cb4442009-05-30 14:03:31 -07002050By default, *:29418.
2051
James Y Knight910bd862011-01-11 20:05:56 -05002052[[sshd.advertisedAddress]]sshd.advertisedAddress::
2053+
2054Specifies the addresses clients should be told to connect to.
2055This may differ from sshd.listenAddress if a firewall based port
2056redirector is being used, making Gerrit appear to answer on port
205722. The following forms may be used to specify an address. In any
2058form, `:'port'` may be omitted to use the default SSH port of 22.
2059+
2060* 'hostname':'port' (for example `review.example.com:22`)
2061* 'IPv4':'port' (for example `10.0.0.1:29418`)
2062* ['IPv6']:'port' (for example `[ff02::1]:29418`)
2063
2064+
2065If multiple values are supplied, the daemon will advertise all
2066of them.
2067+
2068By default, sshd.listenAddress.
2069
Shawn O. Pearce149238a2009-09-10 12:25:20 -07002070[[sshd.reuseAddress]]sshd.reuseAddress::
Shawn O. Pearce9410f2c2009-05-14 10:26:47 -07002071+
2072If true, permits the daemon to bind to the port even if the port
2073is already in use. If false, the daemon ensures the port is not
2074in use before starting. Busy sites may need to set this to true
2075to permit fast restarts.
2076+
2077By default, true.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -07002078
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002079[[sshd.tcpKeepAlive]]sshd.tcpKeepAlive::
Shawn O. Pearcefc9081f2009-05-14 10:26:59 -07002080+
2081If true, enables TCP keepalive messages to the other side, so
2082the daemon can terminate connections if the peer disappears.
2083+
2084By default, true.
2085
Shawn O. Pearce1a4580b2009-11-19 17:37:10 -08002086[[sshd.threads]]sshd.threads::
2087+
2088Number of threads to use when executing SSH command requests.
2089If additional requests are received while all threads are busy they
David Pursehouse221d4f62012-06-08 17:38:08 +09002090are queued and serviced in a first-come-first-served order.
Shawn O. Pearce1a4580b2009-11-19 17:37:10 -08002091+
2092By default, 1.5x the number of CPUs available to the JVM.
2093
Nico Sallembienfc53f7f2010-05-18 16:40:10 -07002094[[sshd.batchThreads]]sshd.batchThreads::
2095+
2096Number of threads to allocate for SSH command requests from
Fredrik Luthander46843022012-03-13 16:11:02 +01002097link:access-control.html#non-interactive_users[non-interactive users].
2098If equals to 0, then all non-interactive requests are executed in the same
2099queue as interactive requests.
Nico Sallembienfc53f7f2010-05-18 16:40:10 -07002100+
2101Any other value will remove the number of threads from the queue
2102allocated to interactive users, and create a separate thread pool
2103of the requested size, which will be used to run commands from
2104non-interactive users.
2105+
2106If the number of threads requested for non-interactive users is larger
2107than the total number of threads allocated in sshd.threads, then the
2108value of sshd.threads is increased to accomodate the requested value.
2109+
2110By default, 0.
2111
Kenny Root15ac1b82010-02-24 00:29:20 -08002112[[sshd.streamThreads]]sshd.streamThreads::
2113+
2114Number of threads to use when formatting events to asynchronous
2115streaming clients. Event formatting is multiplexed onto this thread
2116pool by a simple FIFO scheduling system.
2117+
2118By default, 1 plus the number of CPUs available to the JVM.
2119
Edwin Kempinb5df3b82011-10-10 11:31:14 +02002120[[sshd.commandStartThreads]]sshd.commandStartThreads::
Shawn O. Pearced6296552011-05-15 13:56:30 -07002121+
2122Number of threads used to parse a command line submitted by a client
2123over SSH for execution, create the internal data structures used by
2124that command, and schedule it for execution on another thread.
2125+
2126By default, 2.
2127
Shawn O. Pearce8a0bf362010-11-05 17:49:41 -07002128[[sshd.maxAuthTries]]sshd.maxAuthTries::
2129+
2130Maximum number of authentication attempts before the server
2131disconnects the client. Each public key that a client has loaded
2132into its local agent counts as one auth request. Users can work
2133around the server's limit by loading less keys into their agent,
2134or selecting a specific key in their `~/.ssh/config` file with
2135the `IdentityFile` option.
2136+
2137By default, 6.
2138
2139[[sshd.loginGraceTime]]sshd.loginGraceTime::
2140+
2141Time in seconds that a client has to authenticate before the server
2142automatically terminates their connection. Values should use common
2143unit suffixes to express their setting:
2144+
2145* s, sec, second, seconds
2146* m, min, minute, minutes
2147* h, hr, hour, hours
2148* d, day, days
2149
2150+
2151By default, 2 minutes.
2152
2153[[sshd.maxConnectionsPerUser]]sshd.maxConnectionsPerUser::
2154+
2155Maximum number of concurrent SSH sessions that a user account
2156may open at one time. This is the number of distinct SSH logins
David Pursehouse221d4f62012-06-08 17:38:08 +09002157that each user may have active at one time, and is not related to
Shawn O. Pearce8a0bf362010-11-05 17:49:41 -07002158the number of commands a user may issue over a single connection.
2159If set to 0, there is no limit.
2160+
2161By default, 64.
2162
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002163[[sshd.cipher]]sshd.cipher::
Shawn O. Pearce0bf2f522009-05-14 11:02:03 -07002164+
2165Available ciphers. To permit multiple ciphers, specify multiple
2166`sshd.cipher` keys in the configuration file, one cipher name
2167per key. Cipher names starting with `+` are enabled in addition
2168to the default ciphers, cipher names starting with `-` are removed
2169from the default cipher set.
2170+
2171Supported ciphers: aes128-cbc, aes128-cbc, aes256-cbc, blowfish-cbc,
21723des-cbc, none.
2173+
2174By default, all supported ciphers except `none` are available.
2175
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002176[[sshd.mac]]sshd.mac::
Shawn O. Pearce0bf2f522009-05-14 11:02:03 -07002177+
2178Available MAC (message authentication code) algorithms. To permit
2179multiple algorithms, specify multiple `sshd.mac` keys in the
2180configuration file, one MAC per key. MAC names starting with `+`
2181are enabled in addition to the default MACs, MAC names starting with
2182`-` are removed from the default MACs.
2183+
2184Supported MACs: hmac-md5, hmac-md5-96, hmac-sha1, hmac-sha1-96.
2185+
2186By default, all supported MACs are available.
2187
Shawn O. Pearce07bd6fb2011-04-29 19:15:47 -07002188[[suggest]] Section suggest
2189~~~~~~~~~~~~~~~~~~~~~~~~~~~
2190
Dave Borowitz1ae8c532012-03-09 18:39:40 -08002191[[suggest.accounts]]suggest.accounts::
Shawn O. Pearce07bd6fb2011-04-29 19:15:47 -07002192+
Dave Borowitz45baa892012-02-23 16:43:05 -08002193If `true`, visible user accounts (according to the value of
2194`accounts.visibility`) will be offered as completion suggestions
2195when adding a reviewer to a change, or a user to a group.
Shawn O. Pearce07bd6fb2011-04-29 19:15:47 -07002196+
Dave Borowitz45baa892012-02-23 16:43:05 -08002197If `false`, account suggestion is disabled.
Shawn O. Pearce07bd6fb2011-04-29 19:15:47 -07002198+
Dave Borowitz45baa892012-02-23 16:43:05 -08002199Older configurations may also have one of the `accounts.visibility`
2200values for this field, including `OFF` as a synonym for `NONE`. If
2201`accounts.visibility` is also set, that value overrides this one;
2202otherwise, this value applies to both `suggest.accounts` and
2203`accounts.visibility`.
Edwin Kempin42488812011-05-20 03:11:43 +02002204+
Dave Borowitz45baa892012-02-23 16:43:05 -08002205New configurations should prefer the boolean value for this field
2206and an enum value for `accounts.visibility`.
Shawn O. Pearce07bd6fb2011-04-29 19:15:47 -07002207
Shawn O. Pearce2ba3ab42010-02-25 12:10:10 -08002208[[theme]] Section theme
2209~~~~~~~~~~~~~~~~~~~~~~~
2210
2211[[theme.backgroundColor]]theme.backgroundColor::
2212+
2213Background color for the page, and major data tables like the all
2214open changes table or the account dashboard. The value must be a
2215valid HTML hex color code, or standard color name.
2216+
Shawn O. Pearce9ca8ae32011-05-24 08:28:40 -07002217By default `FCFEEF` (a creme color) for signed-out theme and white
2218(`FFFFFF`) for signed-in theme.
Shawn O. Pearce2ba3ab42010-02-25 12:10:10 -08002219
2220[[theme.topMenuColor]]theme.topMenuColor::
2221+
2222This is the color of the main menu bar at the top of the page.
2223The value must be a valid HTML hex color code, or standard color
2224name. The value defaults to <<theme.trimColor,trimColor>>.
2225
2226[[theme.textColor]]theme.textColor::
2227+
2228Text color for the page, and major data tables like the all
2229open changes table or the account dashboard. The value must be a
2230valid HTML hex color code, or standard color name.
2231+
2232By default black, `000000`.
2233
2234[[theme.trimColor]]theme.trimColor::
2235+
2236Primary color used as a background color behind text. This is
2237the color of the main menu bar at the top, of table headers,
2238and of major UI areas that we want to offset from other portions
2239of the page. The value must be a valid HTML hex color code, or
2240standard color name.
2241+
2242By default a shade of green, `D4E9A9`.
2243
2244[[theme.selectionColor]]theme.selectionColor::
2245+
2246Background color used within a trimColor area to denote the currently
2247selected tab, or the background color used in a table to denote the
2248currently selected row. The value must be a valid HTML hex color
2249code, or standard color name.
2250+
2251By default a shade of yellow, `FFFFCC`.
2252
Andrew Hutchingscfd7abb2012-06-29 10:57:05 +01002253[[theme.changeTableOutdatedColor]]theme.changeTableOutdatedColor::
2254+
2255Background color used for patch outdated messages. The value must be
2256a valid HTML hex color code, or standard color name.
2257+
Edwin Kempinb0347332012-07-17 10:14:32 +02002258By default a shade of red, `F08080`.
Andrew Hutchingscfd7abb2012-06-29 10:57:05 +01002259
2260[[theme.tableOddRowColor]]theme.tableOddRowColor::
2261+
2262Background color for tables such as lists of open reviews for odd
2263rows. This is so you can have a different color for odd and even
2264rows of the table. The value must be a valid HTML hex color code,
2265or standard color name.
2266+
2267By default transparent.
2268
2269[[theme.tableEvenRowColor]]theme.tableEvenRowColor::
2270+
2271Background color for tables such as lists of open reviews for even
2272rows. This is so you can have a different color for odd and even
2273rows of the table. The value must be a valid HTML hex color code,
2274or standard color name.
2275+
2276By default transparent.
2277
Shawn O. Pearcea83bb1c2011-05-20 08:46:48 -07002278A different theme may be used for signed-in vs. signed-out user status
2279by using the "signed-in" and "signed-out" theme sections. Variables
2280not specified in a section are inherited from the default theme.
2281
2282----
2283[theme]
2284 backgroundColor = FFFFFF
2285[theme "signed-in"]
2286 backgroundColor = C0C0C0
2287[theme "signed-out"]
2288 backgroundColor = 00FFFF
2289----
2290
Goran Lungberg04132a12010-06-15 17:20:37 -07002291[[trackingid]] Section trackingid
Shawn O. Pearce91763a02010-06-16 15:39:33 -07002292~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Goran Lungberg04132a12010-06-15 17:20:37 -07002293
Shawn O. Pearcee800b1e2010-06-16 17:33:43 -07002294Tagged footer lines containing references to external
2295tracking systems, parsed out of the commit message and
2296saved in Gerrit's database. After making changes to
2297this section, existing changes must be reindexed with the
2298link:pgm-ScanTrackingIds.html[ScanTrackingIds] program.
Goran Lungberg04132a12010-06-15 17:20:37 -07002299
Edwin Kempinbb421f12011-08-25 11:19:00 +02002300The tracking ids are searchable using tr:<tracking id> or
Shawn O. Pearce91763a02010-06-16 15:39:33 -07002301bug:<tracking id>.
Goran Lungberg04132a12010-06-15 17:20:37 -07002302
2303----
2304[trackingid "jira-bug"]
2305 footer = Bugfix:
2306 match = JRA\\d{2,8}
2307 system = JIRA
2308
2309[trackingid "jira-feature"]
2310 footer = Feature
2311 match = JRA(\\d{2,8})
2312 system = JIRA
2313----
2314
2315[[trackingid.name.footer]]trackingid.<name>.footer::
2316+
2317A prefix tag that identify the footer line to parse for tracking ids.
Kevin Degi9af42ea2011-08-01 15:54:42 -06002318Several trackingid entries can have the same footer tag. A single
2319trackingid entry can have multiple footer tags. If multiple footer
2320tags are specified, each tag will be parsed separately.
Goran Lungberg04132a12010-06-15 17:20:37 -07002321(the trailing ":" is optional)
2322
2323[[trackingid.name.match]]trackingid.<name>.match::
2324+
Magnus Bäcke5611832011-02-02 08:57:15 +01002325A link:http://download.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html[standard
2326Java regular expression (java.util.regex)] used to match the
2327external tracking id part of the footer line. The match can
2328result in several entries in the DB. If grouping is used in the
2329regex the first group will be interpreted as the tracking id.
David Pursehouse221d4f62012-06-08 17:38:08 +09002330Tracking ids longer than 20 characters will be ignored.
Goran Lungberg04132a12010-06-15 17:20:37 -07002331+
2332The configuration file parser eats one level of backslashes, so the
2333character class `\s` requires `\\s` in the configuration file. The
2334parser also terminates the line at the first `#`, so a match
2335expression containing # must be wrapped in double quotes.
2336
2337[[trackingid.name.system]]trackingid.<name>.system::
2338+
David Pursehouse221d4f62012-06-08 17:38:08 +09002339The name of the external tracking system (maximum 10 characters).
Goran Lungberg04132a12010-06-15 17:20:37 -07002340It is possible to have several trackingid entries for the same
2341tracking system.
2342
Shawn O. Pearce6e4dfdd2010-05-12 17:26:08 -07002343[[transfer]] Section transfer
2344~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2345
2346[[transfer.timeout]]transfer.timeout::
2347+
2348Number of seconds to wait for a single network read or write
2349to complete before giving up and declaring the remote side is
2350not responding. If 0, there is no timeout, and this server will
2351wait indefinitely for a transfer to finish.
2352+
2353A timeout should be large enough to mostly transfer the objects to
2354the other side. 1 second may be too small for larger projects,
2355especially over a WAN link, while 10-30 seconds is a much more
2356reasonable timeout value.
2357+
2358Defaults to 0 seconds, wait indefinitely.
2359
lincoln2be11602010-07-05 10:53:25 -03002360
2361[[upload]]Section upload
Remy Bohmer203eea32012-02-19 21:21:36 +01002362~~~~~~~~~~~~~~~~~~~~~~~~
lincoln2be11602010-07-05 10:53:25 -03002363Sets the group of users allowed to execute 'upload-pack' on the
2364server, 'upload-pack' is what runs on the server during a user's
2365fetch, clone or repo sync command.
2366
2367----
2368[upload]
2369 allowGroup = GROUP_ALLOWED_TO_EXECUTE
2370 allowGroup = YET_ANOTHER_GROUP_ALLOWED_TO_EXECUTE
2371----
2372
2373[[upload.allowGroup]]upload.allowGroup::
2374+
2375Name of the groups of users that are allowed to execute 'upload-pack'
2376on the server. One or more groups can be set.
2377+
2378If no groups are added, any user will be allowed to execute
2379'upload-pack' on the server.
2380
2381
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -07002382[[user]] Section user
Shawn O. Pearcea758fef2009-08-19 08:29:32 -07002383~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearce0a351912009-06-01 08:14:46 -07002384
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002385[[user.name]]user.name::
Shawn O. Pearce0a351912009-06-01 08:14:46 -07002386+
2387Name that Gerrit calls itself in Git when it creates a new Git
2388commit, such as a merge during change submission.
2389+
2390By default this is "Gerrit Code Review".
2391
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002392[[user.email]]user.email::
Shawn O. Pearce0a351912009-06-01 08:14:46 -07002393+
2394Email address that Gerrit refers to itself as when it creates a
2395new Git commit, such as a merge commit during change submission.
2396+
2397If not set, Gerrit generates this as "gerrit@`hostname`", where
2398`hostname` is the hostname of the system Gerrit is running on.
2399+
2400By default, not set, generating the value at startup.
2401
Edwin Kempin0e02ded2011-09-16 15:10:14 +02002402[[user.anonymousCoward]]user.anonymousCoward::
2403+
2404Username that this displayed in the Gerrit WebUI and in e-mail
2405notifications if the full name of the user is not set.
2406+
2407By default "Anonymous Coward" is used.
2408
Shawn O. Pearce0bf2f522009-05-14 11:02:03 -07002409
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08002410File `etc/secure.config`
Remy Bohmer203eea32012-02-19 21:21:36 +01002411------------------------
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08002412The optional file `'$site_path'/etc/secure.config` overrides (or
2413supplements) the settings supplied by `'$site_path'/etc/gerrit.config`.
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08002414The file should be readable only by the daemon process and can be
2415used to contain private configuration entries that wouldn't normally
2416be exposed to everyone.
2417
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08002418Sample `etc/secure.config`:
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08002419----
Shawn O. Pearce34f38cf2011-06-16 19:18:54 -07002420[auth]
2421 registerEmailPrivateKey = 2zHNrXE2bsoylzUqDxZp0H1cqUmjgWb6
2422
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08002423[database]
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08002424 username = webuser
2425 password = s3kr3t
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08002426
2427[ldap]
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08002428 password = l3tm3srch
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08002429
2430[httpd]
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08002431 sslKeyPassword = g3rr1t
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08002432
2433[sendemail]
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08002434 smtpPass = sp@m
Shawn O. Pearce7929d872011-05-15 13:33:15 -07002435
2436[remote "bar"]
2437 password = s3kr3t
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08002438----
2439
Johan Bjork3e5ee302012-01-27 17:59:54 +01002440File `etc/peer_keys`
2441--------------------
2442
2443The optional file `'$site_path'/etc/peer_keys` controls who can
2444login as the 'Gerrit Code Review' user, required for the link:cmd-suexec.html[suexec]
2445command.
2446
2447The format is one Base-64 encoded public key per line.
2448
2449
Shawn O. Pearce7b405712009-05-08 18:27:53 -07002450Database system_config
2451----------------------
2452
2453Several columns in the `system_config` table within the metadata
2454database may be set to control how Gerrit behaves.
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08002455
2456[NOTE]
2457The contents of the `system_config` table are cached at startup
2458by Gerrit. If you modify any columns in this table, Gerrit needs
2459to be restarted before it will use the new values.
2460
Shawn O. Pearce7b405712009-05-08 18:27:53 -07002461Configurable Parameters
2462~~~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08002463
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07002464site_path::
2465+
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08002466Local filesystem directory holding the site customization assets.
2467Placing this directory under version control and/or backup is a
2468good idea.
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07002469+
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08002470Files in this directory provide additional configuration.
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07002471+
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08002472Other files support site customization.
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07002473+
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08002474* link:config-headerfooter.html[Site Header/Footer]
2475
Shawn O. Pearce5500e692009-05-28 15:55:01 -07002476GERRIT
2477------
2478Part of link:index.html[Gerrit Code Review]