blob: 5a9e33d926b5707513cc08ba0ffc675c770b746c [file] [log] [blame]
Shawn O. Pearcee31d02c2009-12-08 12:21:37 -08001Gerrit Code Review - Configuration
2==================================
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08003
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08004File `etc/gerrit.config`
5------------------------
Shawn O. Pearce51967cd2009-05-08 19:46:57 -07006
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08007The optional file `'$site_path'/etc/gerrit.config` is a Git-style
8config file that controls many host specific settings for Gerrit.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -07009
10[NOTE]
Shawn O. Pearcec5fed822009-11-17 16:10:10 -080011The contents of the `etc/gerrit.config` file are cached at startup
Brandon Casey4a21add2011-07-05 13:14:18 -050012by Gerrit. If you modify any properties in this file, Gerrit needs
Shawn O. Pearce51967cd2009-05-08 19:46:57 -070013to be restarted before it will use the new values.
14
Shawn O. Pearcec5fed822009-11-17 16:10:10 -080015Sample `etc/gerrit.config`:
Shawn O. Pearce51967cd2009-05-08 19:46:57 -070016----
17[core]
Shawn O. Pearce9d342a42009-12-16 15:49:05 -080018 packedGitLimit = 200 m
Shawn O. Pearce51967cd2009-05-08 19:46:57 -070019
20[cache]
Shawn O. Pearce9d342a42009-12-16 15:49:05 -080021 directory = /var/cache/gerrit2
Shawn O. Pearce51967cd2009-05-08 19:46:57 -070022
23[cache "diff"]
Shawn O. Pearce9d342a42009-12-16 15:49:05 -080024 diskbuffer = 10 m
Shawn O. Pearce51967cd2009-05-08 19:46:57 -070025----
26
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. Pearce34f38cf2011-06-16 19:18:54 -0700168[[auth.maxRegisterEmailTokenAge]]auth.maxRegisterEmailTokenAge::
169+
170Time in seconds before an email verification token sent to a user in
171order to validate their email address expires.
172+
173* s, sec, second, seconds
174* m, min, minute, minutes
175* h, hr, hour, hours
176* d, day, days
177* w, week, weeks (`1 week` is treated as `7 days`)
178* mon, month, months (`1 month` is treated as `30 days`)
179* y, year, years (`1 year` is treated as `365 days`)
180
181+
182Default is 5 days.
183
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700184[[auth.httpHeader]]auth.httpHeader::
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700185+
186HTTP header to trust the username from, or unset to select HTTP basic
187or digest authentication. Only used if `auth.type` was set to HTTP.
188
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700189[[auth.logoutUrl]]auth.logoutUrl::
Shawn O. Pearce12b5d842009-08-15 15:11:10 -0700190+
191URL to redirect a browser to after the end-user has clicked on the
192"Sign Out" link in the upper right corner. Organizations using an
193enterprise single-sign-on solution may want to redirect the browser
194to the SSO product's sign-out page.
195+
196If not set, the redirect returns to the list of all open changes.
197
Shawn O. Pearcec9d26b52009-12-16 08:05:27 -0800198[[auth.registerUrl]]auth.registerUrl::
199+
200Target for the "Register" link in the upper right corner. Used only
201when auth.type is `LDAP`.
202+
203If not set, no "Register" link is displayed.
204
Piotr Sikora7cec2f82011-02-26 12:57:30 +0000205[[auth.cookiePath]]auth.cookiePath::
206+
207Sets "path" attribute of the authentication cookie.
208+
209If not set, HTTP request's path is used.
210
211[[auth.cookieSecure]]auth.cookieSecure::
212+
213Sets "secure" flag of the authentication cookie. If true, cookies
214will be transmitted only over HTTPS protocol.
215+
216By default, false.
217
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700218[[auth.emailFormat]]auth.emailFormat::
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700219+
220Optional format string to construct user email addresses out of
Shawn O. Pearcef7e065e2009-09-26 20:01:10 -0700221user login names. Only used if auth.type is `HTTP`, `HTTP_LDAP`
222or `LDAP`.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700223+
Shawn O. Pearce44221bf2011-06-27 10:37:30 -0700224This value can be set to a format string, where `{0}` is replaced
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700225with the login name. E.g. "\{0\}+gerrit@example.com" with a user
226login name of "foo" will produce "foo+gerrit@example.com" during
227the first time user "foo" registers.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -0700228+
Shawn O. Pearcef7e065e2009-09-26 20:01:10 -0700229If the site is using `HTTP_LDAP` or `LDAP`, using this option is
230discouraged. Setting `ldap.accountEmailAddress` and importing the
231email address from the LDAP directory is generally preferred.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700232
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700233[[auth.contributorAgreements]]auth.contributorAgreements::
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700234+
235Controls whether or not the contributor agreement features are
236enabled for the Gerrit site. If enabled a user must complete a
237contributor agreement before they can upload changes.
238+
239If enabled, the admin must also insert one or more rows into
240`contributor_agreements` and create agreement files under
241`'$site_path'/static`, so users can actually complete one or
Grzegorz Kossakowski28e4e1b2009-09-23 11:33:34 -0700242more agreements.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700243+
244By default this is false (no agreements are used).
245
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700246auth.allowGoogleAccountUpgrade::
247+
Shawn O. Pearce48eea072009-08-31 10:53:12 -0700248Allows Google Account users to automatically update their Gerrit
249account when/if their Google Account OpenID identity token changes.
250Identity tokens can change if the server changes hostnames, or
251for other reasons known only to Google. The upgrade path works
252by matching users by email address if the identity is not present,
253and then changing the identity.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700254+
Shawn O. Pearce48eea072009-08-31 10:53:12 -0700255This setting also permits old Gerrit 1.x users to seamlessly upgrade
256from Google Accounts on Google App Engine to OpenID authentication.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700257+
Shawn O. Pearce48eea072009-08-31 10:53:12 -0700258Having this enabled incurs an extra database query when Google
Shawn O. Pearcee31d02c2009-12-08 12:21:37 -0800259Account users register with the Gerrit server.
Shawn O. Pearce0d3ecff2009-06-01 08:34:17 -0700260+
261By default, unset/false.
262
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -0700263[[cache]]Section cache
264~~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700265
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700266[[cache.directory]]cache.directory::
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700267+
268Path to a local directory where Gerrit can write cached entities for
Shawn O. Pearce4b212282009-08-05 19:45:56 -0700269future lookup. This local disk cache is used to retain potentially
270expensive to compute information across restarts. If the location
271does not exist, Gerrit will try to create it.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700272+
Shawn O. Pearce4b212282009-08-05 19:45:56 -0700273If not absolute, the path is resolved relative to `$site_path`.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700274+
Shawn O. Pearce4b212282009-08-05 19:45:56 -0700275Default is unset, no disk cache.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700276
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700277[[cache.name.maxAge]]cache.<name>.maxAge::
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700278+
Shawn O. Pearced9c403e2009-08-19 08:35:41 -0700279Maximum age to keep an entry in the cache. If an entry has not
280been accessed in this period of time, it is removed from the cache.
281Values should use common unit suffixes to express their setting:
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700282+
Shawn O. Pearced9c403e2009-08-19 08:35:41 -0700283* s, sec, second, seconds
284* m, min, minute, minutes
285* h, hr, hour, hours
286* d, day, days
287* w, week, weeks (`1 week` is treated as `7 days`)
288* mon, month, months (`1 month` is treated as `30 days`)
289* y, year, years (`1 year` is treated as `365 days`)
290
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -0700291+
Shawn O. Pearce3fdbf392009-09-04 18:08:26 -0700292If a unit suffix is not specified, `minutes` is assumed. If 0 is
293supplied, the maximum age is infinite and items are never purged
294except when the cache is full.
Shawn O. Pearced9c403e2009-08-19 08:35:41 -0700295+
296Default is `90 days` for most caches, except:
297+
Shawn O. Pearce05687e92011-04-04 17:29:03 -0400298* `"adv_bases"`: default is `10 minutes`
Shawn O. Pearced9c403e2009-08-19 08:35:41 -0700299* `"ldap_groups"`: default is `1 hour`
Shawn O. Pearced9c403e2009-08-19 08:35:41 -0700300* `"web_sessions"`: default is `12 hours`
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700301
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700302[[cache.name.memoryLimit]]cache.<name>.memoryLimit::
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700303+
304Maximum number of cache items to retain in memory. Keep in mind
305this is total number of items, not bytes of heap used.
306+
Shawn O. Pearceefaf9792009-09-02 18:12:52 -0700307Default is 1024 for most caches, except:
308+
Shawn O. Pearce05687e92011-04-04 17:29:03 -0400309* `"adv_bases"`: default is `4096`
Shawn O. Pearceefaf9792009-09-02 18:12:52 -0700310* `"diff"`: default is `128`
Shawn O. Pearcef0cfe532011-04-11 23:40:06 -0400311* `"diff_intraline"`: default is `128`
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700312
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700313[[cache.name.diskLimit]]cache.<name>.diskLimit::
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700314+
315Maximum number of cache items to retain on disk, if this cache
316supports storing its items to disk. Like memoryLimit, this is
Shawn O. Pearcea5e36d52009-08-17 07:05:03 -0700317total number of items, not bytes of disk used. If 0, disk storage
318for this cache is disabled.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700319+
320Default is 16384.
321
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700322[[cache.name.diskBuffer]]cache.<name>.diskBuffer::
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700323+
324Number of bytes to buffer in memory before writing less frequently
325accessed cache items to disk, if this cache supports storing its
326items to disk.
327+
328Default is 5 MiB.
329+
330Common unit suffixes of 'k', 'm', or 'g' are supported.
331
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -0700332[[cache_names]]Standard Caches
Shawn O. Pearce4016a932009-05-28 15:12:40 -0700333^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700334
Shawn O. Pearce4a452712009-05-28 20:12:33 -0700335cache `"accounts"`::
336+
Shawn O. Pearce4dba9882009-08-05 19:55:15 -0700337Cache entries contain important details of an active user, including
338their display name, preferences, known email addresses, and group
339memberships. Entry information is obtained from the following
340database tables:
341+
342* `accounts`
343+
344* `account_group_members`
345+
346* `account_external_ids`
347
348+
349If direct updates are made to any of these database tables, this
350cache should be flushed.
351
352cache `"accounts_byemail"`::
353+
354Caches account identities keyed by email address, which is scanned
355from the `account_external_ids` database table. If updates are
356made to this table, this cache should be flushed.
Shawn O. Pearce4a452712009-05-28 20:12:33 -0700357
Shawn O. Pearce05687e92011-04-04 17:29:03 -0400358cache `"adv_bases"`::
359+
360Used only for push over smart HTTP when branch level access controls
361are enabled. The cache entry contains all commits that are avaliable
362for the client to use as potential delta bases. Push over smart HTTP
363requires two HTTP requests, and this cache tries to carry state from
364the first request into the second to ensure it can complete.
365
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700366cache `"diff"`::
367+
Shawn O. Pearceefaf9792009-09-02 18:12:52 -0700368Each item caches the differences between two commits, at both the
369directory and file levels. Gerrit uses this cache to accelerate
370the display of affected file names, as well as file contents.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700371+
Shawn O. Pearceefaf9792009-09-02 18:12:52 -0700372Entries in this cache are relatively large, so the memory limit
373should not be set incredibly high. Administrators should try to
374target cache.diff.memoryLimit to be roughly the number of changes
375which their users will process in a 1 or 2 day span.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700376+
377Keeping entries for 90 days gives sufficient time for most changes
378to be submitted or abandoned before their relevant difference items
379expire out.
380
Shawn O. Pearcef0cfe532011-04-11 23:40:06 -0400381cache `"diff_intraline"`::
382+
383Each item caches the intraline difference of one file, when compared
384between two commits. Gerrit uses this cache to accelerate display of
385intraline differences when viewing a file.
386+
387Entries in this cache are relatively large, so the memory limit
388should not be set incredibly high. Administrators should try to
389target cache.diff.memoryLimit to be roughly the number of changes
390which their users will process in a 1 or 2 day span.
391+
392Keeping entries for 90 days gives sufficient time for most changes
393to be submitted or abandoned before their relevant difference items
394expire out.
395
Shawn O. Pearce2d65d292011-06-24 08:12:02 -0700396cache `"git_tags"`::
397+
398If branch or reference level READ access controls are used, this
399cache tracks which tags are reachable from the branch tips of a
400repository. Gerrit uses this information to determine the set
401of tags that a client may access, derived from which tags are
402part of the history of a visible branch.
403+
404The cache is persisted to disk across server restarts as it can
405be expensive to compute (60 or more seconds for a large history
406like the Linux kernel repository).
407
Shawn O. Pearce4a452712009-05-28 20:12:33 -0700408cache `"groups"`::
409+
Shawn O. Pearce4dba9882009-08-05 19:55:15 -0700410Caches the basic group information from the `account_groups` table,
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -0700411including the group owner, name, and description.
412+
413Gerrit group membership obtained from the `account_group_members`
414table is cached under the `"accounts"` cache, above. External group
415membership obtained from LDAP is cached under `"ldap_groups"`.
416
Matt Fischer620255a2011-03-22 14:28:23 -0500417cache `"groups_byinclude"`::
418+
419Caches group inclusions in other groups. If direct updates are made
420to the `account_group_includes` table, this cache should be flushed.
421
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -0700422cache `"ldap_groups"`::
423+
424Caches the LDAP groups that a user belongs to, if LDAP has been
425configured on this server. This cache should be configured with a
426low maxAge setting, to ensure LDAP modifications are picked up in
427a timely fashion.
Shawn O. Pearce4a452712009-05-28 20:12:33 -0700428
Shawn O. Pearce6d26f4a2009-08-24 15:43:52 -0700429cache `"ldap_usernames"`::
430+
431Caches a mapping of LDAP username to Gerrit account identity. The
432cache automatically updates when a user first creates their account
433within Gerrit, so the cache expire time is largely irrelevant.
434
Shawn O. Pearce0c1abdb2011-06-24 11:01:25 -0700435cache `"permission_sort"`::
436+
437Caches the order access control sections must be applied to a
438reference. Sorting the sections can be expensive when regular
439expressions are used, so this cache remembers the ordering for
440each branch.
441
Shawn O. Pearce4a452712009-05-28 20:12:33 -0700442cache `"projects"`::
443+
444Caches the project description records, from the `projects` table
445in the database. If a project record is updated or deleted, this
446cache should be flushed. Newly inserted projects do not require
447a cache flush, as they will be read upon first reference.
448
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700449cache `"sshkeys"`::
450+
451Caches unpacked versions of user SSH keys, so the internal SSH daemon
452can match against them during authentication. The unit of storage
453is per-user, so 1024 items translates to 1024 unique user accounts.
454As each individual user account may configure multiple SSH keys,
455the total number of keys may be larger than the item count.
Shawn O. Pearce4a452712009-05-28 20:12:33 -0700456+
457This cache is based off the `account_ssh_keys` table and the
458`accounts.ssh_user_name` column in the database. If either is
459modified directly, this cache should be flushed.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -0700460
Shawn O. Pearceb09322b2009-08-15 17:49:00 -0700461cache `"web_sessions"`::
462+
463Tracks the live user sessions coming in over HTTP. Flushing this
464cache would cause all users to be signed out immediately, forcing
Shawn O. Pearce727d80f2009-08-17 07:57:54 -0700465them to sign-in again. To avoid breaking active users, this cache
466is not flushed automatically by `gerrit flush-caches --all`, but
467instead must be explicitly requested.
468+
469If no disk cache is configured (or `cache.web_sessions.diskLimit`
470is set to 0) a server restart will force all users to sign-out,
471and need to sign-in again after the restart, as the cache was
472unable to persist the session information. Enabling a disk cache
473is strongly recommended.
474+
475Session storage is relatively inexpensive, the average entry in
476this cache is approximately 248 bytes, depending on the JVM.
Shawn O. Pearceb09322b2009-08-15 17:49:00 -0700477
Shawn O. Pearce4016a932009-05-28 15:12:40 -0700478See also link:cmd-flush-caches.html[gerrit flush-caches].
479
Shawn O. Pearce29de4362010-03-03 17:51:26 -0800480[[cache_options]]Cache Options
481^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
482
Shawn O. Pearce617aa392010-11-15 14:03:28 -0800483cache.diff_intraline.maxIdleWorkers::
484+
485Number of idle worker threads to maintain for the intraline difference
486computations. There is no upper bound on how many concurrent requests
487can occur at once, if additional threads are started to handle a peak
488load, only this many will remaining idle afterwards.
489+
490Default is 1.5x number of available CPUs.
491
492cache.diff_intraline.timeout::
493+
494Maximum number of milliseconds to wait for intraline difference data
495before giving up and disabling it for a particular file pair. This is
496a work around for an infinite loop bug in the intraline difference
497implementation. If computation takes longer than the timeout the
498worker thread is terminated and no intraline difference is displayed.
499+
500Values should use common unit suffixes to express their setting:
501+
502* ms, milliseconds
503* s, sec, second, seconds
504* m, min, minute, minutes
505* h, hr, hour, hours
506
507+
508If a unit suffix is not specified, `milliseconds` is assumed.
509+
510Default is 5 seconds.
511
Shawn O. Pearce307dd4e2010-11-15 12:12:20 -0800512cache.diff_intraline.enabled::
Shawn O. Pearce29de4362010-03-03 17:51:26 -0800513+
514Boolean to enable or disable the computation of intraline differences
Shawn O. Pearce307dd4e2010-11-15 12:12:20 -0800515when populating a diff cache entry. This flag is provided primarily
516as a backdoor to disable the intraline difference feature if
517necessary. To maintain backwards compatability with prior versions,
518this setting will fallback to `cache.diff.intraline` if not set in the
519configuration.
Shawn O. Pearce29de4362010-03-03 17:51:26 -0800520+
521Default is true, enabled.
522
Shawn O. Pearceb8e4e352011-05-19 18:09:01 -0700523cache.projects.checkFrequency::
524+
525How often project configuration should be checked for update from Git.
526Gerrit Code Review caches project access rules and configuration in
527memory, checking the refs/meta/config branch every checkFrequency
528minutes to see if a new revision should be loaded and used for future
529access. Values can be specified using standard time unit abbreviations
530('ms', 'sec', 'min', etc.).
531+
532If set to 0, checks occur every time, which may slow down operations.
533Administrators may force the cache to flush with
534link:cmd-flush-caches.html[gerrit flush-caches].
535+
536Default is 5 minutes.
537
Brad Larson991a31b2009-11-03 14:30:26 -0600538
539[[commentlink]]Section commentlink
540~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
541Comment links are find/replace strings applied to change descriptions,
542patch comments, and in-line code comments to turn set strings into
543hyperlinks. One common use is for linking to bug-tracking systems.
544
545In the following example configuration the 'changeid' comment link
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800546will match typical Gerrit Change-Id values and create a hyperlink
547to changes which reference it. The second configuration 'bugzilla'
548will hyperlink terms such as 'bug 42' to an external bug tracker,
549supplying the argument record number '42' for display. The third
550configuration 'tracker' uses raw HTML to more preciously control
551how the replacement is displayed to the user.
Brad Larson991a31b2009-11-03 14:30:26 -0600552
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800553----
554[commentlink "changeid"]
555 match = (I[0-9a-f]{8,40})
556 link = "#q,$1,n,z"
Brad Larson991a31b2009-11-03 14:30:26 -0600557
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800558[commentlink "bugzilla"]
Shawn O. Pearcec99630a2010-02-21 19:11:56 -0800559 match = "(bug\\s+#?)(\\d+)"
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800560 link = http://bugs.example.com/show_bug.cgi?id=$2
Brad Larson991a31b2009-11-03 14:30:26 -0600561
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800562[commentlink "tracker"]
563 match = ([Bb]ug:\\s+)(\\d+)
564 html = $1<a href=\"http://trak.example.com/$2\">$2</a>
565----
566
567[[commentlink.name.match]]commentlink.<name>.match::
Brad Larson991a31b2009-11-03 14:30:26 -0600568+
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800569A JavaScript regular expression to match positions to be replaced
570with a hyperlink. Subexpressions of the matched string can be
571stored using groups and accessed with `$'n'` syntax, where 'n'
572is the group number, starting from 1.
Brad Larson991a31b2009-11-03 14:30:26 -0600573+
Shawn O. Pearcec99630a2010-02-21 19:11:56 -0800574The configuration file parser eats one level of backslashes, so the
575character class `\s` requires `\\s` in the configuration file. The
576parser also terminates the line at the first `#`, so a match
577expression containing # must be wrapped in double quotes.
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800578+
Shawn O. Pearce665beaa2010-02-21 22:41:03 -0800579To match case insensitive strings, a character class with both the
580upper and lower case character for each position must be used. For
581example, to match the string `bug` in a case insensitive way the match
582pattern `[bB][uU][gG]` needs to be used.
583+
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800584A common pattern to match is `bug\\s+(\\d+)`.
Brad Larson991a31b2009-11-03 14:30:26 -0600585
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800586[[commentlink.name.link]]commentlink.<name>.link::
Brad Larson991a31b2009-11-03 14:30:26 -0600587+
Shawn O. Pearceda866ae2009-12-16 15:46:03 -0800588The URL to direct the user to whenever the regular expression is
589matched. Groups in the match expression may be accessed as `$'n'`.
590+
591The link property is used only when the html property is not present.
592
593[[commentlink.name.html]]commentlink.<name>.html::
594+
595HTML to replace the entire matched string with. If present,
596this property overrides the link property above. Groups in the
597match expression may be accessed as `$'n'`.
598+
599The configuration file eats double quotes, so escaping them as
600`\"` is necessary to protect them from the parser.
Brad Larson991a31b2009-11-03 14:30:26 -0600601
602
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -0700603[[contactstore]]Section contactstore
604~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700605
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700606[[contactstore.url]]contactstore.url::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700607+
608URL of the web based contact store Gerrit will send any offline
609contact information to when it collects the data from users as part
610of a contributor agreement.
611+
612See link:config-contact.html[Contact Information].
613
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700614[[contactstore.appsec]]contactstore.appsec::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700615+
616Shared secret of the web based contact store.
617
Shawn O. Pearcee24c71fb2009-12-07 20:32:40 -0800618
619[[container]]Section container
620~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
621
622These settings are applied only if Gerrit is started as the container
623process through Gerrit's 'gerrit.sh' rc.d compatible wrapper script.
624
625[[container.heapLimit]]container.heapLimit::
626+
627Maximum heap size of the Java process running Gerrit, in bytes.
628This property is translated into the '-Xmx' flag for the JVM.
629+
630Default is platform and JVM specific.
631+
632Common unit suffixes of 'k', 'm', or 'g' are supported.
633
634[[container.javaHome]]container.javaHome::
635+
636Path of the JRE/JDK installation to run Gerrit with. If not set, the
637Gerrit startup script will attempt to search your system and guess
638a suitable JRE. Overrides the environment variable 'JAVA_HOME'.
639
640[[container.javaOptions]]container.javaOptions::
641+
642Additional options to pass along to the Java runtime. If multiple
643values are configured, they are passed in order on the command line,
644separated by spaces. These options are appended onto 'JAVA_OPTIONS'.
645
Fredrik Luthanderb8f7d6d2010-05-18 21:11:22 +0200646[[container.slave]]container.slave::
647+
648Used on Gerrit slave installations. If set to true the Gerrit JVM is
649called with the '--slave' switch, enabling slave mode. If no value is
650set (or any other value), gerrit defaults to master mode.
651
Shawn O. Pearcee24c71fb2009-12-07 20:32:40 -0800652[[container.user]]container.user::
653+
654Login name (or UID) of the operating system user the Gerrit JVM
655will execute as. If not set, defaults to the user who launched
656the 'gerrit.sh' wrapper script.
657
658[[container.war]]container.war::
659+
660Path of the JAR file to start daemon execution with. This should
661be the path of the local 'gerrit.war' archive. Overrides the
662environment variable 'GERRIT_WAR'.
663+
664If not set, defaults to '$site_path/bin/gerrit.war', or to
665'$HOME/gerrit.war'.
666
667
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -0700668[[core]]Section core
669~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700670
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700671[[core.packedGitWindowSize]]core.packedGitWindowSize::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700672+
673Number of bytes of a pack file to load into memory in a single
674read operation. This is the "page size" of the JGit buffer cache,
675used for all pack access operations. All disk IO occurs as single
676window reads. Setting this too large may cause the process to load
677more data than is required; setting this too small may increase
678the frequency of `read()` system calls.
679+
680Default on JGit is 8 KiB on all platforms.
681+
682Common unit suffixes of 'k', 'm', or 'g' are supported.
683
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700684[[core.packedGitLimit]]core.packedGitLimit::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700685+
686Maximum number of bytes to load and cache in memory from pack files.
687If JGit needs to access more than this many bytes it will unload less
688frequently used windows to reclaim memory space within the process.
689As this buffer must be shared with the rest of the JVM heap, it
690should be a fraction of the total memory available.
691+
692Default on JGit is 10 MiB on all platforms.
693+
694Common unit suffixes of 'k', 'm', or 'g' are supported.
695
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700696[[core.deltaBaseCaseLimit]]core.deltaBaseCacheLimit::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700697+
698Maximum number of bytes to reserve for caching base objects
699that multiple deltafied objects reference. By storing the entire
700decompressed base object in a cache Git is able to avoid unpacking
701and decompressing frequently used base objects multiple times.
702+
703Default on JGit is 10 MiB on all platforms. You probably do not
704need to adjust this value.
705+
706Common unit suffixes of 'k', 'm', or 'g' are supported.
707
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700708[[core.packedGitOpenFiles]]core.packedGitOpenFiles::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700709+
710Maximum number of pack files to have open at once. A pack file
711must be opened in order for any of its data to be available in
712a cached window.
713+
714If you increase this to a larger setting you may need to also adjust
715the ulimit on file descriptors for the host JVM, as Gerrit needs
716additional file descriptors available for network sockets and other
717repository data manipulation.
718+
719Default on JGit is 128 file descriptors on all platforms.
720
Shawn O. Pearce329fe792010-09-03 15:44:23 -0700721[[core.streamFileThreshold]]core.streamFileThreshold::
722+
723Largest object size, in bytes, that JGit will allocate as a
724contiguous byte array. Any file revision larger than this threshold
725will have to be streamed, typically requiring the use of temporary
726files under '$GIT_DIR/objects' to implement psuedo-random access
727during delta decompression.
728+
729Servers with very high traffic should set this to be larger than
730the size of their common big files. For example a server managing
731the Android platform typically has to deal with ~10-12 MiB XML
732files, so `15 m` would be a reasonable setting in that environment.
733Setting this too high may cause the JVM to run out of heap space
734when handling very big binary files, such as device firmware or
735CD-ROM ISO images.
736+
Shawn O. Pearcee3febd92010-10-13 21:17:53 -0700737Default is 50 MiB on all platforms. Prior to Gerrit 2.1.6,
Shawn O. Pearce329fe792010-09-03 15:44:23 -0700738this value was effectively 2047 MiB.
739+
740Common unit suffixes of 'k', 'm', or 'g' are supported.
741
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700742[[core.packedGitMmap]]core.packedGitMmap::
Shawn O. Pearce6854bdc2009-06-01 08:14:15 -0700743+
744When true, JGit will use `mmap()` rather than `malloc()+read()`
745to load data from pack files. The use of mmap can be problematic
746on some JVMs as the garbage collector must deduce that a memory
747mapped segment is no longer in use before a call to `munmap()`
748can be made by the JVM native code.
749+
750In server applications (such as Gerrit) that need to access many
751pack files, setting this to true risks artifically running out
752of virtual address space, as the garbage collector cannot reclaim
753unused mapped spaces fast enough.
754+
755Default on JGit is false. Although potentially slower, it yields
756much more predictable behavior.
757
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -0800758[[database]]Section database
759~~~~~~~~~~~~~~~~~~~~~~~~~~~~
760
761The database section configures where Gerrit stores its metadata
762records about user accounts and change reviews.
763
Shawn O. Pearce9d342a42009-12-16 15:49:05 -0800764----
765[database]
Shawn O. Pearce1be39062009-12-19 14:11:52 -0800766 type = POSTGRESQL
Shawn O. Pearce9d342a42009-12-16 15:49:05 -0800767 hostname = localhost
768 database = reviewdb
769 username = gerrit2
770 password = s3kr3t
771----
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -0800772
773[[database.type]]database.type::
774+
775Type of database server to connect to. If set this value will be
776used to automatically create correct database.driver and database.url
777values to open the connection.
778+
Shawn O. Pearce1be39062009-12-19 14:11:52 -0800779* `POSTGRESQL`
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -0800780+
781Connect to a PostgreSQL database server.
782+
783* `H2`
784+
Shawn O. Pearce1be39062009-12-19 14:11:52 -0800785Connect to a local embedded H2 database.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -0800786+
Shawn O. Pearce1be39062009-12-19 14:11:52 -0800787* `MYSQL`
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -0800788+
789Connect to a MySQL database server.
Shawn O. Pearce1be39062009-12-19 14:11:52 -0800790+
791* `JDBC`
792+
793Connect using a JDBC driver class name and URL.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -0800794
795+
796If not specified, database.driver and database.url are used as-is,
797and if they are also not specified, defaults to H2.
798
799[[database.hostname]]database.hostname::
800+
801Hostname of the database server. Defaults to 'localhost'.
802
803[[database.port]]database.port::
804+
805Port number of the database server. Defaults to the default port
806of the server named by database.type.
807
808[[database.database]]database.database::
809+
Shawn O. Pearce1be39062009-12-19 14:11:52 -0800810For POSTGRESQL or MYSQL, the name of the database on the server.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -0800811+
812For H2, this is the path to the database, and if not absolute is
Shawn O. Pearce1be39062009-12-19 14:11:52 -0800813relative to `'$site_path'`.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -0800814
815[[database.username]]database.username::
816+
817Username to connect to the database server as.
818
819[[database.password]]database.password::
820+
821Password to authenticate to the database server with.
822
823[[database.driver]]database.driver::
824+
Shawn O. Pearce1be39062009-12-19 14:11:52 -0800825Name of the JDBC driver class to connect to the database with.
826Setting this usually isn't necessary as it can be derived from
827database.type or database.url for any supported database.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -0800828
829[[database.url]]database.url::
830+
Shawn O. Pearce1be39062009-12-19 14:11:52 -0800831'jdbc:' URL for the database. Setting this variable usually
832isn't necessary as it can be constructed from the all of the
833above properties.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -0800834
Shawn O. Pearce07f35177d2010-02-23 09:47:10 -0800835[[database.poolLimit]]database.poolLimit::
836+
837Maximum number of open database connections. If the server needs
838more than this number, request processing threads will wait up
839to <<database.poolMaxWait, poolMaxWait>> seconds for a
840connection to be released before they abort with an exception.
841This limit must be several units higher than the total number of
842httpd and sshd threads as some request processing code paths may
843need multiple connections.
844+
845Default is 8.
846
Shawn O. Pearcef458bf62010-02-25 09:03:03 -0800847[[database.poolMinIdle]]database.poolMinIdle::
Shawn O. Pearce07f35177d2010-02-23 09:47:10 -0800848+
849Minimum number of connections to keep idle in the pool.
850Default is 4.
851
Shawn O. Pearcef458bf62010-02-25 09:03:03 -0800852[[database.poolMaxIdle]]database.poolMaxIdle::
Shawn O. Pearce07f35177d2010-02-23 09:47:10 -0800853+
854Maximum number of connections to keep idle in the pool. If there
855are more idle connections, connections will be closed instead of
856being returned back to the pool.
857Default is 4.
858
859[[database.poolMaxWait]]database.poolMaxWait::
860+
861Maximum amount of time a request processing thread will wait to
862acquire a database connection from the pool. If no connection is
863released within this time period, the processing thread will abort
864its current operations and return an error to the client.
865Values should use common unit suffixes to express their setting:
866+
867* ms, milliseconds
868* s, sec, second, seconds
869* m, min, minute, minutes
870* h, hr, hour, hours
871
872+
873If a unit suffix is not specified, `milliseconds` is assumed.
874+
875Default is `30 seconds`.
876
monica.dionisio3f630442010-06-29 15:42:57 -0300877[[download]]Section download
Nasser Grainawib9a50372010-08-10 07:57:47 -0600878~~~~~~~~~~~~~~~~~~~~~~~~~~~~
monica.dionisio3f630442010-06-29 15:42:57 -0300879
880----
881[download]
882 scheme = ssh
883 scheme = http
884 scheme = anon_http
885 scheme = anon_git
886 scheme = repo_download
887----
888
889The download section configures the allowed download methods.
890
891[[download.scheme]]download.scheme::
892+
893Schemes that should be used to download changes.
894+
895Multiple schemes are supported:
896+
897* `http`
898+
Shawn O. Pearce5c46a072010-08-23 08:33:32 -0700899Authenticated HTTP download is allowed.
monica.dionisio3f630442010-06-29 15:42:57 -0300900+
901* `ssh`
902+
Shawn O. Pearce5c46a072010-08-23 08:33:32 -0700903Authenticated SSH download is allowed.
monica.dionisio3f630442010-06-29 15:42:57 -0300904+
905* `anon_http`
906+
907Anonymous HTTP download is allowed.
908+
909* `anon_git`
910+
Shawn O. Pearce5c46a072010-08-23 08:33:32 -0700911Anonymous Git download is allowed. This is not default, it is also
912necessary to set <<gerrit.canonicalGitUrl,gerrit.canonicalGitUrl>>
913variable.
monica.dionisio3f630442010-06-29 15:42:57 -0300914+
915* `repo_download`
916+
Shawn O. Pearce5c46a072010-08-23 08:33:32 -0700917Gerrit advertises patch set downloads with the `repo download`
918command, assuming that all projects managed by this instance are
919generally worked on with the repo multi-repository tool. This is
920not default, as not all instances will deploy repo.
monica.dionisio3f630442010-06-29 15:42:57 -0300921
922+
Shawn O. Pearce5c46a072010-08-23 08:33:32 -0700923If download.scheme is not specified, SSH, HTTP and Anonymous HTTP
924downloads are allowed.
Shawn O. Pearcefb5548e2009-11-11 07:39:21 -0800925
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -0700926[[gerrit]]Section gerrit
927~~~~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearceeb7f8ce2009-06-01 09:57:15 -0700928
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700929[[gerrit.basePath]]gerrit.basePath::
Shawn O. Pearce9743d0b2009-06-01 10:10:06 -0700930+
931Local filesystem directory holding all Git repositories that
932Gerrit knows about and can process changes for. A project
933entity in Gerrit maps to a local Git repository by creating
934the path string `"$\{basePath}/$\{project_name}.git"`.
935+
936If relative, the path is resolved relative to `'$site_path'`.
937
Shawn O. Pearce897d9212011-06-16 16:59:59 -0700938[[gerrit.allProjects]]gerrit.allProjects::
939+
940Name of the permissions-only project defining global server
941access controls and settings. These are inherited into every
942other project managed by the running server. The name is
943relative to `gerrit.basePath`.
944+
945Defaults to `All-Projects` if not set.
946
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700947[[gerrit.canonicalWebUrl]]gerrit.canonicalWebUrl::
Shawn O. Pearceeb7f8ce2009-06-01 09:57:15 -0700948+
949The default URL for Gerrit to be accessed through.
950+
951Typically this would be set to "http://review.example.com/" or
952"http://example.com/gerrit/" so Gerrit can output links that point
953back to itself.
954+
955Setting this is highly recommended, as its necessary for the upload
956code invoked by "git push" or "repo upload" to output hyperlinks
957to the newly uploaded changes.
958
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700959[[gerrit.canonicalGitUrl]]gerrit.canonicalGitUrl::
Shawn O. Pearceeb7f8ce2009-06-01 09:57:15 -0700960+
961Optional base URL for repositories available over the anonymous git
962protocol. For example, set this to `git://mirror.example.com/base/`
963to have Gerrit display patch set download URLs in the UI. Gerrit
964automatically appends the project name onto the end of the URL.
965+
966By default unset, as the git daemon must be configured externally
967by the system administrator, and might not even be running on the
968same host as Gerrit.
969
Shawn O. Pearce75c76e22010-08-28 17:26:31 -0700970[[gerrit.replicateOnStartup]]gerrit.replicateOnStartup::
971+
972If true, replicates to all remotes on startup to ensure they are
973in-sync with this server. By default, true.
974
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -0700975[[gitweb]]Section gitweb
976~~~~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearced7ba11f2009-06-01 09:35:41 -0700977
Shawn O. Pearce618dae22010-03-12 19:07:43 -0800978Gerrit can forward requests to either an internally managed gitweb
979(which allows Gerrit to enforce some access controls), or to an
980externally managed gitweb (where the web server manages access).
Shawn O. Pearced7ba11f2009-06-01 09:35:41 -0700981See also link:config-gitweb.html[Gitweb Integration].
982
Shawn O. Pearce618dae22010-03-12 19:07:43 -0800983[[gitweb.cgi]]gitweb.cgi::
984+
985Path to the locally installed `gitweb.cgi` executable. This CGI will
986be called by Gerrit Code Review when the URL `/gitweb` is accessed.
987Project level access controls are enforced prior to calling the CGI.
988+
989Defaults to `/usr/lib/cgi-bin/gitweb.cgi` if gitweb.url is not set.
990
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -0700991[[gitweb.url]]gitweb.url::
Shawn O. Pearced7ba11f2009-06-01 09:35:41 -0700992+
993Optional URL of an affiliated gitweb service. Defines the
994web location where a `gitweb.cgi` is installed to browse
Shawn O. Pearce9743d0b2009-06-01 10:10:06 -0700995gerrit.basePath and the repositories it contains.
Shawn O. Pearced7ba11f2009-06-01 09:35:41 -0700996+
997Gerrit appends any necessary query arguments onto the end of this URL.
998For example, "?p=$project.git;h=$commit".
999
Shane Mc Cormack27868a42009-12-28 04:49:39 +00001000[[gitweb.type]]gitweb.type::
1001+
1002Optional type of affiliated gitweb service. This allows using
1003alternatives to gitweb, such as cgit.
1004+
1005Valid values are `gitweb`, `cgit` or `custom`.
1006
1007[[gitweb.type]]gitweb.revision::
1008+
1009Optional pattern to use for constructing the gitweb URL when pointing
1010at a specific commit when `custom` is used above.
1011+
1012Valid replacements are `$\{project\}` for the project name in Gerrit
1013and `$\{commit\}` for the SHA1 hash for the commit.
1014
1015[[gitweb.type]]gitweb.project::
1016+
1017Optional pattern to use for constructing the gitweb URL when pointing
1018at a specific project when `custom` is used above.
1019+
1020Valid replacements are `$\{project\}` for the project name in Gerrit.
1021
1022[[gitweb.type]]gitweb.branch::
1023+
1024Optional pattern to use for constructing the gitweb URL when pointing
1025at a specific branch when `custom` is used above.
1026+
1027Valid replacements are `$\{project\}` for the project name in Gerrit
1028and `$\{branch\}` for the name of the branch.
1029
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001030
Shane Mc Cormack6c2b6772010-01-12 21:56:44 +00001031[[hooks]]Section hooks
1032~~~~~~~~~~~~~~~~~~~~~~~~
1033
1034See also link:config-hooks.html[Hooks].
1035
1036[[hooks.path]]hooks.path::
1037+
1038Optional path to hooks, if not specified then `'$site_path'/hooks` will be used.
1039
1040[[hooks.patchsetCreatedHook]]hooks.patchsetCreatedHook::
1041+
1042Optional filename for the patchset created hook, if not specified then
1043`patchset-created` will be used.
1044
1045[[hooks.commentAddedHook]]hooks.commentAddedHook::
1046+
1047Optional filename for the comment added hook, if not specified then
1048`comment-added` will be used.
1049
1050[[hooks.changeMergedHook]]hooks.changeMergedHook::
1051+
1052Optional filename for the change merged hook, if not specified then
1053`change-merged` will be used.
1054
1055[[hooks.changeAbandonedHook]]hooks.changeAbandonedHook::
1056+
1057Optional filename for the change abandoned hook, if not specified then
1058`change-abandoned` will be used.
1059
Shawn O. Pearce309d8d32009-11-17 16:03:16 -08001060[[http]]Section http
1061~~~~~~~~~~~~~~~~~~~~
1062
1063[[http.proxy]]http.proxy::
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001064+
1065URL of the proxy server when making outgoing HTTP
1066connections for OpenID login transactions. Syntax
1067should be `http://`'hostname'`:`'port'.
Shawn O. Pearce309d8d32009-11-17 16:03:16 -08001068
1069[[http.proxyUsername]]http.proxyUsername::
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001070+
1071Optional username to authenticate to the HTTP proxy with.
1072This property is honored only if the username does not
1073appear in the http.proxy property above.
Shawn O. Pearce309d8d32009-11-17 16:03:16 -08001074
1075[[http.proxyPassword]]http.proxyPassword::
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001076+
1077Optional password to authenticate to the HTTP proxy with.
1078This property is honored only if the password does not
1079appear in the http.proxy property above.
Shawn O. Pearce309d8d32009-11-17 16:03:16 -08001080
1081
1082[[httpd]]Section httpd
1083~~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08001084
1085The httpd section configures the embedded servlet container.
1086
1087[[httpd.listenUrl]]httpd.listenUrl::
1088+
1089Specifies the URLs the internal HTTP daemon should listen for
1090connections on. The special hostname '\*' may be used to listen
1091on all local addresses. A context path may optionally be included,
1092placing Gerrit Code Review's web address within a subdirectory of
1093the server.
1094+
1095Multiple protocol schemes are supported:
1096+
1097* `http://`'hostname'`:`'port'
1098+
1099Plain-text HTTP protocol. If port is not supplied, defaults to 80,
1100the standard HTTP port.
1101+
1102* `https://`'hostname'`:`'port'
1103+
1104SSL encrypted HTTP protocol. If port is not supplied, defaults to
1105443, the standard HTTPS port.
1106+
1107Externally facing production sites are encouraged to use a reverse
1108proxy configuration and `proxy-https://` (below), rather than using
1109the embedded servlet container to implement the SSL processing.
1110The proxy server with SSL support is probably easier to configure,
1111provides more configuration options to control cipher usage, and
1112is likely using natively compiled encryption algorithms, resulting
1113in higher throughput.
1114+
1115* `proxy-http://`'hostname'`:`'port'
1116+
1117Plain-text HTTP relayed from a reverse proxy. If port is not
1118supplied, defaults to 8080.
1119+
1120Like http, but additional header parsing features are
1121enabled to honor X-Forwarded-For, X-Forwarded-Host and
1122X-Forwarded-Server. These headers are typically set by Apache's
1123link:http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#x-headers[mod_proxy].
1124+
1125* `proxy-https://`'hostname'`:`'port'
1126+
1127Plain text HTTP relayed from a reverse proxy that has already
1128handled the SSL encryption/decryption. If port is not supplied,
1129defaults to 8080.
1130+
1131Behaves exactly like proxy-http, but also sets the scheme to assume
1132'https://' is the proper URL back to the server.
1133
1134+
1135If multiple values are supplied, the daemon will listen on all
1136of them.
1137+
1138By default, http://*:8080.
1139
1140[[httpd.reuseAddress]]httpd.reuseAddress::
1141+
1142If true, permits the daemon to bind to the port even if the port
1143is already in use. If false, the daemon ensures the port is not
1144in use before starting. Busy sites may need to set this to true
1145to permit fast restarts.
1146+
1147By default, true.
1148
1149[[httpd.requestHeaderSize]]httpd.requestHeaderSize::
1150+
1151Size, in bytes, of the buffer used to parse the HTTP headers of an
1152incoming HTTP request. The entire request headers, including any
1153cookies sent by the browser, must fit within this buffer, otherwise
1154the server aborts with the response '413 Request Entity Too Large'.
1155+
1156One buffer of this size is allocated per active connection.
1157Allocating a buffer that is too large wastes memory that cannot be
1158reclaimed, allocating a buffer that is too small may cause unexpected
1159errors caused by very long Referer URLs or large cookie values.
1160+
1161By default, 16384 (16 K), which is sufficient for most OpenID and
1162other web-based single-sign-on integrations.
1163
1164[[httpd.sslKeyStore]]httpd.sslKeyStore::
1165+
1166Path of the Java keystore containing the server's SSL certificate
1167and private key. This keystore is required for `https://` in URL.
1168+
1169To create a self-signed certificate for simple internal usage:
1170+
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001171----
1172keytool -keystore keystore -alias jetty -genkey -keyalg RSA
1173chmod 600 keystore
1174----
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08001175+
1176If not absolute, the path is resolved relative to `$site_path`.
1177+
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08001178By default, `$site_path/etc/keystore`.
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08001179
1180[[httpd.sslKeyPassword]]httpd.sslKeyPassword::
1181+
1182Password used to decrypt the private portion of the sslKeyStore.
1183Java key stores require a password, even if the administrator
1184doesn't want to enable one.
1185+
1186If set to the empty string the embedded server will prompt for the
1187password during startup.
1188+
1189By default, `gerrit`.
1190
Shawn O. Pearce1766f502010-01-15 10:49:46 -08001191[[httpd.requestLog]]httpd.requestLog::
1192+
1193Enable (or disable) the `'$site_path'/logs/httpd_log` request log.
1194If enabled, an NCSA combined log format request log file is written
1195out by the internal HTTP daemon.
1196+
1197By default, true if httpd.listenUrl uses http:// or https://,
1198and false if httpd.listenUrl uses proxy-http:// or proxy-https://.
1199
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08001200[[httpd.acceptorThreads]]httpd.acceptorThreads::
1201+
1202Number of worker threads dedicated to accepting new incoming TCP
1203connections and allocate them connection-specific resources.
1204+
1205By default, 2, which should be suitable for most high-traffic sites.
1206
1207[[httpd.minThreads]]httpd.minThreads::
1208+
1209Minimum number of spare threads to keep in the worker thread pool.
1210This number must be at least 1 larger than httpd.acceptorThreads
1211multipled by the number of httpd.listenUrls configured.
1212+
1213By default, 5, suitable for most lower-volume traffic sites.
1214
1215[[httpd.maxThreads]]httpd.maxThreads::
1216+
1217Maximum number of threads to permit in the worker thread pool.
1218+
1219By default 25, suitable for most lower-volume traffic sites.
1220
1221[[httpd.maxQueued]]httpd.maxQueued::
1222+
1223Maximum number of client connections which can enter the worker
1224thread pool waiting for a worker thread to become available.
12250 disables the queue and permits infinite number of connections.
1226+
1227By default 50.
1228
Shawn O. Pearcee5452b72010-01-15 14:32:50 -08001229[[httpd.maxWait]]httpd.maxWait::
1230+
1231Maximum amount of time a client will wait to for an available
1232thread to handle a project clone, fetch or push request over the
1233smart HTTP transport.
1234+
1235Values should use common unit suffixes to express their setting:
1236+
1237* s, sec, second, seconds
1238* m, min, minute, minutes
1239* h, hr, hour, hours
1240* d, day, days
1241* w, week, weeks (`1 week` is treated as `7 days`)
1242* mon, month, months (`1 month` is treated as `30 days`)
1243* y, year, years (`1 year` is treated as `365 days`)
1244
1245+
1246If a unit suffix is not specified, `minutes` is assumed. If 0
1247is supplied, the maximum age is infinite and connections will not
1248abort until the client disconnects.
1249+
1250By default, 5 minutes.
1251
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08001252
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -07001253[[ldap]]Section ldap
1254~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001255
1256LDAP integration is only enabled if `auth.type` was set to
Sasa Zivkoveabc8972010-10-04 15:47:08 +02001257`HTTP_LDAP`, `LDAP` or `CLIENT_SSL_CERT_LDAP`. See above for a
1258detailed description of the auth.type settings and their
1259implications.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001260
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07001261An example LDAP configuration follows, and then discussion of
1262the parameters introduced here. Suitable defaults for most
1263parameters are automatically guessed based on the type of server
1264detected during startup. The guessed defaults support both
1265link:http://www.ietf.org/rfc/rfc2307.txt[RFC 2307] and Active
1266Directory.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001267
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001268----
1269[ldap]
1270 server = ldap://ldap.example.com
1271
1272 accountBase = ou=people,dc=example,dc=com
1273 accountPattern = (&(objectClass=person)(uid=${username}))
1274 accountFullName = displayName
1275 accountEmailAddress = mail
1276
1277 groupBase = ou=groups,dc=example,dc=com
1278 groupMemberPattern = (&(objectClass=group)(member=${dn}))
1279----
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001280
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001281[[ldap.server]]ldap.server::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001282+
1283URL of the organization's LDAP server to query for user information
1284and group membership from. Must be of the form `ldap://host` or
1285`ldaps://host` to bind with either a plaintext or SSL connection.
Shawn O. Pearcef7e065e2009-09-26 20:01:10 -07001286+
1287If auth.type is `LDAP` this setting should use `ldaps://` to
1288ensure the end user's plaintext password is transmitted only over
1289an encrypted connection.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001290
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07001291[[ldap.sslVerify]]ldap.sslVerify::
1292+
1293If false and ldap.server is an `ldaps://` style URL, Gerrit
1294will not verify the server certificate when it connects to
1295perform a query.
1296+
1297By default, true, requiring the certificate to be verified.
1298
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001299[[ldap.username]]ldap.username::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001300+
1301_(Optional)_ Username to bind to the LDAP server with. If not set,
1302an anonymous connection to the LDAP server is attempted.
1303
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001304[[ldap.password]]ldap.password::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001305+
1306_(Optional)_ Password for the user identified by `ldap.username`.
1307If not set, an anonymous (or passwordless) connection to the LDAP
1308server is attempted.
1309
Ben Wu0410a152010-06-04 16:17:24 +08001310[[ldap.referral]]ldap.referral::
1311+
1312_(Optional)_ How an LDAP referral should be handled if it is
1313encountered during directory traversal. Set to `follow` to
James Y Knight1244ed02011-01-04 02:40:32 -05001314automatically follow any referrals, or `ignore` to ignore the
1315referrals.
Ben Wu0410a152010-06-04 16:17:24 +08001316+
1317By default, `ignore`.
1318
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001319[[ldap.accountBase]]ldap.accountBase::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001320+
1321Root of the tree containing all user accounts. This is typically
1322of the form `ou=people,dc=example,dc=com`.
1323
Shawn O. Pearce304ccdb2009-08-25 12:25:27 -07001324[[ldap.accountScope]]ldap.accountScope::
1325+
1326Scope of the search performed for accounts. Must be one of:
1327+
1328* `one`: Search only one level below accountBase, but not recursive
1329* `sub` or `subtree`: Search recursively below accountBase
1330* `base` or `object`: Search exactly accountBase; probably not desired
1331
1332+
1333Default is `subtree` as many directories have several levels.
1334
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001335[[ldap.accountPattern]]ldap.accountPattern::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001336+
1337Query pattern to use when searching for a user account. This may be
1338any valid LDAP query expression, including the standard `(&...)` and
1339`(|...)` operators. If auth.type is `HTTP_LDAP` then the variable
1340`$\{username\}` is replaced with a parameter set to the username
Shawn O. Pearcef7e065e2009-09-26 20:01:10 -07001341that was supplied by the HTTP server. If auth.type is `LDAP` then
1342the variable `$\{username\}` is replaced by the string entered by
1343the end user.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001344+
1345This pattern is used to search the objects contained directly under
1346the `ldap.accountBase` tree. A typical setting for this parameter
1347is `(uid=$\{username\})` or `(cn=$\{username\})`, but the proper
1348setting depends on the LDAP schema used by the directory server.
1349+
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07001350Default is `(uid=$\{username\})` for RFC 2307 servers,
1351and `(&(objectClass=user)(sAMAccountName=${username}))`
1352for Active Directory.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001353
Shawn O. Pearce37dc1f82009-08-19 09:49:07 -07001354[[ldap.accountFullName]]ldap.accountFullName::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001355+
1356_(Optional)_ Name of an attribute on the user account object which
1357contains the initial value for the user's full name field in Gerrit.
1358Typically this is the `displayName` property in LDAP, but could
1359also be `legalName` or `cn`.
1360+
Shawn O. Pearceb86ae002009-09-26 16:54:05 -07001361Attribute values may be concatenated with literal strings, for
1362example to join given name and surname together use the pattern
1363`$\{givenName\} $\{SN\}`.
1364+
Shawn O. Pearce3ca1dcf2009-08-20 08:56:23 -07001365If set, users will be unable to modify their full name field, as
1366Gerrit will populate it only from the LDAP data.
1367+
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07001368Default is `displayName` for RFC 2307 servers,
1369and `${givenName} ${sn}` for Active Directory.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001370
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001371[[ldap.accountEmailAddress]]ldap.accountEmailAddress::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001372+
1373_(Optional)_ Name of an attribute on the user account object which
1374contains the user's Internet email address, as defined by this
1375LDAP server.
1376+
Shawn O. Pearceb86ae002009-09-26 16:54:05 -07001377Attribute values may be concatenated with literal strings,
1378for example to set the email address to the lowercase form
1379of sAMAccountName followed by a constant domain name, use
1380`$\{sAMAccountName.toLowerCase\}@example.com`.
1381+
Shawn O. Pearce3ca1dcf2009-08-20 08:56:23 -07001382If set, the preferred email address will be prefilled from LDAP,
1383but users may still be able to register additional email address,
1384and select a different preferred email address.
1385+
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07001386Default is `mail`.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001387
Shawn O. Pearce59e09222009-08-19 09:04:49 -07001388[[ldap.accountSshUserName]]ldap.accountSshUserName::
1389+
1390_(Optional)_ Name of an attribute on the user account object which
1391contains the initial value for the user's SSH username field in
1392Gerrit. Typically this is the `uid` property in LDAP, but could
1393also be `cn`. Administrators should prefer to match the attribute
1394corresponding to the user's workstation username, as this is what
1395SSH clients will default to.
1396+
Shawn O. Pearceb86ae002009-09-26 16:54:05 -07001397Attribute values may also be forced to lowercase, or to uppercase in
1398an expression. For example, `$\{sAMAccountName.toLowerCase\}` will
1399force the value of sAMAccountName, if defined, to be all lowercase.
1400The suffix `.toUpperCase` can be used for the other direction.
1401The suffix `.localPart` can be used to split attribute values of
1402the form 'user@example.com' and return only the left hand side, for
1403example `$\{userPrincipalName.localPart\}` would provide only 'user'.
1404+
Shawn O. Pearce3ca1dcf2009-08-20 08:56:23 -07001405If set, users will be unable to modify their SSH username field, as
1406Gerrit will populate it only from the LDAP data.
1407+
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07001408Default is `uid` for RFC 2307 servers,
1409and `${sAMAccountName.toLowerCase}` for Active Directory.
Shawn O. Pearce59e09222009-08-19 09:04:49 -07001410
Shawn O. Pearce7d25f782009-10-30 08:01:03 -07001411[[ldap.accountMemberField]]ldap.accountMemberField::
Anthony93de7db2009-10-03 10:01:50 -04001412+
1413_(Optional)_ Name of an attribute on the user account object which
Shawn O. Pearce7d25f782009-10-30 08:01:03 -07001414contains the groups the user is part of. Typically used for Active
1415Directory servers.
Anthony93de7db2009-10-03 10:01:50 -04001416+
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07001417Default is unset for RFC 2307 servers (disabled)
1418and `memberOf` for Active Directory.
Anthony93de7db2009-10-03 10:01:50 -04001419
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001420[[ldap.groupBase]]ldap.groupBase::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001421+
1422Root of the tree containing all group objects. This is typically
1423of the form `ou=groups,dc=example,dc=com`.
1424
Shawn O. Pearce304ccdb2009-08-25 12:25:27 -07001425[[ldap.groupScope]]ldap.groupScope::
1426+
1427Scope of the search performed for group objects. Must be one of:
1428+
1429* `one`: Search only one level below groupBase, but not recursive
1430* `sub` or `subtree`: Search recursively below groupBase
1431* `base` or `object`: Search exactly groupBase; probably not desired
1432
1433+
1434Default is `subtree` as many directories have several levels.
1435
Shawn O. Pearce7d25f782009-10-30 08:01:03 -07001436[[ldap.groupPattern]]ldap.groupPattern::
1437+
1438Query pattern used when searching for an LDAP group to connect
1439to a Gerrit group. This may be any valid LDAP query expression,
1440including the standard `(&...)` and `(|...)` operators. The variable
1441`$\{groupname\}` is replaced with the search term supplied by the
1442group owner.
1443+
1444Default is `(cn=$\{groupname\})` for RFC 2307,
1445and `(&(objectClass=group)(cn=$\{groupname\}))` for Active Directory.
1446
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001447[[ldap.groupMemberPattern]]ldap.groupMemberPattern::
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001448+
1449Query pattern to use when searching for the groups that a user
1450account is currently a member of. This may be any valid LDAP query
1451expression, including the standard `(&...)` and `(|...)` operators.
1452+
1453If auth.type is `HTTP_LDAP` then the variable `$\{username\}` is
1454replaced with a parameter set to the username that was supplied
1455by the HTTP server. Other variables appearing in the pattern,
1456such as `$\{fooBarAttribute\}`, are replaced with the value of the
1457corresponding attribute (in this case, `fooBarAttribute`) as read
1458from the user's account object matched under `ldap.accountBase`.
1459Attributes such as `$\{dn\}` or `$\{uidNumber\}` may be useful.
1460+
Shawn O. Pearce02c2e802009-10-29 14:46:03 -07001461Default is `(memberUid=$\{username\})` for RFC 2307,
1462and unset (disabled) for Active Directory.
Shawn O. Pearce302a7dd2009-08-18 19:33:15 -07001463
1464
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -07001465[[mimetype]]Section mimetype
1466~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearce01cb11902009-07-15 08:19:01 -07001467
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001468[[mimetype.name.safe]]mimetype.<name>.safe::
Shawn O. Pearce01cb11902009-07-15 08:19:01 -07001469+
1470If set to true, files with the MIME type `<name>` will be sent as
1471direct downloads to the user's browser, rather than being wrapped up
1472inside of zipped archives. The type name may be a complete type
1473name, e.g. `image/gif`, a generic media type, e.g. `image/\*`,
1474or the wildcard `\*/*` to match all types.
1475+
1476By default, false for all MIME types.
1477
1478Common examples:
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08001479----
1480[mimetype "image/*"]
1481 safe = true
1482
1483[mimetype "application/pdf"]
1484 safe = true
1485
1486[mimetype "application/msword"]
1487 safe = true
1488
1489[mimetype "application/vnd.ms-excel"]
1490 safe = true
1491----
Shawn O. Pearce01cb11902009-07-15 08:19:01 -07001492
Shawn O. Pearce5f11b292010-08-05 17:57:35 -07001493
1494[[pack]]Section pack
1495~~~~~~~~~~~~~~~~~~~~
1496Global settings controlling how Gerrit Code Review creates pack
1497streams for Git clients running clone, fetch, or pull. Most of these
1498variables are per-client request, and thus should be carefully set
1499given the expected concurrent request load and available CPU and
1500memory resources.
1501
1502[[pack.deltacompression]]pack.deltacompression::
1503+
1504If true, delta compression between objects is enabled. This may
1505result in a smaller overall transfer for the client, but requires
1506more server memory and CPU time.
1507+
1508False (off) by default, matching Gerrit Code Review 2.1.4.
1509
1510[[pack.threads]]pack.threads::
1511+
1512Maximum number of threads to use for delta compression (if enabled).
1513This is per-client request. If set to 0 then the number of CPUs is
1514auto-detected and one thread per CPU is used, per client request.
1515+
1516By default, 1.
1517
1518
lincoln2be11602010-07-05 10:53:25 -03001519[[receive]]Section receive
1520~~~~~~~~~~~~~~~~~~~~~~~~~~
1521Sets the group of users allowed to execute 'receive-pack' on the
1522server, 'receive-pack' is what runs on the server during a user's
1523push or repo upload command.
1524
1525----
1526[receive]
1527 allowGroup = GROUP_ALLOWED_TO_EXECUTE
1528 allowGroup = YET_ANOTHER_GROUP_ALLOWED_TO_EXECUTE
1529----
1530
1531[[receive.allowGroup]]receive.allowGroup::
1532+
1533Name of the groups of users that are allowed to execute
1534'receive-pack' on the server. One or more groups can be set.
1535+
1536If no groups are added, any user will be allowed to execute
1537'receive-pack' on the server.
1538
1539
Hugo Josefson072b4702010-04-21 19:27:11 +02001540[[repository]]Section repository
1541~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1542Repositories in this sense are the same as projects.
1543
Shawn O. Pearce897d9212011-06-16 16:59:59 -07001544In the following example configuration `Registered Users` is set
1545to be the default owner of new projects.
Hugo Josefson072b4702010-04-21 19:27:11 +02001546
1547----
1548[repository "*"]
Hugo Josefson072b4702010-04-21 19:27:11 +02001549 ownerGroup = Registered Users
1550----
1551
1552[NOTE]
1553Currently only the repository name `*` is supported.
1554This is a wildcard designating all repositories.
1555
Hugo Josefson072b4702010-04-21 19:27:11 +02001556[[repository.name.ownerGroup]]repository.<name>.ownerGroup::
1557+
1558A name of a group which exists in the database. Zero, one or many
1559groups are allowed. Each on its own line. Groups which don't exist
1560in the database are ignored.
Hugo Josefson072b4702010-04-21 19:27:11 +02001561
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -07001562[[sendemail]]Section sendemail
1563~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07001564
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001565[[sendemail.enable]]sendemail.enable::
Shawn O. Pearce2e4573b2009-06-02 09:09:50 -07001566+
1567If false Gerrit will not send email messages, for any reason,
1568and all other properties of section sendemail are ignored.
1569+
1570By default, true, allowing notifications to be sent.
1571
Shawn O. Pearce5c31bd72009-09-10 18:13:33 -07001572[[sendemail.from]]sendemail.from::
1573+
1574Designates what name and address Gerrit will place in the From
1575field of any generated email messages. The supported values are:
1576+
1577* `USER`
1578+
1579Gerrit will set the From header to use the current user's
1580Full Name and Preferred Email. This may cause messsages to be
1581classified as spam if the user's domain has SPF or DKIM enabled
1582and <<sendemail.smtpServer,sendemail.smtpServer>> is not a trusted
1583relay for that domain.
1584+
1585* `MIXED`
1586+
1587Shorthand for `$\{user\} (Code Review) <review@example.com>` where
1588`review@example.com` is the same as <<user.email,user.email>>.
1589See below for a description of how the replacement is handled.
1590+
1591* `SERVER`
1592+
1593Gerrit will set the From header to the same name and address
1594it records in any commits Gerrit creates. This is set by
1595<<user.name,user.name>> and <<user.email,user.email>>, or guessed
1596from the local operating system.
1597+
1598* 'Code Review' `<`'review'`@`'example.com'`>`
1599+
1600If set to a name and email address in brackets, Gerrit will use
1601this name and email address for any messages, overriding the name
1602that may have been selected for commits by user.name and user.email.
1603Optionally, the name portion may contain the placeholder `$\{user\}`,
1604which is replaced by the Full Name of the current user.
1605
1606+
1607By default, MIXED.
1608
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001609[[sendemail.smtpServer]]sendemail.smtpServer::
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07001610+
1611Hostname (or IP address) of a SMTP server that will relay
1612messages generated by Gerrit to end users.
1613+
1614By default, 127.0.0.1 (aka localhost).
1615
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001616[[sendemail.smtpServerPort]]sendemail.smtpServerPort::
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07001617+
1618Port number of the SMTP server in sendemail.smtpserver.
1619+
Shawn O. Pearce6e9a83f2009-11-02 10:30:48 -08001620By default, 25, or 465 if smtpEncryption is 'ssl'.
1621
1622[[sendemail.smtpEncryption]]sendemail.smtpEncryption::
1623+
1624Specify the encryption to use, either 'ssl' or 'tls'.
1625+
1626By default, 'none', indicating no encryption is used.
1627
1628[[sendemail.sslVerify]]sendemail.sslVerify::
1629+
1630If false and sendemail.smtpEncryption is 'ssl' or 'tls', Gerrit
1631will not verify the server certificate when it connects to send
1632an email message.
1633+
1634By default, true, requiring the certificate to be verified.
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07001635
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001636[[sendemail.smtpUser]]sendemail.smtpUser::
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07001637+
1638User name to authenticate with, if required for relay.
1639
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001640[[sendemail.smtpPass]]sendemail.smtpPass::
Shawn O. Pearceb0572c62009-06-01 14:18:22 -07001641+
1642Password for the account named by sendemail.smtpUser.
1643
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001644[[sendemail.allowrcpt]]sendemail.allowrcpt::
Shawn O. Pearce219a8ee2009-06-01 18:13:57 -07001645+
1646If present, each value adds one entry to the whitelist of email
1647addresses that Gerrit can send email to. If set to a complete
1648email address, that one address is added to the white list.
1649If set to a domain name, any address at that domain can receive
1650email from Gerrit.
1651+
1652By default, unset, permitting delivery to any email address.
1653
Alex Blewitt9cca7402011-02-11 01:39:30 +00001654[[sendemail.importance]]sendemail.importance::
1655+
1656If present, emails sent from Gerrit will have the given level
1657of importance. Valid values include 'high' and 'low', which
1658email clients will render in different ways.
1659+
1660By default, unset, so no Importance header is generated.
1661
1662[[sendemail.expiryDays]]sendemail.expiryDays::
1663+
1664If present, emails sent from Gerrit will expire after the given
1665number of days. This will add the Expiry-Date header and
1666email clients may expire or expunge mails whose Expiry-Date
1667header is in the past. This should be a positive non-zero
1668number indicating how many days in the future the mails
1669should expire.
1670+
1671By default, unset, so no Expiry-Date header is generated.
1672
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -07001673[[sshd]] Section sshd
Shawn O. Pearcea758fef2009-08-19 08:29:32 -07001674~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearce9410f2c2009-05-14 10:26:47 -07001675
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001676[[sshd.listenAddress]]sshd.listenAddress::
Shawn O. Pearce1d3cb4442009-05-30 14:03:31 -07001677+
1678Specifies the local addresses the internal SSHD should listen
1679for connections on. The following forms may be used to specify
1680an address. In any form, `:'port'` may be omitted to use the
1681default of 29418.
1682+
1683* 'hostname':'port' (for example `review.example.com:29418`)
1684* 'IPv4':'port' (for example `10.0.0.1:29418`)
1685* ['IPv6']:'port' (for example `[ff02::1]:29418`)
1686* \*:'port' (for example `*:29418`)
1687
1688+
1689If multiple values are supplied, the daemon will listen on all
1690of them.
1691+
1692By default, *:29418.
1693
James Y Knight910bd862011-01-11 20:05:56 -05001694[[sshd.advertisedAddress]]sshd.advertisedAddress::
1695+
1696Specifies the addresses clients should be told to connect to.
1697This may differ from sshd.listenAddress if a firewall based port
1698redirector is being used, making Gerrit appear to answer on port
169922. The following forms may be used to specify an address. In any
1700form, `:'port'` may be omitted to use the default SSH port of 22.
1701+
1702* 'hostname':'port' (for example `review.example.com:22`)
1703* 'IPv4':'port' (for example `10.0.0.1:29418`)
1704* ['IPv6']:'port' (for example `[ff02::1]:29418`)
1705
1706+
1707If multiple values are supplied, the daemon will advertise all
1708of them.
1709+
1710By default, sshd.listenAddress.
1711
Shawn O. Pearce149238a2009-09-10 12:25:20 -07001712[[sshd.reuseAddress]]sshd.reuseAddress::
Shawn O. Pearce9410f2c2009-05-14 10:26:47 -07001713+
1714If true, permits the daemon to bind to the port even if the port
1715is already in use. If false, the daemon ensures the port is not
1716in use before starting. Busy sites may need to set this to true
1717to permit fast restarts.
1718+
1719By default, true.
Shawn O. Pearce51967cd2009-05-08 19:46:57 -07001720
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001721[[sshd.tcpKeepAlive]]sshd.tcpKeepAlive::
Shawn O. Pearcefc9081f2009-05-14 10:26:59 -07001722+
1723If true, enables TCP keepalive messages to the other side, so
1724the daemon can terminate connections if the peer disappears.
1725+
1726By default, true.
1727
Shawn O. Pearce1a4580b2009-11-19 17:37:10 -08001728[[sshd.threads]]sshd.threads::
1729+
1730Number of threads to use when executing SSH command requests.
1731If additional requests are received while all threads are busy they
1732are queued and serviced in a first-come-first-serve order.
1733+
1734By default, 1.5x the number of CPUs available to the JVM.
1735
Nico Sallembienfc53f7f2010-05-18 16:40:10 -07001736[[sshd.batchThreads]]sshd.batchThreads::
1737+
1738Number of threads to allocate for SSH command requests from
1739non-interactive users. If equals to 0, then all non-interactive
1740requests are executed in the same queue as interactive requests.
1741+
1742Any other value will remove the number of threads from the queue
1743allocated to interactive users, and create a separate thread pool
1744of the requested size, which will be used to run commands from
1745non-interactive users.
1746+
1747If the number of threads requested for non-interactive users is larger
1748than the total number of threads allocated in sshd.threads, then the
1749value of sshd.threads is increased to accomodate the requested value.
1750+
1751By default, 0.
1752
Kenny Root15ac1b82010-02-24 00:29:20 -08001753[[sshd.streamThreads]]sshd.streamThreads::
1754+
1755Number of threads to use when formatting events to asynchronous
1756streaming clients. Event formatting is multiplexed onto this thread
1757pool by a simple FIFO scheduling system.
1758+
1759By default, 1 plus the number of CPUs available to the JVM.
1760
Shawn O. Pearced6296552011-05-15 13:56:30 -07001761[sshd.commandStartThreads]]sshd.commandStartThreads::
1762+
1763Number of threads used to parse a command line submitted by a client
1764over SSH for execution, create the internal data structures used by
1765that command, and schedule it for execution on another thread.
1766+
1767By default, 2.
1768
Shawn O. Pearce8a0bf362010-11-05 17:49:41 -07001769[[sshd.maxAuthTries]]sshd.maxAuthTries::
1770+
1771Maximum number of authentication attempts before the server
1772disconnects the client. Each public key that a client has loaded
1773into its local agent counts as one auth request. Users can work
1774around the server's limit by loading less keys into their agent,
1775or selecting a specific key in their `~/.ssh/config` file with
1776the `IdentityFile` option.
1777+
1778By default, 6.
1779
1780[[sshd.loginGraceTime]]sshd.loginGraceTime::
1781+
1782Time in seconds that a client has to authenticate before the server
1783automatically terminates their connection. Values should use common
1784unit suffixes to express their setting:
1785+
1786* s, sec, second, seconds
1787* m, min, minute, minutes
1788* h, hr, hour, hours
1789* d, day, days
1790
1791+
1792By default, 2 minutes.
1793
1794[[sshd.maxConnectionsPerUser]]sshd.maxConnectionsPerUser::
1795+
1796Maximum number of concurrent SSH sessions that a user account
1797may open at one time. This is the number of distinct SSH logins
1798the each user may have active at one time, and is not related to
1799the number of commands a user may issue over a single connection.
1800If set to 0, there is no limit.
1801+
1802By default, 64.
1803
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001804[[sshd.cipher]]sshd.cipher::
Shawn O. Pearce0bf2f522009-05-14 11:02:03 -07001805+
1806Available ciphers. To permit multiple ciphers, specify multiple
1807`sshd.cipher` keys in the configuration file, one cipher name
1808per key. Cipher names starting with `+` are enabled in addition
1809to the default ciphers, cipher names starting with `-` are removed
1810from the default cipher set.
1811+
1812Supported ciphers: aes128-cbc, aes128-cbc, aes256-cbc, blowfish-cbc,
18133des-cbc, none.
1814+
1815By default, all supported ciphers except `none` are available.
1816
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001817[[sshd.mac]]sshd.mac::
Shawn O. Pearce0bf2f522009-05-14 11:02:03 -07001818+
1819Available MAC (message authentication code) algorithms. To permit
1820multiple algorithms, specify multiple `sshd.mac` keys in the
1821configuration file, one MAC per key. MAC names starting with `+`
1822are enabled in addition to the default MACs, MAC names starting with
1823`-` are removed from the default MACs.
1824+
1825Supported MACs: hmac-md5, hmac-md5-96, hmac-sha1, hmac-sha1-96.
1826+
1827By default, all supported MACs are available.
1828
Shawn O. Pearce07bd6fb2011-04-29 19:15:47 -07001829[[suggest]] Section suggest
1830~~~~~~~~~~~~~~~~~~~~~~~~~~~
1831
1832[[suggest.accounts]]::
1833+
1834If `ALL`, all matching user accounts will be offered as
1835completion suggestions when adding a reviewer to a change,
1836or a user to a group.
1837+
1838If `SAME_GROUP`, only users who are also members of a group the
1839current user is a member of will be offered.
1840+
Edwin Kempin42488812011-05-20 03:11:43 +02001841If `VISIBLE_GROUP`, only users who are members of at least one group
1842that is visible to the current user will be offered.
1843+
Shawn O. Pearce07bd6fb2011-04-29 19:15:47 -07001844If `OFF`, no account suggestions are given.
1845+
1846Default is `ALL`.
1847
Shawn O. Pearce2ba3ab42010-02-25 12:10:10 -08001848[[theme]] Section theme
1849~~~~~~~~~~~~~~~~~~~~~~~
1850
1851[[theme.backgroundColor]]theme.backgroundColor::
1852+
1853Background color for the page, and major data tables like the all
1854open changes table or the account dashboard. The value must be a
1855valid HTML hex color code, or standard color name.
1856+
Shawn O. Pearce9ca8ae32011-05-24 08:28:40 -07001857By default `FCFEEF` (a creme color) for signed-out theme and white
1858(`FFFFFF`) for signed-in theme.
Shawn O. Pearce2ba3ab42010-02-25 12:10:10 -08001859
1860[[theme.topMenuColor]]theme.topMenuColor::
1861+
1862This is the color of the main menu bar at the top of the page.
1863The value must be a valid HTML hex color code, or standard color
1864name. The value defaults to <<theme.trimColor,trimColor>>.
1865
1866[[theme.textColor]]theme.textColor::
1867+
1868Text color for the page, and major data tables like the all
1869open changes table or the account dashboard. The value must be a
1870valid HTML hex color code, or standard color name.
1871+
1872By default black, `000000`.
1873
1874[[theme.trimColor]]theme.trimColor::
1875+
1876Primary color used as a background color behind text. This is
1877the color of the main menu bar at the top, of table headers,
1878and of major UI areas that we want to offset from other portions
1879of the page. The value must be a valid HTML hex color code, or
1880standard color name.
1881+
1882By default a shade of green, `D4E9A9`.
1883
1884[[theme.selectionColor]]theme.selectionColor::
1885+
1886Background color used within a trimColor area to denote the currently
1887selected tab, or the background color used in a table to denote the
1888currently selected row. The value must be a valid HTML hex color
1889code, or standard color name.
1890+
1891By default a shade of yellow, `FFFFCC`.
1892
Shawn O. Pearcea83bb1c2011-05-20 08:46:48 -07001893A different theme may be used for signed-in vs. signed-out user status
1894by using the "signed-in" and "signed-out" theme sections. Variables
1895not specified in a section are inherited from the default theme.
1896
1897----
1898[theme]
1899 backgroundColor = FFFFFF
1900[theme "signed-in"]
1901 backgroundColor = C0C0C0
1902[theme "signed-out"]
1903 backgroundColor = 00FFFF
1904----
1905
Goran Lungberg04132a12010-06-15 17:20:37 -07001906[[trackingid]] Section trackingid
Shawn O. Pearce91763a02010-06-16 15:39:33 -07001907~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Goran Lungberg04132a12010-06-15 17:20:37 -07001908
Shawn O. Pearcee800b1e2010-06-16 17:33:43 -07001909Tagged footer lines containing references to external
1910tracking systems, parsed out of the commit message and
1911saved in Gerrit's database. After making changes to
1912this section, existing changes must be reindexed with the
1913link:pgm-ScanTrackingIds.html[ScanTrackingIds] program.
Goran Lungberg04132a12010-06-15 17:20:37 -07001914
Shawn O. Pearce91763a02010-06-16 15:39:33 -07001915The tracking ids are serachable using tr:<tracking id> or
1916bug:<tracking id>.
Goran Lungberg04132a12010-06-15 17:20:37 -07001917
1918----
1919[trackingid "jira-bug"]
1920 footer = Bugfix:
1921 match = JRA\\d{2,8}
1922 system = JIRA
1923
1924[trackingid "jira-feature"]
1925 footer = Feature
1926 match = JRA(\\d{2,8})
1927 system = JIRA
1928----
1929
1930[[trackingid.name.footer]]trackingid.<name>.footer::
1931+
1932A prefix tag that identify the footer line to parse for tracking ids.
1933Several trakingid entries can have the same footer tag.
1934(the trailing ":" is optional)
1935
1936[[trackingid.name.match]]trackingid.<name>.match::
1937+
Magnus Bäcke5611832011-02-02 08:57:15 +01001938A link:http://download.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html[standard
1939Java regular expression (java.util.regex)] used to match the
1940external tracking id part of the footer line. The match can
1941result in several entries in the DB. If grouping is used in the
1942regex the first group will be interpreted as the tracking id.
1943Tracking ids > 20 char will be ignored.
Goran Lungberg04132a12010-06-15 17:20:37 -07001944+
1945The configuration file parser eats one level of backslashes, so the
1946character class `\s` requires `\\s` in the configuration file. The
1947parser also terminates the line at the first `#`, so a match
1948expression containing # must be wrapped in double quotes.
1949
1950[[trackingid.name.system]]trackingid.<name>.system::
1951+
1952The name of the external tracking system(max 10 char).
1953It is possible to have several trackingid entries for the same
1954tracking system.
1955
Shawn O. Pearce6e4dfdd2010-05-12 17:26:08 -07001956[[transfer]] Section transfer
1957~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1958
1959[[transfer.timeout]]transfer.timeout::
1960+
1961Number of seconds to wait for a single network read or write
1962to complete before giving up and declaring the remote side is
1963not responding. If 0, there is no timeout, and this server will
1964wait indefinitely for a transfer to finish.
1965+
1966A timeout should be large enough to mostly transfer the objects to
1967the other side. 1 second may be too small for larger projects,
1968especially over a WAN link, while 10-30 seconds is a much more
1969reasonable timeout value.
1970+
1971Defaults to 0 seconds, wait indefinitely.
1972
lincoln2be11602010-07-05 10:53:25 -03001973
1974[[upload]]Section upload
1975~~~~~~~~~~~~~~~~~~~~~~~~~~
1976Sets the group of users allowed to execute 'upload-pack' on the
1977server, 'upload-pack' is what runs on the server during a user's
1978fetch, clone or repo sync command.
1979
1980----
1981[upload]
1982 allowGroup = GROUP_ALLOWED_TO_EXECUTE
1983 allowGroup = YET_ANOTHER_GROUP_ALLOWED_TO_EXECUTE
1984----
1985
1986[[upload.allowGroup]]upload.allowGroup::
1987+
1988Name of the groups of users that are allowed to execute 'upload-pack'
1989on the server. One or more groups can be set.
1990+
1991If no groups are added, any user will be allowed to execute
1992'upload-pack' on the server.
1993
1994
Shawn O. Pearce8efb2a72009-08-18 19:45:33 -07001995[[user]] Section user
Shawn O. Pearcea758fef2009-08-19 08:29:32 -07001996~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearce0a351912009-06-01 08:14:46 -07001997
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07001998[[user.name]]user.name::
Shawn O. Pearce0a351912009-06-01 08:14:46 -07001999+
2000Name that Gerrit calls itself in Git when it creates a new Git
2001commit, such as a merge during change submission.
2002+
2003By default this is "Gerrit Code Review".
2004
Shawn O. Pearce92a7fd12009-08-18 19:52:48 -07002005[[user.email]]user.email::
Shawn O. Pearce0a351912009-06-01 08:14:46 -07002006+
2007Email address that Gerrit refers to itself as when it creates a
2008new Git commit, such as a merge commit during change submission.
2009+
2010If not set, Gerrit generates this as "gerrit@`hostname`", where
2011`hostname` is the hostname of the system Gerrit is running on.
2012+
2013By default, not set, generating the value at startup.
2014
Shawn O. Pearce0bf2f522009-05-14 11:02:03 -07002015
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08002016File `etc/secure.config`
2017-------------------------
2018The optional file `'$site_path'/etc/secure.config` overrides (or
2019supplements) the settings supplied by `'$site_path'/etc/gerrit.config`.
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08002020The file should be readable only by the daemon process and can be
2021used to contain private configuration entries that wouldn't normally
2022be exposed to everyone.
2023
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08002024Sample `etc/secure.config`:
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08002025----
Shawn O. Pearce34f38cf2011-06-16 19:18:54 -07002026[auth]
2027 registerEmailPrivateKey = 2zHNrXE2bsoylzUqDxZp0H1cqUmjgWb6
2028
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08002029[database]
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08002030 username = webuser
2031 password = s3kr3t
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08002032
2033[ldap]
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08002034 password = l3tm3srch
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08002035
2036[httpd]
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08002037 sslKeyPassword = g3rr1t
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08002038
2039[sendemail]
Shawn O. Pearce9d342a42009-12-16 15:49:05 -08002040 smtpPass = sp@m
Shawn O. Pearce7929d872011-05-15 13:33:15 -07002041
2042[remote "bar"]
2043 password = s3kr3t
Shawn O. Pearce0d4037a2009-11-12 18:33:46 -08002044----
2045
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08002046File `etc/replication.config`
2047-----------------------------
Shawn O. Pearce7b405712009-05-08 18:27:53 -07002048
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08002049The optional file `'$site_path'/etc/replication.config` controls how
Shawn O. Pearce7b405712009-05-08 18:27:53 -07002050Gerrit automatically replicates changes it makes to any of the Git
2051repositories under its control.
2052
2053* link:config-replication.html[Git Replication/Mirroring]
2054
2055Database system_config
2056----------------------
2057
2058Several columns in the `system_config` table within the metadata
2059database may be set to control how Gerrit behaves.
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08002060
2061[NOTE]
2062The contents of the `system_config` table are cached at startup
2063by Gerrit. If you modify any columns in this table, Gerrit needs
2064to be restarted before it will use the new values.
2065
Shawn O. Pearce7b405712009-05-08 18:27:53 -07002066Configurable Parameters
2067~~~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08002068
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07002069site_path::
2070+
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08002071Local filesystem directory holding the site customization assets.
2072Placing this directory under version control and/or backup is a
2073good idea.
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07002074+
Shawn O. Pearcec5fed822009-11-17 16:10:10 -08002075Files in this directory provide additional configuration.
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07002076+
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08002077Other files support site customization.
Shawn O. Pearce8e9c73b2009-05-08 17:38:25 -07002078+
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08002079* link:config-headerfooter.html[Site Header/Footer]
Shawn O. Pearcee7ec0532009-05-08 09:42:54 -07002080* link:config-replication.html[Git Replication/Mirroring]
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08002081
Shawn O. Pearce5500e692009-05-28 15:55:01 -07002082GERRIT
2083------
2084Part of link:index.html[Gerrit Code Review]