blob: d29a99a8cf9961b70ef10e87e605c477140103c7 [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
Shawn O. Pearce51967cd2009-05-08 19:46:57 -070012by Gerrit. If you modify any propeties in this file, Gerrit needs
13to 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
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -070027[[auth]]Section auth
28~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -070029
30See also link:config-sso.html[SSO configuration].
31
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -070032[[auth.type]]auth.type::
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -070033+
Shawn O. Pearce2920ef32009-08-03 08:03:34 -070034Type of user authentication employed by Gerrit. The supported
35values are:
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -070036+
37* `OpenID`
38+
39The default setting. Gerrit uses any valid OpenID
40provider chosen by the end-user. For more information see
Shawn O. Pearce2920ef32009-08-03 08:03:34 -070041http://openid.net/[openid.net].
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -070042+
43* `HTTP`
44+
Shawn O. Pearce2920ef32009-08-03 08:03:34 -070045Gerrit relies upon data presented in the HTTP request. This includes
46HTTP basic authentication, or some types of commerical single-sign-on
47solutions. With this setting enabled the authentication must
48take place in the web server or servlet container, and not from
49within Gerrit.
50+
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -070051* `HTTP_LDAP`
52+
53Exactly like `HTTP` (above), but additionally Gerrit pre-populates
54a user's full name and email address based on information obtained
55from the user's account object in LDAP. The user's group membership
56is also pulled from LDAP, making any LDAP groups that a user is a
57member of available as groups in Gerrit.
58+
Shawn O. Pearcef7e065e2009-09-26 20:01:10 -070059* `LDAP`
60+
61Gerrit prompts the user to enter a username and a password, which
62it then verifies by performing a simple bind against the configured
63<<ldap.server,ldap.server>>. In this configuration the web server
64is not involved in the user authentication process.
65+
Shawn O. Pearcec892d342010-02-17 17:00:50 -080066The actual username used in the LDAP simple bind request is the
67account's full DN, which is discovered by first querying the
68directory using either an anonymous request, or the configured
69<<ldap.username>> identity.
70
71* `LDAP_BIND`
72+
73Gerrit prompts the user to enter a username and a password, which
74it then verifies by performing a simple bind against the configured
75<<ldap.server,ldap.server>>. In this configuration the web server
76is not involved in the user authentication process.
77+
78Unlike LDAP above, the username used to perform the LDAP simple bind
79request is the exact string supplied by in the dialog by the user.
80The configured <<ldap.username>> identity is not used to obtain
81account information.
82+
Shawn O. Pearce2920ef32009-08-03 08:03:34 -070083* `DEVELOPMENT_BECOME_ANY_ACCOUNT`
84+
85*DO NOT USE*. Only for use in a development environment.
86+
87When this is the configured authentication method a hyperlink titled
88`Become` appears in the top right corner of the page, taking the
89user to a form where they can enter the username of any existing
90user account, and immediately login as that account, without any
91authentication taking place. This form of authentication is only
92useful for the GWT hosted mode shell, where OpenID authentication
93redirects might be risky to the developer's host computer, and HTTP
94authentication is not possible.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -070095
96+
97By default, OpenID.
98
Shawn O. Pearce533cafc2010-05-11 16:05:27 -070099[[auth.allowedOpenID]]auth.allowedOpenID::
100+
101List of permitted OpenID providers. A user may only authenticate
102with an OpenID that matches this list. Only used if `auth.type`
103was set to OpenID (the default).
104+
105Patterns may be either a regular expression (start with `^` and
106end with `$`) or be a simple prefix (any other string).
107+
108By default, the list contains two values, `http://` and `https://`,
109allowing users to authenticate with any OpenID provider.
110
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700111[[auth.trustedOpenID]]auth.trustedOpenID::
Shawn O. Pearced7c026d2009-08-05 20:11:22 -0700112+
113List of trusted OpenID providers. Only used if `auth.type` was
114set to OpenID (the default).
115+
116In order for a user to take advantage of permissions beyond those
117granted to the `Anonymous Users` and `Registered Users` groups,
118the user account must only have OpenIDs which match at least one
119pattern from this list.
120+
121Patterns may be either a regular expression (start with `^` and
122end with `$`) or be a simple prefix (any other string).
123+
124By default, the list contains two values, `http://` and `https://`,
125allowing Gerrit to trust any OpenID it receives.
126
Shawn O. Pearce89030bc2010-04-24 17:25:29 -0700127[[auth.maxOpenIdSessionAge]]auth.maxOpenIdSessionAge::
128+
129Time in seconds before an OpenID provider must force the user
130to authenticate themselves again before authentication to this
131Gerrit server. Currently this is only a polite request, and users
132coming from providers that don't support the PAPE extension will
133be accepted anyway. In the future it may be enforced, rejecting
134users coming from providers that don't honor the max session age.
135+
136If set to 0, the provider will always force the user to authenticate
137(e.g. supply their password). Values should use common unit suffixes
138to express their setting:
139+
140* s, sec, second, seconds
141* m, min, minute, minutes
142* h, hr, hour, hours
143* d, day, days
144* w, week, weeks (`1 week` is treated as `7 days`)
145* mon, month, months (`1 month` is treated as `30 days`)
146* y, year, years (`1 year` is treated as `365 days`)
147
148+
149Default is -1, permitting infinite time between authentications.
150
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700151[[auth.httpHeader]]auth.httpHeader::
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700152+
153HTTP header to trust the username from, or unset to select HTTP basic
154or digest authentication. Only used if `auth.type` was set to HTTP.
155
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700156[[auth.logoutUrl]]auth.logoutUrl::
Shawn O. Pearce12b5d842009-08-15 15:11:10 -0700157+
158URL to redirect a browser to after the end-user has clicked on the
159"Sign Out" link in the upper right corner. Organizations using an
160enterprise single-sign-on solution may want to redirect the browser
161to the SSO product's sign-out page.
162+
163If not set, the redirect returns to the list of all open changes.
164
Shawn O. Pearcec9d26b52009-12-16 08:05:27 -0800165[[auth.registerUrl]]auth.registerUrl::
166+
167Target for the "Register" link in the upper right corner. Used only
168when auth.type is `LDAP`.
169+
170If not set, no "Register" link is displayed.
171
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700172[[auth.emailFormat]]auth.emailFormat::
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700173+
174Optional format string to construct user email addresses out of
Shawn O. Pearcef7e065e2009-09-26 20:01:10 -0700175user login names. Only used if auth.type is `HTTP`, `HTTP_LDAP`
176or `LDAP`.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700177+
178This value can be set to a format string, where `\{0\}` is replaced
179with the login name. E.g. "\{0\}+gerrit@example.com" with a user
180login name of "foo" will produce "foo+gerrit@example.com" during
181the first time user "foo" registers.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -0700182+
Shawn O. Pearcef7e065e2009-09-26 20:01:10 -0700183If the site is using `HTTP_LDAP` or `LDAP`, using this option is
184discouraged. Setting `ldap.accountEmailAddress` and importing the
185email address from the LDAP directory is generally preferred.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700186
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700187[[auth.contributorAgreements]]auth.contributorAgreements::
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700188+
189Controls whether or not the contributor agreement features are
190enabled for the Gerrit site. If enabled a user must complete a
191contributor agreement before they can upload changes.
192+
193If enabled, the admin must also insert one or more rows into
194`contributor_agreements` and create agreement files under
195`'$site_path'/static`, so users can actually complete one or
Grzegorz Kossakowski28e4e1b2009-09-23 11:33:34 -0700196more agreements.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700197+
198By default this is false (no agreements are used).
199
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700200auth.allowGoogleAccountUpgrade::
201+
Shawn O. Pearce48eea072009-08-31 10:53:12 -0700202Allows Google Account users to automatically update their Gerrit
203account when/if their Google Account OpenID identity token changes.
204Identity tokens can change if the server changes hostnames, or
205for other reasons known only to Google. The upgrade path works
206by matching users by email address if the identity is not present,
207and then changing the identity.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700208+
Shawn O. Pearce48eea072009-08-31 10:53:12 -0700209This setting also permits old Gerrit 1.x users to seamlessly upgrade
210from Google Accounts on Google App Engine to OpenID authentication.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700211+
Shawn O. Pearce48eea072009-08-31 10:53:12 -0700212Having this enabled incurs an extra database query when Google
Shawn O. Pearcee31d02c2009-12-08 12:21:37 -0800213Account users register with the Gerrit server.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700214+
215By default, unset/false.
216
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -0700217[[cache]]Section cache
218~~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700219
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700220[[cache.directory]]cache.directory::
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700221+
222Path to a local directory where Gerrit can write cached entities for
Shawn O. Pearce4b212282009-08-05 19:45:56 -0700223future lookup. This local disk cache is used to retain potentially
224expensive to compute information across restarts. If the location
225does not exist, Gerrit will try to create it.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700226+
Shawn O. Pearce4b212282009-08-05 19:45:56 -0700227If not absolute, the path is resolved relative to `$site_path`.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700228+
Shawn O. Pearce4b212282009-08-05 19:45:56 -0700229Default is unset, no disk cache.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700230
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700231[[cache.name.maxAge]]cache.<name>.maxAge::
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700232+
Shawn O. Pearced9c403e2009-08-19 08:35:41 -0700233Maximum age to keep an entry in the cache. If an entry has not
234been accessed in this period of time, it is removed from the cache.
235Values should use common unit suffixes to express their setting:
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700236+
Shawn O. Pearced9c403e2009-08-19 08:35:41 -0700237* s, sec, second, seconds
238* m, min, minute, minutes
239* h, hr, hour, hours
240* d, day, days
241* w, week, weeks (`1 week` is treated as `7 days`)
242* mon, month, months (`1 month` is treated as `30 days`)
243* y, year, years (`1 year` is treated as `365 days`)
244
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -0700245+
Shawn O. Pearce3fdbf392009-09-04 18:08:26 -0700246If a unit suffix is not specified, `minutes` is assumed. If 0 is
247supplied, the maximum age is infinite and items are never purged
248except when the cache is full.
Shawn O. Pearced9c403e2009-08-19 08:35:41 -0700249+
250Default is `90 days` for most caches, except:
251+
252* `"ldap_groups"`: default is `1 hour`
253* `"openid"`: default is `5 minutes`
254* `"web_sessions"`: default is `12 hours`
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700255
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700256[[cache.name.memoryLimit]]cache.<name>.memoryLimit::
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700257+
258Maximum number of cache items to retain in memory. Keep in mind
259this is total number of items, not bytes of heap used.
260+
Shawn O. Pearceefaf9792009-09-02 18:12:52 -0700261Default is 1024 for most caches, except:
262+
263* `"diff"`: default is `128`
264* `"openid"`: default is `64`
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700265
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700266[[cache.name.diskLimit]]cache.<name>.diskLimit::
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700267+
268Maximum number of cache items to retain on disk, if this cache
269supports storing its items to disk. Like memoryLimit, this is
Shawn O. Pearcea5e36d52009-08-17 07:05:03 -0700270total number of items, not bytes of disk used. If 0, disk storage
271for this cache is disabled.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700272+
273Default is 16384.
274
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700275[[cache.name.diskBuffer]]cache.<name>.diskBuffer::
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700276+
277Number of bytes to buffer in memory before writing less frequently
278accessed cache items to disk, if this cache supports storing its
279items to disk.
280+
281Default is 5 MiB.
282+
283Common unit suffixes of 'k', 'm', or 'g' are supported.
284
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -0700285[[cache_names]]Standard Caches
Shawn O. Pearce4016a932009-05-28 15:12:40 -0700286^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700287
Shawn O. Pearce4a452712009-05-28 20:12:33 -0700288cache `"accounts"`::
289+
Shawn O. Pearce4dba9882009-08-05 19:55:15 -0700290Cache entries contain important details of an active user, including
291their display name, preferences, known email addresses, and group
292memberships. Entry information is obtained from the following
293database tables:
294+
295* `accounts`
296+
297* `account_group_members`
298+
299* `account_external_ids`
300
301+
302If direct updates are made to any of these database tables, this
303cache should be flushed.
304
305cache `"accounts_byemail"`::
306+
307Caches account identities keyed by email address, which is scanned
308from the `account_external_ids` database table. If updates are
309made to this table, this cache should be flushed.
Shawn O. Pearce4a452712009-05-28 20:12:33 -0700310
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700311cache `"diff"`::
312+
Shawn O. Pearceefaf9792009-09-02 18:12:52 -0700313Each item caches the differences between two commits, at both the
314directory and file levels. Gerrit uses this cache to accelerate
315the display of affected file names, as well as file contents.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700316+
Shawn O. Pearceefaf9792009-09-02 18:12:52 -0700317Entries in this cache are relatively large, so the memory limit
318should not be set incredibly high. Administrators should try to
319target cache.diff.memoryLimit to be roughly the number of changes
320which their users will process in a 1 or 2 day span.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700321+
322Keeping entries for 90 days gives sufficient time for most changes
323to be submitted or abandoned before their relevant difference items
324expire out.
325
Shawn O. Pearce4a452712009-05-28 20:12:33 -0700326cache `"groups"`::
327+
Shawn O. Pearce4dba9882009-08-05 19:55:15 -0700328Caches the basic group information from the `account_groups` table,
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -0700329including the group owner, name, and description.
330+
331Gerrit group membership obtained from the `account_group_members`
332table is cached under the `"accounts"` cache, above. External group
333membership obtained from LDAP is cached under `"ldap_groups"`.
334
335cache `"ldap_groups"`::
336+
337Caches the LDAP groups that a user belongs to, if LDAP has been
338configured on this server. This cache should be configured with a
339low maxAge setting, to ensure LDAP modifications are picked up in
340a timely fashion.
Shawn O. Pearce4a452712009-05-28 20:12:33 -0700341
Shawn O. Pearce6d26f4a2009-08-24 15:43:52 -0700342cache `"ldap_usernames"`::
343+
344Caches a mapping of LDAP username to Gerrit account identity. The
345cache automatically updates when a user first creates their account
346within Gerrit, so the cache expire time is largely irrelevant.
347
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700348cache `"openid"`::
349+
350If OpenID authentication is enabled, caches the OpenID discovery
351response by URL, for up to 5 minutes. This can reduce the time
352required for OpenID authentication through very common providers,
353such as Google Accounts.
354
Shawn O. Pearce4a452712009-05-28 20:12:33 -0700355cache `"projects"`::
356+
357Caches the project description records, from the `projects` table
358in the database. If a project record is updated or deleted, this
359cache should be flushed. Newly inserted projects do not require
360a cache flush, as they will be read upon first reference.
361
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700362cache `"sshkeys"`::
363+
364Caches unpacked versions of user SSH keys, so the internal SSH daemon
365can match against them during authentication. The unit of storage
366is per-user, so 1024 items translates to 1024 unique user accounts.
367As each individual user account may configure multiple SSH keys,
368the total number of keys may be larger than the item count.
Shawn O. Pearce4a452712009-05-28 20:12:33 -0700369+
370This cache is based off the `account_ssh_keys` table and the
371`accounts.ssh_user_name` column in the database. If either is
372modified directly, this cache should be flushed.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700373
Shawn O. Pearceb09322b2009-08-15 17:49:00 -0700374cache `"web_sessions"`::
375+
376Tracks the live user sessions coming in over HTTP. Flushing this
377cache would cause all users to be signed out immediately, forcing
Shawn O. Pearce727d80f2009-08-17 07:57:54 -0700378them to sign-in again. To avoid breaking active users, this cache
379is not flushed automatically by `gerrit flush-caches --all`, but
380instead must be explicitly requested.
381+
382If no disk cache is configured (or `cache.web_sessions.diskLimit`
383is set to 0) a server restart will force all users to sign-out,
384and need to sign-in again after the restart, as the cache was
385unable to persist the session information. Enabling a disk cache
386is strongly recommended.
387+
388Session storage is relatively inexpensive, the average entry in
389this cache is approximately 248 bytes, depending on the JVM.
Shawn O. Pearceb09322b2009-08-15 17:49:00 -0700390
Shawn O. Pearce4016a932009-05-28 15:12:40 -0700391See also link:cmd-flush-caches.html[gerrit flush-caches].
392
Shawn O. Pearce29de4362010-03-03 17:51:26 -0800393[[cache_options]]Cache Options
394^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
395
396cache.diff.intraline::
397+
398Boolean to enable or disable the computation of intraline differences
399when populating a diff cache entry. Changing this setting in the
400server configuration requires flushing the "diff" cache after a
401restart, otherwise older cache entries stored on disk may not reflect
402the current server setting. This flag is provided primarily as a
403backdoor to disable the intraline difference feature if necessary.
404+
405Default is true, enabled.
406
Brad Larson991a31b2009-11-03 14:30:26 -0600407
408[[commentlink]]Section commentlink
409~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
410Comment links are find/replace strings applied to change descriptions,
411patch comments, and in-line code comments to turn set strings into
412hyperlinks. One common use is for linking to bug-tracking systems.
413
414In the following example configuration the 'changeid' comment link
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800415will match typical Gerrit Change-Id values and create a hyperlink
416to changes which reference it. The second configuration 'bugzilla'
417will hyperlink terms such as 'bug 42' to an external bug tracker,
418supplying the argument record number '42' for display. The third
419configuration 'tracker' uses raw HTML to more preciously control
420how the replacement is displayed to the user.
Brad Larson991a31b2009-11-03 14:30:26 -0600421
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800422----
423[commentlink "changeid"]
424 match = (I[0-9a-f]{8,40})
425 link = "#q,$1,n,z"
Brad Larson991a31b2009-11-03 14:30:26 -0600426
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800427[commentlink "bugzilla"]
Shawn O. Pearcec99630a2010-02-21 19:11:56 -0800428 match = "(bug\\s+#?)(\\d+)"
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800429 link = http://bugs.example.com/show_bug.cgi?id=$2
Brad Larson991a31b2009-11-03 14:30:26 -0600430
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800431[commentlink "tracker"]
432 match = ([Bb]ug:\\s+)(\\d+)
433 html = $1<a href=\"http://trak.example.com/$2\">$2</a>
434----
435
436[[commentlink.name.match]]commentlink.<name>.match::
Brad Larson991a31b2009-11-03 14:30:26 -0600437+
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800438A JavaScript regular expression to match positions to be replaced
439with a hyperlink. Subexpressions of the matched string can be
440stored using groups and accessed with `$'n'` syntax, where 'n'
441is the group number, starting from 1.
Brad Larson991a31b2009-11-03 14:30:26 -0600442+
Shawn O. Pearcec99630a2010-02-21 19:11:56 -0800443The configuration file parser eats one level of backslashes, so the
444character class `\s` requires `\\s` in the configuration file. The
445parser also terminates the line at the first `#`, so a match
446expression containing # must be wrapped in double quotes.
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800447+
Shawn O. Pearce665beaa2010-02-21 22:41:03 -0800448To match case insensitive strings, a character class with both the
449upper and lower case character for each position must be used. For
450example, to match the string `bug` in a case insensitive way the match
451pattern `[bB][uU][gG]` needs to be used.
452+
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800453A common pattern to match is `bug\\s+(\\d+)`.
Brad Larson991a31b2009-11-03 14:30:26 -0600454
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800455[[commentlink.name.link]]commentlink.<name>.link::
Brad Larson991a31b2009-11-03 14:30:26 -0600456+
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800457The URL to direct the user to whenever the regular expression is
458matched. Groups in the match expression may be accessed as `$'n'`.
459+
460The link property is used only when the html property is not present.
461
462[[commentlink.name.html]]commentlink.<name>.html::
463+
464HTML to replace the entire matched string with. If present,
465this property overrides the link property above. Groups in the
466match expression may be accessed as `$'n'`.
467+
468The configuration file eats double quotes, so escaping them as
469`\"` is necessary to protect them from the parser.
Brad Larson991a31b2009-11-03 14:30:26 -0600470
471
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -0700472[[contactstore]]Section contactstore
473~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700474
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700475[[contactstore.url]]contactstore.url::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700476+
477URL of the web based contact store Gerrit will send any offline
478contact information to when it collects the data from users as part
479of a contributor agreement.
480+
481See link:config-contact.html[Contact Information].
482
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700483[[contactstore.appsec]]contactstore.appsec::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700484+
485Shared secret of the web based contact store.
486
Shawn O. Pearcee24c71fb2009-12-07 20:32:40 -0800487
488[[container]]Section container
489~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
490
491These settings are applied only if Gerrit is started as the container
492process through Gerrit's 'gerrit.sh' rc.d compatible wrapper script.
493
494[[container.heapLimit]]container.heapLimit::
495+
496Maximum heap size of the Java process running Gerrit, in bytes.
497This property is translated into the '-Xmx' flag for the JVM.
498+
499Default is platform and JVM specific.
500+
501Common unit suffixes of 'k', 'm', or 'g' are supported.
502
503[[container.javaHome]]container.javaHome::
504+
505Path of the JRE/JDK installation to run Gerrit with. If not set, the
506Gerrit startup script will attempt to search your system and guess
507a suitable JRE. Overrides the environment variable 'JAVA_HOME'.
508
509[[container.javaOptions]]container.javaOptions::
510+
511Additional options to pass along to the Java runtime. If multiple
512values are configured, they are passed in order on the command line,
513separated by spaces. These options are appended onto 'JAVA_OPTIONS'.
514
515[[container.user]]container.user::
516+
517Login name (or UID) of the operating system user the Gerrit JVM
518will execute as. If not set, defaults to the user who launched
519the 'gerrit.sh' wrapper script.
520
521[[container.war]]container.war::
522+
523Path of the JAR file to start daemon execution with. This should
524be the path of the local 'gerrit.war' archive. Overrides the
525environment variable 'GERRIT_WAR'.
526+
527If not set, defaults to '$site_path/bin/gerrit.war', or to
528'$HOME/gerrit.war'.
529
530
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -0700531[[core]]Section core
532~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700533
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700534[[core.packedGitWindowSize]]core.packedGitWindowSize::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700535+
536Number of bytes of a pack file to load into memory in a single
537read operation. This is the "page size" of the JGit buffer cache,
538used for all pack access operations. All disk IO occurs as single
539window reads. Setting this too large may cause the process to load
540more data than is required; setting this too small may increase
541the frequency of `read()` system calls.
542+
543Default on JGit is 8 KiB on all platforms.
544+
545Common unit suffixes of 'k', 'm', or 'g' are supported.
546
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700547[[core.packedGitLimit]]core.packedGitLimit::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700548+
549Maximum number of bytes to load and cache in memory from pack files.
550If JGit needs to access more than this many bytes it will unload less
551frequently used windows to reclaim memory space within the process.
552As this buffer must be shared with the rest of the JVM heap, it
553should be a fraction of the total memory available.
554+
555Default on JGit is 10 MiB on all platforms.
556+
557Common unit suffixes of 'k', 'm', or 'g' are supported.
558
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700559[[core.deltaBaseCaseLimit]]core.deltaBaseCacheLimit::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700560+
561Maximum number of bytes to reserve for caching base objects
562that multiple deltafied objects reference. By storing the entire
563decompressed base object in a cache Git is able to avoid unpacking
564and decompressing frequently used base objects multiple times.
565+
566Default on JGit is 10 MiB on all platforms. You probably do not
567need to adjust this value.
568+
569Common unit suffixes of 'k', 'm', or 'g' are supported.
570
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700571[[core.packedGitOpenFiles]]core.packedGitOpenFiles::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700572+
573Maximum number of pack files to have open at once. A pack file
574must be opened in order for any of its data to be available in
575a cached window.
576+
577If you increase this to a larger setting you may need to also adjust
578the ulimit on file descriptors for the host JVM, as Gerrit needs
579additional file descriptors available for network sockets and other
580repository data manipulation.
581+
582Default on JGit is 128 file descriptors on all platforms.
583
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700584[[core.packedGitMmap]]core.packedGitMmap::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700585+
586When true, JGit will use `mmap()` rather than `malloc()+read()`
587to load data from pack files. The use of mmap can be problematic
588on some JVMs as the garbage collector must deduce that a memory
589mapped segment is no longer in use before a call to `munmap()`
590can be made by the JVM native code.
591+
592In server applications (such as Gerrit) that need to access many
593pack files, setting this to true risks artifically running out
594of virtual address space, as the garbage collector cannot reclaim
595unused mapped spaces fast enough.
596+
597Default on JGit is false. Although potentially slower, it yields
598much more predictable behavior.
599
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -0800600[[database]]Section database
601~~~~~~~~~~~~~~~~~~~~~~~~~~~~
602
603The database section configures where Gerrit stores its metadata
604records about user accounts and change reviews.
605
Shawn O. Pearce9d342a42009-12-16 15:49:05 -0800606----
607[database]
Shawn O. Pearce1be39062009-12-19 14:11:52 -0800608 type = POSTGRESQL
Shawn O. Pearce9d342a42009-12-16 15:49:05 -0800609 hostname = localhost
610 database = reviewdb
611 username = gerrit2
612 password = s3kr3t
613----
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -0800614
615[[database.type]]database.type::
616+
617Type of database server to connect to. If set this value will be
618used to automatically create correct database.driver and database.url
619values to open the connection.
620+
Shawn O. Pearce1be39062009-12-19 14:11:52 -0800621* `POSTGRESQL`
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -0800622+
623Connect to a PostgreSQL database server.
624+
625* `H2`
626+
Shawn O. Pearce1be39062009-12-19 14:11:52 -0800627Connect to a local embedded H2 database.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -0800628+
Shawn O. Pearce1be39062009-12-19 14:11:52 -0800629* `MYSQL`
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -0800630+
631Connect to a MySQL database server.
Shawn O. Pearce1be39062009-12-19 14:11:52 -0800632+
633* `JDBC`
634+
635Connect using a JDBC driver class name and URL.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -0800636
637+
638If not specified, database.driver and database.url are used as-is,
639and if they are also not specified, defaults to H2.
640
641[[database.hostname]]database.hostname::
642+
643Hostname of the database server. Defaults to 'localhost'.
644
645[[database.port]]database.port::
646+
647Port number of the database server. Defaults to the default port
648of the server named by database.type.
649
650[[database.database]]database.database::
651+
Shawn O. Pearce1be39062009-12-19 14:11:52 -0800652For POSTGRESQL or MYSQL, the name of the database on the server.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -0800653+
654For H2, this is the path to the database, and if not absolute is
Shawn O. Pearce1be39062009-12-19 14:11:52 -0800655relative to `'$site_path'`.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -0800656
657[[database.username]]database.username::
658+
659Username to connect to the database server as.
660
661[[database.password]]database.password::
662+
663Password to authenticate to the database server with.
664
665[[database.driver]]database.driver::
666+
Shawn O. Pearce1be39062009-12-19 14:11:52 -0800667Name of the JDBC driver class to connect to the database with.
668Setting this usually isn't necessary as it can be derived from
669database.type or database.url for any supported database.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -0800670
671[[database.url]]database.url::
672+
Shawn O. Pearce1be39062009-12-19 14:11:52 -0800673'jdbc:' URL for the database. Setting this variable usually
674isn't necessary as it can be constructed from the all of the
675above properties.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -0800676
Shawn O. Pearce07f35177d2010-02-23 09:47:10 -0800677[[database.poolLimit]]database.poolLimit::
678+
679Maximum number of open database connections. If the server needs
680more than this number, request processing threads will wait up
681to <<database.poolMaxWait, poolMaxWait>> seconds for a
682connection to be released before they abort with an exception.
683This limit must be several units higher than the total number of
684httpd and sshd threads as some request processing code paths may
685need multiple connections.
686+
687Default is 8.
688
Shawn O. Pearcef458bf62010-02-25 09:03:03 -0800689[[database.poolMinIdle]]database.poolMinIdle::
Shawn O. Pearce07f35177d2010-02-23 09:47:10 -0800690+
691Minimum number of connections to keep idle in the pool.
692Default is 4.
693
Shawn O. Pearcef458bf62010-02-25 09:03:03 -0800694[[database.poolMaxIdle]]database.poolMaxIdle::
Shawn O. Pearce07f35177d2010-02-23 09:47:10 -0800695+
696Maximum number of connections to keep idle in the pool. If there
697are more idle connections, connections will be closed instead of
698being returned back to the pool.
699Default is 4.
700
701[[database.poolMaxWait]]database.poolMaxWait::
702+
703Maximum amount of time a request processing thread will wait to
704acquire a database connection from the pool. If no connection is
705released within this time period, the processing thread will abort
706its current operations and return an error to the client.
707Values should use common unit suffixes to express their setting:
708+
709* ms, milliseconds
710* s, sec, second, seconds
711* m, min, minute, minutes
712* h, hr, hour, hours
713
714+
715If a unit suffix is not specified, `milliseconds` is assumed.
716+
717Default is `30 seconds`.
718
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -0800719
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -0700720[[gerrit]]Section gerrit
721~~~~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearceeb7f8ce2009-06-01 09:57:15 -0700722
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700723[[gerrit.basePath]]gerrit.basePath::
Shawn O. Pearce9743d0b2009-06-01 10:10:06 -0700724+
725Local filesystem directory holding all Git repositories that
726Gerrit knows about and can process changes for. A project
727entity in Gerrit maps to a local Git repository by creating
728the path string `"$\{basePath}/$\{project_name}.git"`.
729+
730If relative, the path is resolved relative to `'$site_path'`.
731
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700732[[gerrit.canonicalWebUrl]]gerrit.canonicalWebUrl::
Shawn O. Pearceeb7f8ce2009-06-01 09:57:15 -0700733+
734The default URL for Gerrit to be accessed through.
735+
736Typically this would be set to "http://review.example.com/" or
737"http://example.com/gerrit/" so Gerrit can output links that point
738back to itself.
739+
740Setting this is highly recommended, as its necessary for the upload
741code invoked by "git push" or "repo upload" to output hyperlinks
742to the newly uploaded changes.
743
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700744[[gerrit.canonicalGitUrl]]gerrit.canonicalGitUrl::
Shawn O. Pearceeb7f8ce2009-06-01 09:57:15 -0700745+
746Optional base URL for repositories available over the anonymous git
747protocol. For example, set this to `git://mirror.example.com/base/`
748to have Gerrit display patch set download URLs in the UI. Gerrit
749automatically appends the project name onto the end of the URL.
750+
751By default unset, as the git daemon must be configured externally
752by the system administrator, and might not even be running on the
753same host as Gerrit.
754
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -0700755[[gitweb]]Section gitweb
756~~~~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearced7ba11f2009-06-01 09:35:41 -0700757
Shawn O. Pearce618dae22010-03-12 19:07:43 -0800758Gerrit can forward requests to either an internally managed gitweb
759(which allows Gerrit to enforce some access controls), or to an
760externally managed gitweb (where the web server manages access).
Shawn O. Pearced7ba11f2009-06-01 09:35:41 -0700761See also link:config-gitweb.html[Gitweb Integration].
762
Shawn O. Pearce618dae22010-03-12 19:07:43 -0800763[[gitweb.cgi]]gitweb.cgi::
764+
765Path to the locally installed `gitweb.cgi` executable. This CGI will
766be called by Gerrit Code Review when the URL `/gitweb` is accessed.
767Project level access controls are enforced prior to calling the CGI.
768+
769Defaults to `/usr/lib/cgi-bin/gitweb.cgi` if gitweb.url is not set.
770
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700771[[gitweb.url]]gitweb.url::
Shawn O. Pearced7ba11f2009-06-01 09:35:41 -0700772+
773Optional URL of an affiliated gitweb service. Defines the
774web location where a `gitweb.cgi` is installed to browse
Shawn O. Pearce9743d0b2009-06-01 10:10:06 -0700775gerrit.basePath and the repositories it contains.
Shawn O. Pearced7ba11f2009-06-01 09:35:41 -0700776+
777Gerrit appends any necessary query arguments onto the end of this URL.
778For example, "?p=$project.git;h=$commit".
779
Shane Mc Cormack27868a42009-12-28 04:49:39 +0000780[[gitweb.type]]gitweb.type::
781+
782Optional type of affiliated gitweb service. This allows using
783alternatives to gitweb, such as cgit.
784+
785Valid values are `gitweb`, `cgit` or `custom`.
786
787[[gitweb.type]]gitweb.revision::
788+
789Optional pattern to use for constructing the gitweb URL when pointing
790at a specific commit when `custom` is used above.
791+
792Valid replacements are `$\{project\}` for the project name in Gerrit
793and `$\{commit\}` for the SHA1 hash for the commit.
794
795[[gitweb.type]]gitweb.project::
796+
797Optional pattern to use for constructing the gitweb URL when pointing
798at a specific project when `custom` is used above.
799+
800Valid replacements are `$\{project\}` for the project name in Gerrit.
801
802[[gitweb.type]]gitweb.branch::
803+
804Optional pattern to use for constructing the gitweb URL when pointing
805at a specific branch when `custom` is used above.
806+
807Valid replacements are `$\{project\}` for the project name in Gerrit
808and `$\{branch\}` for the name of the branch.
809
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -0700810
Shane Mc Cormack6c2b6772010-01-12 21:56:44 +0000811[[hooks]]Section hooks
812~~~~~~~~~~~~~~~~~~~~~~~~
813
814See also link:config-hooks.html[Hooks].
815
816[[hooks.path]]hooks.path::
817+
818Optional path to hooks, if not specified then `'$site_path'/hooks` will be used.
819
820[[hooks.patchsetCreatedHook]]hooks.patchsetCreatedHook::
821+
822Optional filename for the patchset created hook, if not specified then
823`patchset-created` will be used.
824
825[[hooks.commentAddedHook]]hooks.commentAddedHook::
826+
827Optional filename for the comment added hook, if not specified then
828`comment-added` will be used.
829
830[[hooks.changeMergedHook]]hooks.changeMergedHook::
831+
832Optional filename for the change merged hook, if not specified then
833`change-merged` will be used.
834
835[[hooks.changeAbandonedHook]]hooks.changeAbandonedHook::
836+
837Optional filename for the change abandoned hook, if not specified then
838`change-abandoned` will be used.
839
Shawn O. Pearce309d8d32009-11-17 16:03:16 -0800840[[http]]Section http
841~~~~~~~~~~~~~~~~~~~~
842
843[[http.proxy]]http.proxy::
Shawn O. Pearce9d342a42009-12-16 15:49:05 -0800844+
845URL of the proxy server when making outgoing HTTP
846connections for OpenID login transactions. Syntax
847should be `http://`'hostname'`:`'port'.
Shawn O. Pearce309d8d32009-11-17 16:03:16 -0800848
849[[http.proxyUsername]]http.proxyUsername::
Shawn O. Pearce9d342a42009-12-16 15:49:05 -0800850+
851Optional username to authenticate to the HTTP proxy with.
852This property is honored only if the username does not
853appear in the http.proxy property above.
Shawn O. Pearce309d8d32009-11-17 16:03:16 -0800854
855[[http.proxyPassword]]http.proxyPassword::
Shawn O. Pearce9d342a42009-12-16 15:49:05 -0800856+
857Optional password to authenticate to the HTTP proxy with.
858This property is honored only if the password does not
859appear in the http.proxy property above.
Shawn O. Pearce309d8d32009-11-17 16:03:16 -0800860
861
862[[httpd]]Section httpd
863~~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -0800864
865The httpd section configures the embedded servlet container.
866
867[[httpd.listenUrl]]httpd.listenUrl::
868+
869Specifies the URLs the internal HTTP daemon should listen for
870connections on. The special hostname '\*' may be used to listen
871on all local addresses. A context path may optionally be included,
872placing Gerrit Code Review's web address within a subdirectory of
873the server.
874+
875Multiple protocol schemes are supported:
876+
877* `http://`'hostname'`:`'port'
878+
879Plain-text HTTP protocol. If port is not supplied, defaults to 80,
880the standard HTTP port.
881+
882* `https://`'hostname'`:`'port'
883+
884SSL encrypted HTTP protocol. If port is not supplied, defaults to
885443, the standard HTTPS port.
886+
887Externally facing production sites are encouraged to use a reverse
888proxy configuration and `proxy-https://` (below), rather than using
889the embedded servlet container to implement the SSL processing.
890The proxy server with SSL support is probably easier to configure,
891provides more configuration options to control cipher usage, and
892is likely using natively compiled encryption algorithms, resulting
893in higher throughput.
894+
895* `proxy-http://`'hostname'`:`'port'
896+
897Plain-text HTTP relayed from a reverse proxy. If port is not
898supplied, defaults to 8080.
899+
900Like http, but additional header parsing features are
901enabled to honor X-Forwarded-For, X-Forwarded-Host and
902X-Forwarded-Server. These headers are typically set by Apache's
903link:http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#x-headers[mod_proxy].
904+
905* `proxy-https://`'hostname'`:`'port'
906+
907Plain text HTTP relayed from a reverse proxy that has already
908handled the SSL encryption/decryption. If port is not supplied,
909defaults to 8080.
910+
911Behaves exactly like proxy-http, but also sets the scheme to assume
912'https://' is the proper URL back to the server.
913
914+
915If multiple values are supplied, the daemon will listen on all
916of them.
917+
918By default, http://*:8080.
919
920[[httpd.reuseAddress]]httpd.reuseAddress::
921+
922If true, permits the daemon to bind to the port even if the port
923is already in use. If false, the daemon ensures the port is not
924in use before starting. Busy sites may need to set this to true
925to permit fast restarts.
926+
927By default, true.
928
929[[httpd.requestHeaderSize]]httpd.requestHeaderSize::
930+
931Size, in bytes, of the buffer used to parse the HTTP headers of an
932incoming HTTP request. The entire request headers, including any
933cookies sent by the browser, must fit within this buffer, otherwise
934the server aborts with the response '413 Request Entity Too Large'.
935+
936One buffer of this size is allocated per active connection.
937Allocating a buffer that is too large wastes memory that cannot be
938reclaimed, allocating a buffer that is too small may cause unexpected
939errors caused by very long Referer URLs or large cookie values.
940+
941By default, 16384 (16 K), which is sufficient for most OpenID and
942other web-based single-sign-on integrations.
943
944[[httpd.sslKeyStore]]httpd.sslKeyStore::
945+
946Path of the Java keystore containing the server's SSL certificate
947and private key. This keystore is required for `https://` in URL.
948+
949To create a self-signed certificate for simple internal usage:
950+
Shawn O. Pearce9d342a42009-12-16 15:49:05 -0800951----
952keytool -keystore keystore -alias jetty -genkey -keyalg RSA
953chmod 600 keystore
954----
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -0800955+
956If not absolute, the path is resolved relative to `$site_path`.
957+
Shawn O. Pearcec5fed822009-11-17 16:10:10 -0800958By default, `$site_path/etc/keystore`.
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -0800959
960[[httpd.sslKeyPassword]]httpd.sslKeyPassword::
961+
962Password used to decrypt the private portion of the sslKeyStore.
963Java key stores require a password, even if the administrator
964doesn't want to enable one.
965+
966If set to the empty string the embedded server will prompt for the
967password during startup.
968+
969By default, `gerrit`.
970
Shawn O. Pearce1766f502010-01-15 10:49:46 -0800971[[httpd.requestLog]]httpd.requestLog::
972+
973Enable (or disable) the `'$site_path'/logs/httpd_log` request log.
974If enabled, an NCSA combined log format request log file is written
975out by the internal HTTP daemon.
976+
977By default, true if httpd.listenUrl uses http:// or https://,
978and false if httpd.listenUrl uses proxy-http:// or proxy-https://.
979
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -0800980[[httpd.acceptorThreads]]httpd.acceptorThreads::
981+
982Number of worker threads dedicated to accepting new incoming TCP
983connections and allocate them connection-specific resources.
984+
985By default, 2, which should be suitable for most high-traffic sites.
986
987[[httpd.minThreads]]httpd.minThreads::
988+
989Minimum number of spare threads to keep in the worker thread pool.
990This number must be at least 1 larger than httpd.acceptorThreads
991multipled by the number of httpd.listenUrls configured.
992+
993By default, 5, suitable for most lower-volume traffic sites.
994
995[[httpd.maxThreads]]httpd.maxThreads::
996+
997Maximum number of threads to permit in the worker thread pool.
998+
999By default 25, suitable for most lower-volume traffic sites.
1000
1001[[httpd.maxQueued]]httpd.maxQueued::
1002+
1003Maximum number of client connections which can enter the worker
1004thread pool waiting for a worker thread to become available.
10050 disables the queue and permits infinite number of connections.
1006+
1007By default 50.
1008
Shawn O. Pearcee5452b72010-01-15 14:32:50 -08001009[[httpd.maxWait]]httpd.maxWait::
1010+
1011Maximum amount of time a client will wait to for an available
1012thread to handle a project clone, fetch or push request over the
1013smart HTTP transport.
1014+
1015Values should use common unit suffixes to express their setting:
1016+
1017* s, sec, second, seconds
1018* m, min, minute, minutes
1019* h, hr, hour, hours
1020* d, day, days
1021* w, week, weeks (`1 week` is treated as `7 days`)
1022* mon, month, months (`1 month` is treated as `30 days`)
1023* y, year, years (`1 year` is treated as `365 days`)
1024
1025+
1026If a unit suffix is not specified, `minutes` is assumed. If 0
1027is supplied, the maximum age is infinite and connections will not
1028abort until the client disconnects.
1029+
1030By default, 5 minutes.
1031
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08001032
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -07001033[[ldap]]Section ldap
1034~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001035
1036LDAP integration is only enabled if `auth.type` was set to
Shawn O. Pearcef7e065e2009-09-26 20:01:10 -07001037`HTTP_LDAP` or `LDAP`. See above for a detailed description of
1038the auth.type settings and their implications.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001039
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07001040An example LDAP configuration follows, and then discussion of
1041the parameters introduced here. Suitable defaults for most
1042parameters are automatically guessed based on the type of server
1043detected during startup. The guessed defaults support both
1044link:http://www.ietf.org/rfc/rfc2307.txt[RFC 2307] and Active
1045Directory.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001046
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001047----
1048[ldap]
1049 server = ldap://ldap.example.com
1050
1051 accountBase = ou=people,dc=example,dc=com
1052 accountPattern = (&(objectClass=person)(uid=${username}))
1053 accountFullName = displayName
1054 accountEmailAddress = mail
1055
1056 groupBase = ou=groups,dc=example,dc=com
1057 groupMemberPattern = (&(objectClass=group)(member=${dn}))
1058----
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001059
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001060[[ldap.server]]ldap.server::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001061+
1062URL of the organization's LDAP server to query for user information
1063and group membership from. Must be of the form `ldap://host` or
1064`ldaps://host` to bind with either a plaintext or SSL connection.
Shawn O. Pearcef7e065e2009-09-26 20:01:10 -07001065+
1066If auth.type is `LDAP` this setting should use `ldaps://` to
1067ensure the end user's plaintext password is transmitted only over
1068an encrypted connection.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001069
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07001070[[ldap.sslVerify]]ldap.sslVerify::
1071+
1072If false and ldap.server is an `ldaps://` style URL, Gerrit
1073will not verify the server certificate when it connects to
1074perform a query.
1075+
1076By default, true, requiring the certificate to be verified.
1077
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001078[[ldap.username]]ldap.username::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001079+
1080_(Optional)_ Username to bind to the LDAP server with. If not set,
1081an anonymous connection to the LDAP server is attempted.
1082
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001083[[ldap.password]]ldap.password::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001084+
1085_(Optional)_ Password for the user identified by `ldap.username`.
1086If not set, an anonymous (or passwordless) connection to the LDAP
1087server is attempted.
1088
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001089[[ldap.accountBase]]ldap.accountBase::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001090+
1091Root of the tree containing all user accounts. This is typically
1092of the form `ou=people,dc=example,dc=com`.
1093
Shawn O. Pearce304ccdb2009-08-25 12:25:27 -07001094[[ldap.accountScope]]ldap.accountScope::
1095+
1096Scope of the search performed for accounts. Must be one of:
1097+
1098* `one`: Search only one level below accountBase, but not recursive
1099* `sub` or `subtree`: Search recursively below accountBase
1100* `base` or `object`: Search exactly accountBase; probably not desired
1101
1102+
1103Default is `subtree` as many directories have several levels.
1104
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001105[[ldap.accountPattern]]ldap.accountPattern::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001106+
1107Query pattern to use when searching for a user account. This may be
1108any valid LDAP query expression, including the standard `(&...)` and
1109`(|...)` operators. If auth.type is `HTTP_LDAP` then the variable
1110`$\{username\}` is replaced with a parameter set to the username
Shawn O. Pearcef7e065e2009-09-26 20:01:10 -07001111that was supplied by the HTTP server. If auth.type is `LDAP` then
1112the variable `$\{username\}` is replaced by the string entered by
1113the end user.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001114+
1115This pattern is used to search the objects contained directly under
1116the `ldap.accountBase` tree. A typical setting for this parameter
1117is `(uid=$\{username\})` or `(cn=$\{username\})`, but the proper
1118setting depends on the LDAP schema used by the directory server.
1119+
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07001120Default is `(uid=$\{username\})` for RFC 2307 servers,
1121and `(&(objectClass=user)(sAMAccountName=${username}))`
1122for Active Directory.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001123
Shawn O. Pearce37dc1f82009-08-19 09:49:07 -07001124[[ldap.accountFullName]]ldap.accountFullName::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001125+
1126_(Optional)_ Name of an attribute on the user account object which
1127contains the initial value for the user's full name field in Gerrit.
1128Typically this is the `displayName` property in LDAP, but could
1129also be `legalName` or `cn`.
1130+
Shawn O. Pearceb86ae002009-09-26 16:54:05 -07001131Attribute values may be concatenated with literal strings, for
1132example to join given name and surname together use the pattern
1133`$\{givenName\} $\{SN\}`.
1134+
Shawn O. Pearce3ca1dcf2009-08-20 08:56:23 -07001135If set, users will be unable to modify their full name field, as
1136Gerrit will populate it only from the LDAP data.
1137+
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07001138Default is `displayName` for RFC 2307 servers,
1139and `${givenName} ${sn}` for Active Directory.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001140
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001141[[ldap.accountEmailAddress]]ldap.accountEmailAddress::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001142+
1143_(Optional)_ Name of an attribute on the user account object which
1144contains the user's Internet email address, as defined by this
1145LDAP server.
1146+
Shawn O. Pearceb86ae002009-09-26 16:54:05 -07001147Attribute values may be concatenated with literal strings,
1148for example to set the email address to the lowercase form
1149of sAMAccountName followed by a constant domain name, use
1150`$\{sAMAccountName.toLowerCase\}@example.com`.
1151+
Shawn O. Pearce3ca1dcf2009-08-20 08:56:23 -07001152If set, the preferred email address will be prefilled from LDAP,
1153but users may still be able to register additional email address,
1154and select a different preferred email address.
1155+
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07001156Default is `mail`.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001157
Shawn O. Pearce59e09222009-08-19 09:04:49 -07001158[[ldap.accountSshUserName]]ldap.accountSshUserName::
1159+
1160_(Optional)_ Name of an attribute on the user account object which
1161contains the initial value for the user's SSH username field in
1162Gerrit. Typically this is the `uid` property in LDAP, but could
1163also be `cn`. Administrators should prefer to match the attribute
1164corresponding to the user's workstation username, as this is what
1165SSH clients will default to.
1166+
Shawn O. Pearceb86ae002009-09-26 16:54:05 -07001167Attribute values may also be forced to lowercase, or to uppercase in
1168an expression. For example, `$\{sAMAccountName.toLowerCase\}` will
1169force the value of sAMAccountName, if defined, to be all lowercase.
1170The suffix `.toUpperCase` can be used for the other direction.
1171The suffix `.localPart` can be used to split attribute values of
1172the form 'user@example.com' and return only the left hand side, for
1173example `$\{userPrincipalName.localPart\}` would provide only 'user'.
1174+
Shawn O. Pearce3ca1dcf2009-08-20 08:56:23 -07001175If set, users will be unable to modify their SSH username field, as
1176Gerrit will populate it only from the LDAP data.
1177+
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07001178Default is `uid` for RFC 2307 servers,
1179and `${sAMAccountName.toLowerCase}` for Active Directory.
Shawn O. Pearce59e09222009-08-19 09:04:49 -07001180
Shawn O. Pearce7d25f782009-10-30 08:01:03 -07001181[[ldap.accountMemberField]]ldap.accountMemberField::
Anthony93de7db2009-10-03 10:01:50 -04001182+
1183_(Optional)_ Name of an attribute on the user account object which
Shawn O. Pearce7d25f782009-10-30 08:01:03 -07001184contains the groups the user is part of. Typically used for Active
1185Directory servers.
Anthony93de7db2009-10-03 10:01:50 -04001186+
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07001187Default is unset for RFC 2307 servers (disabled)
1188and `memberOf` for Active Directory.
Anthony93de7db2009-10-03 10:01:50 -04001189
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001190[[ldap.groupBase]]ldap.groupBase::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001191+
1192Root of the tree containing all group objects. This is typically
1193of the form `ou=groups,dc=example,dc=com`.
1194
Shawn O. Pearce304ccdb2009-08-25 12:25:27 -07001195[[ldap.groupScope]]ldap.groupScope::
1196+
1197Scope of the search performed for group objects. Must be one of:
1198+
1199* `one`: Search only one level below groupBase, but not recursive
1200* `sub` or `subtree`: Search recursively below groupBase
1201* `base` or `object`: Search exactly groupBase; probably not desired
1202
1203+
1204Default is `subtree` as many directories have several levels.
1205
Shawn O. Pearce7d25f782009-10-30 08:01:03 -07001206[[ldap.groupPattern]]ldap.groupPattern::
1207+
1208Query pattern used when searching for an LDAP group to connect
1209to a Gerrit group. This may be any valid LDAP query expression,
1210including the standard `(&...)` and `(|...)` operators. The variable
1211`$\{groupname\}` is replaced with the search term supplied by the
1212group owner.
1213+
1214Default is `(cn=$\{groupname\})` for RFC 2307,
1215and `(&(objectClass=group)(cn=$\{groupname\}))` for Active Directory.
1216
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001217[[ldap.groupMemberPattern]]ldap.groupMemberPattern::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001218+
1219Query pattern to use when searching for the groups that a user
1220account is currently a member of. This may be any valid LDAP query
1221expression, including the standard `(&...)` and `(|...)` operators.
1222+
1223If auth.type is `HTTP_LDAP` then the variable `$\{username\}` is
1224replaced with a parameter set to the username that was supplied
1225by the HTTP server. Other variables appearing in the pattern,
1226such as `$\{fooBarAttribute\}`, are replaced with the value of the
1227corresponding attribute (in this case, `fooBarAttribute`) as read
1228from the user's account object matched under `ldap.accountBase`.
1229Attributes such as `$\{dn\}` or `$\{uidNumber\}` may be useful.
1230+
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07001231Default is `(memberUid=$\{username\})` for RFC 2307,
1232and unset (disabled) for Active Directory.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001233
1234
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -07001235[[mimetype]]Section mimetype
1236~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearce01cb11902009-07-15 08:19:01 -07001237
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001238[[mimetype.name.safe]]mimetype.<name>.safe::
Shawn O. Pearce01cb11902009-07-15 08:19:01 -07001239+
1240If set to true, files with the MIME type `<name>` will be sent as
1241direct downloads to the user's browser, rather than being wrapped up
1242inside of zipped archives. The type name may be a complete type
1243name, e.g. `image/gif`, a generic media type, e.g. `image/\*`,
1244or the wildcard `\*/*` to match all types.
1245+
1246By default, false for all MIME types.
1247
1248Common examples:
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001249----
1250[mimetype "image/*"]
1251 safe = true
1252
1253[mimetype "application/pdf"]
1254 safe = true
1255
1256[mimetype "application/msword"]
1257 safe = true
1258
1259[mimetype "application/vnd.ms-excel"]
1260 safe = true
1261----
Shawn O. Pearce01cb11902009-07-15 08:19:01 -07001262
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -07001263[[repo]]Section repo
1264~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearce0cb2b65f2009-06-01 09:48:45 -07001265
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001266[[repo.showDownloadCommand]]repo.showDownloadCommand::
Shawn O. Pearce0cb2b65f2009-06-01 09:48:45 -07001267+
1268If set to true, Gerrit advertises patch set downloads with the
1269`repo download` command, assuming that all projects managed by this
1270instance are generally worked on with the repo multi-repository tool.
1271+
1272By default, false, as not all instances will deploy repo.
1273
Hugo Josefson072b4702010-04-21 19:27:11 +02001274[[repository]]Section repository
1275~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1276Repositories in this sense are the same as projects.
1277
1278In the following example configuration the `Administrators` and the
1279`Registered Users` groups are set to be the ones to be allowed to
1280create projects matching `*` (any project). `Registered Users` is
1281set to be the default owner of new projects.
1282
1283----
1284[repository "*"]
1285 createGroup = Administrators
1286 createGroup = Registered Users
1287 ownerGroup = Registered Users
1288----
1289
1290[NOTE]
1291Currently only the repository name `*` is supported.
1292This is a wildcard designating all repositories.
1293
1294[[repository.name.createGroup]]repository.<name>.createGroup::
1295+
1296A name of a group which exists in the database. Zero, one or many
1297groups are allowed. Each on its own line. Groups which don't exist
1298in the database are ignored.
1299+
1300If no groups are declared (or only non-existing ones), the default
1301value `Administrators` is used.
1302
1303[[repository.name.ownerGroup]]repository.<name>.ownerGroup::
1304+
1305A name of a group which exists in the database. Zero, one or many
1306groups are allowed. Each on its own line. Groups which don't exist
1307in the database are ignored.
1308+
1309If no groups are declared (or only non-existing ones), it defaults
1310to whatever is declared by `repository.<name>.createGroup` (including
1311any fallback to `Administrators`.)
1312
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -07001313[[sendemail]]Section sendemail
1314~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07001315
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001316[[sendemail.enable]]sendemail.enable::
Shawn O. Pearce2e4573b2009-06-02 09:09:50 -07001317+
1318If false Gerrit will not send email messages, for any reason,
1319and all other properties of section sendemail are ignored.
1320+
1321By default, true, allowing notifications to be sent.
1322
Shawn O. Pearce5c31bd72009-09-10 18:13:33 -07001323[[sendemail.from]]sendemail.from::
1324+
1325Designates what name and address Gerrit will place in the From
1326field of any generated email messages. The supported values are:
1327+
1328* `USER`
1329+
1330Gerrit will set the From header to use the current user's
1331Full Name and Preferred Email. This may cause messsages to be
1332classified as spam if the user's domain has SPF or DKIM enabled
1333and <<sendemail.smtpServer,sendemail.smtpServer>> is not a trusted
1334relay for that domain.
1335+
1336* `MIXED`
1337+
1338Shorthand for `$\{user\} (Code Review) <review@example.com>` where
1339`review@example.com` is the same as <<user.email,user.email>>.
1340See below for a description of how the replacement is handled.
1341+
1342* `SERVER`
1343+
1344Gerrit will set the From header to the same name and address
1345it records in any commits Gerrit creates. This is set by
1346<<user.name,user.name>> and <<user.email,user.email>>, or guessed
1347from the local operating system.
1348+
1349* 'Code Review' `<`'review'`@`'example.com'`>`
1350+
1351If set to a name and email address in brackets, Gerrit will use
1352this name and email address for any messages, overriding the name
1353that may have been selected for commits by user.name and user.email.
1354Optionally, the name portion may contain the placeholder `$\{user\}`,
1355which is replaced by the Full Name of the current user.
1356
1357+
1358By default, MIXED.
1359
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001360[[sendemail.smtpServer]]sendemail.smtpServer::
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07001361+
1362Hostname (or IP address) of a SMTP server that will relay
1363messages generated by Gerrit to end users.
1364+
1365By default, 127.0.0.1 (aka localhost).
1366
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001367[[sendemail.smtpServerPort]]sendemail.smtpServerPort::
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07001368+
1369Port number of the SMTP server in sendemail.smtpserver.
1370+
Shawn O. Pearce6e9a83f2009-11-02 10:30:48 -08001371By default, 25, or 465 if smtpEncryption is 'ssl'.
1372
1373[[sendemail.smtpEncryption]]sendemail.smtpEncryption::
1374+
1375Specify the encryption to use, either 'ssl' or 'tls'.
1376+
1377By default, 'none', indicating no encryption is used.
1378
1379[[sendemail.sslVerify]]sendemail.sslVerify::
1380+
1381If false and sendemail.smtpEncryption is 'ssl' or 'tls', Gerrit
1382will not verify the server certificate when it connects to send
1383an email message.
1384+
1385By default, true, requiring the certificate to be verified.
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07001386
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001387[[sendemail.smtpUser]]sendemail.smtpUser::
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07001388+
1389User name to authenticate with, if required for relay.
1390
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001391[[sendemail.smtpPass]]sendemail.smtpPass::
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07001392+
1393Password for the account named by sendemail.smtpUser.
1394
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001395[[sendemail.allowrcpt]]sendemail.allowrcpt::
Shawn O. Pearce219a8ee2009-06-01 18:13:57 -07001396+
1397If present, each value adds one entry to the whitelist of email
1398addresses that Gerrit can send email to. If set to a complete
1399email address, that one address is added to the white list.
1400If set to a domain name, any address at that domain can receive
1401email from Gerrit.
1402+
1403By default, unset, permitting delivery to any email address.
1404
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -07001405[[sshd]] Section sshd
Shawn O. Pearcea758fef2009-08-19 08:29:32 -07001406~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearce9410f2c2009-05-14 10:26:47 -07001407
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001408[[sshd.listenAddress]]sshd.listenAddress::
Shawn O. Pearce1d3cb4442009-05-30 14:03:31 -07001409+
1410Specifies the local addresses the internal SSHD should listen
1411for connections on. The following forms may be used to specify
1412an address. In any form, `:'port'` may be omitted to use the
1413default of 29418.
1414+
1415* 'hostname':'port' (for example `review.example.com:29418`)
1416* 'IPv4':'port' (for example `10.0.0.1:29418`)
1417* ['IPv6']:'port' (for example `[ff02::1]:29418`)
1418* \*:'port' (for example `*:29418`)
1419
1420+
1421If multiple values are supplied, the daemon will listen on all
1422of them.
1423+
1424By default, *:29418.
1425
Shawn O. Pearce149238a2009-09-10 12:25:20 -07001426[[sshd.reuseAddress]]sshd.reuseAddress::
Shawn O. Pearce9410f2c2009-05-14 10:26:47 -07001427+
1428If true, permits the daemon to bind to the port even if the port
1429is already in use. If false, the daemon ensures the port is not
1430in use before starting. Busy sites may need to set this to true
1431to permit fast restarts.
1432+
1433By default, true.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -07001434
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001435[[sshd.tcpKeepAlive]]sshd.tcpKeepAlive::
Shawn O. Pearcefc9081f2009-05-14 10:26:59 -07001436+
1437If true, enables TCP keepalive messages to the other side, so
1438the daemon can terminate connections if the peer disappears.
1439+
1440By default, true.
1441
Shawn O. Pearce1a4580b2009-11-19 17:37:10 -08001442[[sshd.threads]]sshd.threads::
1443+
1444Number of threads to use when executing SSH command requests.
1445If additional requests are received while all threads are busy they
1446are queued and serviced in a first-come-first-serve order.
1447+
1448By default, 1.5x the number of CPUs available to the JVM.
1449
Nico Sallembienfc53f7f2010-05-18 16:40:10 -07001450[[sshd.batchThreads]]sshd.batchThreads::
1451+
1452Number of threads to allocate for SSH command requests from
1453non-interactive users. If equals to 0, then all non-interactive
1454requests are executed in the same queue as interactive requests.
1455+
1456Any other value will remove the number of threads from the queue
1457allocated to interactive users, and create a separate thread pool
1458of the requested size, which will be used to run commands from
1459non-interactive users.
1460+
1461If the number of threads requested for non-interactive users is larger
1462than the total number of threads allocated in sshd.threads, then the
1463value of sshd.threads is increased to accomodate the requested value.
1464+
1465By default, 0.
1466
Kenny Root15ac1b82010-02-24 00:29:20 -08001467[[sshd.streamThreads]]sshd.streamThreads::
1468+
1469Number of threads to use when formatting events to asynchronous
1470streaming clients. Event formatting is multiplexed onto this thread
1471pool by a simple FIFO scheduling system.
1472+
1473By default, 1 plus the number of CPUs available to the JVM.
1474
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001475[[sshd.cipher]]sshd.cipher::
Shawn O. Pearce0bf2f522009-05-14 11:02:03 -07001476+
1477Available ciphers. To permit multiple ciphers, specify multiple
1478`sshd.cipher` keys in the configuration file, one cipher name
1479per key. Cipher names starting with `+` are enabled in addition
1480to the default ciphers, cipher names starting with `-` are removed
1481from the default cipher set.
1482+
1483Supported ciphers: aes128-cbc, aes128-cbc, aes256-cbc, blowfish-cbc,
14843des-cbc, none.
1485+
1486By default, all supported ciphers except `none` are available.
1487
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001488[[sshd.mac]]sshd.mac::
Shawn O. Pearce0bf2f522009-05-14 11:02:03 -07001489+
1490Available MAC (message authentication code) algorithms. To permit
1491multiple algorithms, specify multiple `sshd.mac` keys in the
1492configuration file, one MAC per key. MAC names starting with `+`
1493are enabled in addition to the default MACs, MAC names starting with
1494`-` are removed from the default MACs.
1495+
1496Supported MACs: hmac-md5, hmac-md5-96, hmac-sha1, hmac-sha1-96.
1497+
1498By default, all supported MACs are available.
1499
Shawn O. Pearce2ba3ab42010-02-25 12:10:10 -08001500[[theme]] Section theme
1501~~~~~~~~~~~~~~~~~~~~~~~
1502
1503[[theme.backgroundColor]]theme.backgroundColor::
1504+
1505Background color for the page, and major data tables like the all
1506open changes table or the account dashboard. The value must be a
1507valid HTML hex color code, or standard color name.
1508+
1509By default white, `FFFFFF`.
1510
1511[[theme.topMenuColor]]theme.topMenuColor::
1512+
1513This is the color of the main menu bar at the top of the page.
1514The value must be a valid HTML hex color code, or standard color
1515name. The value defaults to <<theme.trimColor,trimColor>>.
1516
1517[[theme.textColor]]theme.textColor::
1518+
1519Text color for the page, and major data tables like the all
1520open changes table or the account dashboard. The value must be a
1521valid HTML hex color code, or standard color name.
1522+
1523By default black, `000000`.
1524
1525[[theme.trimColor]]theme.trimColor::
1526+
1527Primary color used as a background color behind text. This is
1528the color of the main menu bar at the top, of table headers,
1529and of major UI areas that we want to offset from other portions
1530of the page. The value must be a valid HTML hex color code, or
1531standard color name.
1532+
1533By default a shade of green, `D4E9A9`.
1534
1535[[theme.selectionColor]]theme.selectionColor::
1536+
1537Background color used within a trimColor area to denote the currently
1538selected tab, or the background color used in a table to denote the
1539currently selected row. The value must be a valid HTML hex color
1540code, or standard color name.
1541+
1542By default a shade of yellow, `FFFFCC`.
1543
Shawn O. Pearce6e4dfdd2010-05-12 17:26:08 -07001544[[transfer]] Section transfer
1545~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1546
1547[[transfer.timeout]]transfer.timeout::
1548+
1549Number of seconds to wait for a single network read or write
1550to complete before giving up and declaring the remote side is
1551not responding. If 0, there is no timeout, and this server will
1552wait indefinitely for a transfer to finish.
1553+
1554A timeout should be large enough to mostly transfer the objects to
1555the other side. 1 second may be too small for larger projects,
1556especially over a WAN link, while 10-30 seconds is a much more
1557reasonable timeout value.
1558+
1559Defaults to 0 seconds, wait indefinitely.
1560
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -07001561[[user]] Section user
Shawn O. Pearcea758fef2009-08-19 08:29:32 -07001562~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearce0a351912009-06-01 08:14:46 -07001563
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001564[[user.name]]user.name::
Shawn O. Pearce0a351912009-06-01 08:14:46 -07001565+
1566Name that Gerrit calls itself in Git when it creates a new Git
1567commit, such as a merge during change submission.
1568+
1569By default this is "Gerrit Code Review".
1570
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001571[[user.email]]user.email::
Shawn O. Pearce0a351912009-06-01 08:14:46 -07001572+
1573Email address that Gerrit refers to itself as when it creates a
1574new Git commit, such as a merge commit during change submission.
1575+
1576If not set, Gerrit generates this as "gerrit@`hostname`", where
1577`hostname` is the hostname of the system Gerrit is running on.
1578+
1579By default, not set, generating the value at startup.
1580
Shawn O. Pearce0bf2f522009-05-14 11:02:03 -07001581
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08001582File `etc/secure.config`
1583-------------------------
1584The optional file `'$site_path'/etc/secure.config` overrides (or
1585supplements) the settings supplied by `'$site_path'/etc/gerrit.config`.
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08001586The file should be readable only by the daemon process and can be
1587used to contain private configuration entries that wouldn't normally
1588be exposed to everyone.
1589
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08001590Sample `etc/secure.config`:
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08001591----
1592[database]
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001593 username = webuser
1594 password = s3kr3t
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08001595
1596[ldap]
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001597 password = l3tm3srch
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08001598
1599[httpd]
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001600 sslKeyPassword = g3rr1t
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08001601
1602[sendemail]
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001603 smtpPass = sp@m
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08001604----
1605
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08001606File `etc/replication.config`
1607-----------------------------
Shawn O. Pearce7b405712009-05-08 18:27:53 -07001608
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08001609The optional file `'$site_path'/etc/replication.config` controls how
Shawn O. Pearce7b405712009-05-08 18:27:53 -07001610Gerrit automatically replicates changes it makes to any of the Git
1611repositories under its control.
1612
1613* link:config-replication.html[Git Replication/Mirroring]
1614
1615Database system_config
1616----------------------
1617
1618Several columns in the `system_config` table within the metadata
1619database may be set to control how Gerrit behaves.
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08001620
1621[NOTE]
1622The contents of the `system_config` table are cached at startup
1623by Gerrit. If you modify any columns in this table, Gerrit needs
1624to be restarted before it will use the new values.
1625
Shawn O. Pearce7b405712009-05-08 18:27:53 -07001626Configurable Parameters
1627~~~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08001628
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07001629site_path::
1630+
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08001631Local filesystem directory holding the site customization assets.
1632Placing this directory under version control and/or backup is a
1633good idea.
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07001634+
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08001635Files in this directory provide additional configuration.
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07001636+
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08001637Other files support site customization.
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07001638+
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08001639* link:config-headerfooter.html[Site Header/Footer]
Shawn O. Pearcee7ec0532009-05-08 09:42:54 -07001640* link:config-replication.html[Git Replication/Mirroring]
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08001641
Shawn O. Pearce7b405712009-05-08 18:27:53 -07001642Not User Serviceable
1643~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08001644
1645These fields generally shouldn't be modified.
1646
Shawn O. Pearcec7f88012009-08-19 08:32:51 -07001647register_email_private_key::
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07001648+
Shawn O. Pearcec7f88012009-08-19 08:32:51 -07001649Private key used to sign the links emailed to users when they
1650request to register a new email address on their user account.
1651When the link is activated, the private key authenticates the link
1652was created and sent by this Gerrit server, proving that the user
1653can receive email at the address they are registering.
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07001654+
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08001655This column is automatically generated when the database is
1656initialized. Changing it to a new value would cause all current
Shawn O. Pearcec7f88012009-08-19 08:32:51 -07001657links to be invalidated.
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07001658+
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08001659Changing it is not recommended.
1660
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07001661admin_group_id::
1662+
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08001663Unique identity of the group with full privileges. Any user who
1664is a member of this group may manage any other group, any project,
1665and other system settings over the web.
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07001666+
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08001667This is initialized by Gerrit to be the "Administrators" group.
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07001668+
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08001669Changing it is not recommended.
1670
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07001671anonymous_group_id::
1672+
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08001673Unique identity of the group for anonymous (not authenticated) users.
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07001674+
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08001675All users are a member of this group, whether or not they are
1676actually signed in to Gerrit. Any access rights assigned to
1677this group are inherited by all users.
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07001678+
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08001679This is initialized by Gerrit to be the "Anonymous Users" group.
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07001680+
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08001681Changing it is not recommended.
1682
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07001683registered_group_id::
1684+
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08001685Unique identity of the group for all authenticated users.
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07001686+
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08001687All signed-in users are a member of this group. Any access rights
1688assigned to this group are inherited by all users once they have
1689authenticated to Gerrit.
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07001690+
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08001691Since account registration is open and fairly easy to obtain,
1692moving from the "Anonymous Users" group to this group is not
1693very difficult. Caution should be taken when assigning any
1694permissions to this group.
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07001695+
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08001696This is initialized by Gerrit to be the "Registered Users" group.
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07001697+
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08001698Changing it is not recommended.
1699
Shawn O. Pearce5500e692009-05-28 15:55:01 -07001700GERRIT
1701------
1702Part of link:index.html[Gerrit Code Review]