Shawn O. Pearce | e31d02c | 2009-12-08 12:21:37 -0800 | [diff] [blame] | 1 | Gerrit Code Review - Configuration |
| 2 | ================================== |
Shawn O. Pearce | d2b73db | 2009-01-09 11:55:47 -0800 | [diff] [blame] | 3 | |
Shawn O. Pearce | c5fed82 | 2009-11-17 16:10:10 -0800 | [diff] [blame] | 4 | File `etc/gerrit.config` |
| 5 | ------------------------ |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 6 | |
Shawn O. Pearce | c5fed82 | 2009-11-17 16:10:10 -0800 | [diff] [blame] | 7 | The optional file `'$site_path'/etc/gerrit.config` is a Git-style |
| 8 | config file that controls many host specific settings for Gerrit. |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 9 | |
| 10 | [NOTE] |
Shawn O. Pearce | c5fed82 | 2009-11-17 16:10:10 -0800 | [diff] [blame] | 11 | The contents of the `etc/gerrit.config` file are cached at startup |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 12 | by Gerrit. If you modify any propeties in this file, Gerrit needs |
| 13 | to be restarted before it will use the new values. |
| 14 | |
Shawn O. Pearce | c5fed82 | 2009-11-17 16:10:10 -0800 | [diff] [blame] | 15 | Sample `etc/gerrit.config`: |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 16 | ---- |
| 17 | [core] |
Shawn O. Pearce | 9d342a4 | 2009-12-16 15:49:05 -0800 | [diff] [blame] | 18 | packedGitLimit = 200 m |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 19 | |
| 20 | [cache] |
Shawn O. Pearce | 9d342a4 | 2009-12-16 15:49:05 -0800 | [diff] [blame] | 21 | directory = /var/cache/gerrit2 |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 22 | |
| 23 | [cache "diff"] |
Shawn O. Pearce | 9d342a4 | 2009-12-16 15:49:05 -0800 | [diff] [blame] | 24 | diskbuffer = 10 m |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 25 | ---- |
| 26 | |
Shawn O. Pearce | 8efb2a7 | 2009-08-18 19:45:33 -0700 | [diff] [blame] | 27 | [[auth]]Section auth |
| 28 | ~~~~~~~~~~~~~~~~~~~~ |
Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 29 | |
| 30 | See also link:config-sso.html[SSO configuration]. |
| 31 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 32 | [[auth.type]]auth.type:: |
Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 33 | + |
Shawn O. Pearce | 2920ef3 | 2009-08-03 08:03:34 -0700 | [diff] [blame] | 34 | Type of user authentication employed by Gerrit. The supported |
| 35 | values are: |
Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 36 | + |
| 37 | * `OpenID` |
| 38 | + |
| 39 | The default setting. Gerrit uses any valid OpenID |
| 40 | provider chosen by the end-user. For more information see |
Shawn O. Pearce | 2920ef3 | 2009-08-03 08:03:34 -0700 | [diff] [blame] | 41 | http://openid.net/[openid.net]. |
Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 42 | + |
| 43 | * `HTTP` |
| 44 | + |
Shawn O. Pearce | 2920ef3 | 2009-08-03 08:03:34 -0700 | [diff] [blame] | 45 | Gerrit relies upon data presented in the HTTP request. This includes |
| 46 | HTTP basic authentication, or some types of commerical single-sign-on |
| 47 | solutions. With this setting enabled the authentication must |
| 48 | take place in the web server or servlet container, and not from |
| 49 | within Gerrit. |
| 50 | + |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 51 | * `HTTP_LDAP` |
| 52 | + |
| 53 | Exactly like `HTTP` (above), but additionally Gerrit pre-populates |
| 54 | a user's full name and email address based on information obtained |
| 55 | from the user's account object in LDAP. The user's group membership |
| 56 | is also pulled from LDAP, making any LDAP groups that a user is a |
| 57 | member of available as groups in Gerrit. |
| 58 | + |
Shawn O. Pearce | f7e065e | 2009-09-26 20:01:10 -0700 | [diff] [blame] | 59 | * `LDAP` |
| 60 | + |
| 61 | Gerrit prompts the user to enter a username and a password, which |
| 62 | it then verifies by performing a simple bind against the configured |
| 63 | <<ldap.server,ldap.server>>. In this configuration the web server |
| 64 | is not involved in the user authentication process. |
| 65 | + |
Shawn O. Pearce | c892d34 | 2010-02-17 17:00:50 -0800 | [diff] [blame] | 66 | The actual username used in the LDAP simple bind request is the |
| 67 | account's full DN, which is discovered by first querying the |
| 68 | directory using either an anonymous request, or the configured |
| 69 | <<ldap.username>> identity. |
| 70 | |
| 71 | * `LDAP_BIND` |
| 72 | + |
| 73 | Gerrit prompts the user to enter a username and a password, which |
| 74 | it then verifies by performing a simple bind against the configured |
| 75 | <<ldap.server,ldap.server>>. In this configuration the web server |
| 76 | is not involved in the user authentication process. |
| 77 | + |
| 78 | Unlike LDAP above, the username used to perform the LDAP simple bind |
| 79 | request is the exact string supplied by in the dialog by the user. |
| 80 | The configured <<ldap.username>> identity is not used to obtain |
| 81 | account information. |
| 82 | + |
Shawn O. Pearce | 2920ef3 | 2009-08-03 08:03:34 -0700 | [diff] [blame] | 83 | * `DEVELOPMENT_BECOME_ANY_ACCOUNT` |
| 84 | + |
| 85 | *DO NOT USE*. Only for use in a development environment. |
| 86 | + |
| 87 | When this is the configured authentication method a hyperlink titled |
| 88 | `Become` appears in the top right corner of the page, taking the |
| 89 | user to a form where they can enter the username of any existing |
| 90 | user account, and immediately login as that account, without any |
| 91 | authentication taking place. This form of authentication is only |
| 92 | useful for the GWT hosted mode shell, where OpenID authentication |
| 93 | redirects might be risky to the developer's host computer, and HTTP |
| 94 | authentication is not possible. |
Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 95 | |
| 96 | + |
| 97 | By default, OpenID. |
| 98 | |
Shawn O. Pearce | 533cafc | 2010-05-11 16:05:27 -0700 | [diff] [blame] | 99 | [[auth.allowedOpenID]]auth.allowedOpenID:: |
| 100 | + |
| 101 | List of permitted OpenID providers. A user may only authenticate |
| 102 | with an OpenID that matches this list. Only used if `auth.type` |
| 103 | was set to OpenID (the default). |
| 104 | + |
| 105 | Patterns may be either a regular expression (start with `^` and |
| 106 | end with `$`) or be a simple prefix (any other string). |
| 107 | + |
| 108 | By default, the list contains two values, `http://` and `https://`, |
| 109 | allowing users to authenticate with any OpenID provider. |
| 110 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 111 | [[auth.trustedOpenID]]auth.trustedOpenID:: |
Shawn O. Pearce | d7c026d | 2009-08-05 20:11:22 -0700 | [diff] [blame] | 112 | + |
| 113 | List of trusted OpenID providers. Only used if `auth.type` was |
| 114 | set to OpenID (the default). |
| 115 | + |
| 116 | In order for a user to take advantage of permissions beyond those |
| 117 | granted to the `Anonymous Users` and `Registered Users` groups, |
| 118 | the user account must only have OpenIDs which match at least one |
| 119 | pattern from this list. |
| 120 | + |
| 121 | Patterns may be either a regular expression (start with `^` and |
| 122 | end with `$`) or be a simple prefix (any other string). |
| 123 | + |
| 124 | By default, the list contains two values, `http://` and `https://`, |
| 125 | allowing Gerrit to trust any OpenID it receives. |
| 126 | |
Shawn O. Pearce | 89030bc | 2010-04-24 17:25:29 -0700 | [diff] [blame] | 127 | [[auth.maxOpenIdSessionAge]]auth.maxOpenIdSessionAge:: |
| 128 | + |
| 129 | Time in seconds before an OpenID provider must force the user |
| 130 | to authenticate themselves again before authentication to this |
| 131 | Gerrit server. Currently this is only a polite request, and users |
| 132 | coming from providers that don't support the PAPE extension will |
| 133 | be accepted anyway. In the future it may be enforced, rejecting |
| 134 | users coming from providers that don't honor the max session age. |
| 135 | + |
| 136 | If set to 0, the provider will always force the user to authenticate |
| 137 | (e.g. supply their password). Values should use common unit suffixes |
| 138 | to express their setting: |
| 139 | + |
| 140 | * s, sec, second, seconds |
| 141 | * m, min, minute, minutes |
| 142 | * h, hr, hour, hours |
| 143 | * d, day, days |
| 144 | * w, week, weeks (`1 week` is treated as `7 days`) |
| 145 | * mon, month, months (`1 month` is treated as `30 days`) |
| 146 | * y, year, years (`1 year` is treated as `365 days`) |
| 147 | |
| 148 | + |
| 149 | Default is -1, permitting infinite time between authentications. |
| 150 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 151 | [[auth.httpHeader]]auth.httpHeader:: |
Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 152 | + |
| 153 | HTTP header to trust the username from, or unset to select HTTP basic |
| 154 | or digest authentication. Only used if `auth.type` was set to HTTP. |
| 155 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 156 | [[auth.logoutUrl]]auth.logoutUrl:: |
Shawn O. Pearce | 12b5d84 | 2009-08-15 15:11:10 -0700 | [diff] [blame] | 157 | + |
| 158 | URL to redirect a browser to after the end-user has clicked on the |
| 159 | "Sign Out" link in the upper right corner. Organizations using an |
| 160 | enterprise single-sign-on solution may want to redirect the browser |
| 161 | to the SSO product's sign-out page. |
| 162 | + |
| 163 | If not set, the redirect returns to the list of all open changes. |
| 164 | |
Shawn O. Pearce | c9d26b5 | 2009-12-16 08:05:27 -0800 | [diff] [blame] | 165 | [[auth.registerUrl]]auth.registerUrl:: |
| 166 | + |
| 167 | Target for the "Register" link in the upper right corner. Used only |
| 168 | when auth.type is `LDAP`. |
| 169 | + |
| 170 | If not set, no "Register" link is displayed. |
| 171 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 172 | [[auth.emailFormat]]auth.emailFormat:: |
Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 173 | + |
| 174 | Optional format string to construct user email addresses out of |
Shawn O. Pearce | f7e065e | 2009-09-26 20:01:10 -0700 | [diff] [blame] | 175 | user login names. Only used if auth.type is `HTTP`, `HTTP_LDAP` |
| 176 | or `LDAP`. |
Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 177 | + |
| 178 | This value can be set to a format string, where `\{0\}` is replaced |
| 179 | with the login name. E.g. "\{0\}+gerrit@example.com" with a user |
| 180 | login name of "foo" will produce "foo+gerrit@example.com" during |
| 181 | the first time user "foo" registers. |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 182 | + |
Shawn O. Pearce | f7e065e | 2009-09-26 20:01:10 -0700 | [diff] [blame] | 183 | If the site is using `HTTP_LDAP` or `LDAP`, using this option is |
| 184 | discouraged. Setting `ldap.accountEmailAddress` and importing the |
| 185 | email address from the LDAP directory is generally preferred. |
Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 186 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 187 | [[auth.contributorAgreements]]auth.contributorAgreements:: |
Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 188 | + |
| 189 | Controls whether or not the contributor agreement features are |
| 190 | enabled for the Gerrit site. If enabled a user must complete a |
| 191 | contributor agreement before they can upload changes. |
| 192 | + |
| 193 | If enabled, the admin must also insert one or more rows into |
| 194 | `contributor_agreements` and create agreement files under |
| 195 | `'$site_path'/static`, so users can actually complete one or |
Grzegorz Kossakowski | 28e4e1b | 2009-09-23 11:33:34 -0700 | [diff] [blame] | 196 | more agreements. |
Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 197 | + |
| 198 | By default this is false (no agreements are used). |
| 199 | |
Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 200 | auth.allowGoogleAccountUpgrade:: |
| 201 | + |
Shawn O. Pearce | 48eea07 | 2009-08-31 10:53:12 -0700 | [diff] [blame] | 202 | Allows Google Account users to automatically update their Gerrit |
| 203 | account when/if their Google Account OpenID identity token changes. |
| 204 | Identity tokens can change if the server changes hostnames, or |
| 205 | for other reasons known only to Google. The upgrade path works |
| 206 | by matching users by email address if the identity is not present, |
| 207 | and then changing the identity. |
Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 208 | + |
Shawn O. Pearce | 48eea07 | 2009-08-31 10:53:12 -0700 | [diff] [blame] | 209 | This setting also permits old Gerrit 1.x users to seamlessly upgrade |
| 210 | from Google Accounts on Google App Engine to OpenID authentication. |
Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 211 | + |
Shawn O. Pearce | 48eea07 | 2009-08-31 10:53:12 -0700 | [diff] [blame] | 212 | Having this enabled incurs an extra database query when Google |
Shawn O. Pearce | e31d02c | 2009-12-08 12:21:37 -0800 | [diff] [blame] | 213 | Account users register with the Gerrit server. |
Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 214 | + |
| 215 | By default, unset/false. |
| 216 | |
Shawn O. Pearce | 8efb2a7 | 2009-08-18 19:45:33 -0700 | [diff] [blame] | 217 | [[cache]]Section cache |
| 218 | ~~~~~~~~~~~~~~~~~~~~~~ |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 219 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 220 | [[cache.directory]]cache.directory:: |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 221 | + |
| 222 | Path to a local directory where Gerrit can write cached entities for |
Shawn O. Pearce | 4b21228 | 2009-08-05 19:45:56 -0700 | [diff] [blame] | 223 | future lookup. This local disk cache is used to retain potentially |
| 224 | expensive to compute information across restarts. If the location |
| 225 | does not exist, Gerrit will try to create it. |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 226 | + |
Shawn O. Pearce | 4b21228 | 2009-08-05 19:45:56 -0700 | [diff] [blame] | 227 | If not absolute, the path is resolved relative to `$site_path`. |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 228 | + |
Shawn O. Pearce | 4b21228 | 2009-08-05 19:45:56 -0700 | [diff] [blame] | 229 | Default is unset, no disk cache. |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 230 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 231 | [[cache.name.maxAge]]cache.<name>.maxAge:: |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 232 | + |
Shawn O. Pearce | d9c403e | 2009-08-19 08:35:41 -0700 | [diff] [blame] | 233 | Maximum age to keep an entry in the cache. If an entry has not |
| 234 | been accessed in this period of time, it is removed from the cache. |
| 235 | Values should use common unit suffixes to express their setting: |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 236 | + |
Shawn O. Pearce | d9c403e | 2009-08-19 08:35:41 -0700 | [diff] [blame] | 237 | * s, sec, second, seconds |
| 238 | * m, min, minute, minutes |
| 239 | * h, hr, hour, hours |
| 240 | * d, day, days |
| 241 | * w, week, weeks (`1 week` is treated as `7 days`) |
| 242 | * mon, month, months (`1 month` is treated as `30 days`) |
| 243 | * y, year, years (`1 year` is treated as `365 days`) |
| 244 | |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 245 | + |
Shawn O. Pearce | 3fdbf39 | 2009-09-04 18:08:26 -0700 | [diff] [blame] | 246 | If a unit suffix is not specified, `minutes` is assumed. If 0 is |
| 247 | supplied, the maximum age is infinite and items are never purged |
| 248 | except when the cache is full. |
Shawn O. Pearce | d9c403e | 2009-08-19 08:35:41 -0700 | [diff] [blame] | 249 | + |
| 250 | Default is `90 days` for most caches, except: |
| 251 | + |
| 252 | * `"ldap_groups"`: default is `1 hour` |
| 253 | * `"openid"`: default is `5 minutes` |
| 254 | * `"web_sessions"`: default is `12 hours` |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 255 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 256 | [[cache.name.memoryLimit]]cache.<name>.memoryLimit:: |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 257 | + |
| 258 | Maximum number of cache items to retain in memory. Keep in mind |
| 259 | this is total number of items, not bytes of heap used. |
| 260 | + |
Shawn O. Pearce | efaf979 | 2009-09-02 18:12:52 -0700 | [diff] [blame] | 261 | Default is 1024 for most caches, except: |
| 262 | + |
| 263 | * `"diff"`: default is `128` |
| 264 | * `"openid"`: default is `64` |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 265 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 266 | [[cache.name.diskLimit]]cache.<name>.diskLimit:: |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 267 | + |
| 268 | Maximum number of cache items to retain on disk, if this cache |
| 269 | supports storing its items to disk. Like memoryLimit, this is |
Shawn O. Pearce | a5e36d5 | 2009-08-17 07:05:03 -0700 | [diff] [blame] | 270 | total number of items, not bytes of disk used. If 0, disk storage |
| 271 | for this cache is disabled. |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 272 | + |
| 273 | Default is 16384. |
| 274 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 275 | [[cache.name.diskBuffer]]cache.<name>.diskBuffer:: |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 276 | + |
| 277 | Number of bytes to buffer in memory before writing less frequently |
| 278 | accessed cache items to disk, if this cache supports storing its |
| 279 | items to disk. |
| 280 | + |
| 281 | Default is 5 MiB. |
| 282 | + |
| 283 | Common unit suffixes of 'k', 'm', or 'g' are supported. |
| 284 | |
Shawn O. Pearce | 8efb2a7 | 2009-08-18 19:45:33 -0700 | [diff] [blame] | 285 | [[cache_names]]Standard Caches |
Shawn O. Pearce | 4016a93 | 2009-05-28 15:12:40 -0700 | [diff] [blame] | 286 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 287 | |
Shawn O. Pearce | 4a45271 | 2009-05-28 20:12:33 -0700 | [diff] [blame] | 288 | cache `"accounts"`:: |
| 289 | + |
Shawn O. Pearce | 4dba988 | 2009-08-05 19:55:15 -0700 | [diff] [blame] | 290 | Cache entries contain important details of an active user, including |
| 291 | their display name, preferences, known email addresses, and group |
| 292 | memberships. Entry information is obtained from the following |
| 293 | database tables: |
| 294 | + |
| 295 | * `accounts` |
| 296 | + |
| 297 | * `account_group_members` |
| 298 | + |
| 299 | * `account_external_ids` |
| 300 | |
| 301 | + |
| 302 | If direct updates are made to any of these database tables, this |
| 303 | cache should be flushed. |
| 304 | |
| 305 | cache `"accounts_byemail"`:: |
| 306 | + |
| 307 | Caches account identities keyed by email address, which is scanned |
| 308 | from the `account_external_ids` database table. If updates are |
| 309 | made to this table, this cache should be flushed. |
Shawn O. Pearce | 4a45271 | 2009-05-28 20:12:33 -0700 | [diff] [blame] | 310 | |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 311 | cache `"diff"`:: |
| 312 | + |
Shawn O. Pearce | efaf979 | 2009-09-02 18:12:52 -0700 | [diff] [blame] | 313 | Each item caches the differences between two commits, at both the |
| 314 | directory and file levels. Gerrit uses this cache to accelerate |
| 315 | the display of affected file names, as well as file contents. |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 316 | + |
Shawn O. Pearce | efaf979 | 2009-09-02 18:12:52 -0700 | [diff] [blame] | 317 | Entries in this cache are relatively large, so the memory limit |
| 318 | should not be set incredibly high. Administrators should try to |
| 319 | target cache.diff.memoryLimit to be roughly the number of changes |
| 320 | which their users will process in a 1 or 2 day span. |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 321 | + |
| 322 | Keeping entries for 90 days gives sufficient time for most changes |
| 323 | to be submitted or abandoned before their relevant difference items |
| 324 | expire out. |
| 325 | |
Shawn O. Pearce | 4a45271 | 2009-05-28 20:12:33 -0700 | [diff] [blame] | 326 | cache `"groups"`:: |
| 327 | + |
Shawn O. Pearce | 4dba988 | 2009-08-05 19:55:15 -0700 | [diff] [blame] | 328 | Caches the basic group information from the `account_groups` table, |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 329 | including the group owner, name, and description. |
| 330 | + |
| 331 | Gerrit group membership obtained from the `account_group_members` |
| 332 | table is cached under the `"accounts"` cache, above. External group |
| 333 | membership obtained from LDAP is cached under `"ldap_groups"`. |
| 334 | |
| 335 | cache `"ldap_groups"`:: |
| 336 | + |
| 337 | Caches the LDAP groups that a user belongs to, if LDAP has been |
| 338 | configured on this server. This cache should be configured with a |
| 339 | low maxAge setting, to ensure LDAP modifications are picked up in |
| 340 | a timely fashion. |
Shawn O. Pearce | 4a45271 | 2009-05-28 20:12:33 -0700 | [diff] [blame] | 341 | |
Shawn O. Pearce | 6d26f4a | 2009-08-24 15:43:52 -0700 | [diff] [blame] | 342 | cache `"ldap_usernames"`:: |
| 343 | + |
| 344 | Caches a mapping of LDAP username to Gerrit account identity. The |
| 345 | cache automatically updates when a user first creates their account |
| 346 | within Gerrit, so the cache expire time is largely irrelevant. |
| 347 | |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 348 | cache `"openid"`:: |
| 349 | + |
| 350 | If OpenID authentication is enabled, caches the OpenID discovery |
| 351 | response by URL, for up to 5 minutes. This can reduce the time |
| 352 | required for OpenID authentication through very common providers, |
| 353 | such as Google Accounts. |
| 354 | |
Shawn O. Pearce | 4a45271 | 2009-05-28 20:12:33 -0700 | [diff] [blame] | 355 | cache `"projects"`:: |
| 356 | + |
| 357 | Caches the project description records, from the `projects` table |
| 358 | in the database. If a project record is updated or deleted, this |
| 359 | cache should be flushed. Newly inserted projects do not require |
| 360 | a cache flush, as they will be read upon first reference. |
| 361 | |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 362 | cache `"sshkeys"`:: |
| 363 | + |
| 364 | Caches unpacked versions of user SSH keys, so the internal SSH daemon |
| 365 | can match against them during authentication. The unit of storage |
| 366 | is per-user, so 1024 items translates to 1024 unique user accounts. |
| 367 | As each individual user account may configure multiple SSH keys, |
| 368 | the total number of keys may be larger than the item count. |
Shawn O. Pearce | 4a45271 | 2009-05-28 20:12:33 -0700 | [diff] [blame] | 369 | + |
| 370 | This cache is based off the `account_ssh_keys` table and the |
| 371 | `accounts.ssh_user_name` column in the database. If either is |
| 372 | modified directly, this cache should be flushed. |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 373 | |
Shawn O. Pearce | b09322b | 2009-08-15 17:49:00 -0700 | [diff] [blame] | 374 | cache `"web_sessions"`:: |
| 375 | + |
| 376 | Tracks the live user sessions coming in over HTTP. Flushing this |
| 377 | cache would cause all users to be signed out immediately, forcing |
Shawn O. Pearce | 727d80f | 2009-08-17 07:57:54 -0700 | [diff] [blame] | 378 | them to sign-in again. To avoid breaking active users, this cache |
| 379 | is not flushed automatically by `gerrit flush-caches --all`, but |
| 380 | instead must be explicitly requested. |
| 381 | + |
| 382 | If no disk cache is configured (or `cache.web_sessions.diskLimit` |
| 383 | is set to 0) a server restart will force all users to sign-out, |
| 384 | and need to sign-in again after the restart, as the cache was |
| 385 | unable to persist the session information. Enabling a disk cache |
| 386 | is strongly recommended. |
| 387 | + |
| 388 | Session storage is relatively inexpensive, the average entry in |
| 389 | this cache is approximately 248 bytes, depending on the JVM. |
Shawn O. Pearce | b09322b | 2009-08-15 17:49:00 -0700 | [diff] [blame] | 390 | |
Shawn O. Pearce | 4016a93 | 2009-05-28 15:12:40 -0700 | [diff] [blame] | 391 | See also link:cmd-flush-caches.html[gerrit flush-caches]. |
| 392 | |
Shawn O. Pearce | 29de436 | 2010-03-03 17:51:26 -0800 | [diff] [blame] | 393 | [[cache_options]]Cache Options |
| 394 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 395 | |
| 396 | cache.diff.intraline:: |
| 397 | + |
| 398 | Boolean to enable or disable the computation of intraline differences |
| 399 | when populating a diff cache entry. Changing this setting in the |
| 400 | server configuration requires flushing the "diff" cache after a |
| 401 | restart, otherwise older cache entries stored on disk may not reflect |
| 402 | the current server setting. This flag is provided primarily as a |
| 403 | backdoor to disable the intraline difference feature if necessary. |
| 404 | + |
| 405 | Default is true, enabled. |
| 406 | |
Brad Larson | 991a31b | 2009-11-03 14:30:26 -0600 | [diff] [blame] | 407 | |
| 408 | [[commentlink]]Section commentlink |
| 409 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 410 | Comment links are find/replace strings applied to change descriptions, |
| 411 | patch comments, and in-line code comments to turn set strings into |
| 412 | hyperlinks. One common use is for linking to bug-tracking systems. |
| 413 | |
| 414 | In the following example configuration the 'changeid' comment link |
Shawn O. Pearce | da866ae | 2009-12-16 15:46:03 -0800 | [diff] [blame] | 415 | will match typical Gerrit Change-Id values and create a hyperlink |
| 416 | to changes which reference it. The second configuration 'bugzilla' |
| 417 | will hyperlink terms such as 'bug 42' to an external bug tracker, |
| 418 | supplying the argument record number '42' for display. The third |
| 419 | configuration 'tracker' uses raw HTML to more preciously control |
| 420 | how the replacement is displayed to the user. |
Brad Larson | 991a31b | 2009-11-03 14:30:26 -0600 | [diff] [blame] | 421 | |
Shawn O. Pearce | da866ae | 2009-12-16 15:46:03 -0800 | [diff] [blame] | 422 | ---- |
| 423 | [commentlink "changeid"] |
| 424 | match = (I[0-9a-f]{8,40}) |
| 425 | link = "#q,$1,n,z" |
Brad Larson | 991a31b | 2009-11-03 14:30:26 -0600 | [diff] [blame] | 426 | |
Shawn O. Pearce | da866ae | 2009-12-16 15:46:03 -0800 | [diff] [blame] | 427 | [commentlink "bugzilla"] |
Shawn O. Pearce | c99630a | 2010-02-21 19:11:56 -0800 | [diff] [blame] | 428 | match = "(bug\\s+#?)(\\d+)" |
Shawn O. Pearce | da866ae | 2009-12-16 15:46:03 -0800 | [diff] [blame] | 429 | link = http://bugs.example.com/show_bug.cgi?id=$2 |
Brad Larson | 991a31b | 2009-11-03 14:30:26 -0600 | [diff] [blame] | 430 | |
Shawn O. Pearce | da866ae | 2009-12-16 15:46:03 -0800 | [diff] [blame] | 431 | [commentlink "tracker"] |
| 432 | match = ([Bb]ug:\\s+)(\\d+) |
| 433 | html = $1<a href=\"http://trak.example.com/$2\">$2</a> |
| 434 | ---- |
| 435 | |
| 436 | [[commentlink.name.match]]commentlink.<name>.match:: |
Brad Larson | 991a31b | 2009-11-03 14:30:26 -0600 | [diff] [blame] | 437 | + |
Shawn O. Pearce | da866ae | 2009-12-16 15:46:03 -0800 | [diff] [blame] | 438 | A JavaScript regular expression to match positions to be replaced |
| 439 | with a hyperlink. Subexpressions of the matched string can be |
| 440 | stored using groups and accessed with `$'n'` syntax, where 'n' |
| 441 | is the group number, starting from 1. |
Brad Larson | 991a31b | 2009-11-03 14:30:26 -0600 | [diff] [blame] | 442 | + |
Shawn O. Pearce | c99630a | 2010-02-21 19:11:56 -0800 | [diff] [blame] | 443 | The configuration file parser eats one level of backslashes, so the |
| 444 | character class `\s` requires `\\s` in the configuration file. The |
| 445 | parser also terminates the line at the first `#`, so a match |
| 446 | expression containing # must be wrapped in double quotes. |
Shawn O. Pearce | da866ae | 2009-12-16 15:46:03 -0800 | [diff] [blame] | 447 | + |
Shawn O. Pearce | 665beaa | 2010-02-21 22:41:03 -0800 | [diff] [blame] | 448 | To match case insensitive strings, a character class with both the |
| 449 | upper and lower case character for each position must be used. For |
| 450 | example, to match the string `bug` in a case insensitive way the match |
| 451 | pattern `[bB][uU][gG]` needs to be used. |
| 452 | + |
Shawn O. Pearce | da866ae | 2009-12-16 15:46:03 -0800 | [diff] [blame] | 453 | A common pattern to match is `bug\\s+(\\d+)`. |
Brad Larson | 991a31b | 2009-11-03 14:30:26 -0600 | [diff] [blame] | 454 | |
Shawn O. Pearce | da866ae | 2009-12-16 15:46:03 -0800 | [diff] [blame] | 455 | [[commentlink.name.link]]commentlink.<name>.link:: |
Brad Larson | 991a31b | 2009-11-03 14:30:26 -0600 | [diff] [blame] | 456 | + |
Shawn O. Pearce | da866ae | 2009-12-16 15:46:03 -0800 | [diff] [blame] | 457 | The URL to direct the user to whenever the regular expression is |
| 458 | matched. Groups in the match expression may be accessed as `$'n'`. |
| 459 | + |
| 460 | The link property is used only when the html property is not present. |
| 461 | |
| 462 | [[commentlink.name.html]]commentlink.<name>.html:: |
| 463 | + |
| 464 | HTML to replace the entire matched string with. If present, |
| 465 | this property overrides the link property above. Groups in the |
| 466 | match expression may be accessed as `$'n'`. |
| 467 | + |
| 468 | The configuration file eats double quotes, so escaping them as |
| 469 | `\"` is necessary to protect them from the parser. |
Brad Larson | 991a31b | 2009-11-03 14:30:26 -0600 | [diff] [blame] | 470 | |
| 471 | |
Shawn O. Pearce | 8efb2a7 | 2009-08-18 19:45:33 -0700 | [diff] [blame] | 472 | [[contactstore]]Section contactstore |
| 473 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
Shawn O. Pearce | 6854bdc | 2009-06-01 08:14:15 -0700 | [diff] [blame] | 474 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 475 | [[contactstore.url]]contactstore.url:: |
Shawn O. Pearce | 6854bdc | 2009-06-01 08:14:15 -0700 | [diff] [blame] | 476 | + |
| 477 | URL of the web based contact store Gerrit will send any offline |
| 478 | contact information to when it collects the data from users as part |
| 479 | of a contributor agreement. |
| 480 | + |
| 481 | See link:config-contact.html[Contact Information]. |
| 482 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 483 | [[contactstore.appsec]]contactstore.appsec:: |
Shawn O. Pearce | 6854bdc | 2009-06-01 08:14:15 -0700 | [diff] [blame] | 484 | + |
| 485 | Shared secret of the web based contact store. |
| 486 | |
Shawn O. Pearce | e24c71fb | 2009-12-07 20:32:40 -0800 | [diff] [blame] | 487 | |
| 488 | [[container]]Section container |
| 489 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 490 | |
| 491 | These settings are applied only if Gerrit is started as the container |
| 492 | process through Gerrit's 'gerrit.sh' rc.d compatible wrapper script. |
| 493 | |
| 494 | [[container.heapLimit]]container.heapLimit:: |
| 495 | + |
| 496 | Maximum heap size of the Java process running Gerrit, in bytes. |
| 497 | This property is translated into the '-Xmx' flag for the JVM. |
| 498 | + |
| 499 | Default is platform and JVM specific. |
| 500 | + |
| 501 | Common unit suffixes of 'k', 'm', or 'g' are supported. |
| 502 | |
| 503 | [[container.javaHome]]container.javaHome:: |
| 504 | + |
| 505 | Path of the JRE/JDK installation to run Gerrit with. If not set, the |
| 506 | Gerrit startup script will attempt to search your system and guess |
| 507 | a suitable JRE. Overrides the environment variable 'JAVA_HOME'. |
| 508 | |
| 509 | [[container.javaOptions]]container.javaOptions:: |
| 510 | + |
| 511 | Additional options to pass along to the Java runtime. If multiple |
| 512 | values are configured, they are passed in order on the command line, |
| 513 | separated by spaces. These options are appended onto 'JAVA_OPTIONS'. |
| 514 | |
| 515 | [[container.user]]container.user:: |
| 516 | + |
| 517 | Login name (or UID) of the operating system user the Gerrit JVM |
| 518 | will execute as. If not set, defaults to the user who launched |
| 519 | the 'gerrit.sh' wrapper script. |
| 520 | |
| 521 | [[container.war]]container.war:: |
| 522 | + |
| 523 | Path of the JAR file to start daemon execution with. This should |
| 524 | be the path of the local 'gerrit.war' archive. Overrides the |
| 525 | environment variable 'GERRIT_WAR'. |
| 526 | + |
| 527 | If not set, defaults to '$site_path/bin/gerrit.war', or to |
| 528 | '$HOME/gerrit.war'. |
| 529 | |
| 530 | |
Shawn O. Pearce | 8efb2a7 | 2009-08-18 19:45:33 -0700 | [diff] [blame] | 531 | [[core]]Section core |
| 532 | ~~~~~~~~~~~~~~~~~~~~ |
Shawn O. Pearce | 6854bdc | 2009-06-01 08:14:15 -0700 | [diff] [blame] | 533 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 534 | [[core.packedGitWindowSize]]core.packedGitWindowSize:: |
Shawn O. Pearce | 6854bdc | 2009-06-01 08:14:15 -0700 | [diff] [blame] | 535 | + |
| 536 | Number of bytes of a pack file to load into memory in a single |
| 537 | read operation. This is the "page size" of the JGit buffer cache, |
| 538 | used for all pack access operations. All disk IO occurs as single |
| 539 | window reads. Setting this too large may cause the process to load |
| 540 | more data than is required; setting this too small may increase |
| 541 | the frequency of `read()` system calls. |
| 542 | + |
| 543 | Default on JGit is 8 KiB on all platforms. |
| 544 | + |
| 545 | Common unit suffixes of 'k', 'm', or 'g' are supported. |
| 546 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 547 | [[core.packedGitLimit]]core.packedGitLimit:: |
Shawn O. Pearce | 6854bdc | 2009-06-01 08:14:15 -0700 | [diff] [blame] | 548 | + |
| 549 | Maximum number of bytes to load and cache in memory from pack files. |
| 550 | If JGit needs to access more than this many bytes it will unload less |
| 551 | frequently used windows to reclaim memory space within the process. |
| 552 | As this buffer must be shared with the rest of the JVM heap, it |
| 553 | should be a fraction of the total memory available. |
| 554 | + |
| 555 | Default on JGit is 10 MiB on all platforms. |
| 556 | + |
| 557 | Common unit suffixes of 'k', 'm', or 'g' are supported. |
| 558 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 559 | [[core.deltaBaseCaseLimit]]core.deltaBaseCacheLimit:: |
Shawn O. Pearce | 6854bdc | 2009-06-01 08:14:15 -0700 | [diff] [blame] | 560 | + |
| 561 | Maximum number of bytes to reserve for caching base objects |
| 562 | that multiple deltafied objects reference. By storing the entire |
| 563 | decompressed base object in a cache Git is able to avoid unpacking |
| 564 | and decompressing frequently used base objects multiple times. |
| 565 | + |
| 566 | Default on JGit is 10 MiB on all platforms. You probably do not |
| 567 | need to adjust this value. |
| 568 | + |
| 569 | Common unit suffixes of 'k', 'm', or 'g' are supported. |
| 570 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 571 | [[core.packedGitOpenFiles]]core.packedGitOpenFiles:: |
Shawn O. Pearce | 6854bdc | 2009-06-01 08:14:15 -0700 | [diff] [blame] | 572 | + |
| 573 | Maximum number of pack files to have open at once. A pack file |
| 574 | must be opened in order for any of its data to be available in |
| 575 | a cached window. |
| 576 | + |
| 577 | If you increase this to a larger setting you may need to also adjust |
| 578 | the ulimit on file descriptors for the host JVM, as Gerrit needs |
| 579 | additional file descriptors available for network sockets and other |
| 580 | repository data manipulation. |
| 581 | + |
| 582 | Default on JGit is 128 file descriptors on all platforms. |
| 583 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 584 | [[core.packedGitMmap]]core.packedGitMmap:: |
Shawn O. Pearce | 6854bdc | 2009-06-01 08:14:15 -0700 | [diff] [blame] | 585 | + |
| 586 | When true, JGit will use `mmap()` rather than `malloc()+read()` |
| 587 | to load data from pack files. The use of mmap can be problematic |
| 588 | on some JVMs as the garbage collector must deduce that a memory |
| 589 | mapped segment is no longer in use before a call to `munmap()` |
| 590 | can be made by the JVM native code. |
| 591 | + |
| 592 | In server applications (such as Gerrit) that need to access many |
| 593 | pack files, setting this to true risks artifically running out |
| 594 | of virtual address space, as the garbage collector cannot reclaim |
| 595 | unused mapped spaces fast enough. |
| 596 | + |
| 597 | Default on JGit is false. Although potentially slower, it yields |
| 598 | much more predictable behavior. |
| 599 | |
Shawn O. Pearce | fb5548e | 2009-11-11 07:39:21 -0800 | [diff] [blame] | 600 | [[database]]Section database |
| 601 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 602 | |
| 603 | The database section configures where Gerrit stores its metadata |
| 604 | records about user accounts and change reviews. |
| 605 | |
Shawn O. Pearce | 9d342a4 | 2009-12-16 15:49:05 -0800 | [diff] [blame] | 606 | ---- |
| 607 | [database] |
Shawn O. Pearce | 1be3906 | 2009-12-19 14:11:52 -0800 | [diff] [blame] | 608 | type = POSTGRESQL |
Shawn O. Pearce | 9d342a4 | 2009-12-16 15:49:05 -0800 | [diff] [blame] | 609 | hostname = localhost |
| 610 | database = reviewdb |
| 611 | username = gerrit2 |
| 612 | password = s3kr3t |
| 613 | ---- |
Shawn O. Pearce | fb5548e | 2009-11-11 07:39:21 -0800 | [diff] [blame] | 614 | |
| 615 | [[database.type]]database.type:: |
| 616 | + |
| 617 | Type of database server to connect to. If set this value will be |
| 618 | used to automatically create correct database.driver and database.url |
| 619 | values to open the connection. |
| 620 | + |
Shawn O. Pearce | 1be3906 | 2009-12-19 14:11:52 -0800 | [diff] [blame] | 621 | * `POSTGRESQL` |
Shawn O. Pearce | fb5548e | 2009-11-11 07:39:21 -0800 | [diff] [blame] | 622 | + |
| 623 | Connect to a PostgreSQL database server. |
| 624 | + |
| 625 | * `H2` |
| 626 | + |
Shawn O. Pearce | 1be3906 | 2009-12-19 14:11:52 -0800 | [diff] [blame] | 627 | Connect to a local embedded H2 database. |
Shawn O. Pearce | fb5548e | 2009-11-11 07:39:21 -0800 | [diff] [blame] | 628 | + |
Shawn O. Pearce | 1be3906 | 2009-12-19 14:11:52 -0800 | [diff] [blame] | 629 | * `MYSQL` |
Shawn O. Pearce | fb5548e | 2009-11-11 07:39:21 -0800 | [diff] [blame] | 630 | + |
| 631 | Connect to a MySQL database server. |
Shawn O. Pearce | 1be3906 | 2009-12-19 14:11:52 -0800 | [diff] [blame] | 632 | + |
| 633 | * `JDBC` |
| 634 | + |
| 635 | Connect using a JDBC driver class name and URL. |
Shawn O. Pearce | fb5548e | 2009-11-11 07:39:21 -0800 | [diff] [blame] | 636 | |
| 637 | + |
| 638 | If not specified, database.driver and database.url are used as-is, |
| 639 | and if they are also not specified, defaults to H2. |
| 640 | |
| 641 | [[database.hostname]]database.hostname:: |
| 642 | + |
| 643 | Hostname of the database server. Defaults to 'localhost'. |
| 644 | |
| 645 | [[database.port]]database.port:: |
| 646 | + |
| 647 | Port number of the database server. Defaults to the default port |
| 648 | of the server named by database.type. |
| 649 | |
| 650 | [[database.database]]database.database:: |
| 651 | + |
Shawn O. Pearce | 1be3906 | 2009-12-19 14:11:52 -0800 | [diff] [blame] | 652 | For POSTGRESQL or MYSQL, the name of the database on the server. |
Shawn O. Pearce | fb5548e | 2009-11-11 07:39:21 -0800 | [diff] [blame] | 653 | + |
| 654 | For H2, this is the path to the database, and if not absolute is |
Shawn O. Pearce | 1be3906 | 2009-12-19 14:11:52 -0800 | [diff] [blame] | 655 | relative to `'$site_path'`. |
Shawn O. Pearce | fb5548e | 2009-11-11 07:39:21 -0800 | [diff] [blame] | 656 | |
| 657 | [[database.username]]database.username:: |
| 658 | + |
| 659 | Username to connect to the database server as. |
| 660 | |
| 661 | [[database.password]]database.password:: |
| 662 | + |
| 663 | Password to authenticate to the database server with. |
| 664 | |
| 665 | [[database.driver]]database.driver:: |
| 666 | + |
Shawn O. Pearce | 1be3906 | 2009-12-19 14:11:52 -0800 | [diff] [blame] | 667 | Name of the JDBC driver class to connect to the database with. |
| 668 | Setting this usually isn't necessary as it can be derived from |
| 669 | database.type or database.url for any supported database. |
Shawn O. Pearce | fb5548e | 2009-11-11 07:39:21 -0800 | [diff] [blame] | 670 | |
| 671 | [[database.url]]database.url:: |
| 672 | + |
Shawn O. Pearce | 1be3906 | 2009-12-19 14:11:52 -0800 | [diff] [blame] | 673 | 'jdbc:' URL for the database. Setting this variable usually |
| 674 | isn't necessary as it can be constructed from the all of the |
| 675 | above properties. |
Shawn O. Pearce | fb5548e | 2009-11-11 07:39:21 -0800 | [diff] [blame] | 676 | |
Shawn O. Pearce | 07f35177d | 2010-02-23 09:47:10 -0800 | [diff] [blame] | 677 | [[database.poolLimit]]database.poolLimit:: |
| 678 | + |
| 679 | Maximum number of open database connections. If the server needs |
| 680 | more than this number, request processing threads will wait up |
| 681 | to <<database.poolMaxWait, poolMaxWait>> seconds for a |
| 682 | connection to be released before they abort with an exception. |
| 683 | This limit must be several units higher than the total number of |
| 684 | httpd and sshd threads as some request processing code paths may |
| 685 | need multiple connections. |
| 686 | + |
| 687 | Default is 8. |
| 688 | |
Shawn O. Pearce | f458bf6 | 2010-02-25 09:03:03 -0800 | [diff] [blame] | 689 | [[database.poolMinIdle]]database.poolMinIdle:: |
Shawn O. Pearce | 07f35177d | 2010-02-23 09:47:10 -0800 | [diff] [blame] | 690 | + |
| 691 | Minimum number of connections to keep idle in the pool. |
| 692 | Default is 4. |
| 693 | |
Shawn O. Pearce | f458bf6 | 2010-02-25 09:03:03 -0800 | [diff] [blame] | 694 | [[database.poolMaxIdle]]database.poolMaxIdle:: |
Shawn O. Pearce | 07f35177d | 2010-02-23 09:47:10 -0800 | [diff] [blame] | 695 | + |
| 696 | Maximum number of connections to keep idle in the pool. If there |
| 697 | are more idle connections, connections will be closed instead of |
| 698 | being returned back to the pool. |
| 699 | Default is 4. |
| 700 | |
| 701 | [[database.poolMaxWait]]database.poolMaxWait:: |
| 702 | + |
| 703 | Maximum amount of time a request processing thread will wait to |
| 704 | acquire a database connection from the pool. If no connection is |
| 705 | released within this time period, the processing thread will abort |
| 706 | its current operations and return an error to the client. |
| 707 | Values should use common unit suffixes to express their setting: |
| 708 | + |
| 709 | * ms, milliseconds |
| 710 | * s, sec, second, seconds |
| 711 | * m, min, minute, minutes |
| 712 | * h, hr, hour, hours |
| 713 | |
| 714 | + |
| 715 | If a unit suffix is not specified, `milliseconds` is assumed. |
| 716 | + |
| 717 | Default is `30 seconds`. |
| 718 | |
Shawn O. Pearce | fb5548e | 2009-11-11 07:39:21 -0800 | [diff] [blame] | 719 | |
Shawn O. Pearce | 8efb2a7 | 2009-08-18 19:45:33 -0700 | [diff] [blame] | 720 | [[gerrit]]Section gerrit |
| 721 | ~~~~~~~~~~~~~~~~~~~~~~~~ |
Shawn O. Pearce | eb7f8ce | 2009-06-01 09:57:15 -0700 | [diff] [blame] | 722 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 723 | [[gerrit.basePath]]gerrit.basePath:: |
Shawn O. Pearce | 9743d0b | 2009-06-01 10:10:06 -0700 | [diff] [blame] | 724 | + |
| 725 | Local filesystem directory holding all Git repositories that |
| 726 | Gerrit knows about and can process changes for. A project |
| 727 | entity in Gerrit maps to a local Git repository by creating |
| 728 | the path string `"$\{basePath}/$\{project_name}.git"`. |
| 729 | + |
| 730 | If relative, the path is resolved relative to `'$site_path'`. |
| 731 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 732 | [[gerrit.canonicalWebUrl]]gerrit.canonicalWebUrl:: |
Shawn O. Pearce | eb7f8ce | 2009-06-01 09:57:15 -0700 | [diff] [blame] | 733 | + |
| 734 | The default URL for Gerrit to be accessed through. |
| 735 | + |
| 736 | Typically this would be set to "http://review.example.com/" or |
| 737 | "http://example.com/gerrit/" so Gerrit can output links that point |
| 738 | back to itself. |
| 739 | + |
| 740 | Setting this is highly recommended, as its necessary for the upload |
| 741 | code invoked by "git push" or "repo upload" to output hyperlinks |
| 742 | to the newly uploaded changes. |
| 743 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 744 | [[gerrit.canonicalGitUrl]]gerrit.canonicalGitUrl:: |
Shawn O. Pearce | eb7f8ce | 2009-06-01 09:57:15 -0700 | [diff] [blame] | 745 | + |
| 746 | Optional base URL for repositories available over the anonymous git |
| 747 | protocol. For example, set this to `git://mirror.example.com/base/` |
| 748 | to have Gerrit display patch set download URLs in the UI. Gerrit |
| 749 | automatically appends the project name onto the end of the URL. |
| 750 | + |
| 751 | By default unset, as the git daemon must be configured externally |
| 752 | by the system administrator, and might not even be running on the |
| 753 | same host as Gerrit. |
| 754 | |
Shawn O. Pearce | 8efb2a7 | 2009-08-18 19:45:33 -0700 | [diff] [blame] | 755 | [[gitweb]]Section gitweb |
| 756 | ~~~~~~~~~~~~~~~~~~~~~~~~ |
Shawn O. Pearce | d7ba11f | 2009-06-01 09:35:41 -0700 | [diff] [blame] | 757 | |
Shawn O. Pearce | 618dae2 | 2010-03-12 19:07:43 -0800 | [diff] [blame] | 758 | Gerrit can forward requests to either an internally managed gitweb |
| 759 | (which allows Gerrit to enforce some access controls), or to an |
| 760 | externally managed gitweb (where the web server manages access). |
Shawn O. Pearce | d7ba11f | 2009-06-01 09:35:41 -0700 | [diff] [blame] | 761 | See also link:config-gitweb.html[Gitweb Integration]. |
| 762 | |
Shawn O. Pearce | 618dae2 | 2010-03-12 19:07:43 -0800 | [diff] [blame] | 763 | [[gitweb.cgi]]gitweb.cgi:: |
| 764 | + |
| 765 | Path to the locally installed `gitweb.cgi` executable. This CGI will |
| 766 | be called by Gerrit Code Review when the URL `/gitweb` is accessed. |
| 767 | Project level access controls are enforced prior to calling the CGI. |
| 768 | + |
| 769 | Defaults to `/usr/lib/cgi-bin/gitweb.cgi` if gitweb.url is not set. |
| 770 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 771 | [[gitweb.url]]gitweb.url:: |
Shawn O. Pearce | d7ba11f | 2009-06-01 09:35:41 -0700 | [diff] [blame] | 772 | + |
| 773 | Optional URL of an affiliated gitweb service. Defines the |
| 774 | web location where a `gitweb.cgi` is installed to browse |
Shawn O. Pearce | 9743d0b | 2009-06-01 10:10:06 -0700 | [diff] [blame] | 775 | gerrit.basePath and the repositories it contains. |
Shawn O. Pearce | d7ba11f | 2009-06-01 09:35:41 -0700 | [diff] [blame] | 776 | + |
| 777 | Gerrit appends any necessary query arguments onto the end of this URL. |
| 778 | For example, "?p=$project.git;h=$commit". |
| 779 | |
Shane Mc Cormack | 27868a4 | 2009-12-28 04:49:39 +0000 | [diff] [blame] | 780 | [[gitweb.type]]gitweb.type:: |
| 781 | + |
| 782 | Optional type of affiliated gitweb service. This allows using |
| 783 | alternatives to gitweb, such as cgit. |
| 784 | + |
| 785 | Valid values are `gitweb`, `cgit` or `custom`. |
| 786 | |
| 787 | [[gitweb.type]]gitweb.revision:: |
| 788 | + |
| 789 | Optional pattern to use for constructing the gitweb URL when pointing |
| 790 | at a specific commit when `custom` is used above. |
| 791 | + |
| 792 | Valid replacements are `$\{project\}` for the project name in Gerrit |
| 793 | and `$\{commit\}` for the SHA1 hash for the commit. |
| 794 | |
| 795 | [[gitweb.type]]gitweb.project:: |
| 796 | + |
| 797 | Optional pattern to use for constructing the gitweb URL when pointing |
| 798 | at a specific project when `custom` is used above. |
| 799 | + |
| 800 | Valid replacements are `$\{project\}` for the project name in Gerrit. |
| 801 | |
| 802 | [[gitweb.type]]gitweb.branch:: |
| 803 | + |
| 804 | Optional pattern to use for constructing the gitweb URL when pointing |
| 805 | at a specific branch when `custom` is used above. |
| 806 | + |
| 807 | Valid replacements are `$\{project\}` for the project name in Gerrit |
| 808 | and `$\{branch\}` for the name of the branch. |
| 809 | |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 810 | |
Shane Mc Cormack | 6c2b677 | 2010-01-12 21:56:44 +0000 | [diff] [blame] | 811 | [[hooks]]Section hooks |
| 812 | ~~~~~~~~~~~~~~~~~~~~~~~~ |
| 813 | |
| 814 | See also link:config-hooks.html[Hooks]. |
| 815 | |
| 816 | [[hooks.path]]hooks.path:: |
| 817 | + |
| 818 | Optional path to hooks, if not specified then `'$site_path'/hooks` will be used. |
| 819 | |
| 820 | [[hooks.patchsetCreatedHook]]hooks.patchsetCreatedHook:: |
| 821 | + |
| 822 | Optional filename for the patchset created hook, if not specified then |
| 823 | `patchset-created` will be used. |
| 824 | |
| 825 | [[hooks.commentAddedHook]]hooks.commentAddedHook:: |
| 826 | + |
| 827 | Optional filename for the comment added hook, if not specified then |
| 828 | `comment-added` will be used. |
| 829 | |
| 830 | [[hooks.changeMergedHook]]hooks.changeMergedHook:: |
| 831 | + |
| 832 | Optional filename for the change merged hook, if not specified then |
| 833 | `change-merged` will be used. |
| 834 | |
| 835 | [[hooks.changeAbandonedHook]]hooks.changeAbandonedHook:: |
| 836 | + |
| 837 | Optional filename for the change abandoned hook, if not specified then |
| 838 | `change-abandoned` will be used. |
| 839 | |
Shawn O. Pearce | 309d8d3 | 2009-11-17 16:03:16 -0800 | [diff] [blame] | 840 | [[http]]Section http |
| 841 | ~~~~~~~~~~~~~~~~~~~~ |
| 842 | |
| 843 | [[http.proxy]]http.proxy:: |
Shawn O. Pearce | 9d342a4 | 2009-12-16 15:49:05 -0800 | [diff] [blame] | 844 | + |
| 845 | URL of the proxy server when making outgoing HTTP |
| 846 | connections for OpenID login transactions. Syntax |
| 847 | should be `http://`'hostname'`:`'port'. |
Shawn O. Pearce | 309d8d3 | 2009-11-17 16:03:16 -0800 | [diff] [blame] | 848 | |
| 849 | [[http.proxyUsername]]http.proxyUsername:: |
Shawn O. Pearce | 9d342a4 | 2009-12-16 15:49:05 -0800 | [diff] [blame] | 850 | + |
| 851 | Optional username to authenticate to the HTTP proxy with. |
| 852 | This property is honored only if the username does not |
| 853 | appear in the http.proxy property above. |
Shawn O. Pearce | 309d8d3 | 2009-11-17 16:03:16 -0800 | [diff] [blame] | 854 | |
| 855 | [[http.proxyPassword]]http.proxyPassword:: |
Shawn O. Pearce | 9d342a4 | 2009-12-16 15:49:05 -0800 | [diff] [blame] | 856 | + |
| 857 | Optional password to authenticate to the HTTP proxy with. |
| 858 | This property is honored only if the password does not |
| 859 | appear in the http.proxy property above. |
Shawn O. Pearce | 309d8d3 | 2009-11-17 16:03:16 -0800 | [diff] [blame] | 860 | |
| 861 | |
| 862 | [[httpd]]Section httpd |
| 863 | ~~~~~~~~~~~~~~~~~~~~~~ |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 864 | |
| 865 | The httpd section configures the embedded servlet container. |
| 866 | |
| 867 | [[httpd.listenUrl]]httpd.listenUrl:: |
| 868 | + |
| 869 | Specifies the URLs the internal HTTP daemon should listen for |
| 870 | connections on. The special hostname '\*' may be used to listen |
| 871 | on all local addresses. A context path may optionally be included, |
| 872 | placing Gerrit Code Review's web address within a subdirectory of |
| 873 | the server. |
| 874 | + |
| 875 | Multiple protocol schemes are supported: |
| 876 | + |
| 877 | * `http://`'hostname'`:`'port' |
| 878 | + |
| 879 | Plain-text HTTP protocol. If port is not supplied, defaults to 80, |
| 880 | the standard HTTP port. |
| 881 | + |
| 882 | * `https://`'hostname'`:`'port' |
| 883 | + |
| 884 | SSL encrypted HTTP protocol. If port is not supplied, defaults to |
| 885 | 443, the standard HTTPS port. |
| 886 | + |
| 887 | Externally facing production sites are encouraged to use a reverse |
| 888 | proxy configuration and `proxy-https://` (below), rather than using |
| 889 | the embedded servlet container to implement the SSL processing. |
| 890 | The proxy server with SSL support is probably easier to configure, |
| 891 | provides more configuration options to control cipher usage, and |
| 892 | is likely using natively compiled encryption algorithms, resulting |
| 893 | in higher throughput. |
| 894 | + |
| 895 | * `proxy-http://`'hostname'`:`'port' |
| 896 | + |
| 897 | Plain-text HTTP relayed from a reverse proxy. If port is not |
| 898 | supplied, defaults to 8080. |
| 899 | + |
| 900 | Like http, but additional header parsing features are |
| 901 | enabled to honor X-Forwarded-For, X-Forwarded-Host and |
| 902 | X-Forwarded-Server. These headers are typically set by Apache's |
| 903 | link:http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#x-headers[mod_proxy]. |
| 904 | + |
| 905 | * `proxy-https://`'hostname'`:`'port' |
| 906 | + |
| 907 | Plain text HTTP relayed from a reverse proxy that has already |
| 908 | handled the SSL encryption/decryption. If port is not supplied, |
| 909 | defaults to 8080. |
| 910 | + |
| 911 | Behaves exactly like proxy-http, but also sets the scheme to assume |
| 912 | 'https://' is the proper URL back to the server. |
| 913 | |
| 914 | + |
| 915 | If multiple values are supplied, the daemon will listen on all |
| 916 | of them. |
| 917 | + |
| 918 | By default, http://*:8080. |
| 919 | |
| 920 | [[httpd.reuseAddress]]httpd.reuseAddress:: |
| 921 | + |
| 922 | If true, permits the daemon to bind to the port even if the port |
| 923 | is already in use. If false, the daemon ensures the port is not |
| 924 | in use before starting. Busy sites may need to set this to true |
| 925 | to permit fast restarts. |
| 926 | + |
| 927 | By default, true. |
| 928 | |
| 929 | [[httpd.requestHeaderSize]]httpd.requestHeaderSize:: |
| 930 | + |
| 931 | Size, in bytes, of the buffer used to parse the HTTP headers of an |
| 932 | incoming HTTP request. The entire request headers, including any |
| 933 | cookies sent by the browser, must fit within this buffer, otherwise |
| 934 | the server aborts with the response '413 Request Entity Too Large'. |
| 935 | + |
| 936 | One buffer of this size is allocated per active connection. |
| 937 | Allocating a buffer that is too large wastes memory that cannot be |
| 938 | reclaimed, allocating a buffer that is too small may cause unexpected |
| 939 | errors caused by very long Referer URLs or large cookie values. |
| 940 | + |
| 941 | By default, 16384 (16 K), which is sufficient for most OpenID and |
| 942 | other web-based single-sign-on integrations. |
| 943 | |
| 944 | [[httpd.sslKeyStore]]httpd.sslKeyStore:: |
| 945 | + |
| 946 | Path of the Java keystore containing the server's SSL certificate |
| 947 | and private key. This keystore is required for `https://` in URL. |
| 948 | + |
| 949 | To create a self-signed certificate for simple internal usage: |
| 950 | + |
Shawn O. Pearce | 9d342a4 | 2009-12-16 15:49:05 -0800 | [diff] [blame] | 951 | ---- |
| 952 | keytool -keystore keystore -alias jetty -genkey -keyalg RSA |
| 953 | chmod 600 keystore |
| 954 | ---- |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 955 | + |
| 956 | If not absolute, the path is resolved relative to `$site_path`. |
| 957 | + |
Shawn O. Pearce | c5fed82 | 2009-11-17 16:10:10 -0800 | [diff] [blame] | 958 | By default, `$site_path/etc/keystore`. |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 959 | |
| 960 | [[httpd.sslKeyPassword]]httpd.sslKeyPassword:: |
| 961 | + |
| 962 | Password used to decrypt the private portion of the sslKeyStore. |
| 963 | Java key stores require a password, even if the administrator |
| 964 | doesn't want to enable one. |
| 965 | + |
| 966 | If set to the empty string the embedded server will prompt for the |
| 967 | password during startup. |
| 968 | + |
| 969 | By default, `gerrit`. |
| 970 | |
Shawn O. Pearce | 1766f50 | 2010-01-15 10:49:46 -0800 | [diff] [blame] | 971 | [[httpd.requestLog]]httpd.requestLog:: |
| 972 | + |
| 973 | Enable (or disable) the `'$site_path'/logs/httpd_log` request log. |
| 974 | If enabled, an NCSA combined log format request log file is written |
| 975 | out by the internal HTTP daemon. |
| 976 | + |
| 977 | By default, true if httpd.listenUrl uses http:// or https://, |
| 978 | and false if httpd.listenUrl uses proxy-http:// or proxy-https://. |
| 979 | |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 980 | [[httpd.acceptorThreads]]httpd.acceptorThreads:: |
| 981 | + |
| 982 | Number of worker threads dedicated to accepting new incoming TCP |
| 983 | connections and allocate them connection-specific resources. |
| 984 | + |
| 985 | By default, 2, which should be suitable for most high-traffic sites. |
| 986 | |
| 987 | [[httpd.minThreads]]httpd.minThreads:: |
| 988 | + |
| 989 | Minimum number of spare threads to keep in the worker thread pool. |
| 990 | This number must be at least 1 larger than httpd.acceptorThreads |
| 991 | multipled by the number of httpd.listenUrls configured. |
| 992 | + |
| 993 | By default, 5, suitable for most lower-volume traffic sites. |
| 994 | |
| 995 | [[httpd.maxThreads]]httpd.maxThreads:: |
| 996 | + |
| 997 | Maximum number of threads to permit in the worker thread pool. |
| 998 | + |
| 999 | By default 25, suitable for most lower-volume traffic sites. |
| 1000 | |
| 1001 | [[httpd.maxQueued]]httpd.maxQueued:: |
| 1002 | + |
| 1003 | Maximum number of client connections which can enter the worker |
| 1004 | thread pool waiting for a worker thread to become available. |
| 1005 | 0 disables the queue and permits infinite number of connections. |
| 1006 | + |
| 1007 | By default 50. |
| 1008 | |
Shawn O. Pearce | e5452b7 | 2010-01-15 14:32:50 -0800 | [diff] [blame] | 1009 | [[httpd.maxWait]]httpd.maxWait:: |
| 1010 | + |
| 1011 | Maximum amount of time a client will wait to for an available |
| 1012 | thread to handle a project clone, fetch or push request over the |
| 1013 | smart HTTP transport. |
| 1014 | + |
| 1015 | Values should use common unit suffixes to express their setting: |
| 1016 | + |
| 1017 | * s, sec, second, seconds |
| 1018 | * m, min, minute, minutes |
| 1019 | * h, hr, hour, hours |
| 1020 | * d, day, days |
| 1021 | * w, week, weeks (`1 week` is treated as `7 days`) |
| 1022 | * mon, month, months (`1 month` is treated as `30 days`) |
| 1023 | * y, year, years (`1 year` is treated as `365 days`) |
| 1024 | |
| 1025 | + |
| 1026 | If a unit suffix is not specified, `minutes` is assumed. If 0 |
| 1027 | is supplied, the maximum age is infinite and connections will not |
| 1028 | abort until the client disconnects. |
| 1029 | + |
| 1030 | By default, 5 minutes. |
| 1031 | |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 1032 | |
Shawn O. Pearce | 8efb2a7 | 2009-08-18 19:45:33 -0700 | [diff] [blame] | 1033 | [[ldap]]Section ldap |
| 1034 | ~~~~~~~~~~~~~~~~~~~~ |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 1035 | |
| 1036 | LDAP integration is only enabled if `auth.type` was set to |
Shawn O. Pearce | f7e065e | 2009-09-26 20:01:10 -0700 | [diff] [blame] | 1037 | `HTTP_LDAP` or `LDAP`. See above for a detailed description of |
| 1038 | the auth.type settings and their implications. |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 1039 | |
Shawn O. Pearce | 02c2e80 | 2009-10-29 14:46:03 -0700 | [diff] [blame] | 1040 | An example LDAP configuration follows, and then discussion of |
| 1041 | the parameters introduced here. Suitable defaults for most |
| 1042 | parameters are automatically guessed based on the type of server |
| 1043 | detected during startup. The guessed defaults support both |
| 1044 | link:http://www.ietf.org/rfc/rfc2307.txt[RFC 2307] and Active |
| 1045 | Directory. |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 1046 | |
Shawn O. Pearce | 9d342a4 | 2009-12-16 15:49:05 -0800 | [diff] [blame] | 1047 | ---- |
| 1048 | [ldap] |
| 1049 | server = ldap://ldap.example.com |
| 1050 | |
| 1051 | accountBase = ou=people,dc=example,dc=com |
| 1052 | accountPattern = (&(objectClass=person)(uid=${username})) |
| 1053 | accountFullName = displayName |
| 1054 | accountEmailAddress = mail |
| 1055 | |
| 1056 | groupBase = ou=groups,dc=example,dc=com |
| 1057 | groupMemberPattern = (&(objectClass=group)(member=${dn})) |
| 1058 | ---- |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 1059 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 1060 | [[ldap.server]]ldap.server:: |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 1061 | + |
| 1062 | URL of the organization's LDAP server to query for user information |
| 1063 | and group membership from. Must be of the form `ldap://host` or |
| 1064 | `ldaps://host` to bind with either a plaintext or SSL connection. |
Shawn O. Pearce | f7e065e | 2009-09-26 20:01:10 -0700 | [diff] [blame] | 1065 | + |
| 1066 | If auth.type is `LDAP` this setting should use `ldaps://` to |
| 1067 | ensure the end user's plaintext password is transmitted only over |
| 1068 | an encrypted connection. |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 1069 | |
Shawn O. Pearce | 02c2e80 | 2009-10-29 14:46:03 -0700 | [diff] [blame] | 1070 | [[ldap.sslVerify]]ldap.sslVerify:: |
| 1071 | + |
| 1072 | If false and ldap.server is an `ldaps://` style URL, Gerrit |
| 1073 | will not verify the server certificate when it connects to |
| 1074 | perform a query. |
| 1075 | + |
| 1076 | By default, true, requiring the certificate to be verified. |
| 1077 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 1078 | [[ldap.username]]ldap.username:: |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 1079 | + |
| 1080 | _(Optional)_ Username to bind to the LDAP server with. If not set, |
| 1081 | an anonymous connection to the LDAP server is attempted. |
| 1082 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 1083 | [[ldap.password]]ldap.password:: |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 1084 | + |
| 1085 | _(Optional)_ Password for the user identified by `ldap.username`. |
| 1086 | If not set, an anonymous (or passwordless) connection to the LDAP |
| 1087 | server is attempted. |
| 1088 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 1089 | [[ldap.accountBase]]ldap.accountBase:: |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 1090 | + |
| 1091 | Root of the tree containing all user accounts. This is typically |
| 1092 | of the form `ou=people,dc=example,dc=com`. |
| 1093 | |
Shawn O. Pearce | 304ccdb | 2009-08-25 12:25:27 -0700 | [diff] [blame] | 1094 | [[ldap.accountScope]]ldap.accountScope:: |
| 1095 | + |
| 1096 | Scope of the search performed for accounts. Must be one of: |
| 1097 | + |
| 1098 | * `one`: Search only one level below accountBase, but not recursive |
| 1099 | * `sub` or `subtree`: Search recursively below accountBase |
| 1100 | * `base` or `object`: Search exactly accountBase; probably not desired |
| 1101 | |
| 1102 | + |
| 1103 | Default is `subtree` as many directories have several levels. |
| 1104 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 1105 | [[ldap.accountPattern]]ldap.accountPattern:: |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 1106 | + |
| 1107 | Query pattern to use when searching for a user account. This may be |
| 1108 | any valid LDAP query expression, including the standard `(&...)` and |
| 1109 | `(|...)` operators. If auth.type is `HTTP_LDAP` then the variable |
| 1110 | `$\{username\}` is replaced with a parameter set to the username |
Shawn O. Pearce | f7e065e | 2009-09-26 20:01:10 -0700 | [diff] [blame] | 1111 | that was supplied by the HTTP server. If auth.type is `LDAP` then |
| 1112 | the variable `$\{username\}` is replaced by the string entered by |
| 1113 | the end user. |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 1114 | + |
| 1115 | This pattern is used to search the objects contained directly under |
| 1116 | the `ldap.accountBase` tree. A typical setting for this parameter |
| 1117 | is `(uid=$\{username\})` or `(cn=$\{username\})`, but the proper |
| 1118 | setting depends on the LDAP schema used by the directory server. |
| 1119 | + |
Shawn O. Pearce | 02c2e80 | 2009-10-29 14:46:03 -0700 | [diff] [blame] | 1120 | Default is `(uid=$\{username\})` for RFC 2307 servers, |
| 1121 | and `(&(objectClass=user)(sAMAccountName=${username}))` |
| 1122 | for Active Directory. |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 1123 | |
Shawn O. Pearce | 37dc1f8 | 2009-08-19 09:49:07 -0700 | [diff] [blame] | 1124 | [[ldap.accountFullName]]ldap.accountFullName:: |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 1125 | + |
| 1126 | _(Optional)_ Name of an attribute on the user account object which |
| 1127 | contains the initial value for the user's full name field in Gerrit. |
| 1128 | Typically this is the `displayName` property in LDAP, but could |
| 1129 | also be `legalName` or `cn`. |
| 1130 | + |
Shawn O. Pearce | b86ae00 | 2009-09-26 16:54:05 -0700 | [diff] [blame] | 1131 | Attribute values may be concatenated with literal strings, for |
| 1132 | example to join given name and surname together use the pattern |
| 1133 | `$\{givenName\} $\{SN\}`. |
| 1134 | + |
Shawn O. Pearce | 3ca1dcf | 2009-08-20 08:56:23 -0700 | [diff] [blame] | 1135 | If set, users will be unable to modify their full name field, as |
| 1136 | Gerrit will populate it only from the LDAP data. |
| 1137 | + |
Shawn O. Pearce | 02c2e80 | 2009-10-29 14:46:03 -0700 | [diff] [blame] | 1138 | Default is `displayName` for RFC 2307 servers, |
| 1139 | and `${givenName} ${sn}` for Active Directory. |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 1140 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 1141 | [[ldap.accountEmailAddress]]ldap.accountEmailAddress:: |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 1142 | + |
| 1143 | _(Optional)_ Name of an attribute on the user account object which |
| 1144 | contains the user's Internet email address, as defined by this |
| 1145 | LDAP server. |
| 1146 | + |
Shawn O. Pearce | b86ae00 | 2009-09-26 16:54:05 -0700 | [diff] [blame] | 1147 | Attribute values may be concatenated with literal strings, |
| 1148 | for example to set the email address to the lowercase form |
| 1149 | of sAMAccountName followed by a constant domain name, use |
| 1150 | `$\{sAMAccountName.toLowerCase\}@example.com`. |
| 1151 | + |
Shawn O. Pearce | 3ca1dcf | 2009-08-20 08:56:23 -0700 | [diff] [blame] | 1152 | If set, the preferred email address will be prefilled from LDAP, |
| 1153 | but users may still be able to register additional email address, |
| 1154 | and select a different preferred email address. |
| 1155 | + |
Shawn O. Pearce | 02c2e80 | 2009-10-29 14:46:03 -0700 | [diff] [blame] | 1156 | Default is `mail`. |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 1157 | |
Shawn O. Pearce | 59e0922 | 2009-08-19 09:04:49 -0700 | [diff] [blame] | 1158 | [[ldap.accountSshUserName]]ldap.accountSshUserName:: |
| 1159 | + |
| 1160 | _(Optional)_ Name of an attribute on the user account object which |
| 1161 | contains the initial value for the user's SSH username field in |
| 1162 | Gerrit. Typically this is the `uid` property in LDAP, but could |
| 1163 | also be `cn`. Administrators should prefer to match the attribute |
| 1164 | corresponding to the user's workstation username, as this is what |
| 1165 | SSH clients will default to. |
| 1166 | + |
Shawn O. Pearce | b86ae00 | 2009-09-26 16:54:05 -0700 | [diff] [blame] | 1167 | Attribute values may also be forced to lowercase, or to uppercase in |
| 1168 | an expression. For example, `$\{sAMAccountName.toLowerCase\}` will |
| 1169 | force the value of sAMAccountName, if defined, to be all lowercase. |
| 1170 | The suffix `.toUpperCase` can be used for the other direction. |
| 1171 | The suffix `.localPart` can be used to split attribute values of |
| 1172 | the form 'user@example.com' and return only the left hand side, for |
| 1173 | example `$\{userPrincipalName.localPart\}` would provide only 'user'. |
| 1174 | + |
Shawn O. Pearce | 3ca1dcf | 2009-08-20 08:56:23 -0700 | [diff] [blame] | 1175 | If set, users will be unable to modify their SSH username field, as |
| 1176 | Gerrit will populate it only from the LDAP data. |
| 1177 | + |
Shawn O. Pearce | 02c2e80 | 2009-10-29 14:46:03 -0700 | [diff] [blame] | 1178 | Default is `uid` for RFC 2307 servers, |
| 1179 | and `${sAMAccountName.toLowerCase}` for Active Directory. |
Shawn O. Pearce | 59e0922 | 2009-08-19 09:04:49 -0700 | [diff] [blame] | 1180 | |
Shawn O. Pearce | 7d25f78 | 2009-10-30 08:01:03 -0700 | [diff] [blame] | 1181 | [[ldap.accountMemberField]]ldap.accountMemberField:: |
Anthony | 93de7db | 2009-10-03 10:01:50 -0400 | [diff] [blame] | 1182 | + |
| 1183 | _(Optional)_ Name of an attribute on the user account object which |
Shawn O. Pearce | 7d25f78 | 2009-10-30 08:01:03 -0700 | [diff] [blame] | 1184 | contains the groups the user is part of. Typically used for Active |
| 1185 | Directory servers. |
Anthony | 93de7db | 2009-10-03 10:01:50 -0400 | [diff] [blame] | 1186 | + |
Shawn O. Pearce | 02c2e80 | 2009-10-29 14:46:03 -0700 | [diff] [blame] | 1187 | Default is unset for RFC 2307 servers (disabled) |
| 1188 | and `memberOf` for Active Directory. |
Anthony | 93de7db | 2009-10-03 10:01:50 -0400 | [diff] [blame] | 1189 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 1190 | [[ldap.groupBase]]ldap.groupBase:: |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 1191 | + |
| 1192 | Root of the tree containing all group objects. This is typically |
| 1193 | of the form `ou=groups,dc=example,dc=com`. |
| 1194 | |
Shawn O. Pearce | 304ccdb | 2009-08-25 12:25:27 -0700 | [diff] [blame] | 1195 | [[ldap.groupScope]]ldap.groupScope:: |
| 1196 | + |
| 1197 | Scope of the search performed for group objects. Must be one of: |
| 1198 | + |
| 1199 | * `one`: Search only one level below groupBase, but not recursive |
| 1200 | * `sub` or `subtree`: Search recursively below groupBase |
| 1201 | * `base` or `object`: Search exactly groupBase; probably not desired |
| 1202 | |
| 1203 | + |
| 1204 | Default is `subtree` as many directories have several levels. |
| 1205 | |
Shawn O. Pearce | 7d25f78 | 2009-10-30 08:01:03 -0700 | [diff] [blame] | 1206 | [[ldap.groupPattern]]ldap.groupPattern:: |
| 1207 | + |
| 1208 | Query pattern used when searching for an LDAP group to connect |
| 1209 | to a Gerrit group. This may be any valid LDAP query expression, |
| 1210 | including the standard `(&...)` and `(|...)` operators. The variable |
| 1211 | `$\{groupname\}` is replaced with the search term supplied by the |
| 1212 | group owner. |
| 1213 | + |
| 1214 | Default is `(cn=$\{groupname\})` for RFC 2307, |
| 1215 | and `(&(objectClass=group)(cn=$\{groupname\}))` for Active Directory. |
| 1216 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 1217 | [[ldap.groupMemberPattern]]ldap.groupMemberPattern:: |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 1218 | + |
| 1219 | Query pattern to use when searching for the groups that a user |
| 1220 | account is currently a member of. This may be any valid LDAP query |
| 1221 | expression, including the standard `(&...)` and `(|...)` operators. |
| 1222 | + |
| 1223 | If auth.type is `HTTP_LDAP` then the variable `$\{username\}` is |
| 1224 | replaced with a parameter set to the username that was supplied |
| 1225 | by the HTTP server. Other variables appearing in the pattern, |
| 1226 | such as `$\{fooBarAttribute\}`, are replaced with the value of the |
| 1227 | corresponding attribute (in this case, `fooBarAttribute`) as read |
| 1228 | from the user's account object matched under `ldap.accountBase`. |
| 1229 | Attributes such as `$\{dn\}` or `$\{uidNumber\}` may be useful. |
| 1230 | + |
Shawn O. Pearce | 02c2e80 | 2009-10-29 14:46:03 -0700 | [diff] [blame] | 1231 | Default is `(memberUid=$\{username\})` for RFC 2307, |
| 1232 | and unset (disabled) for Active Directory. |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 1233 | |
| 1234 | |
Shawn O. Pearce | 8efb2a7 | 2009-08-18 19:45:33 -0700 | [diff] [blame] | 1235 | [[mimetype]]Section mimetype |
| 1236 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
Shawn O. Pearce | 01cb1190 | 2009-07-15 08:19:01 -0700 | [diff] [blame] | 1237 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 1238 | [[mimetype.name.safe]]mimetype.<name>.safe:: |
Shawn O. Pearce | 01cb1190 | 2009-07-15 08:19:01 -0700 | [diff] [blame] | 1239 | + |
| 1240 | If set to true, files with the MIME type `<name>` will be sent as |
| 1241 | direct downloads to the user's browser, rather than being wrapped up |
| 1242 | inside of zipped archives. The type name may be a complete type |
| 1243 | name, e.g. `image/gif`, a generic media type, e.g. `image/\*`, |
| 1244 | or the wildcard `\*/*` to match all types. |
| 1245 | + |
| 1246 | By default, false for all MIME types. |
| 1247 | |
| 1248 | Common examples: |
Shawn O. Pearce | 9d342a4 | 2009-12-16 15:49:05 -0800 | [diff] [blame] | 1249 | ---- |
| 1250 | [mimetype "image/*"] |
| 1251 | safe = true |
| 1252 | |
| 1253 | [mimetype "application/pdf"] |
| 1254 | safe = true |
| 1255 | |
| 1256 | [mimetype "application/msword"] |
| 1257 | safe = true |
| 1258 | |
| 1259 | [mimetype "application/vnd.ms-excel"] |
| 1260 | safe = true |
| 1261 | ---- |
Shawn O. Pearce | 01cb1190 | 2009-07-15 08:19:01 -0700 | [diff] [blame] | 1262 | |
Shawn O. Pearce | 8efb2a7 | 2009-08-18 19:45:33 -0700 | [diff] [blame] | 1263 | [[repo]]Section repo |
| 1264 | ~~~~~~~~~~~~~~~~~~~~ |
Shawn O. Pearce | 0cb2b65f | 2009-06-01 09:48:45 -0700 | [diff] [blame] | 1265 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 1266 | [[repo.showDownloadCommand]]repo.showDownloadCommand:: |
Shawn O. Pearce | 0cb2b65f | 2009-06-01 09:48:45 -0700 | [diff] [blame] | 1267 | + |
| 1268 | If set to true, Gerrit advertises patch set downloads with the |
| 1269 | `repo download` command, assuming that all projects managed by this |
| 1270 | instance are generally worked on with the repo multi-repository tool. |
| 1271 | + |
| 1272 | By default, false, as not all instances will deploy repo. |
| 1273 | |
Hugo Josefson | 072b470 | 2010-04-21 19:27:11 +0200 | [diff] [blame] | 1274 | [[repository]]Section repository |
| 1275 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 1276 | Repositories in this sense are the same as projects. |
| 1277 | |
| 1278 | In the following example configuration the `Administrators` and the |
| 1279 | `Registered Users` groups are set to be the ones to be allowed to |
| 1280 | create projects matching `*` (any project). `Registered Users` is |
| 1281 | set to be the default owner of new projects. |
| 1282 | |
| 1283 | ---- |
| 1284 | [repository "*"] |
| 1285 | createGroup = Administrators |
| 1286 | createGroup = Registered Users |
| 1287 | ownerGroup = Registered Users |
| 1288 | ---- |
| 1289 | |
| 1290 | [NOTE] |
| 1291 | Currently only the repository name `*` is supported. |
| 1292 | This is a wildcard designating all repositories. |
| 1293 | |
| 1294 | [[repository.name.createGroup]]repository.<name>.createGroup:: |
| 1295 | + |
| 1296 | A name of a group which exists in the database. Zero, one or many |
| 1297 | groups are allowed. Each on its own line. Groups which don't exist |
| 1298 | in the database are ignored. |
| 1299 | + |
| 1300 | If no groups are declared (or only non-existing ones), the default |
| 1301 | value `Administrators` is used. |
| 1302 | |
| 1303 | [[repository.name.ownerGroup]]repository.<name>.ownerGroup:: |
| 1304 | + |
| 1305 | A name of a group which exists in the database. Zero, one or many |
| 1306 | groups are allowed. Each on its own line. Groups which don't exist |
| 1307 | in the database are ignored. |
| 1308 | + |
| 1309 | If no groups are declared (or only non-existing ones), it defaults |
| 1310 | to whatever is declared by `repository.<name>.createGroup` (including |
| 1311 | any fallback to `Administrators`.) |
| 1312 | |
Shawn O. Pearce | 8efb2a7 | 2009-08-18 19:45:33 -0700 | [diff] [blame] | 1313 | [[sendemail]]Section sendemail |
| 1314 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
Shawn O. Pearce | b0572c6 | 2009-06-01 14:18:22 -0700 | [diff] [blame] | 1315 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 1316 | [[sendemail.enable]]sendemail.enable:: |
Shawn O. Pearce | 2e4573b | 2009-06-02 09:09:50 -0700 | [diff] [blame] | 1317 | + |
| 1318 | If false Gerrit will not send email messages, for any reason, |
| 1319 | and all other properties of section sendemail are ignored. |
| 1320 | + |
| 1321 | By default, true, allowing notifications to be sent. |
| 1322 | |
Shawn O. Pearce | 5c31bd7 | 2009-09-10 18:13:33 -0700 | [diff] [blame] | 1323 | [[sendemail.from]]sendemail.from:: |
| 1324 | + |
| 1325 | Designates what name and address Gerrit will place in the From |
| 1326 | field of any generated email messages. The supported values are: |
| 1327 | + |
| 1328 | * `USER` |
| 1329 | + |
| 1330 | Gerrit will set the From header to use the current user's |
| 1331 | Full Name and Preferred Email. This may cause messsages to be |
| 1332 | classified as spam if the user's domain has SPF or DKIM enabled |
| 1333 | and <<sendemail.smtpServer,sendemail.smtpServer>> is not a trusted |
| 1334 | relay for that domain. |
| 1335 | + |
| 1336 | * `MIXED` |
| 1337 | + |
| 1338 | Shorthand for `$\{user\} (Code Review) <review@example.com>` where |
| 1339 | `review@example.com` is the same as <<user.email,user.email>>. |
| 1340 | See below for a description of how the replacement is handled. |
| 1341 | + |
| 1342 | * `SERVER` |
| 1343 | + |
| 1344 | Gerrit will set the From header to the same name and address |
| 1345 | it records in any commits Gerrit creates. This is set by |
| 1346 | <<user.name,user.name>> and <<user.email,user.email>>, or guessed |
| 1347 | from the local operating system. |
| 1348 | + |
| 1349 | * 'Code Review' `<`'review'`@`'example.com'`>` |
| 1350 | + |
| 1351 | If set to a name and email address in brackets, Gerrit will use |
| 1352 | this name and email address for any messages, overriding the name |
| 1353 | that may have been selected for commits by user.name and user.email. |
| 1354 | Optionally, the name portion may contain the placeholder `$\{user\}`, |
| 1355 | which is replaced by the Full Name of the current user. |
| 1356 | |
| 1357 | + |
| 1358 | By default, MIXED. |
| 1359 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 1360 | [[sendemail.smtpServer]]sendemail.smtpServer:: |
Shawn O. Pearce | b0572c6 | 2009-06-01 14:18:22 -0700 | [diff] [blame] | 1361 | + |
| 1362 | Hostname (or IP address) of a SMTP server that will relay |
| 1363 | messages generated by Gerrit to end users. |
| 1364 | + |
| 1365 | By default, 127.0.0.1 (aka localhost). |
| 1366 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 1367 | [[sendemail.smtpServerPort]]sendemail.smtpServerPort:: |
Shawn O. Pearce | b0572c6 | 2009-06-01 14:18:22 -0700 | [diff] [blame] | 1368 | + |
| 1369 | Port number of the SMTP server in sendemail.smtpserver. |
| 1370 | + |
Shawn O. Pearce | 6e9a83f | 2009-11-02 10:30:48 -0800 | [diff] [blame] | 1371 | By default, 25, or 465 if smtpEncryption is 'ssl'. |
| 1372 | |
| 1373 | [[sendemail.smtpEncryption]]sendemail.smtpEncryption:: |
| 1374 | + |
| 1375 | Specify the encryption to use, either 'ssl' or 'tls'. |
| 1376 | + |
| 1377 | By default, 'none', indicating no encryption is used. |
| 1378 | |
| 1379 | [[sendemail.sslVerify]]sendemail.sslVerify:: |
| 1380 | + |
| 1381 | If false and sendemail.smtpEncryption is 'ssl' or 'tls', Gerrit |
| 1382 | will not verify the server certificate when it connects to send |
| 1383 | an email message. |
| 1384 | + |
| 1385 | By default, true, requiring the certificate to be verified. |
Shawn O. Pearce | b0572c6 | 2009-06-01 14:18:22 -0700 | [diff] [blame] | 1386 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 1387 | [[sendemail.smtpUser]]sendemail.smtpUser:: |
Shawn O. Pearce | b0572c6 | 2009-06-01 14:18:22 -0700 | [diff] [blame] | 1388 | + |
| 1389 | User name to authenticate with, if required for relay. |
| 1390 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 1391 | [[sendemail.smtpPass]]sendemail.smtpPass:: |
Shawn O. Pearce | b0572c6 | 2009-06-01 14:18:22 -0700 | [diff] [blame] | 1392 | + |
| 1393 | Password for the account named by sendemail.smtpUser. |
| 1394 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 1395 | [[sendemail.allowrcpt]]sendemail.allowrcpt:: |
Shawn O. Pearce | 219a8ee | 2009-06-01 18:13:57 -0700 | [diff] [blame] | 1396 | + |
| 1397 | If present, each value adds one entry to the whitelist of email |
| 1398 | addresses that Gerrit can send email to. If set to a complete |
| 1399 | email address, that one address is added to the white list. |
| 1400 | If set to a domain name, any address at that domain can receive |
| 1401 | email from Gerrit. |
| 1402 | + |
| 1403 | By default, unset, permitting delivery to any email address. |
| 1404 | |
Shawn O. Pearce | 8efb2a7 | 2009-08-18 19:45:33 -0700 | [diff] [blame] | 1405 | [[sshd]] Section sshd |
Shawn O. Pearce | a758fef | 2009-08-19 08:29:32 -0700 | [diff] [blame] | 1406 | ~~~~~~~~~~~~~~~~~~~~~ |
Shawn O. Pearce | 9410f2c | 2009-05-14 10:26:47 -0700 | [diff] [blame] | 1407 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 1408 | [[sshd.listenAddress]]sshd.listenAddress:: |
Shawn O. Pearce | 1d3cb444 | 2009-05-30 14:03:31 -0700 | [diff] [blame] | 1409 | + |
| 1410 | Specifies the local addresses the internal SSHD should listen |
| 1411 | for connections on. The following forms may be used to specify |
| 1412 | an address. In any form, `:'port'` may be omitted to use the |
| 1413 | default of 29418. |
| 1414 | + |
| 1415 | * 'hostname':'port' (for example `review.example.com:29418`) |
| 1416 | * 'IPv4':'port' (for example `10.0.0.1:29418`) |
| 1417 | * ['IPv6']:'port' (for example `[ff02::1]:29418`) |
| 1418 | * \*:'port' (for example `*:29418`) |
| 1419 | |
| 1420 | + |
| 1421 | If multiple values are supplied, the daemon will listen on all |
| 1422 | of them. |
| 1423 | + |
| 1424 | By default, *:29418. |
| 1425 | |
Shawn O. Pearce | 149238a | 2009-09-10 12:25:20 -0700 | [diff] [blame] | 1426 | [[sshd.reuseAddress]]sshd.reuseAddress:: |
Shawn O. Pearce | 9410f2c | 2009-05-14 10:26:47 -0700 | [diff] [blame] | 1427 | + |
| 1428 | If true, permits the daemon to bind to the port even if the port |
| 1429 | is already in use. If false, the daemon ensures the port is not |
| 1430 | in use before starting. Busy sites may need to set this to true |
| 1431 | to permit fast restarts. |
| 1432 | + |
| 1433 | By default, true. |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 1434 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 1435 | [[sshd.tcpKeepAlive]]sshd.tcpKeepAlive:: |
Shawn O. Pearce | fc9081f | 2009-05-14 10:26:59 -0700 | [diff] [blame] | 1436 | + |
| 1437 | If true, enables TCP keepalive messages to the other side, so |
| 1438 | the daemon can terminate connections if the peer disappears. |
| 1439 | + |
| 1440 | By default, true. |
| 1441 | |
Shawn O. Pearce | 1a4580b | 2009-11-19 17:37:10 -0800 | [diff] [blame] | 1442 | [[sshd.threads]]sshd.threads:: |
| 1443 | + |
| 1444 | Number of threads to use when executing SSH command requests. |
| 1445 | If additional requests are received while all threads are busy they |
| 1446 | are queued and serviced in a first-come-first-serve order. |
| 1447 | + |
| 1448 | By default, 1.5x the number of CPUs available to the JVM. |
| 1449 | |
Nico Sallembien | fc53f7f | 2010-05-18 16:40:10 -0700 | [diff] [blame^] | 1450 | [[sshd.batchThreads]]sshd.batchThreads:: |
| 1451 | + |
| 1452 | Number of threads to allocate for SSH command requests from |
| 1453 | non-interactive users. If equals to 0, then all non-interactive |
| 1454 | requests are executed in the same queue as interactive requests. |
| 1455 | + |
| 1456 | Any other value will remove the number of threads from the queue |
| 1457 | allocated to interactive users, and create a separate thread pool |
| 1458 | of the requested size, which will be used to run commands from |
| 1459 | non-interactive users. |
| 1460 | + |
| 1461 | If the number of threads requested for non-interactive users is larger |
| 1462 | than the total number of threads allocated in sshd.threads, then the |
| 1463 | value of sshd.threads is increased to accomodate the requested value. |
| 1464 | + |
| 1465 | By default, 0. |
| 1466 | |
Kenny Root | 15ac1b8 | 2010-02-24 00:29:20 -0800 | [diff] [blame] | 1467 | [[sshd.streamThreads]]sshd.streamThreads:: |
| 1468 | + |
| 1469 | Number of threads to use when formatting events to asynchronous |
| 1470 | streaming clients. Event formatting is multiplexed onto this thread |
| 1471 | pool by a simple FIFO scheduling system. |
| 1472 | + |
| 1473 | By default, 1 plus the number of CPUs available to the JVM. |
| 1474 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 1475 | [[sshd.cipher]]sshd.cipher:: |
Shawn O. Pearce | 0bf2f52 | 2009-05-14 11:02:03 -0700 | [diff] [blame] | 1476 | + |
| 1477 | Available ciphers. To permit multiple ciphers, specify multiple |
| 1478 | `sshd.cipher` keys in the configuration file, one cipher name |
| 1479 | per key. Cipher names starting with `+` are enabled in addition |
| 1480 | to the default ciphers, cipher names starting with `-` are removed |
| 1481 | from the default cipher set. |
| 1482 | + |
| 1483 | Supported ciphers: aes128-cbc, aes128-cbc, aes256-cbc, blowfish-cbc, |
| 1484 | 3des-cbc, none. |
| 1485 | + |
| 1486 | By default, all supported ciphers except `none` are available. |
| 1487 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 1488 | [[sshd.mac]]sshd.mac:: |
Shawn O. Pearce | 0bf2f52 | 2009-05-14 11:02:03 -0700 | [diff] [blame] | 1489 | + |
| 1490 | Available MAC (message authentication code) algorithms. To permit |
| 1491 | multiple algorithms, specify multiple `sshd.mac` keys in the |
| 1492 | configuration file, one MAC per key. MAC names starting with `+` |
| 1493 | are enabled in addition to the default MACs, MAC names starting with |
| 1494 | `-` are removed from the default MACs. |
| 1495 | + |
| 1496 | Supported MACs: hmac-md5, hmac-md5-96, hmac-sha1, hmac-sha1-96. |
| 1497 | + |
| 1498 | By default, all supported MACs are available. |
| 1499 | |
Shawn O. Pearce | 2ba3ab4 | 2010-02-25 12:10:10 -0800 | [diff] [blame] | 1500 | [[theme]] Section theme |
| 1501 | ~~~~~~~~~~~~~~~~~~~~~~~ |
| 1502 | |
| 1503 | [[theme.backgroundColor]]theme.backgroundColor:: |
| 1504 | + |
| 1505 | Background color for the page, and major data tables like the all |
| 1506 | open changes table or the account dashboard. The value must be a |
| 1507 | valid HTML hex color code, or standard color name. |
| 1508 | + |
| 1509 | By default white, `FFFFFF`. |
| 1510 | |
| 1511 | [[theme.topMenuColor]]theme.topMenuColor:: |
| 1512 | + |
| 1513 | This is the color of the main menu bar at the top of the page. |
| 1514 | The value must be a valid HTML hex color code, or standard color |
| 1515 | name. The value defaults to <<theme.trimColor,trimColor>>. |
| 1516 | |
| 1517 | [[theme.textColor]]theme.textColor:: |
| 1518 | + |
| 1519 | Text color for the page, and major data tables like the all |
| 1520 | open changes table or the account dashboard. The value must be a |
| 1521 | valid HTML hex color code, or standard color name. |
| 1522 | + |
| 1523 | By default black, `000000`. |
| 1524 | |
| 1525 | [[theme.trimColor]]theme.trimColor:: |
| 1526 | + |
| 1527 | Primary color used as a background color behind text. This is |
| 1528 | the color of the main menu bar at the top, of table headers, |
| 1529 | and of major UI areas that we want to offset from other portions |
| 1530 | of the page. The value must be a valid HTML hex color code, or |
| 1531 | standard color name. |
| 1532 | + |
| 1533 | By default a shade of green, `D4E9A9`. |
| 1534 | |
| 1535 | [[theme.selectionColor]]theme.selectionColor:: |
| 1536 | + |
| 1537 | Background color used within a trimColor area to denote the currently |
| 1538 | selected tab, or the background color used in a table to denote the |
| 1539 | currently selected row. The value must be a valid HTML hex color |
| 1540 | code, or standard color name. |
| 1541 | + |
| 1542 | By default a shade of yellow, `FFFFCC`. |
| 1543 | |
Shawn O. Pearce | 6e4dfdd | 2010-05-12 17:26:08 -0700 | [diff] [blame] | 1544 | [[transfer]] Section transfer |
| 1545 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 1546 | |
| 1547 | [[transfer.timeout]]transfer.timeout:: |
| 1548 | + |
| 1549 | Number of seconds to wait for a single network read or write |
| 1550 | to complete before giving up and declaring the remote side is |
| 1551 | not responding. If 0, there is no timeout, and this server will |
| 1552 | wait indefinitely for a transfer to finish. |
| 1553 | + |
| 1554 | A timeout should be large enough to mostly transfer the objects to |
| 1555 | the other side. 1 second may be too small for larger projects, |
| 1556 | especially over a WAN link, while 10-30 seconds is a much more |
| 1557 | reasonable timeout value. |
| 1558 | + |
| 1559 | Defaults to 0 seconds, wait indefinitely. |
| 1560 | |
Shawn O. Pearce | 8efb2a7 | 2009-08-18 19:45:33 -0700 | [diff] [blame] | 1561 | [[user]] Section user |
Shawn O. Pearce | a758fef | 2009-08-19 08:29:32 -0700 | [diff] [blame] | 1562 | ~~~~~~~~~~~~~~~~~~~~~ |
Shawn O. Pearce | 0a35191 | 2009-06-01 08:14:46 -0700 | [diff] [blame] | 1563 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 1564 | [[user.name]]user.name:: |
Shawn O. Pearce | 0a35191 | 2009-06-01 08:14:46 -0700 | [diff] [blame] | 1565 | + |
| 1566 | Name that Gerrit calls itself in Git when it creates a new Git |
| 1567 | commit, such as a merge during change submission. |
| 1568 | + |
| 1569 | By default this is "Gerrit Code Review". |
| 1570 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 1571 | [[user.email]]user.email:: |
Shawn O. Pearce | 0a35191 | 2009-06-01 08:14:46 -0700 | [diff] [blame] | 1572 | + |
| 1573 | Email address that Gerrit refers to itself as when it creates a |
| 1574 | new Git commit, such as a merge commit during change submission. |
| 1575 | + |
| 1576 | If not set, Gerrit generates this as "gerrit@`hostname`", where |
| 1577 | `hostname` is the hostname of the system Gerrit is running on. |
| 1578 | + |
| 1579 | By default, not set, generating the value at startup. |
| 1580 | |
Shawn O. Pearce | 0bf2f52 | 2009-05-14 11:02:03 -0700 | [diff] [blame] | 1581 | |
Shawn O. Pearce | c5fed82 | 2009-11-17 16:10:10 -0800 | [diff] [blame] | 1582 | File `etc/secure.config` |
| 1583 | ------------------------- |
| 1584 | The optional file `'$site_path'/etc/secure.config` overrides (or |
| 1585 | supplements) the settings supplied by `'$site_path'/etc/gerrit.config`. |
Shawn O. Pearce | 0d4037a | 2009-11-12 18:33:46 -0800 | [diff] [blame] | 1586 | The file should be readable only by the daemon process and can be |
| 1587 | used to contain private configuration entries that wouldn't normally |
| 1588 | be exposed to everyone. |
| 1589 | |
Shawn O. Pearce | c5fed82 | 2009-11-17 16:10:10 -0800 | [diff] [blame] | 1590 | Sample `etc/secure.config`: |
Shawn O. Pearce | 0d4037a | 2009-11-12 18:33:46 -0800 | [diff] [blame] | 1591 | ---- |
| 1592 | [database] |
Shawn O. Pearce | 9d342a4 | 2009-12-16 15:49:05 -0800 | [diff] [blame] | 1593 | username = webuser |
| 1594 | password = s3kr3t |
Shawn O. Pearce | 0d4037a | 2009-11-12 18:33:46 -0800 | [diff] [blame] | 1595 | |
| 1596 | [ldap] |
Shawn O. Pearce | 9d342a4 | 2009-12-16 15:49:05 -0800 | [diff] [blame] | 1597 | password = l3tm3srch |
Shawn O. Pearce | 0d4037a | 2009-11-12 18:33:46 -0800 | [diff] [blame] | 1598 | |
| 1599 | [httpd] |
Shawn O. Pearce | 9d342a4 | 2009-12-16 15:49:05 -0800 | [diff] [blame] | 1600 | sslKeyPassword = g3rr1t |
Shawn O. Pearce | 0d4037a | 2009-11-12 18:33:46 -0800 | [diff] [blame] | 1601 | |
| 1602 | [sendemail] |
Shawn O. Pearce | 9d342a4 | 2009-12-16 15:49:05 -0800 | [diff] [blame] | 1603 | smtpPass = sp@m |
Shawn O. Pearce | 0d4037a | 2009-11-12 18:33:46 -0800 | [diff] [blame] | 1604 | ---- |
| 1605 | |
Shawn O. Pearce | c5fed82 | 2009-11-17 16:10:10 -0800 | [diff] [blame] | 1606 | File `etc/replication.config` |
| 1607 | ----------------------------- |
Shawn O. Pearce | 7b40571 | 2009-05-08 18:27:53 -0700 | [diff] [blame] | 1608 | |
Shawn O. Pearce | c5fed82 | 2009-11-17 16:10:10 -0800 | [diff] [blame] | 1609 | The optional file `'$site_path'/etc/replication.config` controls how |
Shawn O. Pearce | 7b40571 | 2009-05-08 18:27:53 -0700 | [diff] [blame] | 1610 | Gerrit automatically replicates changes it makes to any of the Git |
| 1611 | repositories under its control. |
| 1612 | |
| 1613 | * link:config-replication.html[Git Replication/Mirroring] |
| 1614 | |
| 1615 | Database system_config |
| 1616 | ---------------------- |
| 1617 | |
| 1618 | Several columns in the `system_config` table within the metadata |
| 1619 | database may be set to control how Gerrit behaves. |
Shawn O. Pearce | d2b73db | 2009-01-09 11:55:47 -0800 | [diff] [blame] | 1620 | |
| 1621 | [NOTE] |
| 1622 | The contents of the `system_config` table are cached at startup |
| 1623 | by Gerrit. If you modify any columns in this table, Gerrit needs |
| 1624 | to be restarted before it will use the new values. |
| 1625 | |
Shawn O. Pearce | 7b40571 | 2009-05-08 18:27:53 -0700 | [diff] [blame] | 1626 | Configurable Parameters |
| 1627 | ~~~~~~~~~~~~~~~~~~~~~~~ |
Shawn O. Pearce | d2b73db | 2009-01-09 11:55:47 -0800 | [diff] [blame] | 1628 | |
Shawn O. Pearce | 8e9c73b | 2009-05-08 17:38:25 -0700 | [diff] [blame] | 1629 | site_path:: |
| 1630 | + |
Shawn O. Pearce | d2b73db | 2009-01-09 11:55:47 -0800 | [diff] [blame] | 1631 | Local filesystem directory holding the site customization assets. |
| 1632 | Placing this directory under version control and/or backup is a |
| 1633 | good idea. |
Shawn O. Pearce | 8e9c73b | 2009-05-08 17:38:25 -0700 | [diff] [blame] | 1634 | + |
Shawn O. Pearce | c5fed82 | 2009-11-17 16:10:10 -0800 | [diff] [blame] | 1635 | Files in this directory provide additional configuration. |
Shawn O. Pearce | 8e9c73b | 2009-05-08 17:38:25 -0700 | [diff] [blame] | 1636 | + |
Shawn O. Pearce | d2b73db | 2009-01-09 11:55:47 -0800 | [diff] [blame] | 1637 | Other files support site customization. |
Shawn O. Pearce | 8e9c73b | 2009-05-08 17:38:25 -0700 | [diff] [blame] | 1638 | + |
Shawn O. Pearce | d2b73db | 2009-01-09 11:55:47 -0800 | [diff] [blame] | 1639 | * link:config-headerfooter.html[Site Header/Footer] |
Shawn O. Pearce | e7ec053 | 2009-05-08 09:42:54 -0700 | [diff] [blame] | 1640 | * link:config-replication.html[Git Replication/Mirroring] |
Shawn O. Pearce | d2b73db | 2009-01-09 11:55:47 -0800 | [diff] [blame] | 1641 | |
Shawn O. Pearce | 7b40571 | 2009-05-08 18:27:53 -0700 | [diff] [blame] | 1642 | Not User Serviceable |
| 1643 | ~~~~~~~~~~~~~~~~~~~~ |
Shawn O. Pearce | d2b73db | 2009-01-09 11:55:47 -0800 | [diff] [blame] | 1644 | |
| 1645 | These fields generally shouldn't be modified. |
| 1646 | |
Shawn O. Pearce | c7f8801 | 2009-08-19 08:32:51 -0700 | [diff] [blame] | 1647 | register_email_private_key:: |
Shawn O. Pearce | 8e9c73b | 2009-05-08 17:38:25 -0700 | [diff] [blame] | 1648 | + |
Shawn O. Pearce | c7f8801 | 2009-08-19 08:32:51 -0700 | [diff] [blame] | 1649 | Private key used to sign the links emailed to users when they |
| 1650 | request to register a new email address on their user account. |
| 1651 | When the link is activated, the private key authenticates the link |
| 1652 | was created and sent by this Gerrit server, proving that the user |
| 1653 | can receive email at the address they are registering. |
Shawn O. Pearce | 8e9c73b | 2009-05-08 17:38:25 -0700 | [diff] [blame] | 1654 | + |
Shawn O. Pearce | d2b73db | 2009-01-09 11:55:47 -0800 | [diff] [blame] | 1655 | This column is automatically generated when the database is |
| 1656 | initialized. Changing it to a new value would cause all current |
Shawn O. Pearce | c7f8801 | 2009-08-19 08:32:51 -0700 | [diff] [blame] | 1657 | links to be invalidated. |
Shawn O. Pearce | 8e9c73b | 2009-05-08 17:38:25 -0700 | [diff] [blame] | 1658 | + |
Shawn O. Pearce | d2b73db | 2009-01-09 11:55:47 -0800 | [diff] [blame] | 1659 | Changing it is not recommended. |
| 1660 | |
Shawn O. Pearce | 8e9c73b | 2009-05-08 17:38:25 -0700 | [diff] [blame] | 1661 | admin_group_id:: |
| 1662 | + |
Shawn O. Pearce | d2b73db | 2009-01-09 11:55:47 -0800 | [diff] [blame] | 1663 | Unique identity of the group with full privileges. Any user who |
| 1664 | is a member of this group may manage any other group, any project, |
| 1665 | and other system settings over the web. |
Shawn O. Pearce | 8e9c73b | 2009-05-08 17:38:25 -0700 | [diff] [blame] | 1666 | + |
Shawn O. Pearce | d2b73db | 2009-01-09 11:55:47 -0800 | [diff] [blame] | 1667 | This is initialized by Gerrit to be the "Administrators" group. |
Shawn O. Pearce | 8e9c73b | 2009-05-08 17:38:25 -0700 | [diff] [blame] | 1668 | + |
Shawn O. Pearce | d2b73db | 2009-01-09 11:55:47 -0800 | [diff] [blame] | 1669 | Changing it is not recommended. |
| 1670 | |
Shawn O. Pearce | 8e9c73b | 2009-05-08 17:38:25 -0700 | [diff] [blame] | 1671 | anonymous_group_id:: |
| 1672 | + |
Shawn O. Pearce | d2b73db | 2009-01-09 11:55:47 -0800 | [diff] [blame] | 1673 | Unique identity of the group for anonymous (not authenticated) users. |
Shawn O. Pearce | 8e9c73b | 2009-05-08 17:38:25 -0700 | [diff] [blame] | 1674 | + |
Shawn O. Pearce | d2b73db | 2009-01-09 11:55:47 -0800 | [diff] [blame] | 1675 | All users are a member of this group, whether or not they are |
| 1676 | actually signed in to Gerrit. Any access rights assigned to |
| 1677 | this group are inherited by all users. |
Shawn O. Pearce | 8e9c73b | 2009-05-08 17:38:25 -0700 | [diff] [blame] | 1678 | + |
Shawn O. Pearce | d2b73db | 2009-01-09 11:55:47 -0800 | [diff] [blame] | 1679 | This is initialized by Gerrit to be the "Anonymous Users" group. |
Shawn O. Pearce | 8e9c73b | 2009-05-08 17:38:25 -0700 | [diff] [blame] | 1680 | + |
Shawn O. Pearce | d2b73db | 2009-01-09 11:55:47 -0800 | [diff] [blame] | 1681 | Changing it is not recommended. |
| 1682 | |
Shawn O. Pearce | 8e9c73b | 2009-05-08 17:38:25 -0700 | [diff] [blame] | 1683 | registered_group_id:: |
| 1684 | + |
Shawn O. Pearce | d2b73db | 2009-01-09 11:55:47 -0800 | [diff] [blame] | 1685 | Unique identity of the group for all authenticated users. |
Shawn O. Pearce | 8e9c73b | 2009-05-08 17:38:25 -0700 | [diff] [blame] | 1686 | + |
Shawn O. Pearce | d2b73db | 2009-01-09 11:55:47 -0800 | [diff] [blame] | 1687 | All signed-in users are a member of this group. Any access rights |
| 1688 | assigned to this group are inherited by all users once they have |
| 1689 | authenticated to Gerrit. |
Shawn O. Pearce | 8e9c73b | 2009-05-08 17:38:25 -0700 | [diff] [blame] | 1690 | + |
Shawn O. Pearce | d2b73db | 2009-01-09 11:55:47 -0800 | [diff] [blame] | 1691 | Since account registration is open and fairly easy to obtain, |
| 1692 | moving from the "Anonymous Users" group to this group is not |
| 1693 | very difficult. Caution should be taken when assigning any |
| 1694 | permissions to this group. |
Shawn O. Pearce | 8e9c73b | 2009-05-08 17:38:25 -0700 | [diff] [blame] | 1695 | + |
Shawn O. Pearce | d2b73db | 2009-01-09 11:55:47 -0800 | [diff] [blame] | 1696 | This is initialized by Gerrit to be the "Registered Users" group. |
Shawn O. Pearce | 8e9c73b | 2009-05-08 17:38:25 -0700 | [diff] [blame] | 1697 | + |
Shawn O. Pearce | d2b73db | 2009-01-09 11:55:47 -0800 | [diff] [blame] | 1698 | Changing it is not recommended. |
| 1699 | |
Shawn O. Pearce | 5500e69 | 2009-05-28 15:55:01 -0700 | [diff] [blame] | 1700 | GERRIT |
| 1701 | ------ |
| 1702 | Part of link:index.html[Gerrit Code Review] |