blob: c8d17ed672b4cdcb39c336316ecd82a952e49432 [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+
Sasa Zivkoveabc8972010-10-04 15:47:08 +020059* `CLIENT_SSL_CERT_LDAP`
60+
61This authentication type is actually kind of SSO. Gerrit will configure
62Jetty's SSL channel to request client's SSL certificate. For this
63authentication to work a Gerrit administrator has to import the root
64certificate of the trust chain used to issue the client's certificate
65into the <review-site>/etc/keystore.
66After the authentication is done Gerrit will obtain basic user
67registration (name and email) from LDAP, and some group memberships.
68Therefore, the "_LDAP" suffix in the name of this authentication type.
69This authentication type can only be used under hosted daemon mode, and
70the httpd.listenUrl must use https:// as the protocol.
71+
Shawn O. Pearcef7e065e2009-09-26 20:01:10 -070072* `LDAP`
73+
74Gerrit prompts the user to enter a username and a password, which
75it then verifies by performing a simple bind against the configured
76<<ldap.server,ldap.server>>. In this configuration the web server
77is not involved in the user authentication process.
78+
Shawn O. Pearcec892d342010-02-17 17:00:50 -080079The actual username used in the LDAP simple bind request is the
80account's full DN, which is discovered by first querying the
81directory using either an anonymous request, or the configured
82<<ldap.username>> identity.
83
84* `LDAP_BIND`
85+
86Gerrit prompts the user to enter a username and a password, which
87it then verifies by performing a simple bind against the configured
88<<ldap.server,ldap.server>>. In this configuration the web server
89is not involved in the user authentication process.
90+
91Unlike LDAP above, the username used to perform the LDAP simple bind
92request is the exact string supplied by in the dialog by the user.
93The configured <<ldap.username>> identity is not used to obtain
94account information.
95+
Shawn O. Pearce2920ef32009-08-03 08:03:34 -070096* `DEVELOPMENT_BECOME_ANY_ACCOUNT`
97+
98*DO NOT USE*. Only for use in a development environment.
99+
100When this is the configured authentication method a hyperlink titled
101`Become` appears in the top right corner of the page, taking the
102user to a form where they can enter the username of any existing
103user account, and immediately login as that account, without any
104authentication taking place. This form of authentication is only
105useful for the GWT hosted mode shell, where OpenID authentication
106redirects might be risky to the developer's host computer, and HTTP
107authentication is not possible.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700108
109+
110By default, OpenID.
111
Shawn O. Pearce533cafc2010-05-11 16:05:27 -0700112[[auth.allowedOpenID]]auth.allowedOpenID::
113+
114List of permitted OpenID providers. A user may only authenticate
115with an OpenID that matches this list. Only used if `auth.type`
116was set to OpenID (the default).
117+
Magnus Bäcke5611832011-02-02 08:57:15 +0100118Patterns may be either a
119link:http://download.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html[standard
120Java regular expression (java.util.regex)] (start with `^` and
Shawn O. Pearce533cafc2010-05-11 16:05:27 -0700121end with `$`) or be a simple prefix (any other string).
122+
123By default, the list contains two values, `http://` and `https://`,
124allowing users to authenticate with any OpenID provider.
125
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700126[[auth.trustedOpenID]]auth.trustedOpenID::
Shawn O. Pearced7c026d2009-08-05 20:11:22 -0700127+
128List of trusted OpenID providers. Only used if `auth.type` was
129set to OpenID (the default).
130+
131In order for a user to take advantage of permissions beyond those
132granted to the `Anonymous Users` and `Registered Users` groups,
133the user account must only have OpenIDs which match at least one
134pattern from this list.
135+
Magnus Bäcke5611832011-02-02 08:57:15 +0100136Patterns may be either a
137link:http://download.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html[standard
138Java regular expression (java.util.regex)] (start with `^` and
Shawn O. Pearced7c026d2009-08-05 20:11:22 -0700139end with `$`) or be a simple prefix (any other string).
140+
141By default, the list contains two values, `http://` and `https://`,
142allowing Gerrit to trust any OpenID it receives.
143
Shawn O. Pearce89030bc2010-04-24 17:25:29 -0700144[[auth.maxOpenIdSessionAge]]auth.maxOpenIdSessionAge::
145+
146Time in seconds before an OpenID provider must force the user
147to authenticate themselves again before authentication to this
148Gerrit server. Currently this is only a polite request, and users
149coming from providers that don't support the PAPE extension will
150be accepted anyway. In the future it may be enforced, rejecting
151users coming from providers that don't honor the max session age.
152+
153If set to 0, the provider will always force the user to authenticate
154(e.g. supply their password). Values should use common unit suffixes
155to express their setting:
156+
157* s, sec, second, seconds
158* m, min, minute, minutes
159* h, hr, hour, hours
160* d, day, days
161* w, week, weeks (`1 week` is treated as `7 days`)
162* mon, month, months (`1 month` is treated as `30 days`)
163* y, year, years (`1 year` is treated as `365 days`)
164
165+
166Default is -1, permitting infinite time between authentications.
167
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700168[[auth.httpHeader]]auth.httpHeader::
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700169+
170HTTP header to trust the username from, or unset to select HTTP basic
171or digest authentication. Only used if `auth.type` was set to HTTP.
172
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700173[[auth.logoutUrl]]auth.logoutUrl::
Shawn O. Pearce12b5d842009-08-15 15:11:10 -0700174+
175URL to redirect a browser to after the end-user has clicked on the
176"Sign Out" link in the upper right corner. Organizations using an
177enterprise single-sign-on solution may want to redirect the browser
178to the SSO product's sign-out page.
179+
180If not set, the redirect returns to the list of all open changes.
181
Shawn O. Pearcec9d26b52009-12-16 08:05:27 -0800182[[auth.registerUrl]]auth.registerUrl::
183+
184Target for the "Register" link in the upper right corner. Used only
185when auth.type is `LDAP`.
186+
187If not set, no "Register" link is displayed.
188
Piotr Sikora7cec2f82011-02-26 12:57:30 +0000189[[auth.cookiePath]]auth.cookiePath::
190+
191Sets "path" attribute of the authentication cookie.
192+
193If not set, HTTP request's path is used.
194
195[[auth.cookieSecure]]auth.cookieSecure::
196+
197Sets "secure" flag of the authentication cookie. If true, cookies
198will be transmitted only over HTTPS protocol.
199+
200By default, false.
201
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700202[[auth.emailFormat]]auth.emailFormat::
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700203+
204Optional format string to construct user email addresses out of
Shawn O. Pearcef7e065e2009-09-26 20:01:10 -0700205user login names. Only used if auth.type is `HTTP`, `HTTP_LDAP`
206or `LDAP`.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700207+
208This value can be set to a format string, where `\{0\}` is replaced
209with the login name. E.g. "\{0\}+gerrit@example.com" with a user
210login name of "foo" will produce "foo+gerrit@example.com" during
211the first time user "foo" registers.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -0700212+
Shawn O. Pearcef7e065e2009-09-26 20:01:10 -0700213If the site is using `HTTP_LDAP` or `LDAP`, using this option is
214discouraged. Setting `ldap.accountEmailAddress` and importing the
215email address from the LDAP directory is generally preferred.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700216
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700217[[auth.contributorAgreements]]auth.contributorAgreements::
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700218+
219Controls whether or not the contributor agreement features are
220enabled for the Gerrit site. If enabled a user must complete a
221contributor agreement before they can upload changes.
222+
223If enabled, the admin must also insert one or more rows into
224`contributor_agreements` and create agreement files under
225`'$site_path'/static`, so users can actually complete one or
Grzegorz Kossakowski28e4e1b2009-09-23 11:33:34 -0700226more agreements.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700227+
228By default this is false (no agreements are used).
229
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700230auth.allowGoogleAccountUpgrade::
231+
Shawn O. Pearce48eea072009-08-31 10:53:12 -0700232Allows Google Account users to automatically update their Gerrit
233account when/if their Google Account OpenID identity token changes.
234Identity tokens can change if the server changes hostnames, or
235for other reasons known only to Google. The upgrade path works
236by matching users by email address if the identity is not present,
237and then changing the identity.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700238+
Shawn O. Pearce48eea072009-08-31 10:53:12 -0700239This setting also permits old Gerrit 1.x users to seamlessly upgrade
240from Google Accounts on Google App Engine to OpenID authentication.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700241+
Shawn O. Pearce48eea072009-08-31 10:53:12 -0700242Having this enabled incurs an extra database query when Google
Shawn O. Pearcee31d02c2009-12-08 12:21:37 -0800243Account users register with the Gerrit server.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700244+
245By default, unset/false.
246
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -0700247[[cache]]Section cache
248~~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700249
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700250[[cache.directory]]cache.directory::
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700251+
252Path to a local directory where Gerrit can write cached entities for
Shawn O. Pearce4b212282009-08-05 19:45:56 -0700253future lookup. This local disk cache is used to retain potentially
254expensive to compute information across restarts. If the location
255does not exist, Gerrit will try to create it.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700256+
Shawn O. Pearce4b212282009-08-05 19:45:56 -0700257If not absolute, the path is resolved relative to `$site_path`.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700258+
Shawn O. Pearce4b212282009-08-05 19:45:56 -0700259Default is unset, no disk cache.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700260
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700261[[cache.name.maxAge]]cache.<name>.maxAge::
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700262+
Shawn O. Pearced9c403e2009-08-19 08:35:41 -0700263Maximum age to keep an entry in the cache. If an entry has not
264been accessed in this period of time, it is removed from the cache.
265Values should use common unit suffixes to express their setting:
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700266+
Shawn O. Pearced9c403e2009-08-19 08:35:41 -0700267* s, sec, second, seconds
268* m, min, minute, minutes
269* h, hr, hour, hours
270* d, day, days
271* w, week, weeks (`1 week` is treated as `7 days`)
272* mon, month, months (`1 month` is treated as `30 days`)
273* y, year, years (`1 year` is treated as `365 days`)
274
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -0700275+
Shawn O. Pearce3fdbf392009-09-04 18:08:26 -0700276If a unit suffix is not specified, `minutes` is assumed. If 0 is
277supplied, the maximum age is infinite and items are never purged
278except when the cache is full.
Shawn O. Pearced9c403e2009-08-19 08:35:41 -0700279+
280Default is `90 days` for most caches, except:
281+
Shawn O. Pearce05687e92011-04-04 17:29:03 -0400282* `"adv_bases"`: default is `10 minutes`
Shawn O. Pearced9c403e2009-08-19 08:35:41 -0700283* `"ldap_groups"`: default is `1 hour`
Shawn O. Pearced9c403e2009-08-19 08:35:41 -0700284* `"web_sessions"`: default is `12 hours`
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700285
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700286[[cache.name.memoryLimit]]cache.<name>.memoryLimit::
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700287+
288Maximum number of cache items to retain in memory. Keep in mind
289this is total number of items, not bytes of heap used.
290+
Shawn O. Pearceefaf9792009-09-02 18:12:52 -0700291Default is 1024 for most caches, except:
292+
Shawn O. Pearce05687e92011-04-04 17:29:03 -0400293* `"adv_bases"`: default is `4096`
Shawn O. Pearceefaf9792009-09-02 18:12:52 -0700294* `"diff"`: default is `128`
Shawn O. Pearcef0cfe532011-04-11 23:40:06 -0400295* `"diff_intraline"`: default is `128`
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700296
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700297[[cache.name.diskLimit]]cache.<name>.diskLimit::
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700298+
299Maximum number of cache items to retain on disk, if this cache
300supports storing its items to disk. Like memoryLimit, this is
Shawn O. Pearcea5e36d52009-08-17 07:05:03 -0700301total number of items, not bytes of disk used. If 0, disk storage
302for this cache is disabled.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700303+
304Default is 16384.
305
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700306[[cache.name.diskBuffer]]cache.<name>.diskBuffer::
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700307+
308Number of bytes to buffer in memory before writing less frequently
309accessed cache items to disk, if this cache supports storing its
310items to disk.
311+
312Default is 5 MiB.
313+
314Common unit suffixes of 'k', 'm', or 'g' are supported.
315
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -0700316[[cache_names]]Standard Caches
Shawn O. Pearce4016a932009-05-28 15:12:40 -0700317^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700318
Shawn O. Pearce4a452712009-05-28 20:12:33 -0700319cache `"accounts"`::
320+
Shawn O. Pearce4dba9882009-08-05 19:55:15 -0700321Cache entries contain important details of an active user, including
322their display name, preferences, known email addresses, and group
323memberships. Entry information is obtained from the following
324database tables:
325+
326* `accounts`
327+
328* `account_group_members`
329+
330* `account_external_ids`
331
332+
333If direct updates are made to any of these database tables, this
334cache should be flushed.
335
336cache `"accounts_byemail"`::
337+
338Caches account identities keyed by email address, which is scanned
339from the `account_external_ids` database table. If updates are
340made to this table, this cache should be flushed.
Shawn O. Pearce4a452712009-05-28 20:12:33 -0700341
Shawn O. Pearce05687e92011-04-04 17:29:03 -0400342cache `"adv_bases"`::
343+
344Used only for push over smart HTTP when branch level access controls
345are enabled. The cache entry contains all commits that are avaliable
346for the client to use as potential delta bases. Push over smart HTTP
347requires two HTTP requests, and this cache tries to carry state from
348the first request into the second to ensure it can complete.
349
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700350cache `"diff"`::
351+
Shawn O. Pearceefaf9792009-09-02 18:12:52 -0700352Each item caches the differences between two commits, at both the
353directory and file levels. Gerrit uses this cache to accelerate
354the display of affected file names, as well as file contents.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700355+
Shawn O. Pearceefaf9792009-09-02 18:12:52 -0700356Entries in this cache are relatively large, so the memory limit
357should not be set incredibly high. Administrators should try to
358target cache.diff.memoryLimit to be roughly the number of changes
359which their users will process in a 1 or 2 day span.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700360+
361Keeping entries for 90 days gives sufficient time for most changes
362to be submitted or abandoned before their relevant difference items
363expire out.
364
Shawn O. Pearcef0cfe532011-04-11 23:40:06 -0400365cache `"diff_intraline"`::
366+
367Each item caches the intraline difference of one file, when compared
368between two commits. Gerrit uses this cache to accelerate display of
369intraline differences when viewing a file.
370+
371Entries in this cache are relatively large, so the memory limit
372should not be set incredibly high. Administrators should try to
373target cache.diff.memoryLimit to be roughly the number of changes
374which their users will process in a 1 or 2 day span.
375+
376Keeping entries for 90 days gives sufficient time for most changes
377to be submitted or abandoned before their relevant difference items
378expire out.
379
Shawn O. Pearce4a452712009-05-28 20:12:33 -0700380cache `"groups"`::
381+
Shawn O. Pearce4dba9882009-08-05 19:55:15 -0700382Caches the basic group information from the `account_groups` table,
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -0700383including the group owner, name, and description.
384+
385Gerrit group membership obtained from the `account_group_members`
386table is cached under the `"accounts"` cache, above. External group
387membership obtained from LDAP is cached under `"ldap_groups"`.
388
Matt Fischer620255a2011-03-22 14:28:23 -0500389cache `"groups_byinclude"`::
390+
391Caches group inclusions in other groups. If direct updates are made
392to the `account_group_includes` table, this cache should be flushed.
393
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -0700394cache `"ldap_groups"`::
395+
396Caches the LDAP groups that a user belongs to, if LDAP has been
397configured on this server. This cache should be configured with a
398low maxAge setting, to ensure LDAP modifications are picked up in
399a timely fashion.
Shawn O. Pearce4a452712009-05-28 20:12:33 -0700400
Shawn O. Pearce6d26f4a2009-08-24 15:43:52 -0700401cache `"ldap_usernames"`::
402+
403Caches a mapping of LDAP username to Gerrit account identity. The
404cache automatically updates when a user first creates their account
405within Gerrit, so the cache expire time is largely irrelevant.
406
Shawn O. Pearce4a452712009-05-28 20:12:33 -0700407cache `"projects"`::
408+
409Caches the project description records, from the `projects` table
410in the database. If a project record is updated or deleted, this
411cache should be flushed. Newly inserted projects do not require
412a cache flush, as they will be read upon first reference.
413
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700414cache `"sshkeys"`::
415+
416Caches unpacked versions of user SSH keys, so the internal SSH daemon
417can match against them during authentication. The unit of storage
418is per-user, so 1024 items translates to 1024 unique user accounts.
419As each individual user account may configure multiple SSH keys,
420the total number of keys may be larger than the item count.
Shawn O. Pearce4a452712009-05-28 20:12:33 -0700421+
422This cache is based off the `account_ssh_keys` table and the
423`accounts.ssh_user_name` column in the database. If either is
424modified directly, this cache should be flushed.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700425
Shawn O. Pearceb09322b2009-08-15 17:49:00 -0700426cache `"web_sessions"`::
427+
428Tracks the live user sessions coming in over HTTP. Flushing this
429cache would cause all users to be signed out immediately, forcing
Shawn O. Pearce727d80f2009-08-17 07:57:54 -0700430them to sign-in again. To avoid breaking active users, this cache
431is not flushed automatically by `gerrit flush-caches --all`, but
432instead must be explicitly requested.
433+
434If no disk cache is configured (or `cache.web_sessions.diskLimit`
435is set to 0) a server restart will force all users to sign-out,
436and need to sign-in again after the restart, as the cache was
437unable to persist the session information. Enabling a disk cache
438is strongly recommended.
439+
440Session storage is relatively inexpensive, the average entry in
441this cache is approximately 248 bytes, depending on the JVM.
Shawn O. Pearceb09322b2009-08-15 17:49:00 -0700442
Shawn O. Pearce4016a932009-05-28 15:12:40 -0700443See also link:cmd-flush-caches.html[gerrit flush-caches].
444
Shawn O. Pearce29de4362010-03-03 17:51:26 -0800445[[cache_options]]Cache Options
446^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
447
Shawn O. Pearce617aa392010-11-15 14:03:28 -0800448cache.diff_intraline.maxIdleWorkers::
449+
450Number of idle worker threads to maintain for the intraline difference
451computations. There is no upper bound on how many concurrent requests
452can occur at once, if additional threads are started to handle a peak
453load, only this many will remaining idle afterwards.
454+
455Default is 1.5x number of available CPUs.
456
457cache.diff_intraline.timeout::
458+
459Maximum number of milliseconds to wait for intraline difference data
460before giving up and disabling it for a particular file pair. This is
461a work around for an infinite loop bug in the intraline difference
462implementation. If computation takes longer than the timeout the
463worker thread is terminated and no intraline difference is displayed.
464+
465Values should use common unit suffixes to express their setting:
466+
467* ms, milliseconds
468* s, sec, second, seconds
469* m, min, minute, minutes
470* h, hr, hour, hours
471
472+
473If a unit suffix is not specified, `milliseconds` is assumed.
474+
475Default is 5 seconds.
476
Shawn O. Pearce307dd4e2010-11-15 12:12:20 -0800477cache.diff_intraline.enabled::
Shawn O. Pearce29de4362010-03-03 17:51:26 -0800478+
479Boolean to enable or disable the computation of intraline differences
Shawn O. Pearce307dd4e2010-11-15 12:12:20 -0800480when populating a diff cache entry. This flag is provided primarily
481as a backdoor to disable the intraline difference feature if
482necessary. To maintain backwards compatability with prior versions,
483this setting will fallback to `cache.diff.intraline` if not set in the
484configuration.
Shawn O. Pearce29de4362010-03-03 17:51:26 -0800485+
486Default is true, enabled.
487
Shawn O. Pearceb8e4e352011-05-19 18:09:01 -0700488cache.projects.checkFrequency::
489+
490How often project configuration should be checked for update from Git.
491Gerrit Code Review caches project access rules and configuration in
492memory, checking the refs/meta/config branch every checkFrequency
493minutes to see if a new revision should be loaded and used for future
494access. Values can be specified using standard time unit abbreviations
495('ms', 'sec', 'min', etc.).
496+
497If set to 0, checks occur every time, which may slow down operations.
498Administrators may force the cache to flush with
499link:cmd-flush-caches.html[gerrit flush-caches].
500+
501Default is 5 minutes.
502
Brad Larson991a31b2009-11-03 14:30:26 -0600503
504[[commentlink]]Section commentlink
505~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
506Comment links are find/replace strings applied to change descriptions,
507patch comments, and in-line code comments to turn set strings into
508hyperlinks. One common use is for linking to bug-tracking systems.
509
510In the following example configuration the 'changeid' comment link
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800511will match typical Gerrit Change-Id values and create a hyperlink
512to changes which reference it. The second configuration 'bugzilla'
513will hyperlink terms such as 'bug 42' to an external bug tracker,
514supplying the argument record number '42' for display. The third
515configuration 'tracker' uses raw HTML to more preciously control
516how the replacement is displayed to the user.
Brad Larson991a31b2009-11-03 14:30:26 -0600517
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800518----
519[commentlink "changeid"]
520 match = (I[0-9a-f]{8,40})
521 link = "#q,$1,n,z"
Brad Larson991a31b2009-11-03 14:30:26 -0600522
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800523[commentlink "bugzilla"]
Shawn O. Pearcec99630a2010-02-21 19:11:56 -0800524 match = "(bug\\s+#?)(\\d+)"
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800525 link = http://bugs.example.com/show_bug.cgi?id=$2
Brad Larson991a31b2009-11-03 14:30:26 -0600526
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800527[commentlink "tracker"]
528 match = ([Bb]ug:\\s+)(\\d+)
529 html = $1<a href=\"http://trak.example.com/$2\">$2</a>
530----
531
532[[commentlink.name.match]]commentlink.<name>.match::
Brad Larson991a31b2009-11-03 14:30:26 -0600533+
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800534A JavaScript regular expression to match positions to be replaced
535with a hyperlink. Subexpressions of the matched string can be
536stored using groups and accessed with `$'n'` syntax, where 'n'
537is the group number, starting from 1.
Brad Larson991a31b2009-11-03 14:30:26 -0600538+
Shawn O. Pearcec99630a2010-02-21 19:11:56 -0800539The configuration file parser eats one level of backslashes, so the
540character class `\s` requires `\\s` in the configuration file. The
541parser also terminates the line at the first `#`, so a match
542expression containing # must be wrapped in double quotes.
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800543+
Shawn O. Pearce665beaa2010-02-21 22:41:03 -0800544To match case insensitive strings, a character class with both the
545upper and lower case character for each position must be used. For
546example, to match the string `bug` in a case insensitive way the match
547pattern `[bB][uU][gG]` needs to be used.
548+
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800549A common pattern to match is `bug\\s+(\\d+)`.
Brad Larson991a31b2009-11-03 14:30:26 -0600550
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800551[[commentlink.name.link]]commentlink.<name>.link::
Brad Larson991a31b2009-11-03 14:30:26 -0600552+
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800553The URL to direct the user to whenever the regular expression is
554matched. Groups in the match expression may be accessed as `$'n'`.
555+
556The link property is used only when the html property is not present.
557
558[[commentlink.name.html]]commentlink.<name>.html::
559+
560HTML to replace the entire matched string with. If present,
561this property overrides the link property above. Groups in the
562match expression may be accessed as `$'n'`.
563+
564The configuration file eats double quotes, so escaping them as
565`\"` is necessary to protect them from the parser.
Brad Larson991a31b2009-11-03 14:30:26 -0600566
567
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -0700568[[contactstore]]Section contactstore
569~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700570
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700571[[contactstore.url]]contactstore.url::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700572+
573URL of the web based contact store Gerrit will send any offline
574contact information to when it collects the data from users as part
575of a contributor agreement.
576+
577See link:config-contact.html[Contact Information].
578
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700579[[contactstore.appsec]]contactstore.appsec::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700580+
581Shared secret of the web based contact store.
582
Shawn O. Pearcee24c71fb2009-12-07 20:32:40 -0800583
584[[container]]Section container
585~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
586
587These settings are applied only if Gerrit is started as the container
588process through Gerrit's 'gerrit.sh' rc.d compatible wrapper script.
589
590[[container.heapLimit]]container.heapLimit::
591+
592Maximum heap size of the Java process running Gerrit, in bytes.
593This property is translated into the '-Xmx' flag for the JVM.
594+
595Default is platform and JVM specific.
596+
597Common unit suffixes of 'k', 'm', or 'g' are supported.
598
599[[container.javaHome]]container.javaHome::
600+
601Path of the JRE/JDK installation to run Gerrit with. If not set, the
602Gerrit startup script will attempt to search your system and guess
603a suitable JRE. Overrides the environment variable 'JAVA_HOME'.
604
605[[container.javaOptions]]container.javaOptions::
606+
607Additional options to pass along to the Java runtime. If multiple
608values are configured, they are passed in order on the command line,
609separated by spaces. These options are appended onto 'JAVA_OPTIONS'.
610
Fredrik Luthanderb8f7d6d2010-05-18 21:11:22 +0200611[[container.slave]]container.slave::
612+
613Used on Gerrit slave installations. If set to true the Gerrit JVM is
614called with the '--slave' switch, enabling slave mode. If no value is
615set (or any other value), gerrit defaults to master mode.
616
Shawn O. Pearcee24c71fb2009-12-07 20:32:40 -0800617[[container.user]]container.user::
618+
619Login name (or UID) of the operating system user the Gerrit JVM
620will execute as. If not set, defaults to the user who launched
621the 'gerrit.sh' wrapper script.
622
623[[container.war]]container.war::
624+
625Path of the JAR file to start daemon execution with. This should
626be the path of the local 'gerrit.war' archive. Overrides the
627environment variable 'GERRIT_WAR'.
628+
629If not set, defaults to '$site_path/bin/gerrit.war', or to
630'$HOME/gerrit.war'.
631
632
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -0700633[[core]]Section core
634~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700635
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700636[[core.packedGitWindowSize]]core.packedGitWindowSize::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700637+
638Number of bytes of a pack file to load into memory in a single
639read operation. This is the "page size" of the JGit buffer cache,
640used for all pack access operations. All disk IO occurs as single
641window reads. Setting this too large may cause the process to load
642more data than is required; setting this too small may increase
643the frequency of `read()` system calls.
644+
645Default on JGit is 8 KiB on all platforms.
646+
647Common unit suffixes of 'k', 'm', or 'g' are supported.
648
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700649[[core.packedGitLimit]]core.packedGitLimit::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700650+
651Maximum number of bytes to load and cache in memory from pack files.
652If JGit needs to access more than this many bytes it will unload less
653frequently used windows to reclaim memory space within the process.
654As this buffer must be shared with the rest of the JVM heap, it
655should be a fraction of the total memory available.
656+
657Default on JGit is 10 MiB on all platforms.
658+
659Common unit suffixes of 'k', 'm', or 'g' are supported.
660
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700661[[core.deltaBaseCaseLimit]]core.deltaBaseCacheLimit::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700662+
663Maximum number of bytes to reserve for caching base objects
664that multiple deltafied objects reference. By storing the entire
665decompressed base object in a cache Git is able to avoid unpacking
666and decompressing frequently used base objects multiple times.
667+
668Default on JGit is 10 MiB on all platforms. You probably do not
669need to adjust this value.
670+
671Common unit suffixes of 'k', 'm', or 'g' are supported.
672
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700673[[core.packedGitOpenFiles]]core.packedGitOpenFiles::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700674+
675Maximum number of pack files to have open at once. A pack file
676must be opened in order for any of its data to be available in
677a cached window.
678+
679If you increase this to a larger setting you may need to also adjust
680the ulimit on file descriptors for the host JVM, as Gerrit needs
681additional file descriptors available for network sockets and other
682repository data manipulation.
683+
684Default on JGit is 128 file descriptors on all platforms.
685
Shawn O. Pearce329fe792010-09-03 15:44:23 -0700686[[core.streamFileThreshold]]core.streamFileThreshold::
687+
688Largest object size, in bytes, that JGit will allocate as a
689contiguous byte array. Any file revision larger than this threshold
690will have to be streamed, typically requiring the use of temporary
691files under '$GIT_DIR/objects' to implement psuedo-random access
692during delta decompression.
693+
694Servers with very high traffic should set this to be larger than
695the size of their common big files. For example a server managing
696the Android platform typically has to deal with ~10-12 MiB XML
697files, so `15 m` would be a reasonable setting in that environment.
698Setting this too high may cause the JVM to run out of heap space
699when handling very big binary files, such as device firmware or
700CD-ROM ISO images.
701+
Shawn O. Pearcee3febd92010-10-13 21:17:53 -0700702Default is 50 MiB on all platforms. Prior to Gerrit 2.1.6,
Shawn O. Pearce329fe792010-09-03 15:44:23 -0700703this value was effectively 2047 MiB.
704+
705Common unit suffixes of 'k', 'm', or 'g' are supported.
706
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700707[[core.packedGitMmap]]core.packedGitMmap::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700708+
709When true, JGit will use `mmap()` rather than `malloc()+read()`
710to load data from pack files. The use of mmap can be problematic
711on some JVMs as the garbage collector must deduce that a memory
712mapped segment is no longer in use before a call to `munmap()`
713can be made by the JVM native code.
714+
715In server applications (such as Gerrit) that need to access many
716pack files, setting this to true risks artifically running out
717of virtual address space, as the garbage collector cannot reclaim
718unused mapped spaces fast enough.
719+
720Default on JGit is false. Although potentially slower, it yields
721much more predictable behavior.
722
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -0800723[[database]]Section database
724~~~~~~~~~~~~~~~~~~~~~~~~~~~~
725
726The database section configures where Gerrit stores its metadata
727records about user accounts and change reviews.
728
Shawn O. Pearce9d342a42009-12-16 15:49:05 -0800729----
730[database]
Shawn O. Pearce1be39062009-12-19 14:11:52 -0800731 type = POSTGRESQL
Shawn O. Pearce9d342a42009-12-16 15:49:05 -0800732 hostname = localhost
733 database = reviewdb
734 username = gerrit2
735 password = s3kr3t
736----
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -0800737
738[[database.type]]database.type::
739+
740Type of database server to connect to. If set this value will be
741used to automatically create correct database.driver and database.url
742values to open the connection.
743+
Shawn O. Pearce1be39062009-12-19 14:11:52 -0800744* `POSTGRESQL`
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -0800745+
746Connect to a PostgreSQL database server.
747+
748* `H2`
749+
Shawn O. Pearce1be39062009-12-19 14:11:52 -0800750Connect to a local embedded H2 database.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -0800751+
Shawn O. Pearce1be39062009-12-19 14:11:52 -0800752* `MYSQL`
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -0800753+
754Connect to a MySQL database server.
Shawn O. Pearce1be39062009-12-19 14:11:52 -0800755+
756* `JDBC`
757+
758Connect using a JDBC driver class name and URL.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -0800759
760+
761If not specified, database.driver and database.url are used as-is,
762and if they are also not specified, defaults to H2.
763
764[[database.hostname]]database.hostname::
765+
766Hostname of the database server. Defaults to 'localhost'.
767
768[[database.port]]database.port::
769+
770Port number of the database server. Defaults to the default port
771of the server named by database.type.
772
773[[database.database]]database.database::
774+
Shawn O. Pearce1be39062009-12-19 14:11:52 -0800775For POSTGRESQL or MYSQL, the name of the database on the server.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -0800776+
777For H2, this is the path to the database, and if not absolute is
Shawn O. Pearce1be39062009-12-19 14:11:52 -0800778relative to `'$site_path'`.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -0800779
780[[database.username]]database.username::
781+
782Username to connect to the database server as.
783
784[[database.password]]database.password::
785+
786Password to authenticate to the database server with.
787
788[[database.driver]]database.driver::
789+
Shawn O. Pearce1be39062009-12-19 14:11:52 -0800790Name of the JDBC driver class to connect to the database with.
791Setting this usually isn't necessary as it can be derived from
792database.type or database.url for any supported database.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -0800793
794[[database.url]]database.url::
795+
Shawn O. Pearce1be39062009-12-19 14:11:52 -0800796'jdbc:' URL for the database. Setting this variable usually
797isn't necessary as it can be constructed from the all of the
798above properties.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -0800799
Shawn O. Pearce07f35177d2010-02-23 09:47:10 -0800800[[database.poolLimit]]database.poolLimit::
801+
802Maximum number of open database connections. If the server needs
803more than this number, request processing threads will wait up
804to <<database.poolMaxWait, poolMaxWait>> seconds for a
805connection to be released before they abort with an exception.
806This limit must be several units higher than the total number of
807httpd and sshd threads as some request processing code paths may
808need multiple connections.
809+
810Default is 8.
811
Shawn O. Pearcef458bf62010-02-25 09:03:03 -0800812[[database.poolMinIdle]]database.poolMinIdle::
Shawn O. Pearce07f35177d2010-02-23 09:47:10 -0800813+
814Minimum number of connections to keep idle in the pool.
815Default is 4.
816
Shawn O. Pearcef458bf62010-02-25 09:03:03 -0800817[[database.poolMaxIdle]]database.poolMaxIdle::
Shawn O. Pearce07f35177d2010-02-23 09:47:10 -0800818+
819Maximum number of connections to keep idle in the pool. If there
820are more idle connections, connections will be closed instead of
821being returned back to the pool.
822Default is 4.
823
824[[database.poolMaxWait]]database.poolMaxWait::
825+
826Maximum amount of time a request processing thread will wait to
827acquire a database connection from the pool. If no connection is
828released within this time period, the processing thread will abort
829its current operations and return an error to the client.
830Values should use common unit suffixes to express their setting:
831+
832* ms, milliseconds
833* s, sec, second, seconds
834* m, min, minute, minutes
835* h, hr, hour, hours
836
837+
838If a unit suffix is not specified, `milliseconds` is assumed.
839+
840Default is `30 seconds`.
841
monica.dionisio3f630442010-06-29 15:42:57 -0300842[[download]]Section download
Nasser Grainawib9a50372010-08-10 07:57:47 -0600843~~~~~~~~~~~~~~~~~~~~~~~~~~~~
monica.dionisio3f630442010-06-29 15:42:57 -0300844
845----
846[download]
847 scheme = ssh
848 scheme = http
849 scheme = anon_http
850 scheme = anon_git
851 scheme = repo_download
852----
853
854The download section configures the allowed download methods.
855
856[[download.scheme]]download.scheme::
857+
858Schemes that should be used to download changes.
859+
860Multiple schemes are supported:
861+
862* `http`
863+
Shawn O. Pearce5c46a072010-08-23 08:33:32 -0700864Authenticated HTTP download is allowed.
monica.dionisio3f630442010-06-29 15:42:57 -0300865+
866* `ssh`
867+
Shawn O. Pearce5c46a072010-08-23 08:33:32 -0700868Authenticated SSH download is allowed.
monica.dionisio3f630442010-06-29 15:42:57 -0300869+
870* `anon_http`
871+
872Anonymous HTTP download is allowed.
873+
874* `anon_git`
875+
Shawn O. Pearce5c46a072010-08-23 08:33:32 -0700876Anonymous Git download is allowed. This is not default, it is also
877necessary to set <<gerrit.canonicalGitUrl,gerrit.canonicalGitUrl>>
878variable.
monica.dionisio3f630442010-06-29 15:42:57 -0300879+
880* `repo_download`
881+
Shawn O. Pearce5c46a072010-08-23 08:33:32 -0700882Gerrit advertises patch set downloads with the `repo download`
883command, assuming that all projects managed by this instance are
884generally worked on with the repo multi-repository tool. This is
885not default, as not all instances will deploy repo.
monica.dionisio3f630442010-06-29 15:42:57 -0300886
887+
Shawn O. Pearce5c46a072010-08-23 08:33:32 -0700888If download.scheme is not specified, SSH, HTTP and Anonymous HTTP
889downloads are allowed.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -0800890
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -0700891[[gerrit]]Section gerrit
892~~~~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearceeb7f8ce2009-06-01 09:57:15 -0700893
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700894[[gerrit.basePath]]gerrit.basePath::
Shawn O. Pearce9743d0b2009-06-01 10:10:06 -0700895+
896Local filesystem directory holding all Git repositories that
897Gerrit knows about and can process changes for. A project
898entity in Gerrit maps to a local Git repository by creating
899the path string `"$\{basePath}/$\{project_name}.git"`.
900+
901If relative, the path is resolved relative to `'$site_path'`.
902
Shawn O. Pearce897d9212011-06-16 16:59:59 -0700903[[gerrit.allProjects]]gerrit.allProjects::
904+
905Name of the permissions-only project defining global server
906access controls and settings. These are inherited into every
907other project managed by the running server. The name is
908relative to `gerrit.basePath`.
909+
910Defaults to `All-Projects` if not set.
911
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700912[[gerrit.canonicalWebUrl]]gerrit.canonicalWebUrl::
Shawn O. Pearceeb7f8ce2009-06-01 09:57:15 -0700913+
914The default URL for Gerrit to be accessed through.
915+
916Typically this would be set to "http://review.example.com/" or
917"http://example.com/gerrit/" so Gerrit can output links that point
918back to itself.
919+
920Setting this is highly recommended, as its necessary for the upload
921code invoked by "git push" or "repo upload" to output hyperlinks
922to the newly uploaded changes.
923
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700924[[gerrit.canonicalGitUrl]]gerrit.canonicalGitUrl::
Shawn O. Pearceeb7f8ce2009-06-01 09:57:15 -0700925+
926Optional base URL for repositories available over the anonymous git
927protocol. For example, set this to `git://mirror.example.com/base/`
928to have Gerrit display patch set download URLs in the UI. Gerrit
929automatically appends the project name onto the end of the URL.
930+
931By default unset, as the git daemon must be configured externally
932by the system administrator, and might not even be running on the
933same host as Gerrit.
934
Shawn O. Pearce75c76e22010-08-28 17:26:31 -0700935[[gerrit.replicateOnStartup]]gerrit.replicateOnStartup::
936+
937If true, replicates to all remotes on startup to ensure they are
938in-sync with this server. By default, true.
939
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -0700940[[gitweb]]Section gitweb
941~~~~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearced7ba11f2009-06-01 09:35:41 -0700942
Shawn O. Pearce618dae22010-03-12 19:07:43 -0800943Gerrit can forward requests to either an internally managed gitweb
944(which allows Gerrit to enforce some access controls), or to an
945externally managed gitweb (where the web server manages access).
Shawn O. Pearced7ba11f2009-06-01 09:35:41 -0700946See also link:config-gitweb.html[Gitweb Integration].
947
Shawn O. Pearce618dae22010-03-12 19:07:43 -0800948[[gitweb.cgi]]gitweb.cgi::
949+
950Path to the locally installed `gitweb.cgi` executable. This CGI will
951be called by Gerrit Code Review when the URL `/gitweb` is accessed.
952Project level access controls are enforced prior to calling the CGI.
953+
954Defaults to `/usr/lib/cgi-bin/gitweb.cgi` if gitweb.url is not set.
955
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700956[[gitweb.url]]gitweb.url::
Shawn O. Pearced7ba11f2009-06-01 09:35:41 -0700957+
958Optional URL of an affiliated gitweb service. Defines the
959web location where a `gitweb.cgi` is installed to browse
Shawn O. Pearce9743d0b2009-06-01 10:10:06 -0700960gerrit.basePath and the repositories it contains.
Shawn O. Pearced7ba11f2009-06-01 09:35:41 -0700961+
962Gerrit appends any necessary query arguments onto the end of this URL.
963For example, "?p=$project.git;h=$commit".
964
Shane Mc Cormack27868a42009-12-28 04:49:39 +0000965[[gitweb.type]]gitweb.type::
966+
967Optional type of affiliated gitweb service. This allows using
968alternatives to gitweb, such as cgit.
969+
970Valid values are `gitweb`, `cgit` or `custom`.
971
972[[gitweb.type]]gitweb.revision::
973+
974Optional pattern to use for constructing the gitweb URL when pointing
975at a specific commit when `custom` is used above.
976+
977Valid replacements are `$\{project\}` for the project name in Gerrit
978and `$\{commit\}` for the SHA1 hash for the commit.
979
980[[gitweb.type]]gitweb.project::
981+
982Optional pattern to use for constructing the gitweb URL when pointing
983at a specific project when `custom` is used above.
984+
985Valid replacements are `$\{project\}` for the project name in Gerrit.
986
987[[gitweb.type]]gitweb.branch::
988+
989Optional pattern to use for constructing the gitweb URL when pointing
990at a specific branch when `custom` is used above.
991+
992Valid replacements are `$\{project\}` for the project name in Gerrit
993and `$\{branch\}` for the name of the branch.
994
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -0700995
Shane Mc Cormack6c2b6772010-01-12 21:56:44 +0000996[[hooks]]Section hooks
997~~~~~~~~~~~~~~~~~~~~~~~~
998
999See also link:config-hooks.html[Hooks].
1000
1001[[hooks.path]]hooks.path::
1002+
1003Optional path to hooks, if not specified then `'$site_path'/hooks` will be used.
1004
1005[[hooks.patchsetCreatedHook]]hooks.patchsetCreatedHook::
1006+
1007Optional filename for the patchset created hook, if not specified then
1008`patchset-created` will be used.
1009
1010[[hooks.commentAddedHook]]hooks.commentAddedHook::
1011+
1012Optional filename for the comment added hook, if not specified then
1013`comment-added` will be used.
1014
1015[[hooks.changeMergedHook]]hooks.changeMergedHook::
1016+
1017Optional filename for the change merged hook, if not specified then
1018`change-merged` will be used.
1019
1020[[hooks.changeAbandonedHook]]hooks.changeAbandonedHook::
1021+
1022Optional filename for the change abandoned hook, if not specified then
1023`change-abandoned` will be used.
1024
Shawn O. Pearce309d8d32009-11-17 16:03:16 -08001025[[http]]Section http
1026~~~~~~~~~~~~~~~~~~~~
1027
1028[[http.proxy]]http.proxy::
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001029+
1030URL of the proxy server when making outgoing HTTP
1031connections for OpenID login transactions. Syntax
1032should be `http://`'hostname'`:`'port'.
Shawn O. Pearce309d8d32009-11-17 16:03:16 -08001033
1034[[http.proxyUsername]]http.proxyUsername::
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001035+
1036Optional username to authenticate to the HTTP proxy with.
1037This property is honored only if the username does not
1038appear in the http.proxy property above.
Shawn O. Pearce309d8d32009-11-17 16:03:16 -08001039
1040[[http.proxyPassword]]http.proxyPassword::
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001041+
1042Optional password to authenticate to the HTTP proxy with.
1043This property is honored only if the password does not
1044appear in the http.proxy property above.
Shawn O. Pearce309d8d32009-11-17 16:03:16 -08001045
1046
1047[[httpd]]Section httpd
1048~~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08001049
1050The httpd section configures the embedded servlet container.
1051
1052[[httpd.listenUrl]]httpd.listenUrl::
1053+
1054Specifies the URLs the internal HTTP daemon should listen for
1055connections on. The special hostname '\*' may be used to listen
1056on all local addresses. A context path may optionally be included,
1057placing Gerrit Code Review's web address within a subdirectory of
1058the server.
1059+
1060Multiple protocol schemes are supported:
1061+
1062* `http://`'hostname'`:`'port'
1063+
1064Plain-text HTTP protocol. If port is not supplied, defaults to 80,
1065the standard HTTP port.
1066+
1067* `https://`'hostname'`:`'port'
1068+
1069SSL encrypted HTTP protocol. If port is not supplied, defaults to
1070443, the standard HTTPS port.
1071+
1072Externally facing production sites are encouraged to use a reverse
1073proxy configuration and `proxy-https://` (below), rather than using
1074the embedded servlet container to implement the SSL processing.
1075The proxy server with SSL support is probably easier to configure,
1076provides more configuration options to control cipher usage, and
1077is likely using natively compiled encryption algorithms, resulting
1078in higher throughput.
1079+
1080* `proxy-http://`'hostname'`:`'port'
1081+
1082Plain-text HTTP relayed from a reverse proxy. If port is not
1083supplied, defaults to 8080.
1084+
1085Like http, but additional header parsing features are
1086enabled to honor X-Forwarded-For, X-Forwarded-Host and
1087X-Forwarded-Server. These headers are typically set by Apache's
1088link:http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#x-headers[mod_proxy].
1089+
1090* `proxy-https://`'hostname'`:`'port'
1091+
1092Plain text HTTP relayed from a reverse proxy that has already
1093handled the SSL encryption/decryption. If port is not supplied,
1094defaults to 8080.
1095+
1096Behaves exactly like proxy-http, but also sets the scheme to assume
1097'https://' is the proper URL back to the server.
1098
1099+
1100If multiple values are supplied, the daemon will listen on all
1101of them.
1102+
1103By default, http://*:8080.
1104
1105[[httpd.reuseAddress]]httpd.reuseAddress::
1106+
1107If true, permits the daemon to bind to the port even if the port
1108is already in use. If false, the daemon ensures the port is not
1109in use before starting. Busy sites may need to set this to true
1110to permit fast restarts.
1111+
1112By default, true.
1113
1114[[httpd.requestHeaderSize]]httpd.requestHeaderSize::
1115+
1116Size, in bytes, of the buffer used to parse the HTTP headers of an
1117incoming HTTP request. The entire request headers, including any
1118cookies sent by the browser, must fit within this buffer, otherwise
1119the server aborts with the response '413 Request Entity Too Large'.
1120+
1121One buffer of this size is allocated per active connection.
1122Allocating a buffer that is too large wastes memory that cannot be
1123reclaimed, allocating a buffer that is too small may cause unexpected
1124errors caused by very long Referer URLs or large cookie values.
1125+
1126By default, 16384 (16 K), which is sufficient for most OpenID and
1127other web-based single-sign-on integrations.
1128
1129[[httpd.sslKeyStore]]httpd.sslKeyStore::
1130+
1131Path of the Java keystore containing the server's SSL certificate
1132and private key. This keystore is required for `https://` in URL.
1133+
1134To create a self-signed certificate for simple internal usage:
1135+
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001136----
1137keytool -keystore keystore -alias jetty -genkey -keyalg RSA
1138chmod 600 keystore
1139----
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08001140+
1141If not absolute, the path is resolved relative to `$site_path`.
1142+
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08001143By default, `$site_path/etc/keystore`.
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08001144
1145[[httpd.sslKeyPassword]]httpd.sslKeyPassword::
1146+
1147Password used to decrypt the private portion of the sslKeyStore.
1148Java key stores require a password, even if the administrator
1149doesn't want to enable one.
1150+
1151If set to the empty string the embedded server will prompt for the
1152password during startup.
1153+
1154By default, `gerrit`.
1155
Shawn O. Pearce1766f502010-01-15 10:49:46 -08001156[[httpd.requestLog]]httpd.requestLog::
1157+
1158Enable (or disable) the `'$site_path'/logs/httpd_log` request log.
1159If enabled, an NCSA combined log format request log file is written
1160out by the internal HTTP daemon.
1161+
1162By default, true if httpd.listenUrl uses http:// or https://,
1163and false if httpd.listenUrl uses proxy-http:// or proxy-https://.
1164
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08001165[[httpd.acceptorThreads]]httpd.acceptorThreads::
1166+
1167Number of worker threads dedicated to accepting new incoming TCP
1168connections and allocate them connection-specific resources.
1169+
1170By default, 2, which should be suitable for most high-traffic sites.
1171
1172[[httpd.minThreads]]httpd.minThreads::
1173+
1174Minimum number of spare threads to keep in the worker thread pool.
1175This number must be at least 1 larger than httpd.acceptorThreads
1176multipled by the number of httpd.listenUrls configured.
1177+
1178By default, 5, suitable for most lower-volume traffic sites.
1179
1180[[httpd.maxThreads]]httpd.maxThreads::
1181+
1182Maximum number of threads to permit in the worker thread pool.
1183+
1184By default 25, suitable for most lower-volume traffic sites.
1185
1186[[httpd.maxQueued]]httpd.maxQueued::
1187+
1188Maximum number of client connections which can enter the worker
1189thread pool waiting for a worker thread to become available.
11900 disables the queue and permits infinite number of connections.
1191+
1192By default 50.
1193
Shawn O. Pearcee5452b72010-01-15 14:32:50 -08001194[[httpd.maxWait]]httpd.maxWait::
1195+
1196Maximum amount of time a client will wait to for an available
1197thread to handle a project clone, fetch or push request over the
1198smart HTTP transport.
1199+
1200Values should use common unit suffixes to express their setting:
1201+
1202* s, sec, second, seconds
1203* m, min, minute, minutes
1204* h, hr, hour, hours
1205* d, day, days
1206* w, week, weeks (`1 week` is treated as `7 days`)
1207* mon, month, months (`1 month` is treated as `30 days`)
1208* y, year, years (`1 year` is treated as `365 days`)
1209
1210+
1211If a unit suffix is not specified, `minutes` is assumed. If 0
1212is supplied, the maximum age is infinite and connections will not
1213abort until the client disconnects.
1214+
1215By default, 5 minutes.
1216
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08001217
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -07001218[[ldap]]Section ldap
1219~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001220
1221LDAP integration is only enabled if `auth.type` was set to
Sasa Zivkoveabc8972010-10-04 15:47:08 +02001222`HTTP_LDAP`, `LDAP` or `CLIENT_SSL_CERT_LDAP`. See above for a
1223detailed description of the auth.type settings and their
1224implications.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001225
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07001226An example LDAP configuration follows, and then discussion of
1227the parameters introduced here. Suitable defaults for most
1228parameters are automatically guessed based on the type of server
1229detected during startup. The guessed defaults support both
1230link:http://www.ietf.org/rfc/rfc2307.txt[RFC 2307] and Active
1231Directory.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001232
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001233----
1234[ldap]
1235 server = ldap://ldap.example.com
1236
1237 accountBase = ou=people,dc=example,dc=com
1238 accountPattern = (&(objectClass=person)(uid=${username}))
1239 accountFullName = displayName
1240 accountEmailAddress = mail
1241
1242 groupBase = ou=groups,dc=example,dc=com
1243 groupMemberPattern = (&(objectClass=group)(member=${dn}))
1244----
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001245
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001246[[ldap.server]]ldap.server::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001247+
1248URL of the organization's LDAP server to query for user information
1249and group membership from. Must be of the form `ldap://host` or
1250`ldaps://host` to bind with either a plaintext or SSL connection.
Shawn O. Pearcef7e065e2009-09-26 20:01:10 -07001251+
1252If auth.type is `LDAP` this setting should use `ldaps://` to
1253ensure the end user's plaintext password is transmitted only over
1254an encrypted connection.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001255
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07001256[[ldap.sslVerify]]ldap.sslVerify::
1257+
1258If false and ldap.server is an `ldaps://` style URL, Gerrit
1259will not verify the server certificate when it connects to
1260perform a query.
1261+
1262By default, true, requiring the certificate to be verified.
1263
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001264[[ldap.username]]ldap.username::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001265+
1266_(Optional)_ Username to bind to the LDAP server with. If not set,
1267an anonymous connection to the LDAP server is attempted.
1268
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001269[[ldap.password]]ldap.password::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001270+
1271_(Optional)_ Password for the user identified by `ldap.username`.
1272If not set, an anonymous (or passwordless) connection to the LDAP
1273server is attempted.
1274
Ben Wu0410a152010-06-04 16:17:24 +08001275[[ldap.referral]]ldap.referral::
1276+
1277_(Optional)_ How an LDAP referral should be handled if it is
1278encountered during directory traversal. Set to `follow` to
1279automatically follow any referrals, or `ignore` to stop and fail
1280with `javax.naming.PartialResultException: Unprocessed Continuation
1281Reference(s)`
1282+
1283By default, `ignore`.
1284
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001285[[ldap.accountBase]]ldap.accountBase::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001286+
1287Root of the tree containing all user accounts. This is typically
1288of the form `ou=people,dc=example,dc=com`.
1289
Shawn O. Pearce304ccdb2009-08-25 12:25:27 -07001290[[ldap.accountScope]]ldap.accountScope::
1291+
1292Scope of the search performed for accounts. Must be one of:
1293+
1294* `one`: Search only one level below accountBase, but not recursive
1295* `sub` or `subtree`: Search recursively below accountBase
1296* `base` or `object`: Search exactly accountBase; probably not desired
1297
1298+
1299Default is `subtree` as many directories have several levels.
1300
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001301[[ldap.accountPattern]]ldap.accountPattern::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001302+
1303Query pattern to use when searching for a user account. This may be
1304any valid LDAP query expression, including the standard `(&...)` and
1305`(|...)` operators. If auth.type is `HTTP_LDAP` then the variable
1306`$\{username\}` is replaced with a parameter set to the username
Shawn O. Pearcef7e065e2009-09-26 20:01:10 -07001307that was supplied by the HTTP server. If auth.type is `LDAP` then
1308the variable `$\{username\}` is replaced by the string entered by
1309the end user.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001310+
1311This pattern is used to search the objects contained directly under
1312the `ldap.accountBase` tree. A typical setting for this parameter
1313is `(uid=$\{username\})` or `(cn=$\{username\})`, but the proper
1314setting depends on the LDAP schema used by the directory server.
1315+
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07001316Default is `(uid=$\{username\})` for RFC 2307 servers,
1317and `(&(objectClass=user)(sAMAccountName=${username}))`
1318for Active Directory.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001319
Shawn O. Pearce37dc1f82009-08-19 09:49:07 -07001320[[ldap.accountFullName]]ldap.accountFullName::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001321+
1322_(Optional)_ Name of an attribute on the user account object which
1323contains the initial value for the user's full name field in Gerrit.
1324Typically this is the `displayName` property in LDAP, but could
1325also be `legalName` or `cn`.
1326+
Shawn O. Pearceb86ae002009-09-26 16:54:05 -07001327Attribute values may be concatenated with literal strings, for
1328example to join given name and surname together use the pattern
1329`$\{givenName\} $\{SN\}`.
1330+
Shawn O. Pearce3ca1dcf2009-08-20 08:56:23 -07001331If set, users will be unable to modify their full name field, as
1332Gerrit will populate it only from the LDAP data.
1333+
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07001334Default is `displayName` for RFC 2307 servers,
1335and `${givenName} ${sn}` for Active Directory.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001336
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001337[[ldap.accountEmailAddress]]ldap.accountEmailAddress::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001338+
1339_(Optional)_ Name of an attribute on the user account object which
1340contains the user's Internet email address, as defined by this
1341LDAP server.
1342+
Shawn O. Pearceb86ae002009-09-26 16:54:05 -07001343Attribute values may be concatenated with literal strings,
1344for example to set the email address to the lowercase form
1345of sAMAccountName followed by a constant domain name, use
1346`$\{sAMAccountName.toLowerCase\}@example.com`.
1347+
Shawn O. Pearce3ca1dcf2009-08-20 08:56:23 -07001348If set, the preferred email address will be prefilled from LDAP,
1349but users may still be able to register additional email address,
1350and select a different preferred email address.
1351+
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07001352Default is `mail`.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001353
Shawn O. Pearce59e09222009-08-19 09:04:49 -07001354[[ldap.accountSshUserName]]ldap.accountSshUserName::
1355+
1356_(Optional)_ Name of an attribute on the user account object which
1357contains the initial value for the user's SSH username field in
1358Gerrit. Typically this is the `uid` property in LDAP, but could
1359also be `cn`. Administrators should prefer to match the attribute
1360corresponding to the user's workstation username, as this is what
1361SSH clients will default to.
1362+
Shawn O. Pearceb86ae002009-09-26 16:54:05 -07001363Attribute values may also be forced to lowercase, or to uppercase in
1364an expression. For example, `$\{sAMAccountName.toLowerCase\}` will
1365force the value of sAMAccountName, if defined, to be all lowercase.
1366The suffix `.toUpperCase` can be used for the other direction.
1367The suffix `.localPart` can be used to split attribute values of
1368the form 'user@example.com' and return only the left hand side, for
1369example `$\{userPrincipalName.localPart\}` would provide only 'user'.
1370+
Shawn O. Pearce3ca1dcf2009-08-20 08:56:23 -07001371If set, users will be unable to modify their SSH username field, as
1372Gerrit will populate it only from the LDAP data.
1373+
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07001374Default is `uid` for RFC 2307 servers,
1375and `${sAMAccountName.toLowerCase}` for Active Directory.
Shawn O. Pearce59e09222009-08-19 09:04:49 -07001376
Shawn O. Pearce7d25f782009-10-30 08:01:03 -07001377[[ldap.accountMemberField]]ldap.accountMemberField::
Anthony93de7db2009-10-03 10:01:50 -04001378+
1379_(Optional)_ Name of an attribute on the user account object which
Shawn O. Pearce7d25f782009-10-30 08:01:03 -07001380contains the groups the user is part of. Typically used for Active
1381Directory servers.
Anthony93de7db2009-10-03 10:01:50 -04001382+
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07001383Default is unset for RFC 2307 servers (disabled)
1384and `memberOf` for Active Directory.
Anthony93de7db2009-10-03 10:01:50 -04001385
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001386[[ldap.groupBase]]ldap.groupBase::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001387+
1388Root of the tree containing all group objects. This is typically
1389of the form `ou=groups,dc=example,dc=com`.
1390
Shawn O. Pearce304ccdb2009-08-25 12:25:27 -07001391[[ldap.groupScope]]ldap.groupScope::
1392+
1393Scope of the search performed for group objects. Must be one of:
1394+
1395* `one`: Search only one level below groupBase, but not recursive
1396* `sub` or `subtree`: Search recursively below groupBase
1397* `base` or `object`: Search exactly groupBase; probably not desired
1398
1399+
1400Default is `subtree` as many directories have several levels.
1401
Shawn O. Pearce7d25f782009-10-30 08:01:03 -07001402[[ldap.groupPattern]]ldap.groupPattern::
1403+
1404Query pattern used when searching for an LDAP group to connect
1405to a Gerrit group. This may be any valid LDAP query expression,
1406including the standard `(&...)` and `(|...)` operators. The variable
1407`$\{groupname\}` is replaced with the search term supplied by the
1408group owner.
1409+
1410Default is `(cn=$\{groupname\})` for RFC 2307,
1411and `(&(objectClass=group)(cn=$\{groupname\}))` for Active Directory.
1412
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001413[[ldap.groupMemberPattern]]ldap.groupMemberPattern::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001414+
1415Query pattern to use when searching for the groups that a user
1416account is currently a member of. This may be any valid LDAP query
1417expression, including the standard `(&...)` and `(|...)` operators.
1418+
1419If auth.type is `HTTP_LDAP` then the variable `$\{username\}` is
1420replaced with a parameter set to the username that was supplied
1421by the HTTP server. Other variables appearing in the pattern,
1422such as `$\{fooBarAttribute\}`, are replaced with the value of the
1423corresponding attribute (in this case, `fooBarAttribute`) as read
1424from the user's account object matched under `ldap.accountBase`.
1425Attributes such as `$\{dn\}` or `$\{uidNumber\}` may be useful.
1426+
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07001427Default is `(memberUid=$\{username\})` for RFC 2307,
1428and unset (disabled) for Active Directory.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001429
1430
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -07001431[[mimetype]]Section mimetype
1432~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearce01cb11902009-07-15 08:19:01 -07001433
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001434[[mimetype.name.safe]]mimetype.<name>.safe::
Shawn O. Pearce01cb11902009-07-15 08:19:01 -07001435+
1436If set to true, files with the MIME type `<name>` will be sent as
1437direct downloads to the user's browser, rather than being wrapped up
1438inside of zipped archives. The type name may be a complete type
1439name, e.g. `image/gif`, a generic media type, e.g. `image/\*`,
1440or the wildcard `\*/*` to match all types.
1441+
1442By default, false for all MIME types.
1443
1444Common examples:
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001445----
1446[mimetype "image/*"]
1447 safe = true
1448
1449[mimetype "application/pdf"]
1450 safe = true
1451
1452[mimetype "application/msword"]
1453 safe = true
1454
1455[mimetype "application/vnd.ms-excel"]
1456 safe = true
1457----
Shawn O. Pearce01cb11902009-07-15 08:19:01 -07001458
Shawn O. Pearce5f11b292010-08-05 17:57:35 -07001459
1460[[pack]]Section pack
1461~~~~~~~~~~~~~~~~~~~~
1462Global settings controlling how Gerrit Code Review creates pack
1463streams for Git clients running clone, fetch, or pull. Most of these
1464variables are per-client request, and thus should be carefully set
1465given the expected concurrent request load and available CPU and
1466memory resources.
1467
1468[[pack.deltacompression]]pack.deltacompression::
1469+
1470If true, delta compression between objects is enabled. This may
1471result in a smaller overall transfer for the client, but requires
1472more server memory and CPU time.
1473+
1474False (off) by default, matching Gerrit Code Review 2.1.4.
1475
1476[[pack.threads]]pack.threads::
1477+
1478Maximum number of threads to use for delta compression (if enabled).
1479This is per-client request. If set to 0 then the number of CPUs is
1480auto-detected and one thread per CPU is used, per client request.
1481+
1482By default, 1.
1483
1484
lincoln2be11602010-07-05 10:53:25 -03001485[[receive]]Section receive
1486~~~~~~~~~~~~~~~~~~~~~~~~~~
1487Sets the group of users allowed to execute 'receive-pack' on the
1488server, 'receive-pack' is what runs on the server during a user's
1489push or repo upload command.
1490
1491----
1492[receive]
1493 allowGroup = GROUP_ALLOWED_TO_EXECUTE
1494 allowGroup = YET_ANOTHER_GROUP_ALLOWED_TO_EXECUTE
1495----
1496
1497[[receive.allowGroup]]receive.allowGroup::
1498+
1499Name of the groups of users that are allowed to execute
1500'receive-pack' on the server. One or more groups can be set.
1501+
1502If no groups are added, any user will be allowed to execute
1503'receive-pack' on the server.
1504
1505
Hugo Josefson072b4702010-04-21 19:27:11 +02001506[[repository]]Section repository
1507~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1508Repositories in this sense are the same as projects.
1509
Shawn O. Pearce897d9212011-06-16 16:59:59 -07001510In the following example configuration `Registered Users` is set
1511to be the default owner of new projects.
Hugo Josefson072b4702010-04-21 19:27:11 +02001512
1513----
1514[repository "*"]
Hugo Josefson072b4702010-04-21 19:27:11 +02001515 ownerGroup = Registered Users
1516----
1517
1518[NOTE]
1519Currently only the repository name `*` is supported.
1520This is a wildcard designating all repositories.
1521
Hugo Josefson072b4702010-04-21 19:27:11 +02001522[[repository.name.ownerGroup]]repository.<name>.ownerGroup::
1523+
1524A name of a group which exists in the database. Zero, one or many
1525groups are allowed. Each on its own line. Groups which don't exist
1526in the database are ignored.
Hugo Josefson072b4702010-04-21 19:27:11 +02001527
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -07001528[[sendemail]]Section sendemail
1529~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07001530
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001531[[sendemail.enable]]sendemail.enable::
Shawn O. Pearce2e4573b2009-06-02 09:09:50 -07001532+
1533If false Gerrit will not send email messages, for any reason,
1534and all other properties of section sendemail are ignored.
1535+
1536By default, true, allowing notifications to be sent.
1537
Shawn O. Pearce5c31bd72009-09-10 18:13:33 -07001538[[sendemail.from]]sendemail.from::
1539+
1540Designates what name and address Gerrit will place in the From
1541field of any generated email messages. The supported values are:
1542+
1543* `USER`
1544+
1545Gerrit will set the From header to use the current user's
1546Full Name and Preferred Email. This may cause messsages to be
1547classified as spam if the user's domain has SPF or DKIM enabled
1548and <<sendemail.smtpServer,sendemail.smtpServer>> is not a trusted
1549relay for that domain.
1550+
1551* `MIXED`
1552+
1553Shorthand for `$\{user\} (Code Review) <review@example.com>` where
1554`review@example.com` is the same as <<user.email,user.email>>.
1555See below for a description of how the replacement is handled.
1556+
1557* `SERVER`
1558+
1559Gerrit will set the From header to the same name and address
1560it records in any commits Gerrit creates. This is set by
1561<<user.name,user.name>> and <<user.email,user.email>>, or guessed
1562from the local operating system.
1563+
1564* 'Code Review' `<`'review'`@`'example.com'`>`
1565+
1566If set to a name and email address in brackets, Gerrit will use
1567this name and email address for any messages, overriding the name
1568that may have been selected for commits by user.name and user.email.
1569Optionally, the name portion may contain the placeholder `$\{user\}`,
1570which is replaced by the Full Name of the current user.
1571
1572+
1573By default, MIXED.
1574
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001575[[sendemail.smtpServer]]sendemail.smtpServer::
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07001576+
1577Hostname (or IP address) of a SMTP server that will relay
1578messages generated by Gerrit to end users.
1579+
1580By default, 127.0.0.1 (aka localhost).
1581
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001582[[sendemail.smtpServerPort]]sendemail.smtpServerPort::
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07001583+
1584Port number of the SMTP server in sendemail.smtpserver.
1585+
Shawn O. Pearce6e9a83f2009-11-02 10:30:48 -08001586By default, 25, or 465 if smtpEncryption is 'ssl'.
1587
1588[[sendemail.smtpEncryption]]sendemail.smtpEncryption::
1589+
1590Specify the encryption to use, either 'ssl' or 'tls'.
1591+
1592By default, 'none', indicating no encryption is used.
1593
1594[[sendemail.sslVerify]]sendemail.sslVerify::
1595+
1596If false and sendemail.smtpEncryption is 'ssl' or 'tls', Gerrit
1597will not verify the server certificate when it connects to send
1598an email message.
1599+
1600By default, true, requiring the certificate to be verified.
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07001601
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001602[[sendemail.smtpUser]]sendemail.smtpUser::
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07001603+
1604User name to authenticate with, if required for relay.
1605
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001606[[sendemail.smtpPass]]sendemail.smtpPass::
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07001607+
1608Password for the account named by sendemail.smtpUser.
1609
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001610[[sendemail.allowrcpt]]sendemail.allowrcpt::
Shawn O. Pearce219a8ee2009-06-01 18:13:57 -07001611+
1612If present, each value adds one entry to the whitelist of email
1613addresses that Gerrit can send email to. If set to a complete
1614email address, that one address is added to the white list.
1615If set to a domain name, any address at that domain can receive
1616email from Gerrit.
1617+
1618By default, unset, permitting delivery to any email address.
1619
Alex Blewitt9cca7402011-02-11 01:39:30 +00001620[[sendemail.importance]]sendemail.importance::
1621+
1622If present, emails sent from Gerrit will have the given level
1623of importance. Valid values include 'high' and 'low', which
1624email clients will render in different ways.
1625+
1626By default, unset, so no Importance header is generated.
1627
1628[[sendemail.expiryDays]]sendemail.expiryDays::
1629+
1630If present, emails sent from Gerrit will expire after the given
1631number of days. This will add the Expiry-Date header and
1632email clients may expire or expunge mails whose Expiry-Date
1633header is in the past. This should be a positive non-zero
1634number indicating how many days in the future the mails
1635should expire.
1636+
1637By default, unset, so no Expiry-Date header is generated.
1638
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -07001639[[sshd]] Section sshd
Shawn O. Pearcea758fef2009-08-19 08:29:32 -07001640~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearce9410f2c2009-05-14 10:26:47 -07001641
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001642[[sshd.listenAddress]]sshd.listenAddress::
Shawn O. Pearce1d3cb4442009-05-30 14:03:31 -07001643+
1644Specifies the local addresses the internal SSHD should listen
1645for connections on. The following forms may be used to specify
1646an address. In any form, `:'port'` may be omitted to use the
1647default of 29418.
1648+
1649* 'hostname':'port' (for example `review.example.com:29418`)
1650* 'IPv4':'port' (for example `10.0.0.1:29418`)
1651* ['IPv6']:'port' (for example `[ff02::1]:29418`)
1652* \*:'port' (for example `*:29418`)
1653
1654+
1655If multiple values are supplied, the daemon will listen on all
1656of them.
1657+
1658By default, *:29418.
1659
Shawn O. Pearce149238a2009-09-10 12:25:20 -07001660[[sshd.reuseAddress]]sshd.reuseAddress::
Shawn O. Pearce9410f2c2009-05-14 10:26:47 -07001661+
1662If true, permits the daemon to bind to the port even if the port
1663is already in use. If false, the daemon ensures the port is not
1664in use before starting. Busy sites may need to set this to true
1665to permit fast restarts.
1666+
1667By default, true.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -07001668
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001669[[sshd.tcpKeepAlive]]sshd.tcpKeepAlive::
Shawn O. Pearcefc9081f2009-05-14 10:26:59 -07001670+
1671If true, enables TCP keepalive messages to the other side, so
1672the daemon can terminate connections if the peer disappears.
1673+
1674By default, true.
1675
Shawn O. Pearce1a4580b2009-11-19 17:37:10 -08001676[[sshd.threads]]sshd.threads::
1677+
1678Number of threads to use when executing SSH command requests.
1679If additional requests are received while all threads are busy they
1680are queued and serviced in a first-come-first-serve order.
1681+
1682By default, 1.5x the number of CPUs available to the JVM.
1683
Nico Sallembienfc53f7f2010-05-18 16:40:10 -07001684[[sshd.batchThreads]]sshd.batchThreads::
1685+
1686Number of threads to allocate for SSH command requests from
1687non-interactive users. If equals to 0, then all non-interactive
1688requests are executed in the same queue as interactive requests.
1689+
1690Any other value will remove the number of threads from the queue
1691allocated to interactive users, and create a separate thread pool
1692of the requested size, which will be used to run commands from
1693non-interactive users.
1694+
1695If the number of threads requested for non-interactive users is larger
1696than the total number of threads allocated in sshd.threads, then the
1697value of sshd.threads is increased to accomodate the requested value.
1698+
1699By default, 0.
1700
Kenny Root15ac1b82010-02-24 00:29:20 -08001701[[sshd.streamThreads]]sshd.streamThreads::
1702+
1703Number of threads to use when formatting events to asynchronous
1704streaming clients. Event formatting is multiplexed onto this thread
1705pool by a simple FIFO scheduling system.
1706+
1707By default, 1 plus the number of CPUs available to the JVM.
1708
Shawn O. Pearced6296552011-05-15 13:56:30 -07001709[sshd.commandStartThreads]]sshd.commandStartThreads::
1710+
1711Number of threads used to parse a command line submitted by a client
1712over SSH for execution, create the internal data structures used by
1713that command, and schedule it for execution on another thread.
1714+
1715By default, 2.
1716
Shawn O. Pearce8a0bf362010-11-05 17:49:41 -07001717[[sshd.maxAuthTries]]sshd.maxAuthTries::
1718+
1719Maximum number of authentication attempts before the server
1720disconnects the client. Each public key that a client has loaded
1721into its local agent counts as one auth request. Users can work
1722around the server's limit by loading less keys into their agent,
1723or selecting a specific key in their `~/.ssh/config` file with
1724the `IdentityFile` option.
1725+
1726By default, 6.
1727
1728[[sshd.loginGraceTime]]sshd.loginGraceTime::
1729+
1730Time in seconds that a client has to authenticate before the server
1731automatically terminates their connection. Values should use common
1732unit suffixes to express their setting:
1733+
1734* s, sec, second, seconds
1735* m, min, minute, minutes
1736* h, hr, hour, hours
1737* d, day, days
1738
1739+
1740By default, 2 minutes.
1741
1742[[sshd.maxConnectionsPerUser]]sshd.maxConnectionsPerUser::
1743+
1744Maximum number of concurrent SSH sessions that a user account
1745may open at one time. This is the number of distinct SSH logins
1746the each user may have active at one time, and is not related to
1747the number of commands a user may issue over a single connection.
1748If set to 0, there is no limit.
1749+
1750By default, 64.
1751
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001752[[sshd.cipher]]sshd.cipher::
Shawn O. Pearce0bf2f522009-05-14 11:02:03 -07001753+
1754Available ciphers. To permit multiple ciphers, specify multiple
1755`sshd.cipher` keys in the configuration file, one cipher name
1756per key. Cipher names starting with `+` are enabled in addition
1757to the default ciphers, cipher names starting with `-` are removed
1758from the default cipher set.
1759+
1760Supported ciphers: aes128-cbc, aes128-cbc, aes256-cbc, blowfish-cbc,
17613des-cbc, none.
1762+
1763By default, all supported ciphers except `none` are available.
1764
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001765[[sshd.mac]]sshd.mac::
Shawn O. Pearce0bf2f522009-05-14 11:02:03 -07001766+
1767Available MAC (message authentication code) algorithms. To permit
1768multiple algorithms, specify multiple `sshd.mac` keys in the
1769configuration file, one MAC per key. MAC names starting with `+`
1770are enabled in addition to the default MACs, MAC names starting with
1771`-` are removed from the default MACs.
1772+
1773Supported MACs: hmac-md5, hmac-md5-96, hmac-sha1, hmac-sha1-96.
1774+
1775By default, all supported MACs are available.
1776
Shawn O. Pearce07bd6fb2011-04-29 19:15:47 -07001777[[suggest]] Section suggest
1778~~~~~~~~~~~~~~~~~~~~~~~~~~~
1779
1780[[suggest.accounts]]::
1781+
1782If `ALL`, all matching user accounts will be offered as
1783completion suggestions when adding a reviewer to a change,
1784or a user to a group.
1785+
1786If `SAME_GROUP`, only users who are also members of a group the
1787current user is a member of will be offered.
1788+
Edwin Kempin42488812011-05-20 03:11:43 +02001789If `VISIBLE_GROUP`, only users who are members of at least one group
1790that is visible to the current user will be offered.
1791+
Shawn O. Pearce07bd6fb2011-04-29 19:15:47 -07001792If `OFF`, no account suggestions are given.
1793+
1794Default is `ALL`.
1795
Shawn O. Pearce2ba3ab42010-02-25 12:10:10 -08001796[[theme]] Section theme
1797~~~~~~~~~~~~~~~~~~~~~~~
1798
1799[[theme.backgroundColor]]theme.backgroundColor::
1800+
1801Background color for the page, and major data tables like the all
1802open changes table or the account dashboard. The value must be a
1803valid HTML hex color code, or standard color name.
1804+
Shawn O. Pearce9ca8ae32011-05-24 08:28:40 -07001805By default `FCFEEF` (a creme color) for signed-out theme and white
1806(`FFFFFF`) for signed-in theme.
Shawn O. Pearce2ba3ab42010-02-25 12:10:10 -08001807
1808[[theme.topMenuColor]]theme.topMenuColor::
1809+
1810This is the color of the main menu bar at the top of the page.
1811The value must be a valid HTML hex color code, or standard color
1812name. The value defaults to <<theme.trimColor,trimColor>>.
1813
1814[[theme.textColor]]theme.textColor::
1815+
1816Text color for the page, and major data tables like the all
1817open changes table or the account dashboard. The value must be a
1818valid HTML hex color code, or standard color name.
1819+
1820By default black, `000000`.
1821
1822[[theme.trimColor]]theme.trimColor::
1823+
1824Primary color used as a background color behind text. This is
1825the color of the main menu bar at the top, of table headers,
1826and of major UI areas that we want to offset from other portions
1827of the page. The value must be a valid HTML hex color code, or
1828standard color name.
1829+
1830By default a shade of green, `D4E9A9`.
1831
1832[[theme.selectionColor]]theme.selectionColor::
1833+
1834Background color used within a trimColor area to denote the currently
1835selected tab, or the background color used in a table to denote the
1836currently selected row. The value must be a valid HTML hex color
1837code, or standard color name.
1838+
1839By default a shade of yellow, `FFFFCC`.
1840
Shawn O. Pearcea83bb1c2011-05-20 08:46:48 -07001841A different theme may be used for signed-in vs. signed-out user status
1842by using the "signed-in" and "signed-out" theme sections. Variables
1843not specified in a section are inherited from the default theme.
1844
1845----
1846[theme]
1847 backgroundColor = FFFFFF
1848[theme "signed-in"]
1849 backgroundColor = C0C0C0
1850[theme "signed-out"]
1851 backgroundColor = 00FFFF
1852----
1853
Goran Lungberg04132a12010-06-15 17:20:37 -07001854[[trackingid]] Section trackingid
Shawn O. Pearce91763a02010-06-16 15:39:33 -07001855~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Goran Lungberg04132a12010-06-15 17:20:37 -07001856
Shawn O. Pearcee800b1e2010-06-16 17:33:43 -07001857Tagged footer lines containing references to external
1858tracking systems, parsed out of the commit message and
1859saved in Gerrit's database. After making changes to
1860this section, existing changes must be reindexed with the
1861link:pgm-ScanTrackingIds.html[ScanTrackingIds] program.
Goran Lungberg04132a12010-06-15 17:20:37 -07001862
Shawn O. Pearce91763a02010-06-16 15:39:33 -07001863The tracking ids are serachable using tr:<tracking id> or
1864bug:<tracking id>.
Goran Lungberg04132a12010-06-15 17:20:37 -07001865
1866----
1867[trackingid "jira-bug"]
1868 footer = Bugfix:
1869 match = JRA\\d{2,8}
1870 system = JIRA
1871
1872[trackingid "jira-feature"]
1873 footer = Feature
1874 match = JRA(\\d{2,8})
1875 system = JIRA
1876----
1877
1878[[trackingid.name.footer]]trackingid.<name>.footer::
1879+
1880A prefix tag that identify the footer line to parse for tracking ids.
1881Several trakingid entries can have the same footer tag.
1882(the trailing ":" is optional)
1883
1884[[trackingid.name.match]]trackingid.<name>.match::
1885+
Magnus Bäcke5611832011-02-02 08:57:15 +01001886A link:http://download.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html[standard
1887Java regular expression (java.util.regex)] used to match the
1888external tracking id part of the footer line. The match can
1889result in several entries in the DB. If grouping is used in the
1890regex the first group will be interpreted as the tracking id.
1891Tracking ids > 20 char will be ignored.
Goran Lungberg04132a12010-06-15 17:20:37 -07001892+
1893The configuration file parser eats one level of backslashes, so the
1894character class `\s` requires `\\s` in the configuration file. The
1895parser also terminates the line at the first `#`, so a match
1896expression containing # must be wrapped in double quotes.
1897
1898[[trackingid.name.system]]trackingid.<name>.system::
1899+
1900The name of the external tracking system(max 10 char).
1901It is possible to have several trackingid entries for the same
1902tracking system.
1903
Shawn O. Pearce6e4dfdd2010-05-12 17:26:08 -07001904[[transfer]] Section transfer
1905~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1906
1907[[transfer.timeout]]transfer.timeout::
1908+
1909Number of seconds to wait for a single network read or write
1910to complete before giving up and declaring the remote side is
1911not responding. If 0, there is no timeout, and this server will
1912wait indefinitely for a transfer to finish.
1913+
1914A timeout should be large enough to mostly transfer the objects to
1915the other side. 1 second may be too small for larger projects,
1916especially over a WAN link, while 10-30 seconds is a much more
1917reasonable timeout value.
1918+
1919Defaults to 0 seconds, wait indefinitely.
1920
lincoln2be11602010-07-05 10:53:25 -03001921
1922[[upload]]Section upload
1923~~~~~~~~~~~~~~~~~~~~~~~~~~
1924Sets the group of users allowed to execute 'upload-pack' on the
1925server, 'upload-pack' is what runs on the server during a user's
1926fetch, clone or repo sync command.
1927
1928----
1929[upload]
1930 allowGroup = GROUP_ALLOWED_TO_EXECUTE
1931 allowGroup = YET_ANOTHER_GROUP_ALLOWED_TO_EXECUTE
1932----
1933
1934[[upload.allowGroup]]upload.allowGroup::
1935+
1936Name of the groups of users that are allowed to execute 'upload-pack'
1937on the server. One or more groups can be set.
1938+
1939If no groups are added, any user will be allowed to execute
1940'upload-pack' on the server.
1941
1942
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -07001943[[user]] Section user
Shawn O. Pearcea758fef2009-08-19 08:29:32 -07001944~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearce0a351912009-06-01 08:14:46 -07001945
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001946[[user.name]]user.name::
Shawn O. Pearce0a351912009-06-01 08:14:46 -07001947+
1948Name that Gerrit calls itself in Git when it creates a new Git
1949commit, such as a merge during change submission.
1950+
1951By default this is "Gerrit Code Review".
1952
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001953[[user.email]]user.email::
Shawn O. Pearce0a351912009-06-01 08:14:46 -07001954+
1955Email address that Gerrit refers to itself as when it creates a
1956new Git commit, such as a merge commit during change submission.
1957+
1958If not set, Gerrit generates this as "gerrit@`hostname`", where
1959`hostname` is the hostname of the system Gerrit is running on.
1960+
1961By default, not set, generating the value at startup.
1962
Shawn O. Pearce0bf2f522009-05-14 11:02:03 -07001963
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08001964File `etc/secure.config`
1965-------------------------
1966The optional file `'$site_path'/etc/secure.config` overrides (or
1967supplements) the settings supplied by `'$site_path'/etc/gerrit.config`.
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08001968The file should be readable only by the daemon process and can be
1969used to contain private configuration entries that wouldn't normally
1970be exposed to everyone.
1971
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08001972Sample `etc/secure.config`:
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08001973----
1974[database]
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001975 username = webuser
1976 password = s3kr3t
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08001977
1978[ldap]
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001979 password = l3tm3srch
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08001980
1981[httpd]
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001982 sslKeyPassword = g3rr1t
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08001983
1984[sendemail]
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001985 smtpPass = sp@m
Shawn O. Pearce7929d872011-05-15 13:33:15 -07001986
1987[remote "bar"]
1988 password = s3kr3t
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08001989----
1990
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08001991File `etc/replication.config`
1992-----------------------------
Shawn O. Pearce7b405712009-05-08 18:27:53 -07001993
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08001994The optional file `'$site_path'/etc/replication.config` controls how
Shawn O. Pearce7b405712009-05-08 18:27:53 -07001995Gerrit automatically replicates changes it makes to any of the Git
1996repositories under its control.
1997
1998* link:config-replication.html[Git Replication/Mirroring]
1999
2000Database system_config
2001----------------------
2002
2003Several columns in the `system_config` table within the metadata
2004database may be set to control how Gerrit behaves.
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08002005
2006[NOTE]
2007The contents of the `system_config` table are cached at startup
2008by Gerrit. If you modify any columns in this table, Gerrit needs
2009to be restarted before it will use the new values.
2010
Shawn O. Pearce7b405712009-05-08 18:27:53 -07002011Configurable Parameters
2012~~~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08002013
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07002014site_path::
2015+
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08002016Local filesystem directory holding the site customization assets.
2017Placing this directory under version control and/or backup is a
2018good idea.
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07002019+
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08002020Files in this directory provide additional configuration.
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07002021+
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08002022Other files support site customization.
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07002023+
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08002024* link:config-headerfooter.html[Site Header/Footer]
Shawn O. Pearcee7ec0532009-05-08 09:42:54 -07002025* link:config-replication.html[Git Replication/Mirroring]
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08002026
Shawn O. Pearce7b405712009-05-08 18:27:53 -07002027Not User Serviceable
2028~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08002029
2030These fields generally shouldn't be modified.
2031
Shawn O. Pearcec7f88012009-08-19 08:32:51 -07002032register_email_private_key::
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07002033+
Shawn O. Pearcec7f88012009-08-19 08:32:51 -07002034Private key used to sign the links emailed to users when they
2035request to register a new email address on their user account.
2036When the link is activated, the private key authenticates the link
2037was created and sent by this Gerrit server, proving that the user
2038can receive email at the address they are registering.
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07002039+
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08002040This column is automatically generated when the database is
2041initialized. Changing it to a new value would cause all current
Shawn O. Pearcec7f88012009-08-19 08:32:51 -07002042links to be invalidated.
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07002043+
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08002044Changing it is not recommended.
2045
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07002046admin_group_id::
2047+
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08002048Unique identity of the group with full privileges. Any user who
2049is a member of this group may manage any other group, any project,
2050and other system settings over the web.
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07002051+
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08002052This is initialized by Gerrit to be the "Administrators" group.
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07002053+
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08002054Changing it is not recommended.
2055
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07002056anonymous_group_id::
2057+
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08002058Unique identity of the group for anonymous (not authenticated) users.
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07002059+
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08002060All users are a member of this group, whether or not they are
2061actually signed in to Gerrit. Any access rights assigned to
2062this group are inherited by all users.
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07002063+
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08002064This is initialized by Gerrit to be the "Anonymous Users" group.
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07002065+
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08002066Changing it is not recommended.
2067
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07002068registered_group_id::
2069+
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08002070Unique identity of the group for all authenticated users.
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07002071+
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08002072All signed-in users are a member of this group. Any access rights
2073assigned to this group are inherited by all users once they have
2074authenticated to Gerrit.
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07002075+
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08002076Since account registration is open and fairly easy to obtain,
2077moving from the "Anonymous Users" group to this group is not
2078very difficult. Caution should be taken when assigning any
2079permissions to this group.
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07002080+
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08002081This is initialized by Gerrit to be the "Registered Users" group.
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07002082+
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08002083Changing it is not recommended.
2084
Shawn O. Pearce5500e692009-05-28 15:55:01 -07002085GERRIT
2086------
2087Part of link:index.html[Gerrit Code Review]