| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1 | = Gerrit Code Review - Configuration |
| Shawn O. Pearce | d2b73db | 2009-01-09 11:55:47 -0800 | [diff] [blame] | 2 | |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3 | == File `etc/gerrit.config` |
| Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 4 | |
| Shawn O. Pearce | c5fed82 | 2009-11-17 16:10:10 -0800 | [diff] [blame] | 5 | The optional file `'$site_path'/etc/gerrit.config` is a Git-style |
| 6 | config file that controls many host specific settings for Gerrit. |
| Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 7 | |
| 8 | [NOTE] |
| Shawn O. Pearce | c5fed82 | 2009-11-17 16:10:10 -0800 | [diff] [blame] | 9 | The contents of the `etc/gerrit.config` file are cached at startup |
| Brandon Casey | 4a21add | 2011-07-05 13:14:18 -0500 | [diff] [blame] | 10 | by Gerrit. If you modify any properties in this file, Gerrit needs |
| Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 11 | to be restarted before it will use the new values. |
| 12 | |
| Shawn O. Pearce | c5fed82 | 2009-11-17 16:10:10 -0800 | [diff] [blame] | 13 | Sample `etc/gerrit.config`: |
| Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 14 | ---- |
| 15 | [core] |
| Shawn O. Pearce | 9d342a4 | 2009-12-16 15:49:05 -0800 | [diff] [blame] | 16 | packedGitLimit = 200 m |
| Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 17 | |
| 18 | [cache] |
| Shawn O. Pearce | 9d342a4 | 2009-12-16 15:49:05 -0800 | [diff] [blame] | 19 | directory = /var/cache/gerrit2 |
| Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 20 | ---- |
| 21 | |
| Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 22 | [[accounts]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 23 | === Section accounts |
| Dave Borowitz | 45baa89 | 2012-02-23 16:43:05 -0800 | [diff] [blame] | 24 | |
| Matthias Sohn | f336066 | 2012-04-05 15:42:52 +0200 | [diff] [blame] | 25 | [[accounts.visibility]]accounts.visibility:: |
| Dave Borowitz | 45baa89 | 2012-02-23 16:43:05 -0800 | [diff] [blame] | 26 | + |
| 27 | Controls visibility of other users' dashboard pages and |
| 28 | completion suggestions to web users. |
| 29 | + |
| 30 | If `ALL`, all users are visible to all other users, even |
| 31 | anonymous users. |
| 32 | + |
| 33 | If `SAME_GROUP`, only users who are also members of a group the |
| 34 | current user is a member of are visible. |
| 35 | + |
| 36 | If `VISIBLE_GROUP`, only users who are members of at least one group |
| 37 | that is visible to the current user are visible. |
| 38 | + |
| 39 | If `NONE`, no users other than the current user are visible. |
| 40 | + |
| 41 | Default is `ALL`. |
| 42 | |
| Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 43 | [[addreviewer]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 44 | === Section addreviewer |
| Edwin Kempin | 49cb3e1 | 2011-06-29 14:35:14 +0200 | [diff] [blame] | 45 | |
| 46 | [[addreviewer.maxWithoutConfirmation]]addreviewer.maxWithoutConfirmation:: |
| 47 | + |
| 48 | The maximum number of reviewers a user can add at once by adding a |
| 49 | group as reviewer without being asked to confirm the operation. |
| 50 | + |
| 51 | If set to 0, the user will never be asked to confirm adding a group |
| 52 | as reviewer. |
| 53 | + |
| 54 | Default is 10. |
| Edwin Kempin | 5e65d9b | 2011-07-08 07:35:48 +0200 | [diff] [blame] | 55 | + |
| David Pursehouse | a1d633b | 2014-05-02 17:21:02 +0900 | [diff] [blame] | 56 | This setting only applies for adding reviewers in the Gerrit Web UI, |
| Edwin Kempin | 5e65d9b | 2011-07-08 07:35:48 +0200 | [diff] [blame] | 57 | but is ignored when adding reviewers with the |
| Edwin Kempin | 33e92d0 | 2011-07-11 22:00:57 +0200 | [diff] [blame] | 58 | link:cmd-set-reviewers.html[set-reviewers] command. |
| Edwin Kempin | 49cb3e1 | 2011-06-29 14:35:14 +0200 | [diff] [blame] | 59 | |
| 60 | [[addreviewer.maxAllowed]]addreviewer.maxAllowed:: |
| 61 | + |
| 62 | The maximum number of reviewers a user can add at once by adding a |
| 63 | group as reviewer. |
| 64 | + |
| 65 | If set to 0, there is no limit for the number of reviewers that can |
| 66 | be added at once by adding a group as reviewer. |
| 67 | + |
| 68 | Default is 20. |
| 69 | |
| Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 70 | [[auth]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 71 | === Section auth |
| Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 72 | |
| 73 | See also link:config-sso.html[SSO configuration]. |
| 74 | |
| Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 75 | [[auth.type]]auth.type:: |
| Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 76 | + |
| Shawn O. Pearce | 2920ef3 | 2009-08-03 08:03:34 -0700 | [diff] [blame] | 77 | Type of user authentication employed by Gerrit. The supported |
| 78 | values are: |
| Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 79 | + |
| 80 | * `OpenID` |
| 81 | + |
| 82 | The default setting. Gerrit uses any valid OpenID |
| 83 | provider chosen by the end-user. For more information see |
| Shawn O. Pearce | 2920ef3 | 2009-08-03 08:03:34 -0700 | [diff] [blame] | 84 | http://openid.net/[openid.net]. |
| Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 85 | + |
| James E. Blair | ca8bc3b | 2011-12-21 18:12:26 +0000 | [diff] [blame] | 86 | * `OpenID_SSO` |
| 87 | + |
| 88 | Supports OpenID from a single provider. There is no registration |
| 89 | link, and the "Sign In" link sends the user directly to the provider's |
| 90 | SSO entry point. |
| 91 | + |
| Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 92 | * `HTTP` |
| 93 | + |
| Shawn O. Pearce | 2920ef3 | 2009-08-03 08:03:34 -0700 | [diff] [blame] | 94 | Gerrit relies upon data presented in the HTTP request. This includes |
| Edwin Kempin | f1acbb8 | 2011-09-15 12:49:42 +0200 | [diff] [blame] | 95 | HTTP basic authentication, or some types of commercial single-sign-on |
| Shawn O. Pearce | 2920ef3 | 2009-08-03 08:03:34 -0700 | [diff] [blame] | 96 | solutions. With this setting enabled the authentication must |
| 97 | take place in the web server or servlet container, and not from |
| 98 | within Gerrit. |
| 99 | + |
| Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 100 | * `HTTP_LDAP` |
| 101 | + |
| 102 | Exactly like `HTTP` (above), but additionally Gerrit pre-populates |
| 103 | a user's full name and email address based on information obtained |
| 104 | from the user's account object in LDAP. The user's group membership |
| 105 | is also pulled from LDAP, making any LDAP groups that a user is a |
| 106 | member of available as groups in Gerrit. |
| 107 | + |
| Sasa Zivkov | eabc897 | 2010-10-04 15:47:08 +0200 | [diff] [blame] | 108 | * `CLIENT_SSL_CERT_LDAP` |
| 109 | + |
| 110 | This authentication type is actually kind of SSO. Gerrit will configure |
| David Pursehouse | 221d4f6 | 2012-06-08 17:38:08 +0900 | [diff] [blame] | 111 | Jetty's SSL channel to request the client's SSL certificate. For this |
| Sasa Zivkov | eabc897 | 2010-10-04 15:47:08 +0200 | [diff] [blame] | 112 | authentication to work a Gerrit administrator has to import the root |
| 113 | certificate of the trust chain used to issue the client's certificate |
| 114 | into the <review-site>/etc/keystore. |
| 115 | After the authentication is done Gerrit will obtain basic user |
| 116 | registration (name and email) from LDAP, and some group memberships. |
| 117 | Therefore, the "_LDAP" suffix in the name of this authentication type. |
| 118 | This authentication type can only be used under hosted daemon mode, and |
| 119 | the httpd.listenUrl must use https:// as the protocol. |
| Chulho Yang | b72ff8f | 2013-07-04 02:35:53 -0400 | [diff] [blame] | 120 | Optionally, certificate revocation list file can be used |
| 121 | at <review-site>/etc/crl.pem. For details, see httpd.sslCrl. |
| Sasa Zivkov | eabc897 | 2010-10-04 15:47:08 +0200 | [diff] [blame] | 122 | + |
| Shawn O. Pearce | f7e065e | 2009-09-26 20:01:10 -0700 | [diff] [blame] | 123 | * `LDAP` |
| 124 | + |
| 125 | Gerrit prompts the user to enter a username and a password, which |
| 126 | it then verifies by performing a simple bind against the configured |
| 127 | <<ldap.server,ldap.server>>. In this configuration the web server |
| 128 | is not involved in the user authentication process. |
| 129 | + |
| Shawn O. Pearce | c892d34 | 2010-02-17 17:00:50 -0800 | [diff] [blame] | 130 | The actual username used in the LDAP simple bind request is the |
| 131 | account's full DN, which is discovered by first querying the |
| 132 | directory using either an anonymous request, or the configured |
| Robin Rosenberg | a3baed0 | 2012-10-14 14:09:32 +0200 | [diff] [blame] | 133 | <<ldap.username,ldap.username>> identity. Gerrit can also use kerberos if |
| 134 | <<ldap.authentication,ldap.authentication>> is set to `GSSAPI`. |
| Shawn O. Pearce | c892d34 | 2010-02-17 17:00:50 -0800 | [diff] [blame] | 135 | |
| 136 | * `LDAP_BIND` |
| 137 | + |
| 138 | Gerrit prompts the user to enter a username and a password, which |
| 139 | it then verifies by performing a simple bind against the configured |
| 140 | <<ldap.server,ldap.server>>. In this configuration the web server |
| 141 | is not involved in the user authentication process. |
| 142 | + |
| David Pursehouse | 42f4204 | 2013-08-01 14:02:25 +0900 | [diff] [blame] | 143 | Unlike `LDAP` above, the username used to perform the LDAP simple bind |
| David Pursehouse | 1344f5b | 2013-08-09 17:35:47 +0900 | [diff] [blame] | 144 | request is the exact string supplied in the dialog by the user. |
| Robin Rosenberg | 524a303 | 2012-10-14 14:24:36 +0200 | [diff] [blame] | 145 | The configured <<ldap.username,ldap.username>> identity is not used to obtain |
| Shawn O. Pearce | c892d34 | 2010-02-17 17:00:50 -0800 | [diff] [blame] | 146 | account information. |
| 147 | + |
| Michael Ochmann | e9e046a | 2015-10-20 15:34:29 +0200 | [diff] [blame] | 148 | * `OAUTH` |
| David Ostrovsky | e9707d8 | 2015-02-22 01:14:02 +0100 | [diff] [blame] | 149 | + |
| 150 | OAuth is a protocol that lets external apps request authorization to private |
| 151 | details in a user's account without getting their password. This is |
| 152 | preferred over Basic Authentication because tokens can be limited to specific |
| 153 | types of data, and can be revoked by users at any time. |
| 154 | + |
| 155 | Site owners have to register their application before getting started. Note |
| 156 | that provider specific plugins must be used with this authentication scheme. |
| 157 | + |
| Shawn O. Pearce | 2920ef3 | 2009-08-03 08:03:34 -0700 | [diff] [blame] | 158 | * `DEVELOPMENT_BECOME_ANY_ACCOUNT` |
| 159 | + |
| 160 | *DO NOT USE*. Only for use in a development environment. |
| 161 | + |
| 162 | When this is the configured authentication method a hyperlink titled |
| 163 | `Become` appears in the top right corner of the page, taking the |
| 164 | user to a form where they can enter the username of any existing |
| 165 | user account, and immediately login as that account, without any |
| 166 | authentication taking place. This form of authentication is only |
| 167 | useful for the GWT hosted mode shell, where OpenID authentication |
| 168 | redirects might be risky to the developer's host computer, and HTTP |
| 169 | authentication is not possible. |
| Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 170 | |
| 171 | + |
| 172 | By default, OpenID. |
| 173 | |
| Shawn O. Pearce | 533cafc | 2010-05-11 16:05:27 -0700 | [diff] [blame] | 174 | [[auth.allowedOpenID]]auth.allowedOpenID:: |
| 175 | + |
| 176 | List of permitted OpenID providers. A user may only authenticate |
| 177 | with an OpenID that matches this list. Only used if `auth.type` |
| David Pursehouse | 42f4204 | 2013-08-01 14:02:25 +0900 | [diff] [blame] | 178 | is set to `OpenID` (the default). |
| Shawn O. Pearce | 533cafc | 2010-05-11 16:05:27 -0700 | [diff] [blame] | 179 | + |
| Magnus Bäck | e561183 | 2011-02-02 08:57:15 +0100 | [diff] [blame] | 180 | Patterns may be either a |
| 181 | link:http://download.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html[standard |
| 182 | Java regular expression (java.util.regex)] (start with `^` and |
| Shawn O. Pearce | 533cafc | 2010-05-11 16:05:27 -0700 | [diff] [blame] | 183 | end with `$`) or be a simple prefix (any other string). |
| 184 | + |
| 185 | By default, the list contains two values, `http://` and `https://`, |
| 186 | allowing users to authenticate with any OpenID provider. |
| 187 | |
| Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 188 | [[auth.trustedOpenID]]auth.trustedOpenID:: |
| Shawn O. Pearce | d7c026d | 2009-08-05 20:11:22 -0700 | [diff] [blame] | 189 | + |
| David Pursehouse | 221d4f6 | 2012-06-08 17:38:08 +0900 | [diff] [blame] | 190 | List of trusted OpenID providers. Only used if `auth.type` is |
| David Pursehouse | 42f4204 | 2013-08-01 14:02:25 +0900 | [diff] [blame] | 191 | set to `OpenID` (the default). |
| Shawn O. Pearce | d7c026d | 2009-08-05 20:11:22 -0700 | [diff] [blame] | 192 | + |
| 193 | In order for a user to take advantage of permissions beyond those |
| 194 | granted to the `Anonymous Users` and `Registered Users` groups, |
| 195 | the user account must only have OpenIDs which match at least one |
| 196 | pattern from this list. |
| 197 | + |
| Magnus Bäck | e561183 | 2011-02-02 08:57:15 +0100 | [diff] [blame] | 198 | Patterns may be either a |
| 199 | link:http://download.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html[standard |
| 200 | Java regular expression (java.util.regex)] (start with `^` and |
| Shawn O. Pearce | d7c026d | 2009-08-05 20:11:22 -0700 | [diff] [blame] | 201 | end with `$`) or be a simple prefix (any other string). |
| 202 | + |
| 203 | By default, the list contains two values, `http://` and `https://`, |
| 204 | allowing Gerrit to trust any OpenID it receives. |
| 205 | |
| Mike Gouline | d2ab0cd | 2012-12-18 11:20:53 +1100 | [diff] [blame] | 206 | [[auth.openIdDomain]]auth.openIdDomain:: |
| 207 | + |
| 208 | List of allowed OpenID email address domains. Only used if |
| David Pursehouse | 42f4204 | 2013-08-01 14:02:25 +0900 | [diff] [blame] | 209 | `auth.type` is set to `OPENID` or `OPENID_SSO`. |
| Mike Gouline | d2ab0cd | 2012-12-18 11:20:53 +1100 | [diff] [blame] | 210 | + |
| 211 | Domain is case insensitive and must be in the same form as it |
| 212 | appears in the email address, for example, "example.com". |
| 213 | + |
| 214 | By default, any domain is accepted. |
| 215 | |
| Shawn O. Pearce | 89030bc | 2010-04-24 17:25:29 -0700 | [diff] [blame] | 216 | [[auth.maxOpenIdSessionAge]]auth.maxOpenIdSessionAge:: |
| 217 | + |
| 218 | Time in seconds before an OpenID provider must force the user |
| 219 | to authenticate themselves again before authentication to this |
| 220 | Gerrit server. Currently this is only a polite request, and users |
| 221 | coming from providers that don't support the PAPE extension will |
| 222 | be accepted anyway. In the future it may be enforced, rejecting |
| 223 | users coming from providers that don't honor the max session age. |
| 224 | + |
| 225 | If set to 0, the provider will always force the user to authenticate |
| 226 | (e.g. supply their password). Values should use common unit suffixes |
| 227 | to express their setting: |
| 228 | + |
| 229 | * s, sec, second, seconds |
| 230 | * m, min, minute, minutes |
| 231 | * h, hr, hour, hours |
| 232 | * d, day, days |
| 233 | * w, week, weeks (`1 week` is treated as `7 days`) |
| 234 | * mon, month, months (`1 month` is treated as `30 days`) |
| 235 | * y, year, years (`1 year` is treated as `365 days`) |
| 236 | |
| 237 | + |
| 238 | Default is -1, permitting infinite time between authentications. |
| 239 | |
| David Pursehouse | 5be35a3 | 2015-09-09 17:35:32 +0900 | [diff] [blame] | 240 | [[auth.registerEmailPrivateKey]]auth.registerEmailPrivateKey:: |
| 241 | + |
| 242 | Private key to use when generating an email verification token. |
| 243 | + |
| 244 | If not set, a random key is generated when running the |
| 245 | link:pgm-init.html[site initialization]. |
| 246 | |
| Shawn O. Pearce | 34f38cf | 2011-06-16 19:18:54 -0700 | [diff] [blame] | 247 | [[auth.maxRegisterEmailTokenAge]]auth.maxRegisterEmailTokenAge:: |
| 248 | + |
| 249 | Time in seconds before an email verification token sent to a user in |
| 250 | order to validate their email address expires. |
| 251 | + |
| 252 | * s, sec, second, seconds |
| 253 | * m, min, minute, minutes |
| 254 | * h, hr, hour, hours |
| 255 | * d, day, days |
| 256 | * w, week, weeks (`1 week` is treated as `7 days`) |
| 257 | * mon, month, months (`1 month` is treated as `30 days`) |
| 258 | * y, year, years (`1 year` is treated as `365 days`) |
| 259 | |
| 260 | + |
| Shawn O. Pearce | d6bd00b | 2012-01-20 12:40:51 -0800 | [diff] [blame] | 261 | Default is 12 hours. |
| Shawn O. Pearce | 34f38cf | 2011-06-16 19:18:54 -0700 | [diff] [blame] | 262 | |
| James E. Blair | ca8bc3b | 2011-12-21 18:12:26 +0000 | [diff] [blame] | 263 | [[auth.openIdSsoUrl]]auth.openIdSsoUrl:: |
| 264 | + |
| David Pursehouse | 42f4204 | 2013-08-01 14:02:25 +0900 | [diff] [blame] | 265 | The SSO entry point URL. Only used if `auth.type` is set to |
| 266 | `OpenID_SSO`. |
| James E. Blair | ca8bc3b | 2011-12-21 18:12:26 +0000 | [diff] [blame] | 267 | + |
| 268 | The "Sign In" link will send users directly to this URL. |
| 269 | |
| Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 270 | [[auth.httpHeader]]auth.httpHeader:: |
| Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 271 | + |
| 272 | HTTP header to trust the username from, or unset to select HTTP basic |
| David Pursehouse | 42f4204 | 2013-08-01 14:02:25 +0900 | [diff] [blame] | 273 | or digest authentication. Only used if `auth.type` is set to `HTTP`. |
| Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 274 | |
| Luca Milanesio | 384ed6c | 2013-07-30 09:10:07 +0100 | [diff] [blame] | 275 | [[auth.httpDisplaynameHeader]]auth.httpDisplaynameHeader:: |
| 276 | + |
| 277 | HTTP header to retrieve the user's display name from. Only used if `auth.type` |
| 278 | is set to `HTTP`. |
| 279 | + |
| 280 | If set, Gerrit trusts and enforces the user's full name using the HTTP header |
| 281 | and disables the ability to manually modify the user's full name |
| 282 | from the contact information page. |
| 283 | |
| 284 | [[auth.httpEmailHeader]]auth.httpEmailHeader:: |
| 285 | + |
| 286 | HTTP header to retrieve the user's e-mail from. Only used if `auth.type` |
| 287 | is set to `HTTP`. |
| 288 | + |
| 289 | If set, Gerrit trusts and enforces the user's e-mail using the HTTP header |
| 290 | and disables the ability to manually modify or register other e-mails |
| 291 | from the contact information page. |
| 292 | |
| Luca Milanesio | 97d0735 | 2014-07-17 08:31:06 +0100 | [diff] [blame] | 293 | [[auth.httpExternalIdHeader]]auth.httpExternalIdHeader:: |
| 294 | + |
| 295 | HTTP header to retrieve the user's external identification token. |
| 296 | Only used if `auth.type` is set to `HTTP`. |
| 297 | + |
| 298 | If set, Gerrit adds the value contained in the HTTP header to the |
| 299 | user's identity. Typical use is with a federated identity token from |
| 300 | an external system (e.g. GitHub OAuth 2.0 authentication) where |
| 301 | the user's auth token exchanged during authentication handshake |
| 302 | needs to be used for authenticated communication to the external |
| 303 | system later on. |
| 304 | + |
| 305 | Example: `auth.httpExternalIdHeader: X-GitHub-OTP` |
| 306 | |
| Luca Milanesio | 5185b04 | 2013-07-27 22:03:06 +0100 | [diff] [blame] | 307 | [[auth.loginUrl]]auth.loginUrl:: |
| 308 | + |
| 309 | URL to redirect a browser to after the end-user has clicked on the |
| David Pursehouse | 42f4204 | 2013-08-01 14:02:25 +0900 | [diff] [blame] | 310 | login link in the upper right corner. Only used if `auth.type` is set |
| 311 | to `HTTP` or `HTTP_LDAP`. |
| Luca Milanesio | 5185b04 | 2013-07-27 22:03:06 +0100 | [diff] [blame] | 312 | Organizations using an enterprise single-sign-on solution may want to |
| 313 | redirect the browser to the SSO product's sign-in page for completing the |
| 314 | login process and validate their credentials. |
| 315 | + |
| David Pursehouse | 42f4204 | 2013-08-01 14:02:25 +0900 | [diff] [blame] | 316 | If set, Gerrit allows anonymous access until the end-user performs the login |
| 317 | and provides a trusted identity through the HTTP header. |
| Luca Milanesio | 5185b04 | 2013-07-27 22:03:06 +0100 | [diff] [blame] | 318 | If not set, Gerrit requires the HTTP header with a trusted identity |
| David Pursehouse | 42f4204 | 2013-08-01 14:02:25 +0900 | [diff] [blame] | 319 | and returns the error page 'LoginRedirect.html' if such a header is not |
| 320 | present. |
| Luca Milanesio | 5185b04 | 2013-07-27 22:03:06 +0100 | [diff] [blame] | 321 | |
| 322 | [[auth.loginText]]auth.loginText:: |
| 323 | + |
| David Pursehouse | 42f4204 | 2013-08-01 14:02:25 +0900 | [diff] [blame] | 324 | Text displayed in the loginUrl link. Only used if `auth.loginUrl` is set. |
| Luca Milanesio | 5185b04 | 2013-07-27 22:03:06 +0100 | [diff] [blame] | 325 | + |
| David Pursehouse | 42f4204 | 2013-08-01 14:02:25 +0900 | [diff] [blame] | 326 | If not set, the "Sign In" text is used. |
| Luca Milanesio | 5185b04 | 2013-07-27 22:03:06 +0100 | [diff] [blame] | 327 | |
| Luca Milanesio | 111e0b7 | 2013-08-15 18:56:42 +0100 | [diff] [blame] | 328 | [[auth.registerPageUrl]]auth.registerPageUrl:: |
| 329 | + |
| David Pursehouse | 268744b | 2013-08-17 15:32:11 +0900 | [diff] [blame] | 330 | URL of the registration page to use when a new user logs in to Gerrit for |
| 331 | the first time. Used only when `auth.type` is set to `HTTP`. |
| Luca Milanesio | 111e0b7 | 2013-08-15 18:56:42 +0100 | [diff] [blame] | 332 | + |
| 333 | If not set, the standard Gerrit registration page `/#/register/` is displayed. |
| 334 | |
| Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 335 | [[auth.logoutUrl]]auth.logoutUrl:: |
| Shawn O. Pearce | 12b5d84 | 2009-08-15 15:11:10 -0700 | [diff] [blame] | 336 | + |
| 337 | URL to redirect a browser to after the end-user has clicked on the |
| 338 | "Sign Out" link in the upper right corner. Organizations using an |
| 339 | enterprise single-sign-on solution may want to redirect the browser |
| 340 | to the SSO product's sign-out page. |
| 341 | + |
| 342 | If not set, the redirect returns to the list of all open changes. |
| 343 | |
| Shawn O. Pearce | c9d26b5 | 2009-12-16 08:05:27 -0800 | [diff] [blame] | 344 | [[auth.registerUrl]]auth.registerUrl:: |
| 345 | + |
| 346 | Target for the "Register" link in the upper right corner. Used only |
| Edwin Kempin | 5409315 | 2015-05-08 10:50:35 +0200 | [diff] [blame] | 347 | when `auth.type` is `LDAP`, `LDAP_BIND` or `CUSTOM_EXTENSION`. |
| Shawn O. Pearce | c9d26b5 | 2009-12-16 08:05:27 -0800 | [diff] [blame] | 348 | + |
| 349 | If not set, no "Register" link is displayed. |
| 350 | |
| Chad Horohoe | 6589708 | 2012-11-10 10:26:25 -0800 | [diff] [blame] | 351 | [[auth.registerText]]auth.registerText:: |
| 352 | + |
| 353 | Text for the "Register" link in the upper right corner. Used only |
| Edwin Kempin | 5409315 | 2015-05-08 10:50:35 +0200 | [diff] [blame] | 354 | when `auth.type` is `LDAP`, `LDAP_BIND` or `CUSTOM_EXTENSION`. |
| Chad Horohoe | 6589708 | 2012-11-10 10:26:25 -0800 | [diff] [blame] | 355 | + |
| 356 | If not set, defaults to "Register". |
| 357 | |
| David Pursehouse | 3d60449 | 2013-01-25 17:41:53 +0900 | [diff] [blame] | 358 | [[auth.editFullNameUrl]]auth.editFullNameUrl:: |
| 359 | + |
| 360 | Target for the "Edit" button when the user is allowed to edit their |
| Edwin Kempin | 5409315 | 2015-05-08 10:50:35 +0200 | [diff] [blame] | 361 | full name. Used only when `auth.type` is `LDAP`, `LDAP_BIND` or |
| 362 | `CUSTOM_EXTENSION`. |
| David Pursehouse | 3d60449 | 2013-01-25 17:41:53 +0900 | [diff] [blame] | 363 | |
| 364 | [[auth.httpPasswordUrl]]auth.httpPasswordUrl:: |
| 365 | + |
| David Pursehouse | 42f4204 | 2013-08-01 14:02:25 +0900 | [diff] [blame] | 366 | Target for the "Obtain Password" link. Used only when `auth.type` is |
| Edwin Kempin | 5409315 | 2015-05-08 10:50:35 +0200 | [diff] [blame] | 367 | `CUSTOM_EXTENSION`. |
| Shawn Pearce | e0cafe4 | 2013-08-29 23:28:13 -0700 | [diff] [blame] | 368 | |
| 369 | [[auth.switchAccountUrl]]auth.switchAccountUrl:: |
| David Pursehouse | 3d60449 | 2013-01-25 17:41:53 +0900 | [diff] [blame] | 370 | + |
| Shawn Pearce | e0cafe4 | 2013-08-29 23:28:13 -0700 | [diff] [blame] | 371 | URL to switch user identities and login as a different account than |
| 372 | the currently active account. This is disabled by default except when |
| 373 | `auth.type` is `OPENID` and `DEVELOPMENT_BECOME_ANY_ACCOUNT`. If set |
| 374 | the "Switch Account" link is displayed next to "Sign Out". |
| 375 | + |
| 376 | When `auth.type` does not normally enable this URL administrators may |
| 377 | set this to `login/` or `$canonicalWebUrl/login`, allowing users to |
| 378 | begin a new web session. |
| David Pursehouse | 3d60449 | 2013-01-25 17:41:53 +0900 | [diff] [blame] | 379 | |
| Piotr Sikora | 7cec2f8 | 2011-02-26 12:57:30 +0000 | [diff] [blame] | 380 | [[auth.cookiePath]]auth.cookiePath:: |
| 381 | + |
| 382 | Sets "path" attribute of the authentication cookie. |
| 383 | + |
| 384 | If not set, HTTP request's path is used. |
| 385 | |
| Sammy Gillespie | 26873c0 | 2016-02-11 14:39:43 +0000 | [diff] [blame] | 386 | [[auth.cookieDomain]]auth.cookieDomain:: |
| 387 | + |
| 388 | Sets "domain" attribute of the authentication cookie. |
| 389 | + |
| 390 | If not set, HTTP request's domain is used. |
| 391 | |
| Piotr Sikora | 7cec2f8 | 2011-02-26 12:57:30 +0000 | [diff] [blame] | 392 | [[auth.cookieSecure]]auth.cookieSecure:: |
| 393 | + |
| 394 | Sets "secure" flag of the authentication cookie. If true, cookies |
| 395 | will be transmitted only over HTTPS protocol. |
| 396 | + |
| 397 | By default, false. |
| 398 | |
| Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 399 | [[auth.emailFormat]]auth.emailFormat:: |
| Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 400 | + |
| 401 | Optional format string to construct user email addresses out of |
| David Pursehouse | 42f4204 | 2013-08-01 14:02:25 +0900 | [diff] [blame] | 402 | user login names. Only used if `auth.type` is `HTTP`, `HTTP_LDAP` |
| Shawn O. Pearce | f7e065e | 2009-09-26 20:01:10 -0700 | [diff] [blame] | 403 | or `LDAP`. |
| Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 404 | + |
| Shawn O. Pearce | 44221bf | 2011-06-27 10:37:30 -0700 | [diff] [blame] | 405 | This value can be set to a format string, where `{0}` is replaced |
| Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 406 | with the login name. E.g. "\{0\}+gerrit@example.com" with a user |
| 407 | login name of "foo" will produce "foo+gerrit@example.com" during |
| 408 | the first time user "foo" registers. |
| Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 409 | + |
| Shawn O. Pearce | f7e065e | 2009-09-26 20:01:10 -0700 | [diff] [blame] | 410 | If the site is using `HTTP_LDAP` or `LDAP`, using this option is |
| 411 | discouraged. Setting `ldap.accountEmailAddress` and importing the |
| 412 | email address from the LDAP directory is generally preferred. |
| Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 413 | |
| Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 414 | [[auth.contributorAgreements]]auth.contributorAgreements:: |
| Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 415 | + |
| 416 | Controls whether or not the contributor agreement features are |
| 417 | enabled for the Gerrit site. If enabled a user must complete a |
| 418 | contributor agreement before they can upload changes. |
| 419 | + |
| Marc Petit-Huguenin | bbb8549 | 2012-12-03 11:11:00 -0800 | [diff] [blame] | 420 | If enabled, the admin must also add one or more |
| 421 | link:config-cla.html[contributor-agreement sections] |
| 422 | in project.config and create agreement files under |
| Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 423 | `'$site_path'/static`, so users can actually complete one or |
| Grzegorz Kossakowski | 28e4e1b | 2009-09-23 11:33:34 -0700 | [diff] [blame] | 424 | more agreements. |
| Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 425 | + |
| 426 | By default this is false (no agreements are used). |
| Fredrik Luthander | a3cf354 | 2012-07-04 16:55:35 -0700 | [diff] [blame] | 427 | + |
| 428 | To enable the actual usage of contributor agreement the project |
| 429 | specific config option in the `project.config` must be set: |
| 430 | link:config-project-config.html[receive.requireContributorAgreement]. |
| Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 431 | |
| Christian Halstrick | a3d88a5 | 2011-08-31 09:21:41 +0200 | [diff] [blame] | 432 | [[auth.trustContainerAuth]]auth.trustContainerAuth:: |
| 433 | + |
| 434 | If true then it is the responsibility of the container hosting |
| 435 | Gerrit to authenticate users. In this case Gerrit will blindly trust |
| 436 | the container. |
| 437 | + |
| 438 | This parameter only affects git over http traffic. If set to false |
| 439 | then Gerrit will do the authentication (using DIGEST authentication). |
| 440 | + |
| 441 | By default this is set to false. |
| 442 | |
| Luca Milanesio | 4205884 | 2012-01-05 21:25:38 +0000 | [diff] [blame] | 443 | [[auth.gitBasicAuth]]auth.gitBasicAuth:: |
| 444 | + |
| 445 | If true then Git over HTTP and HTTP/S traffic is authenticated using |
| Michael Ochmann | e9e046a | 2015-10-20 15:34:29 +0200 | [diff] [blame] | 446 | standard BasicAuth. Depending on the configured `auth.type` credentials |
| 447 | are validated against the randomly generated HTTP password, against LDAP |
| 448 | (`auth.type = LDAP`) or against an OAuth 2 provider (`auth.type = OAUTH`). |
| Luca Milanesio | 4205884 | 2012-01-05 21:25:38 +0000 | [diff] [blame] | 449 | + |
| Edwin Kempin | 4b9d998 | 2014-04-16 11:27:46 +0200 | [diff] [blame] | 450 | This parameter affects git over HTTP traffic and access to the REST |
| 451 | API. If set to false then Gerrit will authenticate through DIGEST |
| 452 | authentication and the randomly generated HTTP password in the Gerrit |
| 453 | database. |
| Luca Milanesio | 4205884 | 2012-01-05 21:25:38 +0000 | [diff] [blame] | 454 | + |
| Edwin Kempin | c5eb003 | 2014-04-16 11:09:58 +0200 | [diff] [blame] | 455 | When `auth.type` is `LDAP`, service users that only exist in the Gerrit |
| 456 | database are still authenticated by their HTTP passwords. |
| Luca Milanesio | 4205884 | 2012-01-05 21:25:38 +0000 | [diff] [blame] | 457 | + |
| Michael Ochmann | e9e046a | 2015-10-20 15:34:29 +0200 | [diff] [blame] | 458 | When `auth.type` is `OAUTH`, Git clients may send OAuth 2 access tokens |
| 459 | instead of passwords in the Basic authentication header. Note that provider |
| 460 | specific plugins must be installed to facilitate this authentication scheme. |
| 461 | If multiple OAuth 2 provider plugins are installed one of them must be |
| 462 | selected as default with the `auth.gitOAuthProvider` option. |
| 463 | + |
| Luca Milanesio | 4205884 | 2012-01-05 21:25:38 +0000 | [diff] [blame] | 464 | By default this is set to false. |
| 465 | |
| Michael Ochmann | e9e046a | 2015-10-20 15:34:29 +0200 | [diff] [blame] | 466 | [[auth.gitOAuthProvider]]auth.gitOAuthProvider:: |
| 467 | + |
| 468 | Selects the OAuth 2 provider to authenticate git over HTTP traffic with. |
| 469 | + |
| 470 | In general there is no way to determine from an access token alone, which |
| 471 | OAuth 2 provider to address to verify that token, and the BasicAuth |
| 472 | scheme does not support amending such details. If multiple OAuth provider |
| 473 | plugins in a system offer support for git over HTTP authentication site |
| 474 | administrators must configure, which one to use as default provider. |
| 475 | In case the provider cannot be determined from a request the access token |
| 476 | will be sent to the default provider for verification. |
| 477 | + |
| 478 | The value of this parameter must be the identifier of an OAuth 2 provider |
| 479 | in the form `plugin-name:provider-name`. Consult the respective plugin |
| 480 | documentation for details. |
| 481 | |
| Edwin Kempin | 4b9e5e7 | 2011-09-22 15:06:14 +0200 | [diff] [blame] | 482 | [[auth.userNameToLowerCase]]auth.userNameToLowerCase:: |
| 483 | + |
| 484 | If set the username that is received to authenticate a git operation |
| 485 | is converted to lower case for looking up the user account in Gerrit. |
| 486 | + |
| 487 | By setting this parameter a case insensitive authentication for the |
| 488 | git operations can be achieved, if it is ensured that the usernames in |
| 489 | Gerrit (scheme `username`) are stored in lower case (e.g. if the |
| 490 | parameter link:#ldap.accountSshUserName[ldap.accountSshUserName] is |
| 491 | set to `${sAMAccountName.toLowerCase}`). It is important that for all |
| 492 | existing accounts this username is already in lower case. It is not |
| 493 | possible to convert the usernames of the existing accounts to lower |
| 494 | case because this would break the access to existing per-user |
| 495 | branches. |
| 496 | + |
| 497 | This parameter only affects git over http and git over SSH traffic. |
| 498 | + |
| 499 | By default this is set to false. |
| 500 | |
| Shawn Pearce | a931fe1 | 2013-06-11 12:29:17 -0700 | [diff] [blame] | 501 | [[auth.enableRunAs]]auth.enableRunAs:: |
| 502 | + |
| 503 | If true HTTP REST APIs will accept the `X-Gerrit-RunAs` HTTP request |
| 504 | header from any users granted the link:access-control.html#capability_runAs[Run As] |
| 505 | capability. The header and capability permit the authenticated user |
| 506 | to impersonate another account. |
| 507 | + |
| 508 | If false the feature is disabled and cannot be re-enabled without |
| 509 | editing gerrit.config and restarting the server. |
| 510 | + |
| 511 | Default is true. |
| 512 | |
| David Pursehouse | 21bd07b | 2015-11-27 00:15:42 +0900 | [diff] [blame] | 513 | [[auth.allowRegisterNewEmail]]auth.allowRegisterNewEmail:: |
| 514 | + |
| 515 | Whether users are allowed to register new email addresses. |
| 516 | + |
| 517 | In addition for the HTTP authentication type |
| 518 | link:#auth.httpemailheader[auth.httpemailheader] must *not* be set to |
| 519 | enable registration of new email addresses. |
| 520 | + |
| 521 | By default, true. |
| 522 | |
| Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 523 | [[cache]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 524 | === Section cache |
| Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 525 | |
| Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 526 | [[cache.directory]]cache.directory:: |
| Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 527 | + |
| 528 | 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] | 529 | future lookup. This local disk cache is used to retain potentially |
| 530 | expensive to compute information across restarts. If the location |
| 531 | does not exist, Gerrit will try to create it. |
| Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 532 | + |
| Saša Živkov | e607d6c | 2016-02-24 10:46:46 +0000 | [diff] [blame] | 533 | Tehnically, cached entities are persisted as a set of H2 databases |
| 534 | inside this directory. |
| 535 | + |
| Shawn O. Pearce | 4b21228 | 2009-08-05 19:45:56 -0700 | [diff] [blame] | 536 | If not absolute, the path is resolved relative to `$site_path`. |
| Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 537 | + |
| Shawn O. Pearce | 4b21228 | 2009-08-05 19:45:56 -0700 | [diff] [blame] | 538 | Default is unset, no disk cache. |
| Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 539 | |
| Saša Živkov | f313457 | 2016-02-09 11:42:46 +0100 | [diff] [blame] | 540 | [[cache.h2CacheSize]]cache.h2CacheSize:: |
| 541 | + |
| Björn Pedersen | 64af3ad | 2016-05-20 10:21:07 +0200 | [diff] [blame] | 542 | The size of the in-memory cache for each opened H2 cache database, in bytes. |
| Saša Živkov | e607d6c | 2016-02-24 10:46:46 +0000 | [diff] [blame] | 543 | + |
| Björn Pedersen | 64af3ad | 2016-05-20 10:21:07 +0200 | [diff] [blame] | 544 | Some caches of Gerrit are persistent and are backed by an H2 database. |
| Saša Živkov | e607d6c | 2016-02-24 10:46:46 +0000 | [diff] [blame] | 545 | H2 uses memory to cache its database content. The parameter `h2CacheSize` |
| 546 | allows to limit the memory used by H2 and thus prevent out-of-memory |
| Saša Živkov | f313457 | 2016-02-09 11:42:46 +0100 | [diff] [blame] | 547 | caused by the H2 database using too much memory. |
| 548 | + |
| Björn Pedersen | 64af3ad | 2016-05-20 10:21:07 +0200 | [diff] [blame] | 549 | See <<database.h2.cachesize,database.h2.cachesize>> for a detailed discussion. |
| Saša Živkov | f313457 | 2016-02-09 11:42:46 +0100 | [diff] [blame] | 550 | + |
| Björn Pedersen | 64af3ad | 2016-05-20 10:21:07 +0200 | [diff] [blame] | 551 | Default is unset, using up to half of the available memory. |
| 552 | |
| 553 | H2 will persist this value in the database, so to unset explicitly specify 0. |
| Saša Živkov | f313457 | 2016-02-09 11:42:46 +0100 | [diff] [blame] | 554 | + |
| 555 | Common unit suffixes of 'k', 'm', or 'g' are supported. |
| 556 | |
| Björn Pedersen | 64af3ad | 2016-05-20 10:21:07 +0200 | [diff] [blame] | 557 | [[cache.h2AutoServer]]cache.h2AutoServer:: |
| 558 | + |
| 559 | If set to true, enable H2 autoserver mode for the H2-backed persistent cache |
| 560 | databases. |
| 561 | + |
| 562 | See link:http://www.h2database.com/html/features.html#auto_mixed_mode[here] |
| 563 | for detail. |
| 564 | + |
| 565 | Default is false. |
| 566 | |
| Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 567 | [[cache.name.maxAge]]cache.<name>.maxAge:: |
| Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 568 | + |
| Shawn O. Pearce | 2e1cb2b | 2012-05-24 14:28:40 -0700 | [diff] [blame] | 569 | Maximum age to keep an entry in the cache. Entries are removed from |
| 570 | the cache and refreshed from source data every maxAge interval. |
| Shawn O. Pearce | d9c403e | 2009-08-19 08:35:41 -0700 | [diff] [blame] | 571 | Values should use common unit suffixes to express their setting: |
| Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 572 | + |
| Shawn O. Pearce | d9c403e | 2009-08-19 08:35:41 -0700 | [diff] [blame] | 573 | * s, sec, second, seconds |
| 574 | * m, min, minute, minutes |
| 575 | * h, hr, hour, hours |
| 576 | * d, day, days |
| 577 | * w, week, weeks (`1 week` is treated as `7 days`) |
| 578 | * mon, month, months (`1 month` is treated as `30 days`) |
| 579 | * y, year, years (`1 year` is treated as `365 days`) |
| 580 | |
| Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 581 | + |
| Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 582 | -- |
| Edwin Kempin | abcd504 | 2013-03-12 16:04:37 +0100 | [diff] [blame] | 583 | If a unit suffix is not specified, `seconds` is assumed. If 0 is |
| Shawn O. Pearce | 3fdbf39 | 2009-09-04 18:08:26 -0700 | [diff] [blame] | 584 | supplied, the maximum age is infinite and items are never purged |
| 585 | except when the cache is full. |
| Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 586 | |
| Shawn O. Pearce | 2e1cb2b | 2012-05-24 14:28:40 -0700 | [diff] [blame] | 587 | Default is `0`, meaning store forever with no expire, except: |
| Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 588 | |
| Shawn O. Pearce | 05687e9 | 2011-04-04 17:29:03 -0400 | [diff] [blame] | 589 | * `"adv_bases"`: default is `10 minutes` |
| Shawn O. Pearce | d9c403e | 2009-08-19 08:35:41 -0700 | [diff] [blame] | 590 | * `"ldap_groups"`: default is `1 hour` |
| Shawn O. Pearce | d9c403e | 2009-08-19 08:35:41 -0700 | [diff] [blame] | 591 | * `"web_sessions"`: default is `12 hours` |
| Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 592 | -- |
| Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 593 | |
| Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 594 | [[cache.name.memoryLimit]]cache.<name>.memoryLimit:: |
| Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 595 | + |
| Shawn O. Pearce | 2e1cb2b | 2012-05-24 14:28:40 -0700 | [diff] [blame] | 596 | The total cost of entries to retain in memory. The cost computation |
| 597 | varies by the cache. For most caches where the in-memory size of each |
| 598 | entry is relatively the same, memoryLimit is currently defined to be |
| 599 | the number of entries held by the cache (each entry costs 1). |
| 600 | + |
| 601 | For caches where the size of an entry can vary significantly between |
| 602 | individual entries (notably `"diff"`, `"diff_intraline"`), memoryLimit |
| 603 | is an approximation of the total number of bytes stored by the cache. |
| 604 | Larger entries that represent bigger patch sets or longer source files |
| 605 | will consume a bigger portion of the memoryLimit. For these caches the |
| 606 | memoryLimit should be set to roughly the amount of RAM (in bytes) the |
| 607 | administrator can dedicate to the cache. |
| Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 608 | + |
| Shawn O. Pearce | efaf979 | 2009-09-02 18:12:52 -0700 | [diff] [blame] | 609 | Default is 1024 for most caches, except: |
| 610 | + |
| Shawn O. Pearce | 05687e9 | 2011-04-04 17:29:03 -0400 | [diff] [blame] | 611 | * `"adv_bases"`: default is `4096` |
| Shawn O. Pearce | 2e1cb2b | 2012-05-24 14:28:40 -0700 | [diff] [blame] | 612 | * `"diff"`: default is `10m` (10 MiB of memory) |
| 613 | * `"diff_intraline"`: default is `10m` (10 MiB of memory) |
| 614 | * `"plugin_resources"`: default is 2m (2 MiB of memory) |
| 615 | |
| 616 | + |
| 617 | If set to 0 the cache is disabled. Entries are removed immediately |
| 618 | after being stored by the cache. This is primarily useful for testing. |
| Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 619 | |
| Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 620 | [[cache.name.diskLimit]]cache.<name>.diskLimit:: |
| Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 621 | + |
| Shawn O. Pearce | 2e1cb2b | 2012-05-24 14:28:40 -0700 | [diff] [blame] | 622 | Total size in bytes of the keys and values stored on disk. Caches that |
| 623 | have grown bigger than this size are scanned daily at 1 AM local |
| 624 | server time to trim the cache. Entries are removed in least recently |
| 625 | accessed order until the cache fits within this limit. Caches may |
| 626 | grow larger than this during the day, as the size check is only |
| 627 | performed once every 24 hours. |
| Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 628 | + |
| Shawn O. Pearce | 2e1cb2b | 2012-05-24 14:28:40 -0700 | [diff] [blame] | 629 | Default is 128 MiB per cache. |
| Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 630 | + |
| Shawn O. Pearce | 2e1cb2b | 2012-05-24 14:28:40 -0700 | [diff] [blame] | 631 | If 0, disk storage for the cache is disabled. |
| Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 632 | |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 633 | ==== [[cache_names]]Standard Caches |
| Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 634 | |
| Shawn O. Pearce | 4a45271 | 2009-05-28 20:12:33 -0700 | [diff] [blame] | 635 | cache `"accounts"`:: |
| 636 | + |
| Shawn O. Pearce | 4dba988 | 2009-08-05 19:55:15 -0700 | [diff] [blame] | 637 | Cache entries contain important details of an active user, including |
| 638 | their display name, preferences, known email addresses, and group |
| 639 | memberships. Entry information is obtained from the following |
| 640 | database tables: |
| 641 | + |
| 642 | * `accounts` |
| 643 | + |
| 644 | * `account_group_members` |
| 645 | + |
| 646 | * `account_external_ids` |
| 647 | |
| 648 | + |
| 649 | If direct updates are made to any of these database tables, this |
| 650 | cache should be flushed. |
| 651 | |
| 652 | cache `"accounts_byemail"`:: |
| 653 | + |
| 654 | Caches account identities keyed by email address, which is scanned |
| 655 | from the `account_external_ids` database table. If updates are |
| 656 | made to this table, this cache should be flushed. |
| Shawn O. Pearce | 4a45271 | 2009-05-28 20:12:33 -0700 | [diff] [blame] | 657 | |
| Shawn O. Pearce | 05687e9 | 2011-04-04 17:29:03 -0400 | [diff] [blame] | 658 | cache `"adv_bases"`:: |
| 659 | + |
| 660 | Used only for push over smart HTTP when branch level access controls |
| David Pursehouse | 9246356 | 2013-06-24 10:16:28 +0900 | [diff] [blame] | 661 | are enabled. The cache entry contains all commits that are available |
| Shawn O. Pearce | 05687e9 | 2011-04-04 17:29:03 -0400 | [diff] [blame] | 662 | for the client to use as potential delta bases. Push over smart HTTP |
| 663 | requires two HTTP requests, and this cache tries to carry state from |
| 664 | the first request into the second to ensure it can complete. |
| 665 | |
| Gustaf Lundh | 47ce4e3 | 2012-05-21 11:18:42 +0200 | [diff] [blame] | 666 | cache `"changes"`:: |
| 667 | + |
| Gustaf Lundh | 3353c36 | 2013-04-24 17:25:39 +0200 | [diff] [blame] | 668 | The size of `memoryLimit` determines the number of projects for which |
| 669 | all changes will be cached. If the cache is set to 1024, this means all |
| 670 | changes for up to 1024 projects can be held in the cache. |
| Gustaf Lundh | 5349377 | 2012-11-18 18:41:15 -0800 | [diff] [blame] | 671 | + |
| Gustaf Lundh | 3353c36 | 2013-04-24 17:25:39 +0200 | [diff] [blame] | 672 | Default value is 0 (disabled). It is disabled by default due to the fact |
| 673 | that change updates are not communicated between Gerrit servers. Hence |
| 674 | this cache should be disabled in an multi-master/multi-slave setup. |
| Gustaf Lundh | 5349377 | 2012-11-18 18:41:15 -0800 | [diff] [blame] | 675 | + |
| 676 | The cache should be flushed whenever the database changes table is modified |
| Matt Baker | 8ce12fc | 2013-11-26 21:43:12 -0700 | [diff] [blame] | 677 | outside of Gerrit. |
| Gustaf Lundh | 47ce4e3 | 2012-05-21 11:18:42 +0200 | [diff] [blame] | 678 | |
| Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 679 | cache `"diff"`:: |
| 680 | + |
| Shawn O. Pearce | efaf979 | 2009-09-02 18:12:52 -0700 | [diff] [blame] | 681 | Each item caches the differences between two commits, at both the |
| 682 | directory and file levels. Gerrit uses this cache to accelerate |
| 683 | the display of affected file names, as well as file contents. |
| Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 684 | + |
| Shawn O. Pearce | 2e1cb2b | 2012-05-24 14:28:40 -0700 | [diff] [blame] | 685 | Entries in this cache are relatively large, so memoryLimit is an |
| 686 | estimate in bytes of memory used. Administrators should try to target |
| 687 | cache.diff.memoryLimit to fit all changes users will view in a 1 or 2 |
| 688 | day span. |
| Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 689 | |
| Shawn O. Pearce | f0cfe53 | 2011-04-11 23:40:06 -0400 | [diff] [blame] | 690 | cache `"diff_intraline"`:: |
| 691 | + |
| 692 | Each item caches the intraline difference of one file, when compared |
| 693 | between two commits. Gerrit uses this cache to accelerate display of |
| 694 | intraline differences when viewing a file. |
| 695 | + |
| Shawn O. Pearce | 2e1cb2b | 2012-05-24 14:28:40 -0700 | [diff] [blame] | 696 | Entries in this cache are relatively large, so memoryLimit is an |
| 697 | estimate in bytes of memory used. Administrators should try to target |
| 698 | cache.diff.memoryLimit to fit all files users will view in a 1 or 2 |
| 699 | day span. |
| Shawn O. Pearce | f0cfe53 | 2011-04-11 23:40:06 -0400 | [diff] [blame] | 700 | |
| Shawn O. Pearce | 2d65d29 | 2011-06-24 08:12:02 -0700 | [diff] [blame] | 701 | cache `"git_tags"`:: |
| 702 | + |
| 703 | If branch or reference level READ access controls are used, this |
| 704 | cache tracks which tags are reachable from the branch tips of a |
| 705 | repository. Gerrit uses this information to determine the set |
| 706 | of tags that a client may access, derived from which tags are |
| 707 | part of the history of a visible branch. |
| 708 | + |
| 709 | The cache is persisted to disk across server restarts as it can |
| 710 | be expensive to compute (60 or more seconds for a large history |
| 711 | like the Linux kernel repository). |
| 712 | |
| Shawn O. Pearce | 4a45271 | 2009-05-28 20:12:33 -0700 | [diff] [blame] | 713 | cache `"groups"`:: |
| 714 | + |
| Shawn O. Pearce | 4dba988 | 2009-08-05 19:55:15 -0700 | [diff] [blame] | 715 | Caches the basic group information from the `account_groups` table, |
| Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 716 | including the group owner, name, and description. |
| 717 | + |
| 718 | Gerrit group membership obtained from the `account_group_members` |
| 719 | table is cached under the `"accounts"` cache, above. External group |
| 720 | membership obtained from LDAP is cached under `"ldap_groups"`. |
| 721 | |
| Matt Fischer | 620255a | 2011-03-22 14:28:23 -0500 | [diff] [blame] | 722 | cache `"groups_byinclude"`:: |
| 723 | + |
| 724 | Caches group inclusions in other groups. If direct updates are made |
| 725 | to the `account_group_includes` table, this cache should be flushed. |
| 726 | |
| Bruce Zu | 825125a | 2014-11-19 17:01:42 +0900 | [diff] [blame] | 727 | cache `"groups_members"`:: |
| 728 | + |
| 729 | Caches subgroups. If direct updates are made to the |
| 730 | `account_group_includes` table, this cache should be flushed. |
| 731 | |
| Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 732 | cache `"ldap_groups"`:: |
| 733 | + |
| 734 | Caches the LDAP groups that a user belongs to, if LDAP has been |
| 735 | configured on this server. This cache should be configured with a |
| 736 | low maxAge setting, to ensure LDAP modifications are picked up in |
| 737 | a timely fashion. |
| Shawn O. Pearce | 4a45271 | 2009-05-28 20:12:33 -0700 | [diff] [blame] | 738 | |
| Gustaf Lundh | 0919a49 | 2012-10-19 15:29:23 +0200 | [diff] [blame] | 739 | cache `"ldap_groups_byinclude"`:: |
| 740 | + |
| 741 | Caches the hierarchical structure of LDAP groups. |
| 742 | |
| Shawn O. Pearce | 6d26f4a | 2009-08-24 15:43:52 -0700 | [diff] [blame] | 743 | cache `"ldap_usernames"`:: |
| 744 | + |
| 745 | Caches a mapping of LDAP username to Gerrit account identity. The |
| 746 | cache automatically updates when a user first creates their account |
| 747 | within Gerrit, so the cache expire time is largely irrelevant. |
| 748 | |
| Shawn O. Pearce | 0c1abdb | 2011-06-24 11:01:25 -0700 | [diff] [blame] | 749 | cache `"permission_sort"`:: |
| 750 | + |
| David Pursehouse | 221d4f6 | 2012-06-08 17:38:08 +0900 | [diff] [blame] | 751 | Caches the order in which access control sections must be applied to a |
| Shawn O. Pearce | 0c1abdb | 2011-06-24 11:01:25 -0700 | [diff] [blame] | 752 | reference. Sorting the sections can be expensive when regular |
| 753 | expressions are used, so this cache remembers the ordering for |
| 754 | each branch. |
| 755 | |
| Shawn O. Pearce | 2e1cb2b | 2012-05-24 14:28:40 -0700 | [diff] [blame] | 756 | cache `"plugin_resources"`:: |
| 757 | + |
| 758 | Caches formatted plugin resources, such as plugin documentation that |
| 759 | has been converted from Markdown to HTML. The memoryLimit refers to |
| 760 | the bytes of memory dedicated to storing the documentation. |
| 761 | |
| Shawn O. Pearce | 4a45271 | 2009-05-28 20:12:33 -0700 | [diff] [blame] | 762 | cache `"projects"`:: |
| 763 | + |
| 764 | Caches the project description records, from the `projects` table |
| 765 | in the database. If a project record is updated or deleted, this |
| 766 | cache should be flushed. Newly inserted projects do not require |
| 767 | a cache flush, as they will be read upon first reference. |
| 768 | |
| Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 769 | cache `"sshkeys"`:: |
| 770 | + |
| 771 | Caches unpacked versions of user SSH keys, so the internal SSH daemon |
| 772 | can match against them during authentication. The unit of storage |
| 773 | is per-user, so 1024 items translates to 1024 unique user accounts. |
| 774 | As each individual user account may configure multiple SSH keys, |
| 775 | 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] | 776 | + |
| 777 | This cache is based off the `account_ssh_keys` table and the |
| 778 | `accounts.ssh_user_name` column in the database. If either is |
| 779 | modified directly, this cache should be flushed. |
| Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 780 | |
| Shawn O. Pearce | b09322b | 2009-08-15 17:49:00 -0700 | [diff] [blame] | 781 | cache `"web_sessions"`:: |
| 782 | + |
| 783 | Tracks the live user sessions coming in over HTTP. Flushing this |
| 784 | cache would cause all users to be signed out immediately, forcing |
| Shawn O. Pearce | 727d80f | 2009-08-17 07:57:54 -0700 | [diff] [blame] | 785 | them to sign-in again. To avoid breaking active users, this cache |
| 786 | is not flushed automatically by `gerrit flush-caches --all`, but |
| 787 | instead must be explicitly requested. |
| 788 | + |
| 789 | If no disk cache is configured (or `cache.web_sessions.diskLimit` |
| 790 | is set to 0) a server restart will force all users to sign-out, |
| 791 | and need to sign-in again after the restart, as the cache was |
| 792 | unable to persist the session information. Enabling a disk cache |
| 793 | is strongly recommended. |
| 794 | + |
| Shawn O. Pearce | 2e1cb2b | 2012-05-24 14:28:40 -0700 | [diff] [blame] | 795 | Session storage is relatively inexpensive. The average entry in |
| 796 | this cache is approximately 346 bytes. |
| Shawn O. Pearce | b09322b | 2009-08-15 17:49:00 -0700 | [diff] [blame] | 797 | |
| Shawn O. Pearce | 4016a93 | 2009-05-28 15:12:40 -0700 | [diff] [blame] | 798 | See also link:cmd-flush-caches.html[gerrit flush-caches]. |
| 799 | |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 800 | ==== [[cache_options]]Cache Options |
| Shawn O. Pearce | 29de436 | 2010-03-03 17:51:26 -0800 | [diff] [blame] | 801 | |
| Hugo Arès | 2bc8681 | 2015-03-09 15:20:28 -0400 | [diff] [blame] | 802 | [[cache.diff.timeout]]cache.diff.timeout:: |
| 803 | + |
| 804 | Maximum number of milliseconds to wait for diff data before giving up and |
| 805 | falling back on a simpler diff algorithm that will not be able to break down |
| 806 | modified regions into smaller ones. This is a work around for an infinite loop |
| 807 | bug in the default difference algorithm implementation. |
| 808 | + |
| 809 | Values should use common unit suffixes to express their setting: |
| 810 | + |
| 811 | * ms, milliseconds |
| 812 | * s, sec, second, seconds |
| 813 | * m, min, minute, minutes |
| 814 | * h, hr, hour, hours |
| 815 | |
| 816 | + |
| Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 817 | -- |
| Hugo Arès | 2bc8681 | 2015-03-09 15:20:28 -0400 | [diff] [blame] | 818 | If a unit suffix is not specified, `milliseconds` is assumed. |
| Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 819 | |
| Hugo Arès | 2bc8681 | 2015-03-09 15:20:28 -0400 | [diff] [blame] | 820 | Default is 5 seconds. |
| Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 821 | -- |
| Hugo Arès | 2bc8681 | 2015-03-09 15:20:28 -0400 | [diff] [blame] | 822 | |
| Edwin Kempin | 42d2743 | 2013-11-24 17:06:24 +0100 | [diff] [blame] | 823 | [[cache.diff_intraline.timeout]]cache.diff_intraline.timeout:: |
| Shawn O. Pearce | 617aa39 | 2010-11-15 14:03:28 -0800 | [diff] [blame] | 824 | + |
| 825 | Maximum number of milliseconds to wait for intraline difference data |
| 826 | before giving up and disabling it for a particular file pair. This is |
| 827 | a work around for an infinite loop bug in the intraline difference |
| David Pursehouse | e8c1fb9 | 2013-04-17 17:18:43 +0900 | [diff] [blame] | 828 | implementation. |
| 829 | + |
| 830 | If computation takes longer than the timeout, the worker thread is |
| 831 | terminated, an error message is shown, and no intraline difference is |
| 832 | displayed for the file pair. |
| Shawn O. Pearce | 617aa39 | 2010-11-15 14:03:28 -0800 | [diff] [blame] | 833 | + |
| 834 | Values should use common unit suffixes to express their setting: |
| 835 | + |
| 836 | * ms, milliseconds |
| 837 | * s, sec, second, seconds |
| 838 | * m, min, minute, minutes |
| 839 | * h, hr, hour, hours |
| 840 | |
| 841 | + |
| Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 842 | -- |
| Shawn O. Pearce | 617aa39 | 2010-11-15 14:03:28 -0800 | [diff] [blame] | 843 | If a unit suffix is not specified, `milliseconds` is assumed. |
| Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 844 | |
| Shawn O. Pearce | 617aa39 | 2010-11-15 14:03:28 -0800 | [diff] [blame] | 845 | Default is 5 seconds. |
| Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 846 | -- |
| Shawn O. Pearce | 617aa39 | 2010-11-15 14:03:28 -0800 | [diff] [blame] | 847 | |
| Edwin Kempin | 42d2743 | 2013-11-24 17:06:24 +0100 | [diff] [blame] | 848 | [[cache.diff_intraline.enabled]]cache.diff_intraline.enabled:: |
| Shawn O. Pearce | 29de436 | 2010-03-03 17:51:26 -0800 | [diff] [blame] | 849 | + |
| 850 | Boolean to enable or disable the computation of intraline differences |
| Shawn O. Pearce | 307dd4e | 2010-11-15 12:12:20 -0800 | [diff] [blame] | 851 | when populating a diff cache entry. This flag is provided primarily |
| 852 | as a backdoor to disable the intraline difference feature if |
| David Pursehouse | 9246356 | 2013-06-24 10:16:28 +0900 | [diff] [blame] | 853 | necessary. To maintain backwards compatibility with prior versions, |
| Shawn O. Pearce | 307dd4e | 2010-11-15 12:12:20 -0800 | [diff] [blame] | 854 | this setting will fallback to `cache.diff.intraline` if not set in the |
| 855 | configuration. |
| Shawn O. Pearce | 29de436 | 2010-03-03 17:51:26 -0800 | [diff] [blame] | 856 | + |
| 857 | Default is true, enabled. |
| 858 | |
| Edwin Kempin | 42d2743 | 2013-11-24 17:06:24 +0100 | [diff] [blame] | 859 | [[cache.projects.checkFrequency]]cache.projects.checkFrequency:: |
| Shawn O. Pearce | b8e4e35 | 2011-05-19 18:09:01 -0700 | [diff] [blame] | 860 | + |
| 861 | How often project configuration should be checked for update from Git. |
| 862 | Gerrit Code Review caches project access rules and configuration in |
| 863 | memory, checking the refs/meta/config branch every checkFrequency |
| 864 | minutes to see if a new revision should be loaded and used for future |
| 865 | access. Values can be specified using standard time unit abbreviations |
| 866 | ('ms', 'sec', 'min', etc.). |
| 867 | + |
| 868 | If set to 0, checks occur every time, which may slow down operations. |
| Shawn Pearce | c825ef1 | 2013-02-20 11:29:46 -0800 | [diff] [blame] | 869 | If set to 'disabled' or 'off', no check will ever be done. |
| Shawn O. Pearce | b8e4e35 | 2011-05-19 18:09:01 -0700 | [diff] [blame] | 870 | Administrators may force the cache to flush with |
| 871 | link:cmd-flush-caches.html[gerrit flush-caches]. |
| 872 | + |
| 873 | Default is 5 minutes. |
| 874 | |
| Simon Lei | fc19ff1 | 2014-10-02 13:36:00 -0400 | [diff] [blame] | 875 | [[cache.projects.loadOnStartup]]cache.projects.loadOnStartup:: |
| 876 | + |
| 877 | If the project cache should be loaded during server startup. |
| 878 | + |
| 879 | The cache is loaded concurrently. Admins should ensure that the cache |
| 880 | size set under <<cache.name.memoryLimit,cache.projects.memoryLimit>> |
| 881 | is not smaller than the number of repos. |
| 882 | + |
| 883 | Default is false, disabled. |
| 884 | |
| 885 | [[cache.projects.loadThreads]]cache.projects.loadThreads:: |
| 886 | + |
| 887 | Only relevant if <<cache.projects.loadOnStartup,cache.projects.loadOnStartup>> |
| 888 | is true. |
| 889 | + |
| 890 | The number of threads to allocate for loading the cache at startup. These |
| 891 | threads will die out after the cache is loaded. |
| 892 | + |
| 893 | Default is the number of CPUs. |
| 894 | |
| Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 895 | [[change]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 896 | === Section change |
| Shawn Pearce | b9ebb66 | 2013-07-19 19:45:25 -0700 | [diff] [blame] | 897 | |
| Edwin Kempin | 662e55f | 2013-11-23 12:50:29 +0100 | [diff] [blame] | 898 | [[change.largeChange]]change.largeChange:: |
| 899 | + |
| 900 | Number of changed lines from which on a change is considered as a large |
| 901 | change. The number of changed lines of a change is the sum of the lines |
| 902 | that were inserted and deleted in the change. |
| 903 | + |
| David Pursehouse | a1d633b | 2014-05-02 17:21:02 +0900 | [diff] [blame] | 904 | The specified value is used to visualize the change sizes in the Web UI |
| Edwin Kempin | 662e55f | 2013-11-23 12:50:29 +0100 | [diff] [blame] | 905 | in change tables and user dashboards. |
| 906 | + |
| 907 | By default 500. |
| 908 | |
| Shawn Pearce | b9ebb66 | 2013-07-19 19:45:25 -0700 | [diff] [blame] | 909 | [[change.updateDelay]]change.updateDelay:: |
| 910 | + |
| 911 | How often in seconds the web interface should poll for updates to the |
| 912 | currently open change. The poller relies on the client's browser |
| 913 | cache to use If-Modified-Since and respect `304 Not Modified` HTTP |
| Matt Baker | 8ce12fc | 2013-11-26 21:43:12 -0700 | [diff] [blame] | 914 | responses. This allows for fast polls, often under 8 milliseconds. |
| Shawn Pearce | b9ebb66 | 2013-07-19 19:45:25 -0700 | [diff] [blame] | 915 | + |
| 916 | With a configured 30 second delay a server with 4900 active users will |
| 917 | typically need to dedicate 1 CPU to the update check. 4900 users |
| 918 | divided by an average delay of 30 seconds is 163 requests arriving per |
| Edwin Kempin | 720eebe | 2014-07-16 13:44:04 +0200 | [diff] [blame] | 919 | second. If requests are served at \~6 ms response time, 1 CPU is |
| Shawn Pearce | b9ebb66 | 2013-07-19 19:45:25 -0700 | [diff] [blame] | 920 | necessary to keep up with the update request traffic. On a smaller |
| 921 | user base of 500 active users, the default 30 second delay is only 17 |
| 922 | requests per second and requires ~10% CPU. |
| 923 | + |
| 924 | If 0 the update polling is disabled. |
| 925 | + |
| 926 | Default is 30 seconds. |
| 927 | |
| Gabor Somossy | b72d4c6 | 2015-10-20 23:40:07 +0100 | [diff] [blame] | 928 | [[change.allowBlame]]change.allowBlame:: |
| 929 | + |
| 930 | Allow blame on side by side diff. If set to false, blame cannot be used. |
| 931 | + |
| 932 | Default is true. |
| 933 | |
| David Ostrovsky | 1b61dc7 | 2014-01-28 18:40:48 +0100 | [diff] [blame] | 934 | [[change.allowDrafts]]change.allowDrafts:: |
| 935 | + |
| 936 | Allow drafts workflow. If set to false, drafts cannot be created, |
| 937 | deleted or published. |
| 938 | + |
| 939 | Default is true. |
| 940 | |
| Dave Borowitz | f5e6e04 | 2016-04-25 13:03:42 -0400 | [diff] [blame] | 941 | [[change.cacheAutomerge]]change.cacheAutomerge:: |
| 942 | + |
| 943 | When reviewing diff commits, the left-hand side shows the output of the |
| 944 | result of JGit's automatic merge algorithm. This option controls whether |
| 945 | this output is cached in the change repository, or if only the diff is |
| 946 | cached in the persistent `diff` cache. |
| 947 | + |
| 948 | If true, automerge results are stored in the repository under |
| 949 | `refs/cache-automerge/*`; the results of diffing the change against its |
| 950 | automerge base are stored in the diff cache. If false, no extra data is |
| 951 | stored in the repository, only the diff cache. This can result in slight |
| 952 | performance improvements by reducing the number of refs in the repo. |
| 953 | + |
| 954 | Default is true. |
| 955 | |
| David Ostrovsky | 9933eb3 | 2014-05-20 16:08:20 +0200 | [diff] [blame] | 956 | [[change.submitLabel]]change.submitLabel:: |
| 957 | + |
| 958 | Label name for the submit button. |
| 959 | + |
| 960 | Default is "Submit". |
| 961 | |
| Stefan Beller | 7c380d51 | 2015-08-21 10:55:21 -0700 | [diff] [blame] | 962 | [[change.submitLabelWithParents]]change.submitLabelWithParents:: |
| 963 | + |
| 964 | Label name for the submit button if the change has parents which will |
| 965 | be submitted together with this change. |
| 966 | + |
| 967 | Default is "Submit including parents". |
| 968 | |
| David Ostrovsky | 9933eb3 | 2014-05-20 16:08:20 +0200 | [diff] [blame] | 969 | [[change.submitTooltip]]change.submitTooltip:: |
| 970 | + |
| 971 | Tooltip for the submit button. Variables available for replacement |
| 972 | include `${patchSet}` for the current patch set number (1, 2, 3), |
| 973 | `${branch}` for the branch name ("master") and `${commit}` for the |
| 974 | abbreviated commit SHA-1 (`c9c0edb`). |
| 975 | + |
| 976 | Default is "Submit patch set ${patchSet} into ${branch}". |
| 977 | |
| Stefan Beller | 0e65554 | 2015-07-20 21:14:38 -0700 | [diff] [blame] | 978 | [[change.submitTooltipAncestors]]change.submitTooltipAncestors:: |
| 979 | + |
| 980 | Tooltip for the submit button if there are ancestors which would |
| 981 | also be submitted by submitting the change. Additionally to the variables |
| 982 | as in link:#change.submitTooltip[change.submitTooltip], there is the |
| 983 | variable `${submitSize}` indicating the number of changes which are |
| 984 | submitted. |
| 985 | + |
| 986 | Default is "Submit all ${topicSize} changes of the same topic (${submitSize} |
| 987 | changes including ancestors and other changes related by topic)". |
| 988 | |
| David Pursehouse | 2ecd030 | 2016-04-07 19:12:00 +0900 | [diff] [blame] | 989 | [[change.submitWholeTopic]]change.submitWholeTopic:: |
| Stefan Beller | a038cf7 | 2015-01-13 16:25:10 -0800 | [diff] [blame] | 990 | + |
| 991 | Determines if the submit button submits the whole topic instead of |
| 992 | just the current change. |
| 993 | + |
| 994 | Default is false. |
| 995 | |
| 996 | [[change.submitTopicLabel]]change.submitTopicLabel:: |
| 997 | + |
| 998 | If `change.submitWholeTopic` is set and a change has a topic, |
| 999 | the label name for the submit button is given here instead of |
| 1000 | the configuration `change.submitLabel`. |
| 1001 | + |
| 1002 | Defaults to "Submit whole topic" |
| 1003 | |
| 1004 | [[change.submitTopicTooltip]]change.submitTopicTooltip:: |
| 1005 | + |
| 1006 | If `change.submitWholeTopic` is configuerd to true and a change has a |
| 1007 | topic, this configuration determines the tooltip for the submit button |
| 1008 | instead of `change.submitTooltip`. The variable `${topicSize}` is available |
| Stefan Beller | 7c380d51 | 2015-08-21 10:55:21 -0700 | [diff] [blame] | 1009 | for the number of changes in the same topic to be submitted. The number of |
| 1010 | all changes to be submitted is in the variable `${submitSize}`. |
| Stefan Beller | a038cf7 | 2015-01-13 16:25:10 -0800 | [diff] [blame] | 1011 | + |
| Stefan Beller | 7c380d51 | 2015-08-21 10:55:21 -0700 | [diff] [blame] | 1012 | Defaults to "Submit all ${topicSize} changes of the same topic |
| 1013 | (${submitSize} changes including ancestors and other |
| 1014 | changes related by topic)". |
| Stefan Beller | a038cf7 | 2015-01-13 16:25:10 -0800 | [diff] [blame] | 1015 | |
| Richard Möhn | e4abe9a | 2014-11-13 20:05:13 +0100 | [diff] [blame] | 1016 | [[change.replyLabel]]change.replyLabel:: |
| 1017 | + |
| 1018 | Label name for the reply button. In the user interface an ellipsis (…) |
| 1019 | is appended. |
| 1020 | + |
| 1021 | Default is "Reply". In the user interface it becomes "Reply…". |
| 1022 | |
| 1023 | [[change.replyTooltip]]change.replyTooltip:: |
| 1024 | + |
| 1025 | Tooltip for the reply button. In the user interface a note about the |
| 1026 | keyboard shortcut is appended. |
| 1027 | + |
| 1028 | Default is "Reply and score". In the user interface it becomes "Reply |
| 1029 | and score (Shortcut: a)". |
| 1030 | |
| Edwin Kempin | e326a1d | 2015-06-03 10:27:39 +0200 | [diff] [blame] | 1031 | [[changeCleanup]] |
| 1032 | === Section changeCleanup |
| 1033 | |
| 1034 | This section allows to configure change cleanups and schedules them to |
| 1035 | run periodically. |
| 1036 | |
| 1037 | [[changeCleanup.abandonAfter]]changeCleanup.abandonAfter:: |
| 1038 | + |
| 1039 | Period of inactivity after which open changes should be abandoned |
| 1040 | automatically. |
| 1041 | + |
| 1042 | By default `0`, never abandon open changes. |
| 1043 | + |
| 1044 | [WARNING] Auto-Abandoning changes may confuse/annoy users. When |
| 1045 | enabling this, make sure to choose a reasonably large grace period and |
| 1046 | inform users in advance. |
| 1047 | + |
| 1048 | The following suffixes are supported to define the time unit: |
| 1049 | + |
| 1050 | * `d, day, days` |
| 1051 | * `w, week, weeks` (`1 week` is treated as `7 days`) |
| 1052 | * `mon, month, months` (`1 month` is treated as `30 days`) |
| 1053 | * `y, year, years` (`1 year` is treated as `365 days`) |
| 1054 | |
| Edwin Kempin | 7080ef1 | 2015-06-10 15:03:09 +0200 | [diff] [blame] | 1055 | [[changeCleanup.abandonIfMergeable]]changeCleanup.abandonIfMergeable:: |
| 1056 | + |
| 1057 | Whether changes which are mergeable should be auto-abandoned. |
| 1058 | + |
| 1059 | By default `true`. |
| 1060 | |
| Edwin Kempin | e326a1d | 2015-06-03 10:27:39 +0200 | [diff] [blame] | 1061 | [[changeCleanup.abandonMessage]]changeCleanup.abandonMessage:: |
| 1062 | + |
| 1063 | Change message that should be posted when a change is abandoned. |
| 1064 | + |
| 1065 | '${URL}' can be used as a placeholder for the Gerrit web URL. |
| 1066 | + |
| 1067 | By default "Auto-Abandoned due to inactivity, see |
| 1068 | ${URL}Documentation/user-change-cleanup.html#auto-abandon\n\n |
| 1069 | If this change is still wanted it should be restored.". |
| 1070 | |
| 1071 | [[changeCleanup.startTime]]changeCleanup.startTime:: |
| 1072 | + |
| 1073 | Start time to define the first execution of the change cleanups. |
| 1074 | If the configured `'changeCleanup.interval'` is shorter than |
| 1075 | `'changeCleanup.startTime - now'` the start time will be preponed by |
| 1076 | the maximum integral multiple of `'changeCleanup.interval'` so that the |
| 1077 | start time is still in the future. |
| 1078 | + |
| 1079 | ---- |
| 1080 | <day of week> <hours>:<minutes> |
| 1081 | or |
| 1082 | <hours>:<minutes> |
| 1083 | |
| 1084 | <day of week> : Mon, Tue, Wed, Thu, Fri, Sat, Sun |
| 1085 | <hours> : 00-23 |
| 1086 | <minutes> : 0-59 |
| 1087 | ---- |
| 1088 | |
| 1089 | |
| 1090 | [[changeCleanup.interval]]changeCleanup.interval:: |
| 1091 | + |
| 1092 | Interval for periodic repetition of triggering the change cleanups. |
| 1093 | The interval must be larger than zero. The following suffixes are supported |
| 1094 | to define the time unit for the interval: |
| 1095 | + |
| 1096 | * `s, sec, second, seconds` |
| 1097 | * `m, min, minute, minutes` |
| 1098 | * `h, hr, hour, hours` |
| 1099 | * `d, day, days` |
| 1100 | * `w, week, weeks` (`1 week` is treated as `7 days`) |
| 1101 | * `mon, month, months` (`1 month` is treated as `30 days`) |
| 1102 | * `y, year, years` (`1 year` is treated as `365 days`) |
| 1103 | |
| 1104 | link:#schedule-examples[Schedule examples] can be found in the |
| 1105 | link:#gc[gc] section. |
| 1106 | |
| Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 1107 | [[changeMerge]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1108 | === Section changeMerge |
| carloseduardo.baldacin | 14246de | 2011-07-14 17:52:22 -0300 | [diff] [blame] | 1109 | |
| Edwin Kempin | 42d2743 | 2013-11-24 17:06:24 +0100 | [diff] [blame] | 1110 | [[changeMerge.checkFrequency]]changeMerge.checkFrequency:: |
| Dave Borowitz | 204669c2 | 2012-10-11 11:06:08 -0700 | [diff] [blame] | 1111 | + |
| 1112 | How often the database should be rescanned for changes that have been |
| 1113 | submitted but not merged due to transient errors. Values can be |
| 1114 | specified using standard time unit abbreviations ('ms', 'sec', 'min', |
| 1115 | etc.). Set to 0 to disable periodic rescanning, only scanning once on |
| 1116 | master node startup. |
| 1117 | + |
| 1118 | Default is 300 seconds (5 minutes). |
| 1119 | |
| Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 1120 | [[commentlink]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1121 | === Section commentlink |
| Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 1122 | |
| Brad Larson | 991a31b | 2009-11-03 14:30:26 -0600 | [diff] [blame] | 1123 | Comment links are find/replace strings applied to change descriptions, |
| Chris Harris | 63c7cdd | 2012-11-23 12:17:36 -0500 | [diff] [blame] | 1124 | patch comments, in-line code comments and approval category value descriptions |
| 1125 | to turn set strings into hyperlinks. One common use is for linking to |
| 1126 | bug-tracking systems. |
| Brad Larson | 991a31b | 2009-11-03 14:30:26 -0600 | [diff] [blame] | 1127 | |
| 1128 | In the following example configuration the 'changeid' comment link |
| Shawn O. Pearce | da866ae | 2009-12-16 15:46:03 -0800 | [diff] [blame] | 1129 | will match typical Gerrit Change-Id values and create a hyperlink |
| 1130 | to changes which reference it. The second configuration 'bugzilla' |
| 1131 | will hyperlink terms such as 'bug 42' to an external bug tracker, |
| 1132 | supplying the argument record number '42' for display. The third |
| David Pursehouse | 221d4f6 | 2012-06-08 17:38:08 +0900 | [diff] [blame] | 1133 | configuration 'tracker' uses raw HTML to more precisely control |
| Shawn O. Pearce | da866ae | 2009-12-16 15:46:03 -0800 | [diff] [blame] | 1134 | how the replacement is displayed to the user. |
| Brad Larson | 991a31b | 2009-11-03 14:30:26 -0600 | [diff] [blame] | 1135 | |
| Shawn O. Pearce | da866ae | 2009-12-16 15:46:03 -0800 | [diff] [blame] | 1136 | ---- |
| 1137 | [commentlink "changeid"] |
| 1138 | match = (I[0-9a-f]{8,40}) |
| David Pursehouse | 9f68e1a | 2016-01-28 09:21:03 +0000 | [diff] [blame] | 1139 | link = "#/q/$1" |
| Brad Larson | 991a31b | 2009-11-03 14:30:26 -0600 | [diff] [blame] | 1140 | |
| Shawn O. Pearce | da866ae | 2009-12-16 15:46:03 -0800 | [diff] [blame] | 1141 | [commentlink "bugzilla"] |
| Shawn O. Pearce | c99630a | 2010-02-21 19:11:56 -0800 | [diff] [blame] | 1142 | match = "(bug\\s+#?)(\\d+)" |
| Shawn O. Pearce | da866ae | 2009-12-16 15:46:03 -0800 | [diff] [blame] | 1143 | link = http://bugs.example.com/show_bug.cgi?id=$2 |
| Brad Larson | 991a31b | 2009-11-03 14:30:26 -0600 | [diff] [blame] | 1144 | |
| Shawn O. Pearce | da866ae | 2009-12-16 15:46:03 -0800 | [diff] [blame] | 1145 | [commentlink "tracker"] |
| 1146 | match = ([Bb]ug:\\s+)(\\d+) |
| 1147 | html = $1<a href=\"http://trak.example.com/$2\">$2</a> |
| 1148 | ---- |
| 1149 | |
| Dave Borowitz | 13b3800 | 2013-04-08 12:03:29 -0700 | [diff] [blame] | 1150 | Comment links can also be specified in `project.config` and sections in |
| 1151 | children override those in parents. The only restriction is that to |
| 1152 | avoid injecting arbitrary user-supplied HTML in the page, comment links |
| 1153 | defined in `project.config` may only supply `link`, not `html`. |
| 1154 | |
| Shawn O. Pearce | da866ae | 2009-12-16 15:46:03 -0800 | [diff] [blame] | 1155 | [[commentlink.name.match]]commentlink.<name>.match:: |
| Brad Larson | 991a31b | 2009-11-03 14:30:26 -0600 | [diff] [blame] | 1156 | + |
| Shawn O. Pearce | da866ae | 2009-12-16 15:46:03 -0800 | [diff] [blame] | 1157 | A JavaScript regular expression to match positions to be replaced |
| 1158 | with a hyperlink. Subexpressions of the matched string can be |
| 1159 | stored using groups and accessed with `$'n'` syntax, where 'n' |
| 1160 | is the group number, starting from 1. |
| Brad Larson | 991a31b | 2009-11-03 14:30:26 -0600 | [diff] [blame] | 1161 | + |
| Shawn O. Pearce | c99630a | 2010-02-21 19:11:56 -0800 | [diff] [blame] | 1162 | The configuration file parser eats one level of backslashes, so the |
| 1163 | character class `\s` requires `\\s` in the configuration file. The |
| 1164 | parser also terminates the line at the first `#`, so a match |
| 1165 | expression containing # must be wrapped in double quotes. |
| Shawn O. Pearce | da866ae | 2009-12-16 15:46:03 -0800 | [diff] [blame] | 1166 | + |
| Shawn O. Pearce | 665beaa | 2010-02-21 22:41:03 -0800 | [diff] [blame] | 1167 | To match case insensitive strings, a character class with both the |
| 1168 | upper and lower case character for each position must be used. For |
| 1169 | example, to match the string `bug` in a case insensitive way the match |
| 1170 | pattern `[bB][uU][gG]` needs to be used. |
| 1171 | + |
| Matthew Webber | cd7d2bf | 2015-10-14 15:54:06 +0100 | [diff] [blame] | 1172 | The regular expression pattern is applied to the HTML form of the message |
| 1173 | in question, which means it needs to assume the data has been escaped. |
| 1174 | So `"` needs to be matched as `&quot;`, `<` as `&lt;`, and `'` as |
| 1175 | `&#39;`. |
| 1176 | + |
| Shawn O. Pearce | da866ae | 2009-12-16 15:46:03 -0800 | [diff] [blame] | 1177 | A common pattern to match is `bug\\s+(\\d+)`. |
| Brad Larson | 991a31b | 2009-11-03 14:30:26 -0600 | [diff] [blame] | 1178 | |
| Shawn O. Pearce | da866ae | 2009-12-16 15:46:03 -0800 | [diff] [blame] | 1179 | [[commentlink.name.link]]commentlink.<name>.link:: |
| Brad Larson | 991a31b | 2009-11-03 14:30:26 -0600 | [diff] [blame] | 1180 | + |
| Shawn O. Pearce | da866ae | 2009-12-16 15:46:03 -0800 | [diff] [blame] | 1181 | The URL to direct the user to whenever the regular expression is |
| 1182 | matched. Groups in the match expression may be accessed as `$'n'`. |
| 1183 | + |
| 1184 | The link property is used only when the html property is not present. |
| 1185 | |
| 1186 | [[commentlink.name.html]]commentlink.<name>.html:: |
| 1187 | + |
| 1188 | HTML to replace the entire matched string with. If present, |
| 1189 | this property overrides the link property above. Groups in the |
| 1190 | match expression may be accessed as `$'n'`. |
| 1191 | + |
| 1192 | The configuration file eats double quotes, so escaping them as |
| 1193 | `\"` is necessary to protect them from the parser. |
| Brad Larson | 991a31b | 2009-11-03 14:30:26 -0600 | [diff] [blame] | 1194 | |
| Dave Borowitz | 82d79c0 | 2013-04-08 15:45:12 -0700 | [diff] [blame] | 1195 | [[commentlink.name.enabled]]commentlink.<name>.enabled:: |
| 1196 | + |
| 1197 | Whether the comment link is enabled. A child project may override a |
| 1198 | section in a parent or the site-wide config that is disabled by |
| 1199 | specifying `enabled = true`. |
| 1200 | + |
| 1201 | Disabling sections in `gerrit.config` can be used by site administrators |
| 1202 | to create a library of comment links with `html` set that are not |
| 1203 | user-supplied and thus can be verified to be XSS-free, but are only |
| 1204 | enabled for a subset of projects. |
| 1205 | + |
| David Pursehouse | 6f1af47 | 2013-12-11 19:23:33 +0900 | [diff] [blame] | 1206 | By default, true. |
| 1207 | + |
| Dave Borowitz | 82d79c0 | 2013-04-08 15:45:12 -0700 | [diff] [blame] | 1208 | Note that the names and contents of disabled sections are visible even |
| 1209 | to anonymous users via the |
| 1210 | link:rest-api-projects.html#get-config[REST API]. |
| 1211 | |
| Brad Larson | 991a31b | 2009-11-03 14:30:26 -0600 | [diff] [blame] | 1212 | |
| Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 1213 | [[container]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1214 | === Section container |
| Shawn O. Pearce | e24c71fb | 2009-12-07 20:32:40 -0800 | [diff] [blame] | 1215 | |
| 1216 | These settings are applied only if Gerrit is started as the container |
| 1217 | process through Gerrit's 'gerrit.sh' rc.d compatible wrapper script. |
| 1218 | |
| 1219 | [[container.heapLimit]]container.heapLimit:: |
| 1220 | + |
| 1221 | Maximum heap size of the Java process running Gerrit, in bytes. |
| 1222 | This property is translated into the '-Xmx' flag for the JVM. |
| 1223 | + |
| 1224 | Default is platform and JVM specific. |
| 1225 | + |
| 1226 | Common unit suffixes of 'k', 'm', or 'g' are supported. |
| 1227 | |
| 1228 | [[container.javaHome]]container.javaHome:: |
| 1229 | + |
| 1230 | Path of the JRE/JDK installation to run Gerrit with. If not set, the |
| 1231 | Gerrit startup script will attempt to search your system and guess |
| 1232 | a suitable JRE. Overrides the environment variable 'JAVA_HOME'. |
| 1233 | |
| 1234 | [[container.javaOptions]]container.javaOptions:: |
| 1235 | + |
| 1236 | Additional options to pass along to the Java runtime. If multiple |
| 1237 | values are configured, they are passed in order on the command line, |
| 1238 | separated by spaces. These options are appended onto 'JAVA_OPTIONS'. |
| 1239 | |
| David Ostrovsky | c772bd8 | 2013-10-03 10:37:51 +0200 | [diff] [blame] | 1240 | For example, it is possible to overwrite Gerrit's default log4j |
| 1241 | configuration: |
| 1242 | |
| 1243 | ---- |
| 1244 | javaOptions = -Dlog4j.configuration=file:///home/gerrit/site/etc/log4j.properties |
| 1245 | ---- |
| 1246 | |
| Hugo Arès | 6710f0a | 2014-11-04 10:28:42 -0500 | [diff] [blame] | 1247 | [[container.daemonOpt]]container.daemonOpt:: |
| 1248 | + |
| 1249 | Additional options to pass to the daemon (e.g. '--enable-httpd'). If |
| 1250 | multiple values are configured, they are passed in that order to the command |
| 1251 | line, separated by spaces. |
| 1252 | + |
| 1253 | Execute `java -jar gerrit.war daemon --help` to see all possible |
| 1254 | options. |
| 1255 | |
| Fredrik Luthander | b8f7d6d | 2010-05-18 21:11:22 +0200 | [diff] [blame] | 1256 | [[container.slave]]container.slave:: |
| 1257 | + |
| 1258 | Used on Gerrit slave installations. If set to true the Gerrit JVM is |
| 1259 | called with the '--slave' switch, enabling slave mode. If no value is |
| Matt Baker | 8ce12fc | 2013-11-26 21:43:12 -0700 | [diff] [blame] | 1260 | set (or any other value), Gerrit defaults to master mode. |
| Fredrik Luthander | b8f7d6d | 2010-05-18 21:11:22 +0200 | [diff] [blame] | 1261 | |
| Shawn O. Pearce | e24c71fb | 2009-12-07 20:32:40 -0800 | [diff] [blame] | 1262 | [[container.user]]container.user:: |
| 1263 | + |
| 1264 | Login name (or UID) of the operating system user the Gerrit JVM |
| 1265 | will execute as. If not set, defaults to the user who launched |
| 1266 | the 'gerrit.sh' wrapper script. |
| 1267 | |
| 1268 | [[container.war]]container.war:: |
| 1269 | + |
| 1270 | Path of the JAR file to start daemon execution with. This should |
| 1271 | be the path of the local 'gerrit.war' archive. Overrides the |
| 1272 | environment variable 'GERRIT_WAR'. |
| 1273 | + |
| 1274 | If not set, defaults to '$site_path/bin/gerrit.war', or to |
| 1275 | '$HOME/gerrit.war'. |
| 1276 | |
| 1277 | |
| Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 1278 | [[core]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1279 | === Section core |
| Shawn O. Pearce | 6854bdc | 2009-06-01 08:14:15 -0700 | [diff] [blame] | 1280 | |
| Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 1281 | [[core.packedGitWindowSize]]core.packedGitWindowSize:: |
| Shawn O. Pearce | 6854bdc | 2009-06-01 08:14:15 -0700 | [diff] [blame] | 1282 | + |
| 1283 | Number of bytes of a pack file to load into memory in a single |
| 1284 | read operation. This is the "page size" of the JGit buffer cache, |
| 1285 | used for all pack access operations. All disk IO occurs as single |
| 1286 | window reads. Setting this too large may cause the process to load |
| 1287 | more data than is required; setting this too small may increase |
| 1288 | the frequency of `read()` system calls. |
| 1289 | + |
| 1290 | Default on JGit is 8 KiB on all platforms. |
| 1291 | + |
| 1292 | Common unit suffixes of 'k', 'm', or 'g' are supported. |
| 1293 | |
| Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 1294 | [[core.packedGitLimit]]core.packedGitLimit:: |
| Shawn O. Pearce | 6854bdc | 2009-06-01 08:14:15 -0700 | [diff] [blame] | 1295 | + |
| 1296 | Maximum number of bytes to load and cache in memory from pack files. |
| 1297 | If JGit needs to access more than this many bytes it will unload less |
| 1298 | frequently used windows to reclaim memory space within the process. |
| 1299 | As this buffer must be shared with the rest of the JVM heap, it |
| 1300 | should be a fraction of the total memory available. |
| 1301 | + |
| 1302 | Default on JGit is 10 MiB on all platforms. |
| 1303 | + |
| 1304 | Common unit suffixes of 'k', 'm', or 'g' are supported. |
| 1305 | |
| Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 1306 | [[core.deltaBaseCaseLimit]]core.deltaBaseCacheLimit:: |
| Shawn O. Pearce | 6854bdc | 2009-06-01 08:14:15 -0700 | [diff] [blame] | 1307 | + |
| 1308 | Maximum number of bytes to reserve for caching base objects |
| 1309 | that multiple deltafied objects reference. By storing the entire |
| 1310 | decompressed base object in a cache Git is able to avoid unpacking |
| 1311 | and decompressing frequently used base objects multiple times. |
| 1312 | + |
| 1313 | Default on JGit is 10 MiB on all platforms. You probably do not |
| 1314 | need to adjust this value. |
| 1315 | + |
| 1316 | Common unit suffixes of 'k', 'm', or 'g' are supported. |
| 1317 | |
| Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 1318 | [[core.packedGitOpenFiles]]core.packedGitOpenFiles:: |
| Shawn O. Pearce | 6854bdc | 2009-06-01 08:14:15 -0700 | [diff] [blame] | 1319 | + |
| 1320 | Maximum number of pack files to have open at once. A pack file |
| 1321 | must be opened in order for any of its data to be available in |
| 1322 | a cached window. |
| 1323 | + |
| 1324 | If you increase this to a larger setting you may need to also adjust |
| 1325 | the ulimit on file descriptors for the host JVM, as Gerrit needs |
| 1326 | additional file descriptors available for network sockets and other |
| 1327 | repository data manipulation. |
| 1328 | + |
| 1329 | Default on JGit is 128 file descriptors on all platforms. |
| 1330 | |
| Shawn O. Pearce | 329fe79 | 2010-09-03 15:44:23 -0700 | [diff] [blame] | 1331 | [[core.streamFileThreshold]]core.streamFileThreshold:: |
| 1332 | + |
| 1333 | Largest object size, in bytes, that JGit will allocate as a |
| 1334 | contiguous byte array. Any file revision larger than this threshold |
| 1335 | will have to be streamed, typically requiring the use of temporary |
| David Pursehouse | 9246356 | 2013-06-24 10:16:28 +0900 | [diff] [blame] | 1336 | files under '$GIT_DIR/objects' to implement pseudo-random access |
| Shawn O. Pearce | 329fe79 | 2010-09-03 15:44:23 -0700 | [diff] [blame] | 1337 | during delta decompression. |
| 1338 | + |
| 1339 | Servers with very high traffic should set this to be larger than |
| 1340 | the size of their common big files. For example a server managing |
| 1341 | the Android platform typically has to deal with ~10-12 MiB XML |
| 1342 | files, so `15 m` would be a reasonable setting in that environment. |
| 1343 | Setting this too high may cause the JVM to run out of heap space |
| 1344 | when handling very big binary files, such as device firmware or |
| 1345 | CD-ROM ISO images. |
| 1346 | + |
| Edwin Kempin | 7f5a4af | 2014-11-12 10:05:03 +0100 | [diff] [blame] | 1347 | Defaults to 25% of the available JVM heap, limited to 2048m. |
| Shawn O. Pearce | 329fe79 | 2010-09-03 15:44:23 -0700 | [diff] [blame] | 1348 | + |
| 1349 | Common unit suffixes of 'k', 'm', or 'g' are supported. |
| 1350 | |
| Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 1351 | [[core.packedGitMmap]]core.packedGitMmap:: |
| Shawn O. Pearce | 6854bdc | 2009-06-01 08:14:15 -0700 | [diff] [blame] | 1352 | + |
| 1353 | When true, JGit will use `mmap()` rather than `malloc()+read()` |
| 1354 | to load data from pack files. The use of mmap can be problematic |
| 1355 | on some JVMs as the garbage collector must deduce that a memory |
| 1356 | mapped segment is no longer in use before a call to `munmap()` |
| 1357 | can be made by the JVM native code. |
| 1358 | + |
| 1359 | In server applications (such as Gerrit) that need to access many |
| David Pursehouse | 9246356 | 2013-06-24 10:16:28 +0900 | [diff] [blame] | 1360 | pack files, setting this to true risks artificially running out |
| Shawn O. Pearce | 6854bdc | 2009-06-01 08:14:15 -0700 | [diff] [blame] | 1361 | of virtual address space, as the garbage collector cannot reclaim |
| 1362 | unused mapped spaces fast enough. |
| 1363 | + |
| 1364 | Default on JGit is false. Although potentially slower, it yields |
| 1365 | much more predictable behavior. |
| 1366 | |
| Sasa Zivkov | f69aeb1 | 2012-06-11 14:05:14 +0200 | [diff] [blame] | 1367 | [[core.asyncLoggingBufferSize]]core.asyncLoggingBufferSize:: |
| 1368 | + |
| 1369 | Size of the buffer to store logging events for asynchronous logging. |
| 1370 | Putting a larger value can protect threads from stalling when the |
| 1371 | AsyncAppender threads are not fast enough to consume the logging events |
| David Pursehouse | 1ff91c0 | 2015-05-19 15:05:26 +0900 | [diff] [blame] | 1372 | from the buffer. It also protects from losing log entries in this case. |
| Sasa Zivkov | f69aeb1 | 2012-06-11 14:05:14 +0200 | [diff] [blame] | 1373 | + |
| 1374 | Default is 64 entries. |
| 1375 | |
| Dave Borowitz | 1bec65a | 2013-03-13 10:59:01 -0700 | [diff] [blame] | 1376 | [[core.useRecursiveMerge]]core.useRecursiveMerge:: |
| 1377 | + |
| Edwin Kempin | 71831d2 | 2014-07-15 08:54:29 +0200 | [diff] [blame] | 1378 | Use JGit's recursive merger for three-way merges. This only affects |
| Sebastian Schuberth | 774aac9 | 2015-04-16 13:21:04 +0200 | [diff] [blame] | 1379 | projects that allow content merges. |
| Edwin Kempin | 71831d2 | 2014-07-15 08:54:29 +0200 | [diff] [blame] | 1380 | + |
| 1381 | As explained in this |
| 1382 | link:http://codicesoftware.blogspot.com/2011/09/merge-recursive-strategy.html[ |
| 1383 | blog], the recursive merge produces better results if the two commits |
| 1384 | that are merged have more than one common predecessor. |
| Dave Borowitz | 1bec65a | 2013-03-13 10:59:01 -0700 | [diff] [blame] | 1385 | + |
| Edwin Kempin | 7853c5b | 2014-07-15 08:57:17 +0200 | [diff] [blame] | 1386 | Default is true. |
| Dave Borowitz | 1bec65a | 2013-03-13 10:59:01 -0700 | [diff] [blame] | 1387 | |
| Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 1388 | [[database]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1389 | === Section database |
| Shawn O. Pearce | fb5548e | 2009-11-11 07:39:21 -0800 | [diff] [blame] | 1390 | |
| 1391 | The database section configures where Gerrit stores its metadata |
| 1392 | records about user accounts and change reviews. |
| 1393 | |
| Shawn O. Pearce | 9d342a4 | 2009-12-16 15:49:05 -0800 | [diff] [blame] | 1394 | ---- |
| 1395 | [database] |
| Shawn O. Pearce | 1be3906 | 2009-12-19 14:11:52 -0800 | [diff] [blame] | 1396 | type = POSTGRESQL |
| Shawn O. Pearce | 9d342a4 | 2009-12-16 15:49:05 -0800 | [diff] [blame] | 1397 | hostname = localhost |
| 1398 | database = reviewdb |
| 1399 | username = gerrit2 |
| 1400 | password = s3kr3t |
| 1401 | ---- |
| Shawn O. Pearce | fb5548e | 2009-11-11 07:39:21 -0800 | [diff] [blame] | 1402 | |
| 1403 | [[database.type]]database.type:: |
| 1404 | + |
| 1405 | Type of database server to connect to. If set this value will be |
| 1406 | used to automatically create correct database.driver and database.url |
| 1407 | values to open the connection. |
| 1408 | + |
| David Pursehouse | 227e403 | 2016-02-26 15:47:14 +0900 | [diff] [blame] | 1409 | * `DB2` |
| Shawn O. Pearce | fb5548e | 2009-11-11 07:39:21 -0800 | [diff] [blame] | 1410 | + |
| David Pursehouse | 227e403 | 2016-02-26 15:47:14 +0900 | [diff] [blame] | 1411 | Connect to a DB2 database server. |
| 1412 | + |
| 1413 | * `DERBY` |
| 1414 | + |
| 1415 | Connect to an Apache Derby database server. |
| Shawn O. Pearce | fb5548e | 2009-11-11 07:39:21 -0800 | [diff] [blame] | 1416 | + |
| 1417 | * `H2` |
| 1418 | + |
| Shawn O. Pearce | 1be3906 | 2009-12-19 14:11:52 -0800 | [diff] [blame] | 1419 | Connect to a local embedded H2 database. |
| Shawn O. Pearce | fb5548e | 2009-11-11 07:39:21 -0800 | [diff] [blame] | 1420 | + |
| David Pursehouse | 4f859e7 | 2016-02-26 15:44:38 +0900 | [diff] [blame] | 1421 | * `JDBC` |
| 1422 | + |
| 1423 | Connect using a JDBC driver class name and URL. |
| 1424 | + |
| David Pursehouse | 227e403 | 2016-02-26 15:47:14 +0900 | [diff] [blame] | 1425 | * `MAXDB` |
| 1426 | + |
| 1427 | Connect to an SAP MaxDb database server. |
| 1428 | + |
| Shawn O. Pearce | 1be3906 | 2009-12-19 14:11:52 -0800 | [diff] [blame] | 1429 | * `MYSQL` |
| Shawn O. Pearce | fb5548e | 2009-11-11 07:39:21 -0800 | [diff] [blame] | 1430 | + |
| 1431 | Connect to a MySQL database server. |
| Shawn O. Pearce | 1be3906 | 2009-12-19 14:11:52 -0800 | [diff] [blame] | 1432 | + |
| David Pursehouse | 227e403 | 2016-02-26 15:47:14 +0900 | [diff] [blame] | 1433 | * `ORACLE` |
| Shawn O. Pearce | 1be3906 | 2009-12-19 14:11:52 -0800 | [diff] [blame] | 1434 | + |
| David Pursehouse | 227e403 | 2016-02-26 15:47:14 +0900 | [diff] [blame] | 1435 | Connect to an Oracle database server. |
| 1436 | + |
| David Pursehouse | 4f859e7 | 2016-02-26 15:44:38 +0900 | [diff] [blame] | 1437 | * `POSTGRESQL` |
| Shawn O. Pearce | 1be3906 | 2009-12-19 14:11:52 -0800 | [diff] [blame] | 1438 | + |
| David Pursehouse | 4f859e7 | 2016-02-26 15:44:38 +0900 | [diff] [blame] | 1439 | Connect to a PostgreSQL database server. |
| Shawn O. Pearce | fb5548e | 2009-11-11 07:39:21 -0800 | [diff] [blame] | 1440 | |
| 1441 | + |
| 1442 | If not specified, database.driver and database.url are used as-is, |
| 1443 | and if they are also not specified, defaults to H2. |
| 1444 | |
| 1445 | [[database.hostname]]database.hostname:: |
| 1446 | + |
| 1447 | Hostname of the database server. Defaults to 'localhost'. |
| 1448 | |
| 1449 | [[database.port]]database.port:: |
| 1450 | + |
| 1451 | Port number of the database server. Defaults to the default port |
| 1452 | of the server named by database.type. |
| 1453 | |
| 1454 | [[database.database]]database.database:: |
| 1455 | + |
| Shawn O. Pearce | 1be3906 | 2009-12-19 14:11:52 -0800 | [diff] [blame] | 1456 | 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] | 1457 | + |
| 1458 | 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] | 1459 | relative to `'$site_path'`. |
| Shawn O. Pearce | fb5548e | 2009-11-11 07:39:21 -0800 | [diff] [blame] | 1460 | |
| 1461 | [[database.username]]database.username:: |
| 1462 | + |
| 1463 | Username to connect to the database server as. |
| 1464 | |
| 1465 | [[database.password]]database.password:: |
| 1466 | + |
| 1467 | Password to authenticate to the database server with. |
| 1468 | |
| 1469 | [[database.driver]]database.driver:: |
| 1470 | + |
| Shawn O. Pearce | 1be3906 | 2009-12-19 14:11:52 -0800 | [diff] [blame] | 1471 | Name of the JDBC driver class to connect to the database with. |
| 1472 | Setting this usually isn't necessary as it can be derived from |
| 1473 | database.type or database.url for any supported database. |
| Shawn O. Pearce | fb5548e | 2009-11-11 07:39:21 -0800 | [diff] [blame] | 1474 | |
| 1475 | [[database.url]]database.url:: |
| 1476 | + |
| Shawn O. Pearce | 1be3906 | 2009-12-19 14:11:52 -0800 | [diff] [blame] | 1477 | 'jdbc:' URL for the database. Setting this variable usually |
| 1478 | isn't necessary as it can be constructed from the all of the |
| 1479 | above properties. |
| Shawn O. Pearce | fb5548e | 2009-11-11 07:39:21 -0800 | [diff] [blame] | 1480 | |
| Christian Aistleitner | 851072a | 2013-05-05 15:04:09 +0200 | [diff] [blame] | 1481 | [[database.connectionPool]]database.connectionPool:: |
| 1482 | + |
| 1483 | If true, use connection pooling for database connections. Otherwise, a |
| 1484 | new database connection is opened for each request. |
| 1485 | + |
| 1486 | Default is false for MySQL, and true for other database backends. |
| 1487 | |
| Shawn O. Pearce | 07f35177d | 2010-02-23 09:47:10 -0800 | [diff] [blame] | 1488 | [[database.poolLimit]]database.poolLimit:: |
| 1489 | + |
| 1490 | Maximum number of open database connections. If the server needs |
| 1491 | more than this number, request processing threads will wait up |
| 1492 | to <<database.poolMaxWait, poolMaxWait>> seconds for a |
| 1493 | connection to be released before they abort with an exception. |
| 1494 | This limit must be several units higher than the total number of |
| 1495 | httpd and sshd threads as some request processing code paths may |
| 1496 | need multiple connections. |
| 1497 | + |
| Dariusz Luksza | 2ebfc28 | 2015-11-09 20:25:25 +0100 | [diff] [blame] | 1498 | Default is <<sshd.threads, sshd.threads>> |
| 1499 | + <<httpd.maxThreads, httpd.maxThreads>> + 2. |
| Christian Aistleitner | 851072a | 2013-05-05 15:04:09 +0200 | [diff] [blame] | 1500 | + |
| 1501 | This setting only applies if |
| 1502 | <<database.connectionPool,database.connectionPool>> is true. |
| Shawn O. Pearce | 07f35177d | 2010-02-23 09:47:10 -0800 | [diff] [blame] | 1503 | |
| Shawn O. Pearce | f458bf6 | 2010-02-25 09:03:03 -0800 | [diff] [blame] | 1504 | [[database.poolMinIdle]]database.poolMinIdle:: |
| Shawn O. Pearce | 07f35177d | 2010-02-23 09:47:10 -0800 | [diff] [blame] | 1505 | + |
| 1506 | Minimum number of connections to keep idle in the pool. |
| 1507 | Default is 4. |
| Christian Aistleitner | 851072a | 2013-05-05 15:04:09 +0200 | [diff] [blame] | 1508 | + |
| 1509 | This setting only applies if |
| 1510 | <<database.connectionPool,database.connectionPool>> is true. |
| Shawn O. Pearce | 07f35177d | 2010-02-23 09:47:10 -0800 | [diff] [blame] | 1511 | |
| Shawn O. Pearce | f458bf6 | 2010-02-25 09:03:03 -0800 | [diff] [blame] | 1512 | [[database.poolMaxIdle]]database.poolMaxIdle:: |
| Shawn O. Pearce | 07f35177d | 2010-02-23 09:47:10 -0800 | [diff] [blame] | 1513 | + |
| 1514 | Maximum number of connections to keep idle in the pool. If there |
| 1515 | are more idle connections, connections will be closed instead of |
| 1516 | being returned back to the pool. |
| Dariusz Luksza | 30d70ae | 2015-11-09 22:19:59 +0100 | [diff] [blame] | 1517 | Default is min(<<database.poolLimit, database.poolLimit>>, 16). |
| Christian Aistleitner | 851072a | 2013-05-05 15:04:09 +0200 | [diff] [blame] | 1518 | + |
| 1519 | This setting only applies if |
| 1520 | <<database.connectionPool,database.connectionPool>> is true. |
| Shawn O. Pearce | 07f35177d | 2010-02-23 09:47:10 -0800 | [diff] [blame] | 1521 | |
| 1522 | [[database.poolMaxWait]]database.poolMaxWait:: |
| 1523 | + |
| 1524 | Maximum amount of time a request processing thread will wait to |
| 1525 | acquire a database connection from the pool. If no connection is |
| 1526 | released within this time period, the processing thread will abort |
| 1527 | its current operations and return an error to the client. |
| 1528 | Values should use common unit suffixes to express their setting: |
| 1529 | + |
| 1530 | * ms, milliseconds |
| 1531 | * s, sec, second, seconds |
| 1532 | * m, min, minute, minutes |
| 1533 | * h, hr, hour, hours |
| 1534 | |
| 1535 | + |
| Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 1536 | -- |
| Shawn O. Pearce | 07f35177d | 2010-02-23 09:47:10 -0800 | [diff] [blame] | 1537 | If a unit suffix is not specified, `milliseconds` is assumed. |
| Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 1538 | |
| Shawn O. Pearce | 07f35177d | 2010-02-23 09:47:10 -0800 | [diff] [blame] | 1539 | Default is `30 seconds`. |
| Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 1540 | |
| Christian Aistleitner | 851072a | 2013-05-05 15:04:09 +0200 | [diff] [blame] | 1541 | This setting only applies if |
| 1542 | <<database.connectionPool,database.connectionPool>> is true. |
| Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 1543 | -- |
| Shawn O. Pearce | 07f35177d | 2010-02-23 09:47:10 -0800 | [diff] [blame] | 1544 | |
| David Ostrovsky | 38a6f6c | 2014-01-11 13:56:09 +0100 | [diff] [blame] | 1545 | [[database.dataSourceInterceptorClass]]database.dataSourceInterceptorClass:: |
| 1546 | |
| 1547 | Class that implements DataSourceInterceptor interface to monitor SQL activity. |
| 1548 | This class must have default constructor and be available on Gerrit's bootstrap |
| 1549 | classpath, e. g. in `$gerrit_site/lib` directory. Example implementation of |
| 1550 | SQL monitoring can be found in javamelody-plugin. |
| 1551 | |
| Björn Pedersen | 64af3ad | 2016-05-20 10:21:07 +0200 | [diff] [blame] | 1552 | [[database.h2]]database.h2:: |
| 1553 | + |
| 1554 | The settings in this section are used for the reviewdb if the |
| 1555 | <<database.type,database.type>> is H2. |
| 1556 | + |
| 1557 | Additionally gerrit uses H2 for storing reviewed flags on changes. |
| 1558 | |
| 1559 | [[database.h2.cacheSize]]database.h2.cacheSize:: |
| 1560 | + |
| 1561 | The size of the H2 internal database cache, in bytes. The H2 internal cache for |
| 1562 | persistent H2-backed caches is controlled by |
| 1563 | <<cache.h2CacheSize,cache.h2CacheSize>>. |
| 1564 | + |
| 1565 | H2 uses memory to cache its database content. The parameter `cacheSize` |
| 1566 | allows to limit the memory used by H2 and thus prevent out-of-memory |
| 1567 | caused by the H2 database using too much memory. |
| 1568 | + |
| 1569 | Technically the H2 cache size is configured using the CACHE_SIZE parameter in |
| 1570 | the H2 JDBC connection URL, as described |
| 1571 | link:http://www.h2database.com/html/features.html#cache_settings[here] |
| 1572 | + |
| 1573 | Default is unset, using up to half of the available memory. |
| 1574 | |
| 1575 | H2 will persist this value in the database, so to unset explicitly specify 0. |
| 1576 | + |
| 1577 | Common unit suffixes of 'k', 'm', or 'g' are supported. |
| 1578 | |
| 1579 | [[database.h2.autoServer]]database.h2.autoServer:: |
| 1580 | + |
| 1581 | If `true` enable the automatic mixed mode |
| 1582 | (see link:http://www.h2database.com/html/features.html#auto_mixed_mode[Automatic Mixed Mode]). |
| 1583 | This enables concurrent access to the embedded H2 database from command line |
| 1584 | utils (e.g. RebuildNoteDb). |
| 1585 | + |
| 1586 | Default is `false`. |
| 1587 | |
| Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 1588 | [[download]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1589 | === Section download |
| monica.dionisio | 3f63044 | 2010-06-29 15:42:57 -0300 | [diff] [blame] | 1590 | |
| 1591 | ---- |
| 1592 | [download] |
| Edwin Kempin | 08b03a2 | 2012-09-14 16:32:57 +0200 | [diff] [blame] | 1593 | command = checkout |
| 1594 | command = cherry_pick |
| 1595 | command = pull |
| 1596 | command = format_patch |
| monica.dionisio | 3f63044 | 2010-06-29 15:42:57 -0300 | [diff] [blame] | 1597 | scheme = ssh |
| 1598 | scheme = http |
| 1599 | scheme = anon_http |
| 1600 | scheme = anon_git |
| 1601 | scheme = repo_download |
| 1602 | ---- |
| 1603 | |
| 1604 | The download section configures the allowed download methods. |
| 1605 | |
| Edwin Kempin | 08b03a2 | 2012-09-14 16:32:57 +0200 | [diff] [blame] | 1606 | [[download.command]]download.command:: |
| 1607 | + |
| 1608 | Commands that should be offered to download changes. |
| 1609 | + |
| 1610 | Multiple commands are supported: |
| 1611 | + |
| 1612 | * `checkout` |
| 1613 | + |
| 1614 | Command to fetch and checkout the patch set. |
| 1615 | + |
| 1616 | * `cherry_pick` |
| 1617 | + |
| 1618 | Command to fetch the patch set and to cherry-pick it onto the current |
| 1619 | commit. |
| 1620 | + |
| 1621 | * `pull` |
| 1622 | + |
| 1623 | Command to pull the patch set. |
| 1624 | + |
| 1625 | * `format_patch` |
| 1626 | + |
| 1627 | Command to fetch the patch set and to feed it into the `format-patch` |
| 1628 | command. |
| 1629 | |
| 1630 | + |
| 1631 | If `download.command` is not specified, all download commands are |
| 1632 | offered. |
| 1633 | |
| monica.dionisio | 3f63044 | 2010-06-29 15:42:57 -0300 | [diff] [blame] | 1634 | [[download.scheme]]download.scheme:: |
| 1635 | + |
| 1636 | Schemes that should be used to download changes. |
| 1637 | + |
| 1638 | Multiple schemes are supported: |
| 1639 | + |
| 1640 | * `http` |
| 1641 | + |
| Shawn O. Pearce | 5c46a07 | 2010-08-23 08:33:32 -0700 | [diff] [blame] | 1642 | Authenticated HTTP download is allowed. |
| monica.dionisio | 3f63044 | 2010-06-29 15:42:57 -0300 | [diff] [blame] | 1643 | + |
| 1644 | * `ssh` |
| 1645 | + |
| Shawn O. Pearce | 5c46a07 | 2010-08-23 08:33:32 -0700 | [diff] [blame] | 1646 | Authenticated SSH download is allowed. |
| monica.dionisio | 3f63044 | 2010-06-29 15:42:57 -0300 | [diff] [blame] | 1647 | + |
| 1648 | * `anon_http` |
| 1649 | + |
| 1650 | Anonymous HTTP download is allowed. |
| 1651 | + |
| 1652 | * `anon_git` |
| 1653 | + |
| Shawn O. Pearce | 5c46a07 | 2010-08-23 08:33:32 -0700 | [diff] [blame] | 1654 | Anonymous Git download is allowed. This is not default, it is also |
| 1655 | necessary to set <<gerrit.canonicalGitUrl,gerrit.canonicalGitUrl>> |
| 1656 | variable. |
| monica.dionisio | 3f63044 | 2010-06-29 15:42:57 -0300 | [diff] [blame] | 1657 | + |
| 1658 | * `repo_download` |
| 1659 | + |
| Shawn O. Pearce | 5c46a07 | 2010-08-23 08:33:32 -0700 | [diff] [blame] | 1660 | Gerrit advertises patch set downloads with the `repo download` |
| 1661 | command, assuming that all projects managed by this instance are |
| 1662 | generally worked on with the repo multi-repository tool. This is |
| 1663 | not default, as not all instances will deploy repo. |
| monica.dionisio | 3f63044 | 2010-06-29 15:42:57 -0300 | [diff] [blame] | 1664 | |
| 1665 | + |
| Edwin Kempin | 08b03a2 | 2012-09-14 16:32:57 +0200 | [diff] [blame] | 1666 | If `download.scheme` is not specified, SSH, HTTP and Anonymous HTTP |
| Shawn O. Pearce | 5c46a07 | 2010-08-23 08:33:32 -0700 | [diff] [blame] | 1667 | downloads are allowed. |
| Shawn O. Pearce | fb5548e | 2009-11-11 07:39:21 -0800 | [diff] [blame] | 1668 | |
| Edwin Kempin | 322db67 | 2015-07-03 08:50:46 +0200 | [diff] [blame] | 1669 | [[download.checkForHiddenChangeRefs]]download.checkForHiddenChangeRefs:: |
| 1670 | + |
| 1671 | Whether the download commands should be adapted when the change refs |
| 1672 | are hidden. |
| 1673 | + |
| 1674 | Git has a configuration option to hide refs from the initial |
| 1675 | advertisement (`uploadpack.hideRefs`). This option can be used to hide |
| 1676 | the change refs from the client. As consequence fetching changes by |
| 1677 | change ref does not work anymore. However by setting |
| 1678 | `uploadpack.allowTipSha1InWant` to `true` fetching changes by commit ID |
| 1679 | is possible. If `download.checkForHiddenChangeRefs` is set to `true` |
| 1680 | the git download commands use the commit ID instead of the change ref |
| 1681 | when a project is configured like this. |
| 1682 | + |
| 1683 | Example git configuration on a project: |
| 1684 | + |
| 1685 | ---- |
| 1686 | [uploadpack] |
| 1687 | hideRefs = refs/changes/ |
| 1688 | hideRefs = refs/cache-automerge/ |
| 1689 | allowTipSha1InWant = true |
| 1690 | ---- |
| 1691 | + |
| 1692 | By default `false`. |
| 1693 | |
| David Ostrovsky | fc9cdf0 | 2014-03-26 14:46:45 -0700 | [diff] [blame] | 1694 | [[download.archive]]download.archive:: |
| 1695 | + |
| 1696 | Specifies which archive formats, if any, should be offered on the change |
| Francois Ferrand | 1e93388 | 2014-09-25 11:19:08 +0200 | [diff] [blame] | 1697 | screen and supported for `git-upload-archive` operation: |
| David Ostrovsky | fc9cdf0 | 2014-03-26 14:46:45 -0700 | [diff] [blame] | 1698 | + |
| 1699 | ---- |
| 1700 | [download] |
| 1701 | archive = tar |
| 1702 | archive = tbz2 |
| 1703 | archive = tgz |
| 1704 | archive = txz |
| Francois Ferrand | 1e93388 | 2014-09-25 11:19:08 +0200 | [diff] [blame] | 1705 | archive = zip |
| David Ostrovsky | fc9cdf0 | 2014-03-26 14:46:45 -0700 | [diff] [blame] | 1706 | ---- |
| 1707 | |
| Shawn Pearce | 6edde31 | 2014-03-26 22:00:26 -0700 | [diff] [blame] | 1708 | If `download.archive` is not specified defaults to all archive |
| 1709 | commands. Set to `off` or empty string to disable. |
| David Ostrovsky | fc9cdf0 | 2014-03-26 14:46:45 -0700 | [diff] [blame] | 1710 | |
| Francois Ferrand | 1e93388 | 2014-09-25 11:19:08 +0200 | [diff] [blame] | 1711 | Zip is not supported because it may be interpreted by a Java plugin as a |
| 1712 | valid JAR file, whose code would have access to cookies on the domain. |
| 1713 | For this reason `zip` format is always excluded from formats offered |
| 1714 | through the `Download` drop down or accessible in the REST API. |
| 1715 | |
| Matthias Sohn | 0fb2c99 | 2014-06-03 01:42:59 +0200 | [diff] [blame] | 1716 | [[gc]] |
| 1717 | === Section gc |
| 1718 | |
| 1719 | This section allows to configure the git garbage collection and schedules it |
| 1720 | to run periodically. It will be triggered and executed sequentially for all |
| 1721 | projects. |
| 1722 | |
| Christian Halstrick | e6c6832 | 2015-03-11 15:21:42 +0100 | [diff] [blame] | 1723 | [[gc.aggressive]]gc.aggressive:: |
| 1724 | + |
| 1725 | Determines if scheduled garbage collections and garbage collections triggered |
| 1726 | through Web-UI should run in aggressive mode or not. Aggressive garbage |
| 1727 | collections are more expensive but may lead to significantly smaller |
| 1728 | repositories. |
| 1729 | + |
| 1730 | Valid values are "true" and "false," default is "false". |
| 1731 | |
| Matthias Sohn | 0fb2c99 | 2014-06-03 01:42:59 +0200 | [diff] [blame] | 1732 | [[gc.startTime]]gc.startTime:: |
| 1733 | + |
| 1734 | Start time to define the first execution of the git garbage collection. |
| 1735 | If the configured `'gc.interval'` is shorter than `'gc.startTime - now'` |
| 1736 | the start time will be preponed by the maximum integral multiple of |
| 1737 | `'gc.interval'` so that the start time is still in the future. |
| 1738 | + |
| 1739 | ---- |
| 1740 | <day of week> <hours>:<minutes> |
| 1741 | or |
| 1742 | <hours>:<minutes> |
| 1743 | |
| 1744 | <day of week> : Mon, Tue, Wed, Thu, Fri, Sat, Sun |
| 1745 | <hours> : 00-23 |
| 1746 | <minutes> : 0-59 |
| 1747 | ---- |
| 1748 | |
| 1749 | |
| 1750 | [[gc.interval]]gc.interval:: |
| 1751 | + |
| 1752 | Interval for periodic repetition of triggering the git garbage collection. |
| 1753 | The interval must be larger than zero. The following suffixes are supported |
| 1754 | to define the time unit for the interval: |
| 1755 | + |
| 1756 | * `s, sec, second, seconds` |
| 1757 | * `m, min, minute, minutes` |
| 1758 | * `h, hr, hour, hours` |
| 1759 | * `d, day, days` |
| 1760 | * `w, week, weeks` (`1 week` is treated as `7 days`) |
| 1761 | * `mon, month, months` (`1 month` is treated as `30 days`) |
| 1762 | * `y, year, years` (`1 year` is treated as `365 days`) |
| 1763 | |
| Edwin Kempin | e326a1d | 2015-06-03 10:27:39 +0200 | [diff] [blame] | 1764 | [[schedule-examples]] |
| Matthias Sohn | 0fb2c99 | 2014-06-03 01:42:59 +0200 | [diff] [blame] | 1765 | Examples:: |
| 1766 | + |
| 1767 | ---- |
| 1768 | gc.startTime = Fri 10:30 |
| 1769 | gc.interval = 2 day |
| 1770 | ---- |
| 1771 | + |
| 1772 | Assuming the server is started on Mon 7:00 -> `'startTime - now = 4 days 3:30 hours'`. |
| 1773 | This is larger than the interval hence prepone the start time |
| 1774 | by the maximum integral multiple of the interval so that start |
| 1775 | time is still in the future, i.e. prepone by 4 days. This yields |
| 1776 | a start time of Mon 10:30, next executions are Wed 10:30, Fri 10:30 |
| 1777 | etc. |
| 1778 | + |
| 1779 | ---- |
| 1780 | gc.startTime = 6:00 |
| 1781 | gc.interval = 1 day |
| 1782 | ---- |
| 1783 | + |
| 1784 | Assuming the server is started on Mon 7:00 this yields the first run on next Tuesday |
| 1785 | at 6:00 and a repetition interval of 1 day. |
| 1786 | |
| 1787 | |
| Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 1788 | [[gerrit]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1789 | === Section gerrit |
| Shawn O. Pearce | eb7f8ce | 2009-06-01 09:57:15 -0700 | [diff] [blame] | 1790 | |
| Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 1791 | [[gerrit.basePath]]gerrit.basePath:: |
| Shawn O. Pearce | 9743d0b | 2009-06-01 10:10:06 -0700 | [diff] [blame] | 1792 | + |
| 1793 | Local filesystem directory holding all Git repositories that |
| 1794 | Gerrit knows about and can process changes for. A project |
| 1795 | entity in Gerrit maps to a local Git repository by creating |
| Edwin Kempin | cdb0e00 | 2011-09-08 14:23:30 +0200 | [diff] [blame] | 1796 | the path string `"${basePath}/${project_name}.git"`. |
| Shawn O. Pearce | 9743d0b | 2009-06-01 10:10:06 -0700 | [diff] [blame] | 1797 | + |
| 1798 | If relative, the path is resolved relative to `'$site_path'`. |
| 1799 | |
| Shawn O. Pearce | 897d921 | 2011-06-16 16:59:59 -0700 | [diff] [blame] | 1800 | [[gerrit.allProjects]]gerrit.allProjects:: |
| 1801 | + |
| 1802 | Name of the permissions-only project defining global server |
| 1803 | access controls and settings. These are inherited into every |
| 1804 | other project managed by the running server. The name is |
| 1805 | relative to `gerrit.basePath`. |
| 1806 | + |
| 1807 | Defaults to `All-Projects` if not set. |
| 1808 | |
| Edwin Kempin | 2bf5edd | 2014-03-25 22:21:23 +0100 | [diff] [blame] | 1809 | [[gerrit.allUsers]]gerrit.allUsers:: |
| 1810 | + |
| 1811 | Name of the project in which meta data of all users is stored. |
| 1812 | The name is relative to `gerrit.basePath`. |
| 1813 | + |
| 1814 | Defaults to `All-Users` if not set. |
| 1815 | |
| Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 1816 | [[gerrit.canonicalWebUrl]]gerrit.canonicalWebUrl:: |
| Shawn O. Pearce | eb7f8ce | 2009-06-01 09:57:15 -0700 | [diff] [blame] | 1817 | + |
| 1818 | The default URL for Gerrit to be accessed through. |
| 1819 | + |
| 1820 | Typically this would be set to "http://review.example.com/" or |
| 1821 | "http://example.com/gerrit/" so Gerrit can output links that point |
| 1822 | back to itself. |
| 1823 | + |
| 1824 | Setting this is highly recommended, as its necessary for the upload |
| 1825 | code invoked by "git push" or "repo upload" to output hyperlinks |
| 1826 | to the newly uploaded changes. |
| 1827 | |
| Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 1828 | [[gerrit.canonicalGitUrl]]gerrit.canonicalGitUrl:: |
| Shawn O. Pearce | eb7f8ce | 2009-06-01 09:57:15 -0700 | [diff] [blame] | 1829 | + |
| 1830 | Optional base URL for repositories available over the anonymous git |
| 1831 | protocol. For example, set this to `git://mirror.example.com/base/` |
| 1832 | to have Gerrit display patch set download URLs in the UI. Gerrit |
| 1833 | automatically appends the project name onto the end of the URL. |
| 1834 | + |
| 1835 | By default unset, as the git daemon must be configured externally |
| 1836 | by the system administrator, and might not even be running on the |
| 1837 | same host as Gerrit. |
| 1838 | |
| Dave Borowitz | a5d3fec | 2015-07-09 14:24:02 -0700 | [diff] [blame] | 1839 | [[gerrit.docUrl]]gerrit.docUrl:: |
| 1840 | + |
| 1841 | Optional base URL for documentation, under which one can find |
| 1842 | "index.html", "rest-api.html", etc. Used as the base for the fixed set |
| 1843 | of links in the "Documentation" tab. A slash is implicitly appended. |
| 1844 | (For finer control over the top menu, consider writing a |
| 1845 | link:dev-plugins.html#top-menu-extensions[plugin].) |
| 1846 | + |
| 1847 | If unset or empty, the documentation tab will only be shown if |
| 1848 | `/Documentation/index.html` can be reached by the browser at app load |
| 1849 | time. |
| 1850 | |
| Dave Borowitz | a17a984 | 2015-09-15 09:58:17 -0400 | [diff] [blame] | 1851 | [[gerrit.editGpgKeys]]gerrit.editGpgKeys:: |
| 1852 | + |
| 1853 | If enabled and server-side signed push validation is also |
| 1854 | link:#receive.enableSignedPush[enabled], enable the |
| 1855 | link:rest-api-accounts.html#list-gpg-keys[REST API endpoints] and web UI |
| 1856 | for editing GPG keys. If disabled, GPG keys can only be added by |
| 1857 | administrators with direct git access to All-Users. |
| 1858 | + |
| 1859 | Defaults to true. |
| 1860 | |
| Dave Borowitz | 76ab1a1 | 2013-05-10 17:01:29 +0100 | [diff] [blame] | 1861 | [[gerrit.installCommitMsgHookCommand]]gerrit.installCommitMsgHookCommand:: |
| 1862 | + |
| 1863 | Optional command to install the `commit-msg` hook. Typically of the |
| 1864 | form: |
| David Pursehouse | 05588e5 | 2015-01-07 14:25:11 +0900 | [diff] [blame] | 1865 | + |
| Dave Borowitz | 76ab1a1 | 2013-05-10 17:01:29 +0100 | [diff] [blame] | 1866 | ---- |
| 1867 | fetch-cmd some://url/to/commit-msg .git/hooks/commit-msg ; chmod +x .git/hooks/commit-msg |
| 1868 | ---- |
| 1869 | + |
| 1870 | By default unset; falls back to using scp from the canonical SSH host, |
| 1871 | or curl from the canonical HTTP URL for the server. Only necessary if a |
| 1872 | proxy or other server/network configuration prevents clients from |
| 1873 | fetching from the default location. |
| 1874 | |
| Shawn O. Pearce | 5d6de52 | 2011-10-07 18:00:16 -0700 | [diff] [blame] | 1875 | [[gerrit.gitHttpUrl]]gerrit.gitHttpUrl:: |
| 1876 | + |
| 1877 | Optional base URL for repositories available over the HTTP |
| 1878 | protocol. For example, set this to `http://mirror.example.com/base/` |
| 1879 | to have Gerrit display URLs from this server, rather than itself. |
| 1880 | + |
| 1881 | By default unset, as the HTTP daemon must be configured externally |
| 1882 | by the system administrator, and might not even be running on the |
| 1883 | same host as Gerrit. |
| 1884 | |
| Shawn O. Pearce | b8bea1b | 2012-08-16 17:18:58 -0700 | [diff] [blame] | 1885 | [[gerrit.reportBugUrl]]gerrit.reportBugUrl:: |
| 1886 | + |
| David Pursehouse | 214ab86 | 2014-12-01 11:48:26 +0900 | [diff] [blame] | 1887 | URL to direct users to when they need to report a bug. |
| 1888 | + |
| 1889 | By default unset, meaning no bug report URL will be displayed. Administrators |
| 1890 | should set this to the URL of their issue tracker, if necessary. |
| Shawn O. Pearce | b8bea1b | 2012-08-16 17:18:58 -0700 | [diff] [blame] | 1891 | |
| David Pursehouse | 753ca33 | 2013-12-10 15:36:29 +0900 | [diff] [blame] | 1892 | [[gerrit.reportBugText]]gerrit.reportBugText:: |
| 1893 | + |
| 1894 | Text to be displayed in the link to the bug report URL. |
| 1895 | + |
| David Pursehouse | 214ab86 | 2014-12-01 11:48:26 +0900 | [diff] [blame] | 1896 | Only used when `gerrit.reportBugUrl` is set. |
| 1897 | + |
| David Pursehouse | 753ca33 | 2013-12-10 15:36:29 +0900 | [diff] [blame] | 1898 | Defaults to "Report Bug". |
| 1899 | |
| Dariusz Luksza | 45ee73e | 2014-08-20 09:38:09 +0200 | [diff] [blame] | 1900 | [[gerrit.disableReverseDnsLookup]]gerrit.disableReverseDnsLookup:: |
| 1901 | + |
| 1902 | Disables reverse DNS lookup during computing ref log entry for identified user. |
| 1903 | + |
| 1904 | Defaults to false. |
| 1905 | |
| David Pursehouse | 962e118 | 2014-12-03 17:17:52 +0900 | [diff] [blame] | 1906 | [[gerrit.secureStoreClass]]gerrit.secureStoreClass:: |
| 1907 | + |
| 1908 | Use the secure store implementation from a specified class. |
| 1909 | + |
| 1910 | If specified, must be the fully qualified class name of a class that implements |
| 1911 | the `com.google.gerrit.server.securestore.SecureStore` interface, and the jar |
| 1912 | file containing the class must be placed in the `$site_path/lib` folder. |
| 1913 | + |
| 1914 | If not specified, the default no-op implementation is used. |
| 1915 | |
| Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 1916 | [[gitweb]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1917 | === Section gitweb |
| Shawn O. Pearce | d7ba11f | 2009-06-01 09:35:41 -0700 | [diff] [blame] | 1918 | |
| Shawn O. Pearce | 618dae2 | 2010-03-12 19:07:43 -0800 | [diff] [blame] | 1919 | Gerrit can forward requests to either an internally managed gitweb |
| 1920 | (which allows Gerrit to enforce some access controls), or to an |
| 1921 | externally managed gitweb (where the web server manages access). |
| Shawn O. Pearce | d7ba11f | 2009-06-01 09:35:41 -0700 | [diff] [blame] | 1922 | See also link:config-gitweb.html[Gitweb Integration]. |
| 1923 | |
| Shawn O. Pearce | 618dae2 | 2010-03-12 19:07:43 -0800 | [diff] [blame] | 1924 | [[gitweb.cgi]]gitweb.cgi:: |
| 1925 | + |
| 1926 | Path to the locally installed `gitweb.cgi` executable. This CGI will |
| 1927 | be called by Gerrit Code Review when the URL `/gitweb` is accessed. |
| 1928 | Project level access controls are enforced prior to calling the CGI. |
| 1929 | + |
| 1930 | Defaults to `/usr/lib/cgi-bin/gitweb.cgi` if gitweb.url is not set. |
| 1931 | |
| Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 1932 | [[gitweb.url]]gitweb.url:: |
| Shawn O. Pearce | d7ba11f | 2009-06-01 09:35:41 -0700 | [diff] [blame] | 1933 | + |
| 1934 | Optional URL of an affiliated gitweb service. Defines the |
| 1935 | web location where a `gitweb.cgi` is installed to browse |
| Shawn O. Pearce | 9743d0b | 2009-06-01 10:10:06 -0700 | [diff] [blame] | 1936 | gerrit.basePath and the repositories it contains. |
| Shawn O. Pearce | d7ba11f | 2009-06-01 09:35:41 -0700 | [diff] [blame] | 1937 | + |
| 1938 | Gerrit appends any necessary query arguments onto the end of this URL. |
| 1939 | For example, "?p=$project.git;h=$commit". |
| 1940 | |
| Shane Mc Cormack | 27868a4 | 2009-12-28 04:49:39 +0000 | [diff] [blame] | 1941 | [[gitweb.type]]gitweb.type:: |
| 1942 | + |
| 1943 | Optional type of affiliated gitweb service. This allows using |
| Shawn O. Pearce | 2b11da0 | 2011-09-06 16:18:12 -0700 | [diff] [blame] | 1944 | alternatives to gitweb, such as cgit. If set to disabled there |
| 1945 | is no gitweb hyperlinking support. |
| Shane Mc Cormack | 27868a4 | 2009-12-28 04:49:39 +0000 | [diff] [blame] | 1946 | + |
| Shawn O. Pearce | 2b11da0 | 2011-09-06 16:18:12 -0700 | [diff] [blame] | 1947 | Valid values are `gitweb`, `cgit`, `disabled` or `custom`. |
| Shane Mc Cormack | 27868a4 | 2009-12-28 04:49:39 +0000 | [diff] [blame] | 1948 | |
| Edwin Kempin | d86909c | 2012-03-26 10:36:29 +0200 | [diff] [blame] | 1949 | [[gitweb.revision]]gitweb.revision:: |
| Shane Mc Cormack | 27868a4 | 2009-12-28 04:49:39 +0000 | [diff] [blame] | 1950 | + |
| 1951 | Optional pattern to use for constructing the gitweb URL when pointing |
| 1952 | at a specific commit when `custom` is used above. |
| 1953 | + |
| Edwin Kempin | cdb0e00 | 2011-09-08 14:23:30 +0200 | [diff] [blame] | 1954 | Valid replacements are `${project}` for the project name in Gerrit |
| 1955 | and `${commit}` for the SHA1 hash for the commit. |
| Shane Mc Cormack | 27868a4 | 2009-12-28 04:49:39 +0000 | [diff] [blame] | 1956 | |
| Edwin Kempin | d86909c | 2012-03-26 10:36:29 +0200 | [diff] [blame] | 1957 | [[gitweb.project]]gitweb.project:: |
| Shane Mc Cormack | 27868a4 | 2009-12-28 04:49:39 +0000 | [diff] [blame] | 1958 | + |
| 1959 | Optional pattern to use for constructing the gitweb URL when pointing |
| 1960 | at a specific project when `custom` is used above. |
| 1961 | + |
| Edwin Kempin | cdb0e00 | 2011-09-08 14:23:30 +0200 | [diff] [blame] | 1962 | Valid replacements are `${project}` for the project name in Gerrit. |
| Shane Mc Cormack | 27868a4 | 2009-12-28 04:49:39 +0000 | [diff] [blame] | 1963 | |
| Edwin Kempin | d86909c | 2012-03-26 10:36:29 +0200 | [diff] [blame] | 1964 | [[gitweb.branch]]gitweb.branch:: |
| Shane Mc Cormack | 27868a4 | 2009-12-28 04:49:39 +0000 | [diff] [blame] | 1965 | + |
| 1966 | Optional pattern to use for constructing the gitweb URL when pointing |
| 1967 | at a specific branch when `custom` is used above. |
| 1968 | + |
| Edwin Kempin | cdb0e00 | 2011-09-08 14:23:30 +0200 | [diff] [blame] | 1969 | Valid replacements are `${project}` for the project name in Gerrit |
| 1970 | and `${branch}` for the name of the branch. |
| Shane Mc Cormack | 27868a4 | 2009-12-28 04:49:39 +0000 | [diff] [blame] | 1971 | |
| Colby Ranger | 79d4ebe | 2013-12-16 14:19:18 -0800 | [diff] [blame] | 1972 | [[gitweb.roottree]]gitweb.roottree:: |
| 1973 | + |
| 1974 | Optional pattern to use for constructing the gitweb URL when pointing |
| 1975 | at the contents of the root tree in a specific commit when `custom` is |
| 1976 | used above. |
| 1977 | + |
| 1978 | Valid replacements are `${project}` for the project name in Gerrit |
| 1979 | and `${commit}` for the SHA1 hash for the commit. |
| 1980 | |
| 1981 | [[gitweb.file]]gitweb.file:: |
| 1982 | + |
| 1983 | Optional pattern to use for constructing the gitweb URL when pointing |
| 1984 | at the contents of a file in a specific commit when `custom` is used |
| 1985 | above. |
| 1986 | + |
| 1987 | Valid replacements are `${project}` for the project name in Gerrit, |
| 1988 | `${file}` for the file name and `${commit}` for the SHA1 hash for |
| 1989 | the commit. |
| 1990 | |
| Edwin Kempin | 6401156 | 2012-03-26 10:50:12 +0200 | [diff] [blame] | 1991 | [[gitweb.filehistory]]gitweb.filehistory:: |
| 1992 | + |
| 1993 | Optional pattern to use for constructing the gitweb URL when pointing |
| 1994 | at the history of a file in a specific branch when `custom` is used |
| 1995 | above. |
| 1996 | + |
| 1997 | Valid replacements are `${project}` for the project name in Gerrit, |
| 1998 | `${file}` for the file name and `${branch}` for the name of the |
| 1999 | branch. |
| 2000 | |
| Gustaf Lundh | a07d2e7 | 2011-10-27 15:26:35 -0700 | [diff] [blame] | 2001 | [[gitweb.linkname]]gitweb.linkname:: |
| 2002 | + |
| 2003 | Optional setting for modifying the link name presented to the user |
| 2004 | in the Gerrit web-UI. |
| 2005 | + |
| 2006 | Default linkname for custom type is "gitweb". |
| Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 2007 | |
| Adrian Goerler | f200707 | 2011-11-10 08:39:55 +0100 | [diff] [blame] | 2008 | [[gitweb.pathSeparator]]gitweb.pathSeparator:: |
| 2009 | + |
| 2010 | Optional character to substitute the standard path separator (slash) in |
| 2011 | project names and branch names. |
| 2012 | + |
| 2013 | By default, Gerrit will use hexadecimal encoding for slashes in project and |
| 2014 | branch names. Some web servers, such as Tomcat, reject this hexadecimal |
| 2015 | encoding in the URL. |
| 2016 | + |
| 2017 | Some alternative gitweb services, such as link:http://gitblit.com[Gitblit], |
| 2018 | allow using an alternative path separator character. In Gitblit, this can be |
| 2019 | configured through the property link:http://gitblit.com/properties.html[web.forwardSlashCharacter]. |
| 2020 | In Gerrit, the alternative path separator can be configured correspondingly |
| 2021 | using the property 'gitweb.pathSeparator'. |
| 2022 | + |
| 2023 | Valid values are the characters '*', '(' and ')'. |
| 2024 | |
| David Pursehouse | 5d592e8 | 2016-06-09 05:12:26 +0000 | [diff] [blame] | 2025 | [[gitweb.urlEncode]]gitweb.urlEncode:: |
| Luca Milanesio | 2531203 | 2013-10-11 11:34:39 +0100 | [diff] [blame] | 2026 | + |
| 2027 | Whether or not Gerrit should encode the generated viewer URL. |
| 2028 | + |
| 2029 | Gerrit composes the viewer URL using information about the project, branch, file |
| 2030 | or commit of the target object to be displayed. Typically viewers such as CGit |
| Dave Borowitz | a3d6788 | 2015-06-05 15:22:23 -0700 | [diff] [blame] | 2031 | and gitweb do need those parts to be encoded, including the '/' in project's name, |
| Luca Milanesio | 2531203 | 2013-10-11 11:34:39 +0100 | [diff] [blame] | 2032 | for being correctly parsed. |
| 2033 | However other viewers could instead require an unencoded URL (e.g. GitHub web |
| 2034 | based viewer) |
| 2035 | + |
| 2036 | Valid values are "true" and "false," default is "true." |
| 2037 | |
| Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 2038 | [[groups]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2039 | === Section groups |
| Edwin Kempin | 4bbff70 | 2013-01-11 09:59:53 +0100 | [diff] [blame] | 2040 | |
| 2041 | [[groups.newGroupsVisibleToAll]]groups.newGroupsVisibleToAll:: |
| 2042 | + |
| 2043 | Controls whether newly created groups should be by default visible to |
| 2044 | all registered users. |
| 2045 | + |
| 2046 | By default, false. |
| 2047 | |
| Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 2048 | [[http]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2049 | === Section http |
| Shawn O. Pearce | 309d8d3 | 2009-11-17 16:03:16 -0800 | [diff] [blame] | 2050 | |
| 2051 | [[http.proxy]]http.proxy:: |
| Shawn O. Pearce | 9d342a4 | 2009-12-16 15:49:05 -0800 | [diff] [blame] | 2052 | + |
| 2053 | URL of the proxy server when making outgoing HTTP |
| 2054 | connections for OpenID login transactions. Syntax |
| 2055 | should be `http://`'hostname'`:`'port'. |
| Shawn O. Pearce | 309d8d3 | 2009-11-17 16:03:16 -0800 | [diff] [blame] | 2056 | |
| 2057 | [[http.proxyUsername]]http.proxyUsername:: |
| Shawn O. Pearce | 9d342a4 | 2009-12-16 15:49:05 -0800 | [diff] [blame] | 2058 | + |
| 2059 | Optional username to authenticate to the HTTP proxy with. |
| Robin Rosenberg | 524a303 | 2012-10-14 14:24:36 +0200 | [diff] [blame] | 2060 | This property is honored only if the username does not |
| Shawn O. Pearce | 9d342a4 | 2009-12-16 15:49:05 -0800 | [diff] [blame] | 2061 | appear in the http.proxy property above. |
| Shawn O. Pearce | 309d8d3 | 2009-11-17 16:03:16 -0800 | [diff] [blame] | 2062 | |
| 2063 | [[http.proxyPassword]]http.proxyPassword:: |
| Shawn O. Pearce | 9d342a4 | 2009-12-16 15:49:05 -0800 | [diff] [blame] | 2064 | + |
| 2065 | Optional password to authenticate to the HTTP proxy with. |
| Robin Rosenberg | 524a303 | 2012-10-14 14:24:36 +0200 | [diff] [blame] | 2066 | This property is honored only if the password does not |
| Shawn O. Pearce | 9d342a4 | 2009-12-16 15:49:05 -0800 | [diff] [blame] | 2067 | appear in the http.proxy property above. |
| Shawn O. Pearce | 309d8d3 | 2009-11-17 16:03:16 -0800 | [diff] [blame] | 2068 | |
| Hugo Arès | 88e33ac | 2014-03-03 13:52:45 -0500 | [diff] [blame] | 2069 | [[http.addUserAsRequestAttribute]]http.addUserAsRequestAttribute:: |
| 2070 | + |
| 2071 | If true, 'User' attribute will be added to the request attributes so it |
| 2072 | can be accessed outside the request scope (will be set to username or id |
| 2073 | if username not configured). |
| 2074 | + |
| 2075 | This attribute can be used by the servlet container to log user in the |
| 2076 | http access log. |
| 2077 | + |
| 2078 | When running the embedded servlet container, this attribute is used to |
| 2079 | print user in the httpd_log. |
| 2080 | + |
| 2081 | * `%{User}r` |
| 2082 | + |
| 2083 | Pattern to print user in Tomcat AccessLog. |
| 2084 | |
| 2085 | + |
| 2086 | Default value is true. |
| Shawn O. Pearce | 309d8d3 | 2009-11-17 16:03:16 -0800 | [diff] [blame] | 2087 | |
| Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 2088 | [[httpd]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2089 | === Section httpd |
| Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 2090 | |
| 2091 | The httpd section configures the embedded servlet container. |
| 2092 | |
| 2093 | [[httpd.listenUrl]]httpd.listenUrl:: |
| 2094 | + |
| 2095 | Specifies the URLs the internal HTTP daemon should listen for |
| Edwin Kempin | cdb0e00 | 2011-09-08 14:23:30 +0200 | [diff] [blame] | 2096 | connections on. The special hostname '*' may be used to listen |
| Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 2097 | on all local addresses. A context path may optionally be included, |
| 2098 | placing Gerrit Code Review's web address within a subdirectory of |
| 2099 | the server. |
| 2100 | + |
| 2101 | Multiple protocol schemes are supported: |
| 2102 | + |
| 2103 | * `http://`'hostname'`:`'port' |
| 2104 | + |
| 2105 | Plain-text HTTP protocol. If port is not supplied, defaults to 80, |
| 2106 | the standard HTTP port. |
| 2107 | + |
| 2108 | * `https://`'hostname'`:`'port' |
| 2109 | + |
| 2110 | SSL encrypted HTTP protocol. If port is not supplied, defaults to |
| 2111 | 443, the standard HTTPS port. |
| 2112 | + |
| 2113 | Externally facing production sites are encouraged to use a reverse |
| 2114 | proxy configuration and `proxy-https://` (below), rather than using |
| 2115 | the embedded servlet container to implement the SSL processing. |
| 2116 | The proxy server with SSL support is probably easier to configure, |
| 2117 | provides more configuration options to control cipher usage, and |
| 2118 | is likely using natively compiled encryption algorithms, resulting |
| 2119 | in higher throughput. |
| 2120 | + |
| 2121 | * `proxy-http://`'hostname'`:`'port' |
| 2122 | + |
| 2123 | Plain-text HTTP relayed from a reverse proxy. If port is not |
| 2124 | supplied, defaults to 8080. |
| 2125 | + |
| 2126 | Like http, but additional header parsing features are |
| 2127 | enabled to honor X-Forwarded-For, X-Forwarded-Host and |
| 2128 | X-Forwarded-Server. These headers are typically set by Apache's |
| 2129 | link:http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#x-headers[mod_proxy]. |
| 2130 | + |
| 2131 | * `proxy-https://`'hostname'`:`'port' |
| 2132 | + |
| 2133 | Plain text HTTP relayed from a reverse proxy that has already |
| 2134 | handled the SSL encryption/decryption. If port is not supplied, |
| 2135 | defaults to 8080. |
| 2136 | + |
| 2137 | Behaves exactly like proxy-http, but also sets the scheme to assume |
| 2138 | 'https://' is the proper URL back to the server. |
| 2139 | |
| 2140 | + |
| Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 2141 | -- |
| Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 2142 | If multiple values are supplied, the daemon will listen on all |
| 2143 | of them. |
| Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 2144 | |
| Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 2145 | By default, http://*:8080. |
| Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 2146 | -- |
| Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 2147 | |
| 2148 | [[httpd.reuseAddress]]httpd.reuseAddress:: |
| 2149 | + |
| 2150 | If true, permits the daemon to bind to the port even if the port |
| 2151 | is already in use. If false, the daemon ensures the port is not |
| 2152 | in use before starting. Busy sites may need to set this to true |
| 2153 | to permit fast restarts. |
| 2154 | + |
| 2155 | By default, true. |
| 2156 | |
| 2157 | [[httpd.requestHeaderSize]]httpd.requestHeaderSize:: |
| 2158 | + |
| 2159 | Size, in bytes, of the buffer used to parse the HTTP headers of an |
| 2160 | incoming HTTP request. The entire request headers, including any |
| 2161 | cookies sent by the browser, must fit within this buffer, otherwise |
| 2162 | the server aborts with the response '413 Request Entity Too Large'. |
| 2163 | + |
| 2164 | One buffer of this size is allocated per active connection. |
| 2165 | Allocating a buffer that is too large wastes memory that cannot be |
| 2166 | reclaimed, allocating a buffer that is too small may cause unexpected |
| 2167 | errors caused by very long Referer URLs or large cookie values. |
| 2168 | + |
| 2169 | By default, 16384 (16 K), which is sufficient for most OpenID and |
| 2170 | other web-based single-sign-on integrations. |
| 2171 | |
| Chulho Yang | b72ff8f | 2013-07-04 02:35:53 -0400 | [diff] [blame] | 2172 | [[httpd.sslCrl]]httpd.sslCrl:: |
| 2173 | + |
| 2174 | Path of the certificate revocation list file in PEM format. This |
| 2175 | crl file is optional, and available for CLIENT_SSL_CERT_LDAP |
| 2176 | authentication. |
| 2177 | + |
| 2178 | To create and view a crl using openssl: |
| 2179 | + |
| 2180 | ---- |
| 2181 | openssl ca -gencrl -out crl.pem |
| 2182 | openssl crl -in crl.pem -text |
| 2183 | ---- |
| 2184 | + |
| 2185 | If not absolute, the path is resolved relative to `$site_path`. |
| 2186 | + |
| 2187 | By default, `$site_path/etc/crl.pem`. |
| 2188 | |
| Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 2189 | [[httpd.sslKeyStore]]httpd.sslKeyStore:: |
| 2190 | + |
| 2191 | Path of the Java keystore containing the server's SSL certificate |
| 2192 | and private key. This keystore is required for `https://` in URL. |
| 2193 | + |
| 2194 | To create a self-signed certificate for simple internal usage: |
| 2195 | + |
| Shawn O. Pearce | 9d342a4 | 2009-12-16 15:49:05 -0800 | [diff] [blame] | 2196 | ---- |
| 2197 | keytool -keystore keystore -alias jetty -genkey -keyalg RSA |
| 2198 | chmod 600 keystore |
| 2199 | ---- |
| Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 2200 | + |
| 2201 | If not absolute, the path is resolved relative to `$site_path`. |
| 2202 | + |
| Shawn O. Pearce | c5fed82 | 2009-11-17 16:10:10 -0800 | [diff] [blame] | 2203 | By default, `$site_path/etc/keystore`. |
| Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 2204 | |
| 2205 | [[httpd.sslKeyPassword]]httpd.sslKeyPassword:: |
| 2206 | + |
| 2207 | Password used to decrypt the private portion of the sslKeyStore. |
| David Pursehouse | 221d4f6 | 2012-06-08 17:38:08 +0900 | [diff] [blame] | 2208 | Java keystores require a password, even if the administrator |
| Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 2209 | doesn't want to enable one. |
| 2210 | + |
| 2211 | If set to the empty string the embedded server will prompt for the |
| 2212 | password during startup. |
| 2213 | + |
| 2214 | By default, `gerrit`. |
| 2215 | |
| Shawn O. Pearce | 1766f50 | 2010-01-15 10:49:46 -0800 | [diff] [blame] | 2216 | [[httpd.requestLog]]httpd.requestLog:: |
| 2217 | + |
| 2218 | Enable (or disable) the `'$site_path'/logs/httpd_log` request log. |
| 2219 | If enabled, an NCSA combined log format request log file is written |
| 2220 | out by the internal HTTP daemon. |
| 2221 | + |
| David Ostrovsky | 8e4a990 | 2013-11-19 23:57:48 +0100 | [diff] [blame] | 2222 | `log4j.appender` with the name `httpd_log` can be configured to overwrite |
| 2223 | programmatic configuration. |
| 2224 | + |
| Shawn O. Pearce | 1766f50 | 2010-01-15 10:49:46 -0800 | [diff] [blame] | 2225 | By default, true if httpd.listenUrl uses http:// or https://, |
| 2226 | and false if httpd.listenUrl uses proxy-http:// or proxy-https://. |
| 2227 | |
| Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 2228 | [[httpd.acceptorThreads]]httpd.acceptorThreads:: |
| 2229 | + |
| 2230 | Number of worker threads dedicated to accepting new incoming TCP |
| David Pursehouse | 221d4f6 | 2012-06-08 17:38:08 +0900 | [diff] [blame] | 2231 | connections and allocating them connection-specific resources. |
| Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 2232 | + |
| 2233 | By default, 2, which should be suitable for most high-traffic sites. |
| 2234 | |
| 2235 | [[httpd.minThreads]]httpd.minThreads:: |
| 2236 | + |
| 2237 | Minimum number of spare threads to keep in the worker thread pool. |
| 2238 | This number must be at least 1 larger than httpd.acceptorThreads |
| David Pursehouse | 9246356 | 2013-06-24 10:16:28 +0900 | [diff] [blame] | 2239 | multiplied by the number of httpd.listenUrls configured. |
| Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 2240 | + |
| 2241 | By default, 5, suitable for most lower-volume traffic sites. |
| 2242 | |
| 2243 | [[httpd.maxThreads]]httpd.maxThreads:: |
| 2244 | + |
| 2245 | Maximum number of threads to permit in the worker thread pool. |
| 2246 | + |
| 2247 | By default 25, suitable for most lower-volume traffic sites. |
| 2248 | |
| 2249 | [[httpd.maxQueued]]httpd.maxQueued:: |
| 2250 | + |
| 2251 | Maximum number of client connections which can enter the worker |
| 2252 | thread pool waiting for a worker thread to become available. |
| David Ostrovsky | 14fe8bc | 2014-03-26 06:03:44 -0700 | [diff] [blame] | 2253 | 0 sets the queue size to the Integer.MAX_VALUE. |
| Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 2254 | + |
| Luca Milanesio | 0ae62fe | 2015-09-04 07:56:00 -0700 | [diff] [blame] | 2255 | By default 200. |
| Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 2256 | |
| Shawn O. Pearce | e5452b7 | 2010-01-15 14:32:50 -0800 | [diff] [blame] | 2257 | [[httpd.maxWait]]httpd.maxWait:: |
| 2258 | + |
| David Pursehouse | 221d4f6 | 2012-06-08 17:38:08 +0900 | [diff] [blame] | 2259 | Maximum amount of time a client will wait for an available |
| Shawn O. Pearce | e5452b7 | 2010-01-15 14:32:50 -0800 | [diff] [blame] | 2260 | thread to handle a project clone, fetch or push request over the |
| 2261 | smart HTTP transport. |
| 2262 | + |
| 2263 | Values should use common unit suffixes to express their setting: |
| 2264 | + |
| 2265 | * s, sec, second, seconds |
| 2266 | * m, min, minute, minutes |
| 2267 | * h, hr, hour, hours |
| 2268 | * d, day, days |
| 2269 | * w, week, weeks (`1 week` is treated as `7 days`) |
| 2270 | * mon, month, months (`1 month` is treated as `30 days`) |
| 2271 | * y, year, years (`1 year` is treated as `365 days`) |
| 2272 | |
| 2273 | + |
| Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 2274 | -- |
| Shawn O. Pearce | e5452b7 | 2010-01-15 14:32:50 -0800 | [diff] [blame] | 2275 | If a unit suffix is not specified, `minutes` is assumed. If 0 |
| 2276 | is supplied, the maximum age is infinite and connections will not |
| 2277 | abort until the client disconnects. |
| Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 2278 | |
| Shawn O. Pearce | e5452b7 | 2010-01-15 14:32:50 -0800 | [diff] [blame] | 2279 | By default, 5 minutes. |
| Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 2280 | -- |
| Shawn O. Pearce | e5452b7 | 2010-01-15 14:32:50 -0800 | [diff] [blame] | 2281 | |
| Luca Milanesio | ce7b745 | 2013-06-18 11:40:49 +0100 | [diff] [blame] | 2282 | [[httpd.filterClass]]httpd.filterClass:: |
| 2283 | + |
| 2284 | Class that implements the javax.servlet.Filter interface |
| 2285 | for filtering any HTTP related traffic going through the Gerrit |
| 2286 | HTTP protocol. |
| 2287 | Class is loaded and configured in the Gerrit Jetty container |
| 2288 | and run in front of all Gerrit URL handlers, allowing the filter |
| 2289 | to inspect, modify, allow or reject each request. |
| 2290 | It needs to be provided as JAR library |
| 2291 | under $GERRIT_SITE/lib as it is resolved using the default Gerrit class |
| 2292 | loader and cannot be dynamically loaded by a plugin. |
| 2293 | + |
| 2294 | Failing to load the Filter class would result in a Gerrit start-up |
| 2295 | failure, as this class is supposed to provide mandatory filtering |
| 2296 | in front of Gerrit HTTP protocol. |
| 2297 | + |
| David Pursehouse | 42f4204 | 2013-08-01 14:02:25 +0900 | [diff] [blame] | 2298 | Typical usage is in conjunction with the `auth.type=HTTP` as replacement |
| Luca Milanesio | ce7b745 | 2013-06-18 11:40:49 +0100 | [diff] [blame] | 2299 | of an Apache HTTP proxy layer as security enforcement on top of Gerrit |
| 2300 | by returning a trusted username as HTTP Header. |
| 2301 | + |
| 2302 | Example of using a security library secure.jar under $GERRIT_SITE/lib |
| 2303 | that provides a org.anyorg.MySecureFilter Servlet Filter that enforces |
| 2304 | a trusted username in the `TRUSTED_USER` HTTP Header: |
| 2305 | |
| 2306 | ---- |
| 2307 | [auth] |
| 2308 | type = HTTP |
| 2309 | httpHeader = TRUSTED_USER |
| 2310 | |
| Dariusz Luksza | aac0113 | 2015-02-11 12:13:07 +0100 | [diff] [blame] | 2311 | [httpd] |
| Luca Milanesio | ce7b745 | 2013-06-18 11:40:49 +0100 | [diff] [blame] | 2312 | filterClass = org.anyorg.MySecureFilter |
| 2313 | ---- |
| Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 2314 | |
| Juan Hernandez | ec51256 | 2013-08-06 16:30:50 +0200 | [diff] [blame] | 2315 | [[httpd.robotsFile]]httpd.robotsFile:: |
| 2316 | + |
| 2317 | Location of an external robots.txt file to be used instead of the one |
| 2318 | bundled with the .war of the application. |
| 2319 | + |
| 2320 | If not absolute, the path is resolved relative to `$site_path`. |
| 2321 | + |
| 2322 | If the file doesn't exist or can't be read the default robots.txt file |
| 2323 | bundled with the .war will be used instead. |
| 2324 | |
| Dariusz Luksza | 011cfed | 2014-04-03 10:23:35 +0200 | [diff] [blame] | 2325 | [[httpd.registerMBeans]]httpd.registerMBeans:: |
| 2326 | + |
| 2327 | Enable (or disable) registration of Jetty MBeans for Java JMX. |
| 2328 | + |
| 2329 | By default, false. |
| 2330 | |
| Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 2331 | [[index]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2332 | === Section index |
| David Pursehouse | 6d45843 | 2013-08-23 16:17:18 +0900 | [diff] [blame] | 2333 | |
| 2334 | The index section configures the secondary index. |
| 2335 | |
| David Pursehouse | 3fc5ee3 | 2014-03-17 18:35:32 +0900 | [diff] [blame] | 2336 | Note that after enabling the secondary index, the index must be built |
| 2337 | using the link:pgm-reindex.html[reindex program] before restarting the |
| 2338 | Gerrit server. |
| 2339 | |
| David Pursehouse | 6d45843 | 2013-08-23 16:17:18 +0900 | [diff] [blame] | 2340 | [[index.type]]index.type:: |
| 2341 | + |
| 2342 | Type of secondary indexing employed by Gerrit. The supported |
| 2343 | values are: |
| 2344 | + |
| 2345 | * `LUCENE` |
| 2346 | + |
| 2347 | A link:http://lucene.apache.org/[Lucene] index is used. |
| 2348 | + |
| David Pursehouse | 6d45843 | 2013-08-23 16:17:18 +0900 | [diff] [blame] | 2349 | |
| 2350 | + |
| Shawn Pearce | d4ae3a16 | 2013-11-24 17:00:31 -0800 | [diff] [blame] | 2351 | By default, `LUCENE`. |
| David Pursehouse | 6d45843 | 2013-08-23 16:17:18 +0900 | [diff] [blame] | 2352 | |
| David Pursehouse | 904db30 | 2014-03-17 18:55:38 +0900 | [diff] [blame] | 2353 | [[index.threads]]index.threads:: |
| 2354 | + |
| Hugo Arès | fab0670 | 2016-06-10 12:49:52 -0400 | [diff] [blame] | 2355 | Number of threads to use for indexing in normal interactive operations. Setting |
| 2356 | it to 0 disables the dedicated thread pool and indexing will be done in the same |
| 2357 | thread as the operation. |
| David Pursehouse | 904db30 | 2014-03-17 18:55:38 +0900 | [diff] [blame] | 2358 | + |
| Hugo Arès | 176cd58 | 2016-05-06 14:37:09 -0400 | [diff] [blame] | 2359 | If not set or set to a negative value, defaults to 1 plus half of the number of |
| 2360 | logical CPUs as returned by the JVM. |
| David Pursehouse | 00c8214 | 2014-01-22 17:41:09 +0900 | [diff] [blame] | 2361 | |
| Dave Borowitz | 787af5f | 2014-10-22 16:26:00 -0700 | [diff] [blame] | 2362 | [[index.batchThreads]]index.batchThreads:: |
| 2363 | + |
| 2364 | Number of threads to use for indexing in background operations, such as |
| 2365 | online schema upgrades. |
| 2366 | + |
| Sebastian Schuberth | a13dc29 | 2015-05-21 15:31:28 +0200 | [diff] [blame] | 2367 | If not set or set to a negative value, defaults to the number of logical |
| Hugo Arès | 1cf252c | 2016-05-06 08:38:22 -0400 | [diff] [blame] | 2368 | CPUs as returned by the JVM. |
| Dave Borowitz | 787af5f | 2014-10-22 16:26:00 -0700 | [diff] [blame] | 2369 | |
| Dave Borowitz | d80b934 | 2015-03-25 10:32:21 -0700 | [diff] [blame] | 2370 | [[index.onlineUpgrade]]index.onlineUpgrade:: |
| 2371 | + |
| 2372 | Whether to upgrade to new index schema versions while the server is |
| 2373 | running. This is recommended as it prevents additional downtime during |
| 2374 | Gerrit version upgrades (avoiding the need for an offline reindex step |
| 2375 | using Reindex), but can add additional server load during the upgrade. |
| 2376 | + |
| 2377 | If set to false, there is no way to upgrade the index schema to take |
| 2378 | advantage of new search features without restarting the server. |
| 2379 | + |
| 2380 | Defaults to true. |
| 2381 | |
| Dave Borowitz | b82fbcb | 2015-04-22 16:43:54 -0700 | [diff] [blame] | 2382 | [[index.maxLimit]]index.maxLimit:: |
| 2383 | + |
| 2384 | Maximum limit to allow for search queries. Requesting results above this |
| 2385 | limit will truncate the list (but will still set `_more_changes` on |
| 2386 | result lists). Set to 0 for no limit. |
| 2387 | + |
| 2388 | Defaults to no limit. |
| 2389 | |
| Dave Borowitz | f56d365 | 2015-04-22 17:35:34 -0700 | [diff] [blame] | 2390 | [[index.maxPages]]index.maxPages:: |
| 2391 | + |
| 2392 | Maximum number of pages of search results to allow, as index |
| 2393 | implementations may have to scan through large numbers of skipped |
| 2394 | results when searching with an offset. Requesting results starting past |
| 2395 | this threshold times the requested limit will result in an error. Set to |
| 2396 | 0 for no limit. |
| 2397 | + |
| 2398 | Defaults to no limit. |
| 2399 | |
| Dave Borowitz | d034ca8 | 2015-10-15 11:20:30 -0400 | [diff] [blame] | 2400 | [[index.maxTerms]]index.maxTerms:: |
| 2401 | + |
| 2402 | Maximum number of leaf terms to allow in a query. Too-large queries may |
| 2403 | perform poorly, so setting this option causes query parsing to fail fast |
| Marco Miller | 6da2282 | 2016-01-29 12:31:38 -0500 | [diff] [blame] | 2404 | before attempting to send them to the secondary index. Should this limit |
| 2405 | be reached, database is used instead of index as applicable. |
| Dave Borowitz | d034ca8 | 2015-10-15 11:20:30 -0400 | [diff] [blame] | 2406 | + |
| Marco Miller | 6da2282 | 2016-01-29 12:31:38 -0500 | [diff] [blame] | 2407 | When the index type is `LUCENE`, also sets the maximum number of clauses |
| 2408 | permitted per BooleanQuery. This is so that all enforced query limits |
| 2409 | are the same. |
| 2410 | + |
| 2411 | Defaults to 1024. |
| Dave Borowitz | d034ca8 | 2015-10-15 11:20:30 -0400 | [diff] [blame] | 2412 | |
| David Pursehouse | 902b3ee | 2014-07-09 16:17:49 +0900 | [diff] [blame] | 2413 | ==== Lucene configuration |
| 2414 | |
| 2415 | Open and closed changes are indexed in separate indexes named |
| 2416 | 'open' and 'closed' respectively. |
| 2417 | |
| 2418 | The following settings are only used when the index type is `LUCENE`. |
| David Pursehouse | ac88c36 | 2014-02-06 12:01:34 +0900 | [diff] [blame] | 2419 | |
| David Pursehouse | 00c8214 | 2014-01-22 17:41:09 +0900 | [diff] [blame] | 2420 | [[index.name.ramBufferSize]]index.name.ramBufferSize:: |
| 2421 | + |
| David Pursehouse | 00c8214 | 2014-01-22 17:41:09 +0900 | [diff] [blame] | 2422 | Determines the amount of RAM that may be used for buffering added documents |
| 2423 | and deletions before they are flushed to the index. See the |
| 2424 | link:http://lucene.apache.org/core/4_6_0/core/org/apache/lucene/index/LiveIndexWriterConfig.html#setRAMBufferSizeMB(double)[ |
| 2425 | Lucene documentation] for further details. |
| 2426 | + |
| 2427 | Defaults to 16M. |
| 2428 | |
| 2429 | [[index.name.maxBufferedDocs]]index.name.maxBufferedDocs:: |
| 2430 | + |
| David Pursehouse | 00c8214 | 2014-01-22 17:41:09 +0900 | [diff] [blame] | 2431 | Determines the minimal number of documents required before the buffered |
| 2432 | in-memory documents are flushed to the index. Large values generally |
| 2433 | give faster indexing. See the |
| 2434 | link:http://lucene.apache.org/core/4_6_0/core/org/apache/lucene/index/LiveIndexWriterConfig.html#setMaxBufferedDocs(int)[ |
| 2435 | Lucene documentation] for further details. |
| 2436 | + |
| 2437 | Defaults to -1, meaning no maximum is set and the writer will flush |
| 2438 | according to RAM usage. |
| 2439 | |
| Dave Borowitz | d08b045 | 2014-02-13 11:56:03 -0800 | [diff] [blame] | 2440 | [[index.name.commitWithin]]index.name.commitWithin:: |
| 2441 | + |
| Dave Borowitz | d08b045 | 2014-02-13 11:56:03 -0800 | [diff] [blame] | 2442 | Determines the period at which changes are automatically committed to |
| 2443 | stable store on disk. This is a costly operation and may block |
| 2444 | additional index writes, so lower with caution. |
| 2445 | + |
| Bruce Zu | af058e6 | 2014-03-21 10:03:05 +0800 | [diff] [blame] | 2446 | If zero, changes are committed after every write. This is very costly |
| 2447 | but may be useful if offline reindexing is infeasible, or for development |
| 2448 | servers. |
| Dave Borowitz | d08b045 | 2014-02-13 11:56:03 -0800 | [diff] [blame] | 2449 | + |
| Bruce Zu | af058e6 | 2014-03-21 10:03:05 +0800 | [diff] [blame] | 2450 | Values can be specified using standard time unit abbreviations (`ms`, `sec`, |
| 2451 | `min`, etc.). |
| David Pursehouse | 9354c1a | 2014-03-22 12:23:43 -0700 | [diff] [blame] | 2452 | + |
| Bruce Zu | af058e6 | 2014-03-21 10:03:05 +0800 | [diff] [blame] | 2453 | If negative, `commitWithin` is disabled. Changes are flushed to disk when |
| 2454 | the in-memory buffer fills, but only committed and guaranteed to be synced |
| 2455 | to disk when the process finishes. |
| David Pursehouse | 902b3ee | 2014-07-09 16:17:49 +0900 | [diff] [blame] | 2456 | + |
| Dave Borowitz | d08b045 | 2014-02-13 11:56:03 -0800 | [diff] [blame] | 2457 | Defaults to 300000 ms (5 minutes). |
| 2458 | |
| David Pursehouse | 902b3ee | 2014-07-09 16:17:49 +0900 | [diff] [blame] | 2459 | Sample Lucene index configuration: |
| David Pursehouse | 00c8214 | 2014-01-22 17:41:09 +0900 | [diff] [blame] | 2460 | ---- |
| 2461 | [index] |
| 2462 | type = LUCENE |
| 2463 | |
| 2464 | [index "changes_open"] |
| 2465 | ramBufferSize = 60 m |
| 2466 | maxBufferedDocs = 3000 |
| 2467 | |
| 2468 | [index "changes_closed"] |
| 2469 | ramBufferSize = 20 m |
| 2470 | maxBufferedDocs = 500 |
| 2471 | ---- |
| 2472 | |
| Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 2473 | [[ldap]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2474 | === Section ldap |
| Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 2475 | |
| David Pursehouse | 221d4f6 | 2012-06-08 17:38:08 +0900 | [diff] [blame] | 2476 | LDAP integration is only enabled if `auth.type` is set to |
| Sasa Zivkov | eabc897 | 2010-10-04 15:47:08 +0200 | [diff] [blame] | 2477 | `HTTP_LDAP`, `LDAP` or `CLIENT_SSL_CERT_LDAP`. See above for a |
| David Pursehouse | 42f4204 | 2013-08-01 14:02:25 +0900 | [diff] [blame] | 2478 | detailed description of the `auth.type` settings and their |
| Sasa Zivkov | eabc897 | 2010-10-04 15:47:08 +0200 | [diff] [blame] | 2479 | implications. |
| Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 2480 | |
| Shawn O. Pearce | 02c2e80 | 2009-10-29 14:46:03 -0700 | [diff] [blame] | 2481 | An example LDAP configuration follows, and then discussion of |
| 2482 | the parameters introduced here. Suitable defaults for most |
| 2483 | parameters are automatically guessed based on the type of server |
| 2484 | detected during startup. The guessed defaults support both |
| 2485 | link:http://www.ietf.org/rfc/rfc2307.txt[RFC 2307] and Active |
| 2486 | Directory. |
| Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 2487 | |
| Shawn O. Pearce | 9d342a4 | 2009-12-16 15:49:05 -0800 | [diff] [blame] | 2488 | ---- |
| 2489 | [ldap] |
| 2490 | server = ldap://ldap.example.com |
| 2491 | |
| 2492 | accountBase = ou=people,dc=example,dc=com |
| 2493 | accountPattern = (&(objectClass=person)(uid=${username})) |
| 2494 | accountFullName = displayName |
| 2495 | accountEmailAddress = mail |
| 2496 | |
| 2497 | groupBase = ou=groups,dc=example,dc=com |
| 2498 | groupMemberPattern = (&(objectClass=group)(member=${dn})) |
| 2499 | ---- |
| Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 2500 | |
| Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 2501 | [[ldap.server]]ldap.server:: |
| Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 2502 | + |
| 2503 | URL of the organization's LDAP server to query for user information |
| 2504 | and group membership from. Must be of the form `ldap://host` or |
| 2505 | `ldaps://host` to bind with either a plaintext or SSL connection. |
| Shawn O. Pearce | f7e065e | 2009-09-26 20:01:10 -0700 | [diff] [blame] | 2506 | + |
| David Pursehouse | 42f4204 | 2013-08-01 14:02:25 +0900 | [diff] [blame] | 2507 | If `auth.type` is `LDAP` this setting should use `ldaps://` to |
| Shawn O. Pearce | f7e065e | 2009-09-26 20:01:10 -0700 | [diff] [blame] | 2508 | ensure the end user's plaintext password is transmitted only over |
| 2509 | an encrypted connection. |
| Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 2510 | |
| Shawn O. Pearce | 02c2e80 | 2009-10-29 14:46:03 -0700 | [diff] [blame] | 2511 | [[ldap.sslVerify]]ldap.sslVerify:: |
| 2512 | + |
| 2513 | If false and ldap.server is an `ldaps://` style URL, Gerrit |
| 2514 | will not verify the server certificate when it connects to |
| 2515 | perform a query. |
| 2516 | + |
| 2517 | By default, true, requiring the certificate to be verified. |
| 2518 | |
| Olga Grinberg | cf1b06a | 2015-02-03 15:54:48 -0500 | [diff] [blame] | 2519 | [[ldap.groupsVisibleToAll]]ldap.groupsVisibleToAll:: |
| 2520 | + |
| 2521 | If true, LDAP groups are visible to all registered users. |
| 2522 | + |
| 2523 | By default, false, LDAP groups are visible only to administrators and |
| 2524 | group members. |
| 2525 | |
| Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 2526 | [[ldap.username]]ldap.username:: |
| Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 2527 | + |
| 2528 | _(Optional)_ Username to bind to the LDAP server with. If not set, |
| 2529 | an anonymous connection to the LDAP server is attempted. |
| 2530 | |
| Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 2531 | [[ldap.password]]ldap.password:: |
| Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 2532 | + |
| 2533 | _(Optional)_ Password for the user identified by `ldap.username`. |
| 2534 | If not set, an anonymous (or passwordless) connection to the LDAP |
| 2535 | server is attempted. |
| 2536 | |
| Ben Wu | 0410a15 | 2010-06-04 16:17:24 +0800 | [diff] [blame] | 2537 | [[ldap.referral]]ldap.referral:: |
| 2538 | + |
| 2539 | _(Optional)_ How an LDAP referral should be handled if it is |
| 2540 | encountered during directory traversal. Set to `follow` to |
| James Y Knight | 1244ed0 | 2011-01-04 02:40:32 -0500 | [diff] [blame] | 2541 | automatically follow any referrals, or `ignore` to ignore the |
| 2542 | referrals. |
| Ben Wu | 0410a15 | 2010-06-04 16:17:24 +0800 | [diff] [blame] | 2543 | + |
| 2544 | By default, `ignore`. |
| 2545 | |
| Sasa Zivkov | 100bd4b | 2011-11-07 14:58:46 +0100 | [diff] [blame] | 2546 | [[ldap.readTimeout]]ldap.readTimeout:: |
| 2547 | + |
| 2548 | _(Optional)_ The read timeout for an LDAP operation. The value is |
| 2549 | in the usual time-unit format like "1 s", "100 ms", etc... |
| 2550 | A timeout can be used to avoid blocking all of the SSH command start |
| David Pursehouse | 221d4f6 | 2012-06-08 17:38:08 +0900 | [diff] [blame] | 2551 | threads in case the LDAP server becomes slow. |
| Sasa Zivkov | 100bd4b | 2011-11-07 14:58:46 +0100 | [diff] [blame] | 2552 | + |
| 2553 | By default there is no timeout and Gerrit will wait for the LDAP |
| 2554 | server to respond until the TCP connection times out. |
| 2555 | |
| Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 2556 | [[ldap.accountBase]]ldap.accountBase:: |
| Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 2557 | + |
| 2558 | Root of the tree containing all user accounts. This is typically |
| 2559 | of the form `ou=people,dc=example,dc=com`. |
| David Pursehouse | 82d5563 | 2015-12-14 10:31:27 +0000 | [diff] [blame] | 2560 | + |
| 2561 | This setting may be added multiple times to specify more than |
| 2562 | one root. |
| Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 2563 | |
| Shawn O. Pearce | 304ccdb | 2009-08-25 12:25:27 -0700 | [diff] [blame] | 2564 | [[ldap.accountScope]]ldap.accountScope:: |
| 2565 | + |
| 2566 | Scope of the search performed for accounts. Must be one of: |
| 2567 | + |
| 2568 | * `one`: Search only one level below accountBase, but not recursive |
| 2569 | * `sub` or `subtree`: Search recursively below accountBase |
| 2570 | * `base` or `object`: Search exactly accountBase; probably not desired |
| 2571 | |
| 2572 | + |
| 2573 | Default is `subtree` as many directories have several levels. |
| 2574 | |
| Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 2575 | [[ldap.accountPattern]]ldap.accountPattern:: |
| Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 2576 | + |
| 2577 | Query pattern to use when searching for a user account. This may be |
| 2578 | any valid LDAP query expression, including the standard `(&...)` and |
| David Pursehouse | 42f4204 | 2013-08-01 14:02:25 +0900 | [diff] [blame] | 2579 | `(|...)` operators. If `auth.type` is `HTTP_LDAP` then the variable |
| Edwin Kempin | cdb0e00 | 2011-09-08 14:23:30 +0200 | [diff] [blame] | 2580 | `${username}` is replaced with a parameter set to the username |
| David Pursehouse | 42f4204 | 2013-08-01 14:02:25 +0900 | [diff] [blame] | 2581 | that was supplied by the HTTP server. If `auth.type` is `LDAP` then |
| Edwin Kempin | cdb0e00 | 2011-09-08 14:23:30 +0200 | [diff] [blame] | 2582 | the variable `${username}` is replaced by the string entered by |
| Shawn O. Pearce | f7e065e | 2009-09-26 20:01:10 -0700 | [diff] [blame] | 2583 | the end user. |
| Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 2584 | + |
| 2585 | This pattern is used to search the objects contained directly under |
| 2586 | the `ldap.accountBase` tree. A typical setting for this parameter |
| Edwin Kempin | cdb0e00 | 2011-09-08 14:23:30 +0200 | [diff] [blame] | 2587 | is `(uid=${username})` or `(cn=${username})`, but the proper |
| Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 2588 | setting depends on the LDAP schema used by the directory server. |
| 2589 | + |
| Edwin Kempin | cdb0e00 | 2011-09-08 14:23:30 +0200 | [diff] [blame] | 2590 | Default is `(uid=${username})` for RFC 2307 servers, |
| Shawn O. Pearce | 02c2e80 | 2009-10-29 14:46:03 -0700 | [diff] [blame] | 2591 | and `(&(objectClass=user)(sAMAccountName=${username}))` |
| 2592 | for Active Directory. |
| Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 2593 | |
| Shawn O. Pearce | 37dc1f8 | 2009-08-19 09:49:07 -0700 | [diff] [blame] | 2594 | [[ldap.accountFullName]]ldap.accountFullName:: |
| Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 2595 | + |
| 2596 | _(Optional)_ Name of an attribute on the user account object which |
| 2597 | contains the initial value for the user's full name field in Gerrit. |
| 2598 | Typically this is the `displayName` property in LDAP, but could |
| 2599 | also be `legalName` or `cn`. |
| 2600 | + |
| David Pursehouse | 221d4f6 | 2012-06-08 17:38:08 +0900 | [diff] [blame] | 2601 | Attribute values may be concatenated with literal strings. For |
| 2602 | example to join given name and surname together, use the pattern |
| Edwin Kempin | cdb0e00 | 2011-09-08 14:23:30 +0200 | [diff] [blame] | 2603 | `${givenName} ${SN}`. |
| Shawn O. Pearce | b86ae00 | 2009-09-26 16:54:05 -0700 | [diff] [blame] | 2604 | + |
| Shawn O. Pearce | 3ca1dcf | 2009-08-20 08:56:23 -0700 | [diff] [blame] | 2605 | If set, users will be unable to modify their full name field, as |
| 2606 | Gerrit will populate it only from the LDAP data. |
| 2607 | + |
| Shawn O. Pearce | 02c2e80 | 2009-10-29 14:46:03 -0700 | [diff] [blame] | 2608 | Default is `displayName` for RFC 2307 servers, |
| 2609 | and `${givenName} ${sn}` for Active Directory. |
| Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 2610 | |
| Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 2611 | [[ldap.accountEmailAddress]]ldap.accountEmailAddress:: |
| Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 2612 | + |
| 2613 | _(Optional)_ Name of an attribute on the user account object which |
| 2614 | contains the user's Internet email address, as defined by this |
| 2615 | LDAP server. |
| 2616 | + |
| Shawn O. Pearce | b86ae00 | 2009-09-26 16:54:05 -0700 | [diff] [blame] | 2617 | Attribute values may be concatenated with literal strings, |
| 2618 | for example to set the email address to the lowercase form |
| 2619 | of sAMAccountName followed by a constant domain name, use |
| Edwin Kempin | cdb0e00 | 2011-09-08 14:23:30 +0200 | [diff] [blame] | 2620 | `${sAMAccountName.toLowerCase}@example.com`. |
| Shawn O. Pearce | b86ae00 | 2009-09-26 16:54:05 -0700 | [diff] [blame] | 2621 | + |
| Shawn O. Pearce | 3ca1dcf | 2009-08-20 08:56:23 -0700 | [diff] [blame] | 2622 | If set, the preferred email address will be prefilled from LDAP, |
| David Pursehouse | 221d4f6 | 2012-06-08 17:38:08 +0900 | [diff] [blame] | 2623 | but users may still be able to register additional email addresses, |
| Shawn O. Pearce | 3ca1dcf | 2009-08-20 08:56:23 -0700 | [diff] [blame] | 2624 | and select a different preferred email address. |
| 2625 | + |
| Shawn O. Pearce | 02c2e80 | 2009-10-29 14:46:03 -0700 | [diff] [blame] | 2626 | Default is `mail`. |
| Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 2627 | |
| Shawn O. Pearce | 59e0922 | 2009-08-19 09:04:49 -0700 | [diff] [blame] | 2628 | [[ldap.accountSshUserName]]ldap.accountSshUserName:: |
| 2629 | + |
| 2630 | _(Optional)_ Name of an attribute on the user account object which |
| 2631 | contains the initial value for the user's SSH username field in |
| 2632 | Gerrit. Typically this is the `uid` property in LDAP, but could |
| 2633 | also be `cn`. Administrators should prefer to match the attribute |
| 2634 | corresponding to the user's workstation username, as this is what |
| 2635 | SSH clients will default to. |
| 2636 | + |
| Shawn O. Pearce | b86ae00 | 2009-09-26 16:54:05 -0700 | [diff] [blame] | 2637 | Attribute values may also be forced to lowercase, or to uppercase in |
| Edwin Kempin | cdb0e00 | 2011-09-08 14:23:30 +0200 | [diff] [blame] | 2638 | an expression. For example, `${sAMAccountName.toLowerCase}` will |
| Shawn O. Pearce | b86ae00 | 2009-09-26 16:54:05 -0700 | [diff] [blame] | 2639 | force the value of sAMAccountName, if defined, to be all lowercase. |
| 2640 | The suffix `.toUpperCase` can be used for the other direction. |
| 2641 | The suffix `.localPart` can be used to split attribute values of |
| 2642 | the form 'user@example.com' and return only the left hand side, for |
| Edwin Kempin | cdb0e00 | 2011-09-08 14:23:30 +0200 | [diff] [blame] | 2643 | example `${userPrincipalName.localPart}` would provide only 'user'. |
| Shawn O. Pearce | b86ae00 | 2009-09-26 16:54:05 -0700 | [diff] [blame] | 2644 | + |
| Shawn O. Pearce | 3ca1dcf | 2009-08-20 08:56:23 -0700 | [diff] [blame] | 2645 | If set, users will be unable to modify their SSH username field, as |
| 2646 | Gerrit will populate it only from the LDAP data. |
| 2647 | + |
| Shawn O. Pearce | 02c2e80 | 2009-10-29 14:46:03 -0700 | [diff] [blame] | 2648 | Default is `uid` for RFC 2307 servers, |
| 2649 | and `${sAMAccountName.toLowerCase}` for Active Directory. |
| Shawn O. Pearce | 59e0922 | 2009-08-19 09:04:49 -0700 | [diff] [blame] | 2650 | |
| Shawn O. Pearce | 7d25f78 | 2009-10-30 08:01:03 -0700 | [diff] [blame] | 2651 | [[ldap.accountMemberField]]ldap.accountMemberField:: |
| Anthony | 93de7db | 2009-10-03 10:01:50 -0400 | [diff] [blame] | 2652 | + |
| 2653 | _(Optional)_ Name of an attribute on the user account object which |
| Shawn O. Pearce | 7d25f78 | 2009-10-30 08:01:03 -0700 | [diff] [blame] | 2654 | contains the groups the user is part of. Typically used for Active |
| 2655 | Directory servers. |
| Anthony | 93de7db | 2009-10-03 10:01:50 -0400 | [diff] [blame] | 2656 | + |
| Shawn O. Pearce | 02c2e80 | 2009-10-29 14:46:03 -0700 | [diff] [blame] | 2657 | Default is unset for RFC 2307 servers (disabled) |
| 2658 | and `memberOf` for Active Directory. |
| Anthony | 93de7db | 2009-10-03 10:01:50 -0400 | [diff] [blame] | 2659 | |
| Saša Živkov | c81291f | 2015-02-04 17:19:20 +0100 | [diff] [blame] | 2660 | [[ldap.fetchMemberOfEagerly]]ldap.fetchMemberOfEagerly:: |
| 2661 | + |
| 2662 | _(Optional)_ Whether to fetch the `memberOf` account attribute on |
| 2663 | login. Setups which use LDAP for user authentication but don't make |
| 2664 | use of the LDAP groups may benefit from setting this option to `false` |
| 2665 | as this will result in a much faster LDAP login. |
| 2666 | + |
| 2667 | Default is unset for RFC 2307 servers (disabled) and `true` for |
| 2668 | Active Directory. |
| 2669 | |
| Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 2670 | [[ldap.groupBase]]ldap.groupBase:: |
| Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 2671 | + |
| 2672 | Root of the tree containing all group objects. This is typically |
| 2673 | of the form `ou=groups,dc=example,dc=com`. |
| David Pursehouse | 82d5563 | 2015-12-14 10:31:27 +0000 | [diff] [blame] | 2674 | + |
| 2675 | This setting may be added multiple times to specify more than |
| 2676 | one root. |
| Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 2677 | |
| Shawn O. Pearce | 304ccdb | 2009-08-25 12:25:27 -0700 | [diff] [blame] | 2678 | [[ldap.groupScope]]ldap.groupScope:: |
| 2679 | + |
| 2680 | Scope of the search performed for group objects. Must be one of: |
| 2681 | + |
| 2682 | * `one`: Search only one level below groupBase, but not recursive |
| 2683 | * `sub` or `subtree`: Search recursively below groupBase |
| 2684 | * `base` or `object`: Search exactly groupBase; probably not desired |
| 2685 | |
| 2686 | + |
| 2687 | Default is `subtree` as many directories have several levels. |
| 2688 | |
| Shawn O. Pearce | 7d25f78 | 2009-10-30 08:01:03 -0700 | [diff] [blame] | 2689 | [[ldap.groupPattern]]ldap.groupPattern:: |
| 2690 | + |
| 2691 | Query pattern used when searching for an LDAP group to connect |
| 2692 | to a Gerrit group. This may be any valid LDAP query expression, |
| 2693 | including the standard `(&...)` and `(|...)` operators. The variable |
| Edwin Kempin | cdb0e00 | 2011-09-08 14:23:30 +0200 | [diff] [blame] | 2694 | `${groupname}` is replaced with the search term supplied by the |
| Shawn O. Pearce | 7d25f78 | 2009-10-30 08:01:03 -0700 | [diff] [blame] | 2695 | group owner. |
| 2696 | + |
| Edwin Kempin | cdb0e00 | 2011-09-08 14:23:30 +0200 | [diff] [blame] | 2697 | Default is `(cn=${groupname})` for RFC 2307, |
| 2698 | and `(&(objectClass=group)(cn=${groupname}))` for Active Directory. |
| Shawn O. Pearce | 7d25f78 | 2009-10-30 08:01:03 -0700 | [diff] [blame] | 2699 | |
| Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 2700 | [[ldap.groupMemberPattern]]ldap.groupMemberPattern:: |
| Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 2701 | + |
| 2702 | Query pattern to use when searching for the groups that a user |
| 2703 | account is currently a member of. This may be any valid LDAP query |
| 2704 | expression, including the standard `(&...)` and `(|...)` operators. |
| 2705 | + |
| David Pursehouse | 42f4204 | 2013-08-01 14:02:25 +0900 | [diff] [blame] | 2706 | If `auth.type` is `HTTP_LDAP` then the variable `${username}` is |
| Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 2707 | replaced with a parameter set to the username that was supplied |
| 2708 | by the HTTP server. Other variables appearing in the pattern, |
| Edwin Kempin | cdb0e00 | 2011-09-08 14:23:30 +0200 | [diff] [blame] | 2709 | such as `${fooBarAttribute}`, are replaced with the value of the |
| Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 2710 | corresponding attribute (in this case, `fooBarAttribute`) as read |
| 2711 | from the user's account object matched under `ldap.accountBase`. |
| Edwin Kempin | cdb0e00 | 2011-09-08 14:23:30 +0200 | [diff] [blame] | 2712 | Attributes such as `${dn}` or `${uidNumber}` may be useful. |
| Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 2713 | + |
| Scott Dial | 5045750 | 2013-08-11 16:52:51 -0400 | [diff] [blame] | 2714 | Default is `(|(memberUid=${username})(gidNumber=${gidNumber}))` for |
| 2715 | RFC 2307, and unset (disabled) for Active Directory. |
| Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 2716 | |
| Auke Schrijnen | 5780913 | 2012-09-26 21:05:39 +0200 | [diff] [blame] | 2717 | [[ldap.groupName]]ldap.groupName:: |
| 2718 | + |
| David Pursehouse | 39489ae | 2012-10-12 13:50:04 +0900 | [diff] [blame] | 2719 | _(Optional)_ Name of the attribute on the group object which contains |
| 2720 | the value to use as the group name in Gerrit. |
| Auke Schrijnen | 5780913 | 2012-09-26 21:05:39 +0200 | [diff] [blame] | 2721 | + |
| David Pursehouse | 39489ae | 2012-10-12 13:50:04 +0900 | [diff] [blame] | 2722 | Typically the attribute name is `cn` for RFC 2307 and Active Directory |
| 2723 | servers. For other servers the attribute name may differ, for example |
| 2724 | `apple-group-realname` on Apple MacOS X Server. |
| Auke Schrijnen | 5780913 | 2012-09-26 21:05:39 +0200 | [diff] [blame] | 2725 | + |
| David Pursehouse | 39489ae | 2012-10-12 13:50:04 +0900 | [diff] [blame] | 2726 | It is also possible to specify a literal string containing a pattern of |
| 2727 | attribute values. For example to create a Gerrit group name consisting of |
| 2728 | LDAP group name and group ID, use the pattern `${cn} (${gidNumber})`. |
| 2729 | + |
| 2730 | Default is `cn`. |
| Auke Schrijnen | 5780913 | 2012-09-26 21:05:39 +0200 | [diff] [blame] | 2731 | |
| Edwin Kempin | b3b0d29 | 2011-09-14 14:17:34 +0200 | [diff] [blame] | 2732 | [[ldap.localUsernameToLowerCase]]ldap.localUsernameToLowerCase:: |
| 2733 | + |
| 2734 | Converts the local username, that is used to login into the Gerrit |
| David Pursehouse | a1d633b | 2014-05-02 17:21:02 +0900 | [diff] [blame] | 2735 | Web UI, to lower case before doing the LDAP authentication. By setting |
| 2736 | this parameter to true, a case insensitive login to the Gerrit Web UI |
| Edwin Kempin | b3b0d29 | 2011-09-14 14:17:34 +0200 | [diff] [blame] | 2737 | can be achieved. |
| 2738 | + |
| 2739 | If set, it must be ensured that the local usernames for all existing |
| 2740 | accounts are converted to lower case, otherwise a user that has a |
| David Pursehouse | 221d4f6 | 2012-06-08 17:38:08 +0900 | [diff] [blame] | 2741 | local username that contains upper case characters will not be able to login |
| Edwin Kempin | b3b0d29 | 2011-09-14 14:17:34 +0200 | [diff] [blame] | 2742 | anymore. The local usernames for the existing accounts can be |
| 2743 | converted to lower case by running the server program |
| 2744 | link:pgm-LocalUsernamesToLowerCase.html[LocalUsernamesToLowerCase]. |
| 2745 | Please be aware that the conversion of the local usernames to lower |
| 2746 | case can't be undone. For newly created accounts the local username |
| 2747 | will be directly stored in lower case. |
| 2748 | + |
| 2749 | By default, unset/false. |
| Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 2750 | |
| Robin Rosenberg | a3baed0 | 2012-10-14 14:09:32 +0200 | [diff] [blame] | 2751 | [[ldap.authentication]]ldap.authentication:: |
| 2752 | + |
| 2753 | Defines how Gerrit authenticates with the server. When set to `GSSAPI` |
| 2754 | Gerrit will use Kerberos. To use kerberos the |
| 2755 | `java.security.auth.login.config` system property must point to a |
| 2756 | login to a JAAS configuration file and, if Java 6 is used, the system |
| 2757 | property `java.security.krb5.conf` must point to the appropriate |
| 2758 | krb5.ini file with references to the KDC. |
| 2759 | |
| 2760 | Typical jaas.conf. |
| 2761 | |
| 2762 | ---- |
| 2763 | KerberosLogin { |
| 2764 | com.sun.security.auth.module.Krb5LoginModule |
| 2765 | required |
| 2766 | useTicketCache=true |
| 2767 | doNotPrompt=true |
| 2768 | renewTGT=true; |
| 2769 | }; |
| 2770 | ---- |
| 2771 | |
| 2772 | See Java documentation on how to create the krb5.ini file. |
| 2773 | |
| 2774 | Note the `renewTGT` property to make sure the TGT does not expire, |
| 2775 | and `useTicketCache` to use the TGT supplied by the operating system. As |
| 2776 | the whole point of using GSSAPI is to have passwordless authentication |
| David Pursehouse | 9246356 | 2013-06-24 10:16:28 +0900 | [diff] [blame] | 2777 | to the LDAP service, this option does not acquire a new TGT on its own. |
| Robin Rosenberg | a3baed0 | 2012-10-14 14:09:32 +0200 | [diff] [blame] | 2778 | |
| 2779 | On Windows servers the registry key `HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\Kerberos\Parameters` |
| 2780 | must have the DWORD value `allowtgtsessionkey` set to 1 and the account must not |
| 2781 | have local administrator privileges. |
| 2782 | |
| Bruce Zu | cd04bbc | 2014-07-25 15:48:09 +0800 | [diff] [blame] | 2783 | [[ldap.useConnectionPooling]]ldap.useConnectionPooling:: |
| 2784 | + |
| 2785 | _(Optional)_ Enable the LDAP connection pooling or not. |
| 2786 | + |
| 2787 | If it is true, the LDAP service provider maintains a pool of (possibly) |
| 2788 | previously used connections and assigns them to a Context instance as |
| 2789 | needed. When a Context instance is done with a connection (closed or |
| 2790 | garbage collected), the connection is returned to the pool for future use. |
| 2791 | + |
| 2792 | For details, see link:http://docs.oracle.com/javase/tutorial/jndi/ldap/pool.html[ |
| 2793 | LDAP connection management (Pool)] and link:http://docs.oracle.com/javase/tutorial/jndi/ldap/config.html[ |
| 2794 | LDAP connection management (Configuration)] |
| 2795 | + |
| 2796 | By default, false. |
| 2797 | |
| 2798 | [[ldap.connectTimeout]]ldap.connectTimeout:: |
| 2799 | + |
| Saša Živkov | 303701a | 2015-01-19 16:24:44 +0100 | [diff] [blame] | 2800 | _(Optional)_ Timeout period for establishment of an LDAP connection. |
| Bruce Zu | cd04bbc | 2014-07-25 15:48:09 +0800 | [diff] [blame] | 2801 | + |
| 2802 | The value is in the usual time-unit format like "1 s", "100 ms", |
| 2803 | etc... |
| 2804 | + |
| 2805 | By default there is no timeout and Gerrit will wait indefinitely. |
| 2806 | |
| Saša Živkov | 5049f51 | 2015-01-19 17:04:43 +0100 | [diff] [blame] | 2807 | [[ldap-connection-pooling]] |
| 2808 | ==== LDAP Connection Pooling |
| 2809 | Once LDAP connection pooling is enabled by setting the link:#ldap.useConnectionPooling[ |
| 2810 | ldap.useConnectionPooling] configuration property to `true`, the connection pool |
| 2811 | can be configured using JVM system properties as explained in the |
| 2812 | link:http://docs.oracle.com/javase/7/docs/technotes/guides/jndi/jndi-ldap.html#POOL[ |
| 2813 | Java SE Documentation]. |
| Bruce Zu | cd04bbc | 2014-07-25 15:48:09 +0800 | [diff] [blame] | 2814 | |
| Saša Živkov | 5049f51 | 2015-01-19 17:04:43 +0100 | [diff] [blame] | 2815 | For standalone Gerrit (running with the embedded Jetty), JVM system properties |
| 2816 | are specified in the link:#container[container section]: |
| Bruce Zu | cd04bbc | 2014-07-25 15:48:09 +0800 | [diff] [blame] | 2817 | |
| Saša Živkov | 5049f51 | 2015-01-19 17:04:43 +0100 | [diff] [blame] | 2818 | ---- |
| 2819 | javaOptions = -Dcom.sun.jndi.ldap.connect.pool.maxsize=20 |
| 2820 | javaOptions = -Dcom.sun.jndi.ldap.connect.pool.prefsize=10 |
| 2821 | javaOptions = -Dcom.sun.jndi.ldap.connect.pool.timeout=300000 |
| 2822 | ---- |
| Bruce Zu | cd04bbc | 2014-07-25 15:48:09 +0800 | [diff] [blame] | 2823 | |
| Saša Živkov | ca7a67e | 2015-12-01 14:25:10 +0100 | [diff] [blame] | 2824 | [[lfs]] |
| 2825 | === Section lfs |
| 2826 | |
| 2827 | [[lfs.plugin]]lfs.plugin:: |
| 2828 | + |
| 2829 | The name of a plugin which serves the LFS protocol on the |
| 2830 | `<project-name>/info/lfs/objects/batch` endpoint. When not configured Gerrit |
| 2831 | will respond with `501 Not Implemented` on LFS protocol requests. |
| 2832 | + |
| 2833 | By default unset. |
| 2834 | |
| Gustaf Lundh | aef9012 | 2015-04-27 16:48:19 +0200 | [diff] [blame] | 2835 | [[log]] |
| 2836 | === Section log |
| 2837 | |
| 2838 | [[log.jsonLogging]]log.jsonLogging:: |
| 2839 | + |
| 2840 | If set to true, enables error logging in JSON format (file name: "logs/error_log.json"). |
| 2841 | + |
| 2842 | Defaults to false. |
| 2843 | |
| 2844 | [[log.textLogging]]log.textLogging:: |
| 2845 | + |
| 2846 | If set to true, enables error logging in regular plain text format. Can only be disabled |
| 2847 | if `jsonLogging` is enabled. |
| 2848 | + |
| 2849 | Defaults to true. |
| 2850 | |
| Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 2851 | [[mimetype]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2852 | === Section mimetype |
| Shawn O. Pearce | 01cb1190 | 2009-07-15 08:19:01 -0700 | [diff] [blame] | 2853 | |
| Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 2854 | [[mimetype.name.safe]]mimetype.<name>.safe:: |
| Shawn O. Pearce | 01cb1190 | 2009-07-15 08:19:01 -0700 | [diff] [blame] | 2855 | + |
| 2856 | If set to true, files with the MIME type `<name>` will be sent as |
| 2857 | direct downloads to the user's browser, rather than being wrapped up |
| 2858 | inside of zipped archives. The type name may be a complete type |
| Jonathan Nieder | 5758f18 | 2015-03-30 11:28:55 -0700 | [diff] [blame] | 2859 | name, e.g. `image/gif`, a generic media type, e.g. `+image/*+`, |
| 2860 | or the wildcard `+*/*+` to match all types. |
| Shawn O. Pearce | 01cb1190 | 2009-07-15 08:19:01 -0700 | [diff] [blame] | 2861 | + |
| 2862 | By default, false for all MIME types. |
| 2863 | |
| 2864 | Common examples: |
| Shawn O. Pearce | 9d342a4 | 2009-12-16 15:49:05 -0800 | [diff] [blame] | 2865 | ---- |
| 2866 | [mimetype "image/*"] |
| 2867 | safe = true |
| 2868 | |
| 2869 | [mimetype "application/pdf"] |
| 2870 | safe = true |
| 2871 | |
| 2872 | [mimetype "application/msword"] |
| 2873 | safe = true |
| 2874 | |
| 2875 | [mimetype "application/vnd.ms-excel"] |
| 2876 | safe = true |
| 2877 | ---- |
| Shawn O. Pearce | 01cb1190 | 2009-07-15 08:19:01 -0700 | [diff] [blame] | 2878 | |
| Michael Ochmann | 6981326 | 2016-01-27 17:53:55 +0100 | [diff] [blame] | 2879 | [[oauth]] |
| 2880 | === Section oauth |
| 2881 | |
| 2882 | OAuth integration is only enabled if `auth.type` is set to `OAUTH`. See |
| 2883 | link:#auth.type[above] for a detailed description of the `auth.type` settings |
| 2884 | and their implications. |
| 2885 | |
| 2886 | By default, contact information, like the full name and email address, |
| 2887 | is retrieved from the selected OAuth provider when a user account is created, |
| 2888 | or when a user requests to reload that information in the settings UI. If |
| 2889 | that is not supported by the OAuth provider, users can be allowed to edit |
| 2890 | their contact information manually. |
| 2891 | |
| 2892 | [[oauth.allowEditFullName]]oauth.allowEditFullName:: |
| 2893 | + |
| 2894 | If true, the full name can be edited in the contact information. |
| 2895 | + |
| 2896 | Default is false. |
| 2897 | |
| 2898 | [[oauth.allowRegisterNewEmail]]oauth.allowRegisterNewEmail:: |
| 2899 | + |
| 2900 | If true, additional email addresses can be registered in the contact |
| 2901 | information. |
| 2902 | + |
| 2903 | Default is false. |
| Shawn O. Pearce | 5f11b29 | 2010-08-05 17:57:35 -0700 | [diff] [blame] | 2904 | |
| Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 2905 | [[pack]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2906 | === Section pack |
| Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 2907 | |
| Shawn O. Pearce | 5f11b29 | 2010-08-05 17:57:35 -0700 | [diff] [blame] | 2908 | Global settings controlling how Gerrit Code Review creates pack |
| 2909 | streams for Git clients running clone, fetch, or pull. Most of these |
| 2910 | variables are per-client request, and thus should be carefully set |
| 2911 | given the expected concurrent request load and available CPU and |
| 2912 | memory resources. |
| 2913 | |
| 2914 | [[pack.deltacompression]]pack.deltacompression:: |
| 2915 | + |
| 2916 | If true, delta compression between objects is enabled. This may |
| 2917 | result in a smaller overall transfer for the client, but requires |
| 2918 | more server memory and CPU time. |
| 2919 | + |
| 2920 | False (off) by default, matching Gerrit Code Review 2.1.4. |
| 2921 | |
| 2922 | [[pack.threads]]pack.threads:: |
| 2923 | + |
| 2924 | Maximum number of threads to use for delta compression (if enabled). |
| 2925 | This is per-client request. If set to 0 then the number of CPUs is |
| 2926 | auto-detected and one thread per CPU is used, per client request. |
| 2927 | + |
| 2928 | By default, 1. |
| 2929 | |
| 2930 | |
| Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 2931 | [[plugins]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2932 | === Section plugins |
| Shawn O. Pearce | 5ad16ea | 2012-05-09 14:24:25 -0700 | [diff] [blame] | 2933 | |
| 2934 | [[plugins.checkFrequency]]plugins.checkFrequency:: |
| 2935 | + |
| 2936 | How often plugins should be examined for new plugins to load, removed |
| 2937 | plugins to be unloaded, or updated plugins to be reloaded. Values can |
| 2938 | be specified using standard time unit abbreviations ('ms', 'sec', |
| 2939 | 'min', etc.). |
| 2940 | + |
| 2941 | If set to 0, automatic plugin reloading is disabled. Administrators |
| Christian Aistleitner | 8ce1a4e | 2015-06-05 01:54:15 +0200 | [diff] [blame] | 2942 | may force reloading with link:cmd-plugin-reload.html[gerrit plugin reload]. |
| Shawn O. Pearce | 5ad16ea | 2012-05-09 14:24:25 -0700 | [diff] [blame] | 2943 | + |
| 2944 | Default is 1 minute. |
| 2945 | |
| Shawn Pearce | fd03350 | 2014-02-14 16:42:35 -0800 | [diff] [blame] | 2946 | [[plugins.allowRemoteAdmin]]plugins.allowRemoteAdmin:: |
| 2947 | + |
| 2948 | Enable remote installation, enable and disable of plugins over HTTP |
| 2949 | and SSH. If set to true Administrators can install new plugins |
| 2950 | remotely, or disable existing plugins. Defaults to false. |
| 2951 | |
| Dariusz Luksza | 98f2352 | 2015-03-11 11:41:41 +0100 | [diff] [blame] | 2952 | [[plugins.jsLoadTimeout]]plugins.jsLoadTimeout:: |
| 2953 | + |
| 2954 | Set the timeout value for loading JavaScript plugins in Gerrit UI. |
| 2955 | Values can be specified using standard time unit abbreviations ('ms', |
| 2956 | 'sec', 'min', etc.). |
| 2957 | + |
| 2958 | Default is 5 seconds. Negative values will be converted to 0. |
| Shawn O. Pearce | 5ad16ea | 2012-05-09 14:24:25 -0700 | [diff] [blame] | 2959 | |
| Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 2960 | [[receive]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2961 | === Section receive |
| Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 2962 | |
| Dave Borowitz | ff24389 | 2015-08-31 15:35:28 -0400 | [diff] [blame] | 2963 | This section is used to configure behavior of the 'receive-pack' |
| 2964 | handler, which responds to 'git push' requests. |
| lincoln | 2be1160 | 2010-07-05 10:53:25 -0300 | [diff] [blame] | 2965 | |
| Dave Borowitz | ff24389 | 2015-08-31 15:35:28 -0400 | [diff] [blame] | 2966 | [[receive.allowGroup]]receive.allowGroup:: |
| Dave Borowitz | 532342bf | 2015-06-18 20:28:22 -0400 | [diff] [blame] | 2967 | + |
| Dave Borowitz | ff24389 | 2015-08-31 15:35:28 -0400 | [diff] [blame] | 2968 | Name of the groups of users that are allowed to execute |
| 2969 | 'receive-pack' on the server. One or more groups can be set. |
| Dave Borowitz | 532342bf | 2015-06-18 20:28:22 -0400 | [diff] [blame] | 2970 | + |
| Dave Borowitz | ff24389 | 2015-08-31 15:35:28 -0400 | [diff] [blame] | 2971 | If no groups are added, any user will be allowed to execute |
| 2972 | 'receive-pack' on the server. |
| Dave Borowitz | 532342bf | 2015-06-18 20:28:22 -0400 | [diff] [blame] | 2973 | |
| 2974 | [[receive.certNonceSeed]]receive.certNonceSeed:: |
| 2975 | + |
| 2976 | If set to a non-empty value and server-side signed push validation is |
| 2977 | link:#receive.enableSignedPush[enabled], use this value as the seed to |
| 2978 | the HMAC SHA-1 nonce generator. If unset, a 64-byte random seed will be |
| 2979 | generated at server startup. |
| 2980 | + |
| 2981 | As this is used as the seed of a cryptographic algorithm, it is |
| 2982 | recommended to be placed in link:#secure-config[`secure.config`]. |
| 2983 | + |
| 2984 | Defaults to unset. |
| 2985 | |
| 2986 | [[receive.certNonceSlop]]receive.certNonceSlop:: |
| 2987 | + |
| 2988 | When validating the nonce passed as part of the signed push protocol, |
| 2989 | accept valid nonces up to this many seconds old. This allows |
| 2990 | certificate verification to work over HTTP where there is a lag between |
| 2991 | the HTTP response providing the nonce to sign and the next request |
| 2992 | containing the signed nonce. This can be significant on large |
| 2993 | repositories, since the lag also includes the time to count objects on |
| 2994 | the client. |
| 2995 | + |
| 2996 | Default is 5 minutes. |
| 2997 | |
| Dave Borowitz | ff24389 | 2015-08-31 15:35:28 -0400 | [diff] [blame] | 2998 | [[receive.changeUpdateThreads]]receive.changeUpdateThreads:: |
| 2999 | + |
| 3000 | Number of threads to perform change creation or patch set updates |
| 3001 | concurrently. Each thread uses its own database connection from |
| 3002 | the database connection pool, and if all threads are busy then |
| 3003 | main receive thread will also perform a change creation or patch |
| 3004 | set update. |
| 3005 | + |
| 3006 | Defaults to 1, using only the main receive thread. This feature is for |
| 3007 | databases with very high latency that can benefit from concurrent |
| 3008 | operations when multiple changes are impacted at once. |
| 3009 | |
| Shawn Pearce | 5cb31bf | 2013-02-27 16:20:26 -0800 | [diff] [blame] | 3010 | [[receive.checkMagicRefs]]receive.checkMagicRefs:: |
| 3011 | + |
| 3012 | If true, Gerrit will verify the destination repository has |
| 3013 | no references under the magic 'refs/drafts', 'refs/for', or |
| 3014 | 'refs/publish' branch namespaces. Names under these locations |
| 3015 | confuse clients when trying to upload code reviews so Gerrit |
| 3016 | requires them to be empty. |
| 3017 | + |
| 3018 | If false Gerrit skips the sanity check and assumes administrators |
| 3019 | have ensured the repository does not contain any magic references. |
| 3020 | Setting to false to skip the check can decrease latency during push. |
| 3021 | + |
| 3022 | Default is true. |
| 3023 | |
| Gustaf Lundh | 9062fd6 | 2013-02-14 17:23:11 +0100 | [diff] [blame] | 3024 | [[receive.checkReferencedObjectsAreReachable]]receive.checkReferencedObjectsAreReachable:: |
| 3025 | + |
| 3026 | If set to true, Gerrit will validate that all referenced objects that |
| 3027 | are not included in the received pack are reachable by the user. |
| 3028 | + |
| 3029 | Carrying out this check on gits with many refs and commits can be a |
| 3030 | very CPU-heavy operation. For non public Gerrit-servers this check may |
| 3031 | be overkill. |
| 3032 | + |
| 3033 | Only disable this check if you trust the clients not to forge SHA1 |
| 3034 | references to access commits intended to be hidden from the user. |
| 3035 | + |
| 3036 | Default is true. |
| 3037 | |
| Dave Borowitz | ff24389 | 2015-08-31 15:35:28 -0400 | [diff] [blame] | 3038 | [[receive.enableSignedPush]]receive.enableSignedPush:: |
| lincoln | 2be1160 | 2010-07-05 10:53:25 -0300 | [diff] [blame] | 3039 | + |
| Dave Borowitz | ff24389 | 2015-08-31 15:35:28 -0400 | [diff] [blame] | 3040 | If true, server-side signed push validation is enabled. |
| lincoln | 2be1160 | 2010-07-05 10:53:25 -0300 | [diff] [blame] | 3041 | + |
| Dave Borowitz | ff24389 | 2015-08-31 15:35:28 -0400 | [diff] [blame] | 3042 | When a client pushes with `git push --signed`, this ensures that the |
| 3043 | push certificate is valid and signed with a valid public key stored in |
| David Pursehouse | 6117a47 | 2016-07-26 08:02:49 +0000 | [diff] [blame] | 3044 | the `refs/meta/gpg-keys` branch of `All-Users`. |
| Dave Borowitz | ff24389 | 2015-08-31 15:35:28 -0400 | [diff] [blame] | 3045 | + |
| 3046 | Defaults to false. |
| 3047 | |
| 3048 | [[receive.maxBatchChanges]]receive.maxBatchChanges:: |
| 3049 | + |
| 3050 | The maximum number of changes that Gerrit allows to be pushed |
| 3051 | in a batch for review. When this number is exceeded Gerrit rejects |
| 3052 | the push with an error message. |
| 3053 | + |
| 3054 | May be overridden for certain groups by specifying a limit in the |
| 3055 | link:access-control.html#capability_batchChangesLimit['Batch Changes Limit'] |
| 3056 | global capability. |
| 3057 | + |
| 3058 | This setting can be used to prevent users from uploading large |
| 3059 | number of changes for review by mistake. |
| 3060 | + |
| 3061 | Default is zero, no limit. |
| lincoln | 2be1160 | 2010-07-05 10:53:25 -0300 | [diff] [blame] | 3062 | |
| Sasa Zivkov | 59d89c3 | 2011-11-18 15:32:35 +0100 | [diff] [blame] | 3063 | [[receive.maxObjectSizeLimit]]receive.maxObjectSizeLimit:: |
| 3064 | + |
| 3065 | Maximum allowed Git object size that 'receive-pack' will accept. |
| 3066 | If an object is larger than the given size the pack-parsing will abort |
| 3067 | and the push operation will fail. If set to zero then there is no |
| 3068 | limit. |
| 3069 | + |
| David Pursehouse | 221d4f6 | 2012-06-08 17:38:08 +0900 | [diff] [blame] | 3070 | Gerrit administrators can use this setting to prevent developers |
| Sasa Zivkov | 59d89c3 | 2011-11-18 15:32:35 +0100 | [diff] [blame] | 3071 | from pushing objects which are too large to Gerrit. |
| 3072 | + |
| Fredrik Luthander | a3cf354 | 2012-07-04 16:55:35 -0700 | [diff] [blame] | 3073 | This setting can also be set in the `project.config` |
| 3074 | link:config-project-config.html[receive.maxObjectSizeLimit] in order |
| 3075 | to further reduce the global setting. The project specific setting is |
| 3076 | only honored when it further reduces the global limit. |
| Sasa Zivkov | 5a708a8 | 2013-06-28 17:07:55 +0200 | [diff] [blame] | 3077 | + |
| Sasa Zivkov | 59d89c3 | 2011-11-18 15:32:35 +0100 | [diff] [blame] | 3078 | Default is zero. |
| 3079 | + |
| 3080 | Common unit suffixes of 'k', 'm', or 'g' are supported. |
| 3081 | |
| Dave Borowitz | 1bb4949 | 2015-08-31 15:36:59 -0400 | [diff] [blame] | 3082 | [[receive.maxTrustDepth]]receive.maxTrustDepth:: |
| 3083 | + |
| 3084 | If signed push validation is link:#receive.enableSignedPush[enabled], |
| 3085 | set to the maximum depth to search when checking if a key is |
| 3086 | link:#receive.trustedKey[trusted]. |
| 3087 | + |
| 3088 | Default is 0, meaning only explicitly trusted keys are allowed. |
| 3089 | |
| Dave Borowitz | 234734a | 2012-03-01 14:22:29 -0800 | [diff] [blame] | 3090 | [[receive.threadPoolSize]]receive.threadPoolSize:: |
| 3091 | + |
| 3092 | Maximum size of the thread pool in which the change data in received packs is |
| 3093 | processed. |
| 3094 | + |
| 3095 | Defaults to the number of available CPUs according to the Java runtime. |
| 3096 | |
| Dave Borowitz | 1c40136 | 2012-03-02 17:39:17 -0800 | [diff] [blame] | 3097 | [[receive.timeout]]receive.timeout:: |
| 3098 | + |
| Shawn O. Pearce | 00dd12d | 2012-03-12 15:52:11 -0700 | [diff] [blame] | 3099 | Overall timeout on the time taken to process the change data in |
| 3100 | received packs. Only includes the time processing Gerrit changes |
| 3101 | and updating references, not the time to index the pack. Values can |
| 3102 | be specified using standard time unit abbreviations ('ms', 'sec', |
| 3103 | 'min', etc.). |
| Dave Borowitz | 1c40136 | 2012-03-02 17:39:17 -0800 | [diff] [blame] | 3104 | + |
| Dariusz Luksza | de482b0 | 2015-11-09 18:25:04 +0100 | [diff] [blame] | 3105 | Default is 4 minutes. If no unit is specified, milliseconds |
| Shawn O. Pearce | 00dd12d | 2012-03-12 15:52:11 -0700 | [diff] [blame] | 3106 | is assumed. |
| Dave Borowitz | 1c40136 | 2012-03-02 17:39:17 -0800 | [diff] [blame] | 3107 | |
| Dave Borowitz | 1bb4949 | 2015-08-31 15:36:59 -0400 | [diff] [blame] | 3108 | [[receive.trustedKey]]receive.trustedKey:: |
| 3109 | + |
| 3110 | List of GPG key fingerprints that should be considered trust roots by |
| 3111 | the server when signed push validation is |
| 3112 | link:#receive.enableSignedPush[enabled]. A key is trusted by the server |
| 3113 | if it is either in this list, or a path of trust signatures leads from |
| 3114 | the key to a configured trust root. The maximum length of the path is |
| 3115 | determined by link:#receive.maxTrustDepth[`receive.maxTrustDepth`]. |
| 3116 | + |
| 3117 | Key fingerprints can be displayed with `gpg --list-keys |
| 3118 | --with-fingerprint`. |
| 3119 | + |
| 3120 | Trust signatures can be added to a key using the `tsign` command to |
| 3121 | link:https://www.gnupg.org/documentation/manuals/gnupg/OpenPGP-Key-Management.html[ |
| 3122 | `gpg --edit-key`], after which the signed key should be re-uploaded. |
| 3123 | + |
| 3124 | If no keys are specified, web-of-trust checks are disabled. This is the |
| 3125 | default behavior. |
| 3126 | |
| lincoln | 2be1160 | 2010-07-05 10:53:25 -0300 | [diff] [blame] | 3127 | |
| Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 3128 | [[repository]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3129 | === Section repository |
| Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 3130 | |
| Hugo Josefson | 072b470 | 2010-04-21 19:27:11 +0200 | [diff] [blame] | 3131 | Repositories in this sense are the same as projects. |
| 3132 | |
| Shawn O. Pearce | 897d921 | 2011-06-16 16:59:59 -0700 | [diff] [blame] | 3133 | In the following example configuration `Registered Users` is set |
| 3134 | to be the default owner of new projects. |
| Hugo Josefson | 072b470 | 2010-04-21 19:27:11 +0200 | [diff] [blame] | 3135 | |
| 3136 | ---- |
| 3137 | [repository "*"] |
| Hugo Josefson | 072b470 | 2010-04-21 19:27:11 +0200 | [diff] [blame] | 3138 | ownerGroup = Registered Users |
| 3139 | ---- |
| 3140 | |
| Hugo Arès | 7d2b942 | 2014-11-25 15:33:42 -0500 | [diff] [blame] | 3141 | The only matching patterns supported are exact match or wildcard matching which |
| 3142 | can be specified by ending the name with a `*`. If a project matches more than one |
| 3143 | repository configuration, then the configuration from the more precise match |
| 3144 | will be used. In the following example, the default submit type for a project |
| 3145 | named `project/plugins/a` would be `CHERRY_PICK`. |
| 3146 | |
| 3147 | ---- |
| 3148 | [repository "project/*"] |
| 3149 | defaultSubmitType = MERGE_IF_NECESSARY |
| 3150 | [repository "project/plugins/*"] |
| 3151 | defaultSubmitType = CHERRY_PICK |
| 3152 | ---- |
| 3153 | |
| Michael Ochmann | 8129ece | 2016-07-08 11:25:25 +0200 | [diff] [blame] | 3154 | [NOTE] |
| 3155 | All properties are used from the matching repository configuration. In |
| Hugo Arès | 7d2b942 | 2014-11-25 15:33:42 -0500 | [diff] [blame] | 3156 | the previous example, all properties will be used from `project/plugins/\*` |
| 3157 | section and no properties will be inherited nor overridden from `project/*`. |
| Hugo Josefson | 072b470 | 2010-04-21 19:27:11 +0200 | [diff] [blame] | 3158 | |
| Hugo Arès | 218bb3b | 2015-04-22 15:05:14 -0400 | [diff] [blame] | 3159 | [[repository.name.basePath]]repository.<name>.basePath:: |
| 3160 | + |
| 3161 | Alternate to <<gerrit.basePath,gerrit.basePath>>. The repository will be created |
| 3162 | and used from this location instead: ${alternateBasePath}/${projectName}.git. |
| 3163 | + |
| 3164 | If configuring the basePath for an existing project in gerrit, make sure to stop |
| 3165 | gerrit, move the repository in the alternate basePath, configure basePath for |
| 3166 | this repository and then start Gerrit. |
| 3167 | + |
| 3168 | Path must be absolute. |
| 3169 | |
| Edwin Kempin | a79ea55 | 2013-11-19 11:24:37 +0100 | [diff] [blame] | 3170 | [[repository.name.defaultSubmitType]]repository.<name>.defaultSubmitType:: |
| 3171 | + |
| 3172 | The default submit type for newly created projects. Supported values |
| 3173 | are `MERGE_IF_NECESSARY`, `FAST_FORWARD_ONLY`, `REBASE_IF_NECESSARY`, |
| 3174 | `MERGE_ALWAYS` and `CHERRY_PICK`. |
| 3175 | + |
| 3176 | By default, `MERGE_IF_NECESSARY`. |
| 3177 | |
| Hugo Josefson | 072b470 | 2010-04-21 19:27:11 +0200 | [diff] [blame] | 3178 | [[repository.name.ownerGroup]]repository.<name>.ownerGroup:: |
| 3179 | + |
| 3180 | A name of a group which exists in the database. Zero, one or many |
| 3181 | groups are allowed. Each on its own line. Groups which don't exist |
| 3182 | in the database are ignored. |
| Hugo Josefson | 072b470 | 2010-04-21 19:27:11 +0200 | [diff] [blame] | 3183 | |
| Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 3184 | [[rules]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3185 | === Section rules |
| Shawn O. Pearce | 94860ee | 2011-09-29 13:11:08 -0700 | [diff] [blame] | 3186 | |
| 3187 | [[rules.enable]]rules.enable:: |
| 3188 | + |
| Matt Baker | 8ce12fc | 2013-11-26 21:43:12 -0700 | [diff] [blame] | 3189 | If true, Gerrit will load and execute 'rules.pl' files in each |
| Shawn O. Pearce | 94860ee | 2011-09-29 13:11:08 -0700 | [diff] [blame] | 3190 | project's refs/meta/config branch, if present. When set to false, |
| 3191 | only the default internal rules will be used. |
| 3192 | + |
| 3193 | Default is true, to execute project specific rules. |
| 3194 | |
| Shawn Pearce | ed001d7 | 2014-12-17 14:25:55 -0800 | [diff] [blame] | 3195 | [[rules.reductionLimit]]rules.reductionLimit:: |
| 3196 | + |
| 3197 | Maximum number of Prolog reductions that can be performed when |
| 3198 | evaluating rules for a single change. Each function call made |
| 3199 | in user rule code, internal Gerrit Prolog code, or the Prolog |
| 3200 | interpreter counts against this limit. |
| 3201 | + |
| 3202 | Sites using very complex rules that need many reductions should |
| 3203 | compile Prolog to Java bytecode with link:pgm-rulec.html[rulec]. |
| 3204 | This eliminates the dynamic Prolog interpreter from charging its |
| 3205 | own reductions against the limit, enabling more logic to execute |
| 3206 | within the same bounds. |
| 3207 | + |
| 3208 | A reductionLimit of 0 is nearly infinite, implemented by setting |
| 3209 | the internal limit to 2^31-1. |
| 3210 | + |
| 3211 | Default is 100,000 reductions (about 14 ms on Intel Core i7 CPU). |
| 3212 | |
| 3213 | [[rules.compileReductionLimit]]rules.compileReductionLimit:: |
| 3214 | + |
| 3215 | Maximum number of Prolog reductions that can be performed when |
| 3216 | compiling source code to internal Prolog machine code. |
| 3217 | + |
| 3218 | Default is 10x reductionLimit (1,000,000). |
| 3219 | |
| Shawn Pearce | a2b9852 | 2015-11-21 09:47:32 -0800 | [diff] [blame] | 3220 | [[rules.maxSourceBytes]]rules.maxSourceBytes:: |
| 3221 | + |
| 3222 | Maximum input size (in bytes) of a Prolog rules.pl file. Larger |
| 3223 | source files may need a larger rules.compileReductionLimit. Consider |
| 3224 | using link:pgm-rulec.html[rulec] to precompile larger rule files. |
| 3225 | + |
| 3226 | A size of 0 bytes disables rules, same as rules.enable = false. |
| 3227 | + |
| David Pursehouse | 0c1dadf | 2015-11-24 09:14:21 +0000 | [diff] [blame] | 3228 | Common unit suffixes of 'k', 'm', or 'g' are supported. |
| 3229 | + |
| Shawn Pearce | a2b9852 | 2015-11-21 09:47:32 -0800 | [diff] [blame] | 3230 | Default is 128 KiB. |
| 3231 | |
| 3232 | [[rules.maxPrologDatabaseSize]]rules.maxPrologDatabaseSize:: |
| 3233 | + |
| 3234 | Number of predicate clauses allowed to be defined in the Prolog |
| 3235 | database by project rules. Very complex rules may need more than the |
| 3236 | default 256 limit, but cost more memory and may need more time to |
| 3237 | evaluate. Consider using link:pgm-rulec.html[rulec] to precompile |
| 3238 | larger rule files. |
| 3239 | + |
| 3240 | Default is 256. |
| 3241 | |
| David Pursehouse | 511a35b | 2014-04-04 10:27:13 +0900 | [diff] [blame] | 3242 | [[execution]] |
| 3243 | === Section execution |
| Bruce Zu | a7e3431 | 2014-04-01 17:35:41 +0800 | [diff] [blame] | 3244 | |
| 3245 | [[execution.defaultThreadPoolSize]]execution.defaultThreadPoolSize:: |
| 3246 | + |
| 3247 | The default size of the background execution thread pool in |
| 3248 | which miscellaneous tasks are handled. |
| 3249 | + |
| 3250 | Default is 1. |
| 3251 | |
| Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 3252 | [[sendemail]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3253 | === Section sendemail |
| Shawn O. Pearce | b0572c6 | 2009-06-01 14:18:22 -0700 | [diff] [blame] | 3254 | |
| Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 3255 | [[sendemail.enable]]sendemail.enable:: |
| Shawn O. Pearce | 2e4573b | 2009-06-02 09:09:50 -0700 | [diff] [blame] | 3256 | + |
| 3257 | If false Gerrit will not send email messages, for any reason, |
| 3258 | and all other properties of section sendemail are ignored. |
| 3259 | + |
| 3260 | By default, true, allowing notifications to be sent. |
| 3261 | |
| Bruce Zu | a7e3431 | 2014-04-01 17:35:41 +0800 | [diff] [blame] | 3262 | [[sendemail.connectTimeout]]sendemail.connectTimeout:: |
| 3263 | + |
| 3264 | The connection timeout of opening a socket connected to a |
| 3265 | remote SMTP server. |
| 3266 | + |
| 3267 | Values can be specified using standard time unit abbreviations |
| 3268 | ('ms', 'sec', 'min', etc.). |
| 3269 | If no unit is specified, milliseconds is assumed. |
| 3270 | + |
| 3271 | Default is 0. A timeout of zero is interpreted as an infinite |
| 3272 | timeout. The connection will then block until established or |
| 3273 | an error occurs. |
| 3274 | |
| 3275 | [[sendemail.threadPoolSize]]sendemail.threadPoolSize:: |
| 3276 | + |
| 3277 | Maximum size of thread pool in which the review comments |
| 3278 | notifications are sent out asynchronously. |
| 3279 | + |
| 3280 | By default, 1. |
| 3281 | |
| Shawn O. Pearce | 5c31bd7 | 2009-09-10 18:13:33 -0700 | [diff] [blame] | 3282 | [[sendemail.from]]sendemail.from:: |
| 3283 | + |
| 3284 | Designates what name and address Gerrit will place in the From |
| 3285 | field of any generated email messages. The supported values are: |
| 3286 | + |
| 3287 | * `USER` |
| 3288 | + |
| 3289 | Gerrit will set the From header to use the current user's |
| David Pursehouse | 9246356 | 2013-06-24 10:16:28 +0900 | [diff] [blame] | 3290 | Full Name and Preferred Email. This may cause messages to be |
| Shawn O. Pearce | 5c31bd7 | 2009-09-10 18:13:33 -0700 | [diff] [blame] | 3291 | classified as spam if the user's domain has SPF or DKIM enabled |
| 3292 | and <<sendemail.smtpServer,sendemail.smtpServer>> is not a trusted |
| 3293 | relay for that domain. |
| 3294 | + |
| 3295 | * `MIXED` |
| 3296 | + |
| Edwin Kempin | cdb0e00 | 2011-09-08 14:23:30 +0200 | [diff] [blame] | 3297 | Shorthand for `${user} (Code Review) <review@example.com>` where |
| Shawn O. Pearce | 5c31bd7 | 2009-09-10 18:13:33 -0700 | [diff] [blame] | 3298 | `review@example.com` is the same as <<user.email,user.email>>. |
| 3299 | See below for a description of how the replacement is handled. |
| 3300 | + |
| 3301 | * `SERVER` |
| 3302 | + |
| 3303 | Gerrit will set the From header to the same name and address |
| 3304 | it records in any commits Gerrit creates. This is set by |
| 3305 | <<user.name,user.name>> and <<user.email,user.email>>, or guessed |
| 3306 | from the local operating system. |
| 3307 | + |
| Edwin Kempin | ebfbbac | 2015-07-01 16:02:39 +0200 | [diff] [blame] | 3308 | * `Code Review <review@example.com>` |
| Shawn O. Pearce | 5c31bd7 | 2009-09-10 18:13:33 -0700 | [diff] [blame] | 3309 | + |
| 3310 | If set to a name and email address in brackets, Gerrit will use |
| 3311 | this name and email address for any messages, overriding the name |
| 3312 | that may have been selected for commits by user.name and user.email. |
| Edwin Kempin | cdb0e00 | 2011-09-08 14:23:30 +0200 | [diff] [blame] | 3313 | Optionally, the name portion may contain the placeholder `${user}`, |
| Shawn O. Pearce | 5c31bd7 | 2009-09-10 18:13:33 -0700 | [diff] [blame] | 3314 | which is replaced by the Full Name of the current user. |
| 3315 | |
| 3316 | + |
| 3317 | By default, MIXED. |
| 3318 | |
| Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 3319 | [[sendemail.smtpServer]]sendemail.smtpServer:: |
| Shawn O. Pearce | b0572c6 | 2009-06-01 14:18:22 -0700 | [diff] [blame] | 3320 | + |
| 3321 | Hostname (or IP address) of a SMTP server that will relay |
| 3322 | messages generated by Gerrit to end users. |
| 3323 | + |
| 3324 | By default, 127.0.0.1 (aka localhost). |
| 3325 | |
| Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 3326 | [[sendemail.smtpServerPort]]sendemail.smtpServerPort:: |
| Shawn O. Pearce | b0572c6 | 2009-06-01 14:18:22 -0700 | [diff] [blame] | 3327 | + |
| 3328 | Port number of the SMTP server in sendemail.smtpserver. |
| 3329 | + |
| Shawn O. Pearce | 6e9a83f | 2009-11-02 10:30:48 -0800 | [diff] [blame] | 3330 | By default, 25, or 465 if smtpEncryption is 'ssl'. |
| 3331 | |
| 3332 | [[sendemail.smtpEncryption]]sendemail.smtpEncryption:: |
| 3333 | + |
| 3334 | Specify the encryption to use, either 'ssl' or 'tls'. |
| 3335 | + |
| 3336 | By default, 'none', indicating no encryption is used. |
| 3337 | |
| 3338 | [[sendemail.sslVerify]]sendemail.sslVerify:: |
| 3339 | + |
| 3340 | If false and sendemail.smtpEncryption is 'ssl' or 'tls', Gerrit |
| 3341 | will not verify the server certificate when it connects to send |
| 3342 | an email message. |
| 3343 | + |
| 3344 | By default, true, requiring the certificate to be verified. |
| Shawn O. Pearce | b0572c6 | 2009-06-01 14:18:22 -0700 | [diff] [blame] | 3345 | |
| Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 3346 | [[sendemail.smtpUser]]sendemail.smtpUser:: |
| Shawn O. Pearce | b0572c6 | 2009-06-01 14:18:22 -0700 | [diff] [blame] | 3347 | + |
| 3348 | User name to authenticate with, if required for relay. |
| 3349 | |
| Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 3350 | [[sendemail.smtpPass]]sendemail.smtpPass:: |
| Shawn O. Pearce | b0572c6 | 2009-06-01 14:18:22 -0700 | [diff] [blame] | 3351 | + |
| 3352 | Password for the account named by sendemail.smtpUser. |
| 3353 | |
| Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 3354 | [[sendemail.allowrcpt]]sendemail.allowrcpt:: |
| Shawn O. Pearce | 219a8ee | 2009-06-01 18:13:57 -0700 | [diff] [blame] | 3355 | + |
| 3356 | If present, each value adds one entry to the whitelist of email |
| 3357 | addresses that Gerrit can send email to. If set to a complete |
| 3358 | email address, that one address is added to the white list. |
| 3359 | If set to a domain name, any address at that domain can receive |
| 3360 | email from Gerrit. |
| 3361 | + |
| 3362 | By default, unset, permitting delivery to any email address. |
| 3363 | |
| Shawn O. Pearce | 02aacbc | 2012-06-12 13:44:22 -0700 | [diff] [blame] | 3364 | [[sendemail.includeDiff]]sendemail.includeDiff:: |
| 3365 | + |
| Bruce Zu | eb00ff3 | 2012-11-27 17:38:10 +0800 | [diff] [blame] | 3366 | If true, new change emails and merged change emails from Gerrit |
| 3367 | will include the complete unified diff of the change. |
| 3368 | Variable maxmimumDiffSize places an upper limit on how large the |
| 3369 | email can get when this option is enabled. |
| Shawn O. Pearce | 02aacbc | 2012-06-12 13:44:22 -0700 | [diff] [blame] | 3370 | + |
| 3371 | By default, false. |
| 3372 | |
| Shawn O. Pearce | 28a950b | 2012-06-12 14:36:34 -0700 | [diff] [blame] | 3373 | [[sendemail.maximumDiffSize]]sendemail.maximumDiffSize:: |
| 3374 | + |
| 3375 | Largest size of unified diff output to include in an email. When |
| 3376 | the diff exceeds this size the file paths will be listed instead. |
| 3377 | Standard byte unit suffixes are supported. |
| 3378 | + |
| 3379 | By default, 256 KiB. |
| 3380 | |
| Alex Blewitt | 9cca740 | 2011-02-11 01:39:30 +0000 | [diff] [blame] | 3381 | [[sendemail.importance]]sendemail.importance:: |
| 3382 | + |
| 3383 | If present, emails sent from Gerrit will have the given level |
| 3384 | of importance. Valid values include 'high' and 'low', which |
| 3385 | email clients will render in different ways. |
| 3386 | + |
| 3387 | By default, unset, so no Importance header is generated. |
| 3388 | |
| 3389 | [[sendemail.expiryDays]]sendemail.expiryDays:: |
| 3390 | + |
| 3391 | If present, emails sent from Gerrit will expire after the given |
| 3392 | number of days. This will add the Expiry-Date header and |
| 3393 | email clients may expire or expunge mails whose Expiry-Date |
| 3394 | header is in the past. This should be a positive non-zero |
| 3395 | number indicating how many days in the future the mails |
| 3396 | should expire. |
| 3397 | + |
| 3398 | By default, unset, so no Expiry-Date header is generated. |
| 3399 | |
| Shawn O. Pearce | dba9764 | 2011-09-07 20:12:31 -0700 | [diff] [blame] | 3400 | |
| Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 3401 | [[site]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3402 | === Section site |
| Shawn O. Pearce | dba9764 | 2011-09-07 20:12:31 -0700 | [diff] [blame] | 3403 | |
| Shawn O. Pearce | dba9764 | 2011-09-07 20:12:31 -0700 | [diff] [blame] | 3404 | [[site.refreshHeaderFooter]]site.refreshHeaderFooter:: |
| 3405 | + |
| 3406 | If true the server checks the site header, footer and CSS files for |
| 3407 | updated versions. If false, a server restart is required to change |
| 3408 | any of these resources. Default is true, allowing automatic reloads. |
| 3409 | |
| Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 3410 | [[ssh-alias]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3411 | === Section ssh-alias |
| Shawn O. Pearce | 521380a | 2012-05-11 14:57:56 -0700 | [diff] [blame] | 3412 | |
| 3413 | Variables in section ssh-alias permit the site administrator to alias |
| 3414 | another command from Gerrit or a plugin into the `gerrit` command |
| 3415 | namespace. To alias `replication start` to `gerrit replicate`: |
| 3416 | |
| 3417 | ---- |
| 3418 | [ssh-alias] |
| 3419 | replicate = replication start |
| 3420 | ---- |
| Shawn O. Pearce | dba9764 | 2011-09-07 20:12:31 -0700 | [diff] [blame] | 3421 | |
| Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 3422 | [[sshd]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3423 | === Section sshd |
| Shawn O. Pearce | 9410f2c | 2009-05-14 10:26:47 -0700 | [diff] [blame] | 3424 | |
| Gustaf Lundh | d60e90f | 2015-08-03 16:18:33 +0200 | [diff] [blame] | 3425 | [[sshd.enableCompression]]sshd.enableCompression:: |
| 3426 | + |
| 3427 | In the general case, we want to disable transparent compression, since |
| 3428 | the majority of our data transfer is highly compressed Git pack files |
| 3429 | and we cannot make them any smaller than they already are. |
| 3430 | + |
| 3431 | However, if there are CPU in abundance and the server is reachable |
| 3432 | through slow networks, gits with huge amount of refs can benefit from |
| 3433 | SSH-compression since git does not compress the ref announcement during |
| 3434 | handshake. |
| 3435 | + |
| 3436 | Compression can be especially useful when Gerrit slaves are being used |
| 3437 | for the larger clones and fetches and the master server mostly takes |
| 3438 | small receive-packs. |
| 3439 | + |
| 3440 | By default, `false`. |
| 3441 | |
| David Ostrovsky | e2921b6 | 2015-03-04 22:36:10 +0100 | [diff] [blame] | 3442 | [[sshd.backend]]sshd.backend:: |
| 3443 | + |
| 3444 | Starting from version 0.9.0 Apache SSHD project added support for NIO2 |
| 3445 | IoSession. To use the new NIO2 session the `backend` option must be set |
| Marco Miller | 4eba49e | 2016-04-06 08:23:01 -0400 | [diff] [blame] | 3446 | to `NIO2`. Otherwise, this option must be set to `MINA`. |
| David Ostrovsky | e2921b6 | 2015-03-04 22:36:10 +0100 | [diff] [blame] | 3447 | + |
| Luca Milanesio | fc1ed9c | 2016-03-01 18:28:36 +0000 | [diff] [blame] | 3448 | By default, `NIO2`. |
| David Ostrovsky | e2921b6 | 2015-03-04 22:36:10 +0100 | [diff] [blame] | 3449 | |
| Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 3450 | [[sshd.listenAddress]]sshd.listenAddress:: |
| Shawn O. Pearce | 1d3cb444 | 2009-05-30 14:03:31 -0700 | [diff] [blame] | 3451 | + |
| 3452 | Specifies the local addresses the internal SSHD should listen |
| 3453 | for connections on. The following forms may be used to specify |
| 3454 | an address. In any form, `:'port'` may be omitted to use the |
| 3455 | default of 29418. |
| 3456 | + |
| 3457 | * 'hostname':'port' (for example `review.example.com:29418`) |
| 3458 | * 'IPv4':'port' (for example `10.0.0.1:29418`) |
| 3459 | * ['IPv6']:'port' (for example `[ff02::1]:29418`) |
| Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 3460 | * +*:'port'+ (for example `+*:29418+`) |
| Shawn O. Pearce | 1d3cb444 | 2009-05-30 14:03:31 -0700 | [diff] [blame] | 3461 | |
| 3462 | + |
| Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 3463 | -- |
| Shawn O. Pearce | 1d3cb444 | 2009-05-30 14:03:31 -0700 | [diff] [blame] | 3464 | If multiple values are supplied, the daemon will listen on all |
| 3465 | of them. |
| Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 3466 | |
| Shawn O. Pearce | 6af6f5f | 2010-06-08 17:38:43 -0700 | [diff] [blame] | 3467 | To disable the internal SSHD, set listenAddress to `off`. |
| Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 3468 | |
| Shawn O. Pearce | 1d3cb444 | 2009-05-30 14:03:31 -0700 | [diff] [blame] | 3469 | By default, *:29418. |
| Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 3470 | -- |
| Shawn O. Pearce | 1d3cb444 | 2009-05-30 14:03:31 -0700 | [diff] [blame] | 3471 | |
| James Y Knight | 910bd86 | 2011-01-11 20:05:56 -0500 | [diff] [blame] | 3472 | [[sshd.advertisedAddress]]sshd.advertisedAddress:: |
| 3473 | + |
| 3474 | Specifies the addresses clients should be told to connect to. |
| 3475 | This may differ from sshd.listenAddress if a firewall based port |
| 3476 | redirector is being used, making Gerrit appear to answer on port |
| 3477 | 22. The following forms may be used to specify an address. In any |
| 3478 | form, `:'port'` may be omitted to use the default SSH port of 22. |
| Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 3479 | |
| James Y Knight | 910bd86 | 2011-01-11 20:05:56 -0500 | [diff] [blame] | 3480 | * 'hostname':'port' (for example `review.example.com:22`) |
| 3481 | * 'IPv4':'port' (for example `10.0.0.1:29418`) |
| 3482 | * ['IPv6']:'port' (for example `[ff02::1]:29418`) |
| 3483 | |
| 3484 | + |
| Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 3485 | -- |
| James Y Knight | 910bd86 | 2011-01-11 20:05:56 -0500 | [diff] [blame] | 3486 | If multiple values are supplied, the daemon will advertise all |
| 3487 | of them. |
| Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 3488 | |
| James Y Knight | 910bd86 | 2011-01-11 20:05:56 -0500 | [diff] [blame] | 3489 | By default, sshd.listenAddress. |
| Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 3490 | -- |
| James Y Knight | 910bd86 | 2011-01-11 20:05:56 -0500 | [diff] [blame] | 3491 | |
| Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 3492 | [[sshd.tcpKeepAlive]]sshd.tcpKeepAlive:: |
| Shawn O. Pearce | fc9081f | 2009-05-14 10:26:59 -0700 | [diff] [blame] | 3493 | + |
| 3494 | If true, enables TCP keepalive messages to the other side, so |
| 3495 | the daemon can terminate connections if the peer disappears. |
| 3496 | + |
| David Ostrovsky | e5b7f1a | 2013-10-23 21:10:39 +0200 | [diff] [blame] | 3497 | Only effective when `sshd.backend` is set to `MINA`. |
| 3498 | + |
| Shawn O. Pearce | fc9081f | 2009-05-14 10:26:59 -0700 | [diff] [blame] | 3499 | By default, true. |
| 3500 | |
| Shawn O. Pearce | 1a4580b | 2009-11-19 17:37:10 -0800 | [diff] [blame] | 3501 | [[sshd.threads]]sshd.threads:: |
| 3502 | + |
| 3503 | Number of threads to use when executing SSH command requests. |
| 3504 | If additional requests are received while all threads are busy they |
| David Pursehouse | 221d4f6 | 2012-06-08 17:38:08 +0900 | [diff] [blame] | 3505 | are queued and serviced in a first-come-first-served order. |
| Shawn O. Pearce | 1a4580b | 2009-11-19 17:37:10 -0800 | [diff] [blame] | 3506 | + |
| Dariusz Luksza | 4b5a416 | 2015-11-09 21:53:29 +0100 | [diff] [blame] | 3507 | By default, 2x the number of CPUs available to the JVM. |
| Shawn O. Pearce | 1a4580b | 2009-11-19 17:37:10 -0800 | [diff] [blame] | 3508 | |
| Nico Sallembien | fc53f7f | 2010-05-18 16:40:10 -0700 | [diff] [blame] | 3509 | [[sshd.batchThreads]]sshd.batchThreads:: |
| 3510 | + |
| 3511 | Number of threads to allocate for SSH command requests from |
| Fredrik Luthander | 4684302 | 2012-03-13 16:11:02 +0100 | [diff] [blame] | 3512 | link:access-control.html#non-interactive_users[non-interactive users]. |
| 3513 | If equals to 0, then all non-interactive requests are executed in the same |
| 3514 | queue as interactive requests. |
| Nico Sallembien | fc53f7f | 2010-05-18 16:40:10 -0700 | [diff] [blame] | 3515 | + |
| 3516 | Any other value will remove the number of threads from the queue |
| 3517 | allocated to interactive users, and create a separate thread pool |
| 3518 | of the requested size, which will be used to run commands from |
| 3519 | non-interactive users. |
| 3520 | + |
| 3521 | If the number of threads requested for non-interactive users is larger |
| 3522 | than the total number of threads allocated in sshd.threads, then the |
| David Pursehouse | 9246356 | 2013-06-24 10:16:28 +0900 | [diff] [blame] | 3523 | value of sshd.threads is increased to accommodate the requested value. |
| Nico Sallembien | fc53f7f | 2010-05-18 16:40:10 -0700 | [diff] [blame] | 3524 | + |
| Dariusz Luksza | 145de47 | 2015-11-09 18:44:35 +0100 | [diff] [blame] | 3525 | By default is 1 on single core node, 2 otherwise. |
| Nico Sallembien | fc53f7f | 2010-05-18 16:40:10 -0700 | [diff] [blame] | 3526 | |
| Kenny Root | 15ac1b8 | 2010-02-24 00:29:20 -0800 | [diff] [blame] | 3527 | [[sshd.streamThreads]]sshd.streamThreads:: |
| 3528 | + |
| 3529 | Number of threads to use when formatting events to asynchronous |
| 3530 | streaming clients. Event formatting is multiplexed onto this thread |
| 3531 | pool by a simple FIFO scheduling system. |
| 3532 | + |
| 3533 | By default, 1 plus the number of CPUs available to the JVM. |
| 3534 | |
| Edwin Kempin | b5df3b8 | 2011-10-10 11:31:14 +0200 | [diff] [blame] | 3535 | [[sshd.commandStartThreads]]sshd.commandStartThreads:: |
| Shawn O. Pearce | d629655 | 2011-05-15 13:56:30 -0700 | [diff] [blame] | 3536 | + |
| 3537 | Number of threads used to parse a command line submitted by a client |
| 3538 | over SSH for execution, create the internal data structures used by |
| 3539 | that command, and schedule it for execution on another thread. |
| 3540 | + |
| 3541 | By default, 2. |
| 3542 | |
| Shawn O. Pearce | 8a0bf36 | 2010-11-05 17:49:41 -0700 | [diff] [blame] | 3543 | [[sshd.maxAuthTries]]sshd.maxAuthTries:: |
| 3544 | + |
| 3545 | Maximum number of authentication attempts before the server |
| 3546 | disconnects the client. Each public key that a client has loaded |
| 3547 | into its local agent counts as one auth request. Users can work |
| 3548 | around the server's limit by loading less keys into their agent, |
| 3549 | or selecting a specific key in their `~/.ssh/config` file with |
| 3550 | the `IdentityFile` option. |
| 3551 | + |
| 3552 | By default, 6. |
| 3553 | |
| 3554 | [[sshd.loginGraceTime]]sshd.loginGraceTime:: |
| 3555 | + |
| 3556 | Time in seconds that a client has to authenticate before the server |
| 3557 | automatically terminates their connection. Values should use common |
| 3558 | unit suffixes to express their setting: |
| 3559 | + |
| 3560 | * s, sec, second, seconds |
| 3561 | * m, min, minute, minutes |
| 3562 | * h, hr, hour, hours |
| 3563 | * d, day, days |
| 3564 | |
| 3565 | + |
| 3566 | By default, 2 minutes. |
| 3567 | |
| Christian Aistleitner | 3d79459 | 2013-04-08 00:19:40 +0200 | [diff] [blame] | 3568 | [[sshd.idleTimeout]]sshd.idleTimeout:: |
| 3569 | + |
| 3570 | Time in seconds after which the server automatically terminates idle |
| 3571 | connections (or 0 to disable closing of idle connections). Values |
| 3572 | should use common unit suffixes to express their setting: |
| 3573 | + |
| 3574 | * s, sec, second, seconds |
| 3575 | * m, min, minute, minutes |
| 3576 | * h, hr, hour, hours |
| 3577 | * d, day, days |
| 3578 | |
| 3579 | + |
| 3580 | By default, 0. |
| 3581 | |
| Shawn O. Pearce | 8a0bf36 | 2010-11-05 17:49:41 -0700 | [diff] [blame] | 3582 | [[sshd.maxConnectionsPerUser]]sshd.maxConnectionsPerUser:: |
| 3583 | + |
| 3584 | Maximum number of concurrent SSH sessions that a user account |
| 3585 | may open at one time. This is the number of distinct SSH logins |
| David Pursehouse | 221d4f6 | 2012-06-08 17:38:08 +0900 | [diff] [blame] | 3586 | that each user may have active at one time, and is not related to |
| Shawn O. Pearce | 8a0bf36 | 2010-11-05 17:49:41 -0700 | [diff] [blame] | 3587 | the number of commands a user may issue over a single connection. |
| 3588 | If set to 0, there is no limit. |
| 3589 | + |
| 3590 | By default, 64. |
| 3591 | |
| Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 3592 | [[sshd.cipher]]sshd.cipher:: |
| Shawn O. Pearce | 0bf2f52 | 2009-05-14 11:02:03 -0700 | [diff] [blame] | 3593 | + |
| 3594 | Available ciphers. To permit multiple ciphers, specify multiple |
| 3595 | `sshd.cipher` keys in the configuration file, one cipher name |
| 3596 | per key. Cipher names starting with `+` are enabled in addition |
| 3597 | to the default ciphers, cipher names starting with `-` are removed |
| 3598 | from the default cipher set. |
| 3599 | + |
| 3600 | Supported ciphers: aes128-cbc, aes128-cbc, aes256-cbc, blowfish-cbc, |
| 3601 | 3des-cbc, none. |
| 3602 | + |
| 3603 | By default, all supported ciphers except `none` are available. |
| 3604 | |
| Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 3605 | [[sshd.mac]]sshd.mac:: |
| Shawn O. Pearce | 0bf2f52 | 2009-05-14 11:02:03 -0700 | [diff] [blame] | 3606 | + |
| 3607 | Available MAC (message authentication code) algorithms. To permit |
| 3608 | multiple algorithms, specify multiple `sshd.mac` keys in the |
| 3609 | configuration file, one MAC per key. MAC names starting with `+` |
| 3610 | are enabled in addition to the default MACs, MAC names starting with |
| 3611 | `-` are removed from the default MACs. |
| 3612 | + |
| Scott Dial | be1c400 | 2015-11-10 11:07:44 -0500 | [diff] [blame] | 3613 | Supported MACs: hmac-md5, hmac-md5-96, hmac-sha1, hmac-sha1-96, |
| 3614 | hmac-sha2-256, hmac-sha2-512. |
| Shawn O. Pearce | 0bf2f52 | 2009-05-14 11:02:03 -0700 | [diff] [blame] | 3615 | + |
| 3616 | By default, all supported MACs are available. |
| 3617 | |
| Alex Blewitt | 7efb06f | 2013-04-01 12:46:48 -0400 | [diff] [blame] | 3618 | [[sshd.kerberosKeytab]]sshd.kerberosKeytab:: |
| 3619 | + |
| 3620 | Enable kerberos authentication for SSH connections. To permit |
| 3621 | kerberos authentication, the server must have a host principal |
| 3622 | (see `sshd.kerberosPrincipal`) which is acquired from a keytab. |
| 3623 | This must be provisioned by the kerberos administrators, and is |
| 3624 | typically installed into `/etc/krb5.keytab` on host machines. |
| 3625 | + |
| 3626 | The keytab must contain at least one `host/` principal, typically |
| 3627 | using the host's canonical name. If it does not use the |
| 3628 | canonical name, the `sshd.kerberosPrincipal` should be configured |
| 3629 | with the correct name. |
| 3630 | + |
| 3631 | By default, not set and so kerberos authentication is not enabled. |
| 3632 | |
| 3633 | [[sshd.kerberosPrincipal]]sshd.kerberosPrincipal:: |
| 3634 | + |
| 3635 | If kerberos authentication is enabled with `sshd.kerberosKeytab`, |
| 3636 | instead use the given principal name instead of the default. |
| 3637 | If the principal does not begin with `host/` a warning message is |
| 3638 | printed and may prevent successful authentication. |
| 3639 | + |
| 3640 | This may be useful if the host is behind an IP load balancer or |
| 3641 | other SSH forwarding systems, since the principal name is constructed |
| 3642 | by the client and must match for kerberos authentication to work. |
| 3643 | + |
| 3644 | By default, `host/canonical.host.name` |
| 3645 | |
| Shawn Pearce | 318bfca | 2013-10-17 22:15:38 -0700 | [diff] [blame] | 3646 | [[sshd.requestLog]]sshd.requestLog:: |
| 3647 | + |
| 3648 | Enable (or disable) the `'$site_path'/logs/sshd_log` request log. |
| 3649 | If enabled, a request log file is written out by the SSH daemon. |
| 3650 | + |
| David Ostrovsky | 8e4a990 | 2013-11-19 23:57:48 +0100 | [diff] [blame] | 3651 | `log4j.appender` with the name `sshd_log` can be configured to overwrite |
| 3652 | programmatic configuration. |
| 3653 | + |
| Shawn Pearce | 318bfca | 2013-10-17 22:15:38 -0700 | [diff] [blame] | 3654 | By default, true. |
| 3655 | |
| David Ostrovsky | 985201b | 2015-03-04 22:37:33 +0100 | [diff] [blame] | 3656 | [[sshd.rekeyBytesLimit]]sshd.rekeyBytesLimit:: |
| 3657 | + |
| 3658 | The SSH daemon will issue a rekeying after a certain amount of data. |
| 3659 | This configuration option allows you to tweak that setting. |
| 3660 | + |
| 3661 | By default, 1073741824 (bytes, 1GB). |
| 3662 | + |
| 3663 | The rekeyBytesLimit cannot be set to lower than 32. |
| 3664 | |
| 3665 | [[sshd.rekeyTimeLimit]]sshd.rekeyTimeLimit:: |
| 3666 | + |
| 3667 | The SSH daemon will issue a rekeying after a certain amount of time. |
| 3668 | This configuration option allows you to tweak that setting. |
| 3669 | + |
| 3670 | By default, 1h. |
| 3671 | + |
| 3672 | Set to 0 to disable this check. |
| 3673 | |
| Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 3674 | [[suggest]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3675 | === Section suggest |
| Shawn O. Pearce | 07bd6fb | 2011-04-29 19:15:47 -0700 | [diff] [blame] | 3676 | |
| Sven Selberg | 42d9d29 | 2014-08-13 11:20:11 +0200 | [diff] [blame] | 3677 | [[suggest.maxSuggestedReviewers]]suggest.maxSuggestedReviewers:: |
| 3678 | + |
| 3679 | The maximum numbers of reviewers suggested. |
| 3680 | + |
| 3681 | By default 10. |
| 3682 | |
| Edwin Kempin | f957dc2 | 2012-10-19 20:41:18 +0200 | [diff] [blame] | 3683 | [[suggest.from]]suggest.from:: |
| 3684 | + |
| 3685 | The number of characters that a user must have typed before suggestions |
| 3686 | are provided. If set to 0, suggestions are always provided. |
| 3687 | + |
| 3688 | By default 0. |
| 3689 | |
| Sven Selberg | 42d9d29 | 2014-08-13 11:20:11 +0200 | [diff] [blame] | 3690 | |
| Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 3691 | [[theme]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3692 | === Section theme |
| Shawn O. Pearce | 2ba3ab4 | 2010-02-25 12:10:10 -0800 | [diff] [blame] | 3693 | |
| 3694 | [[theme.backgroundColor]]theme.backgroundColor:: |
| 3695 | + |
| 3696 | Background color for the page, and major data tables like the all |
| 3697 | open changes table or the account dashboard. The value must be a |
| 3698 | valid HTML hex color code, or standard color name. |
| 3699 | + |
| Chad Horohoe | bbdf748 | 2012-11-13 18:23:15 -0800 | [diff] [blame] | 3700 | By default white, `FFFFFF`. |
| Shawn O. Pearce | 2ba3ab4 | 2010-02-25 12:10:10 -0800 | [diff] [blame] | 3701 | |
| 3702 | [[theme.topMenuColor]]theme.topMenuColor:: |
| 3703 | + |
| 3704 | This is the color of the main menu bar at the top of the page. |
| 3705 | The value must be a valid HTML hex color code, or standard color |
| Chad Horohoe | bbdf748 | 2012-11-13 18:23:15 -0800 | [diff] [blame] | 3706 | name. |
| 3707 | + |
| 3708 | By default white, `FFFFFF`. |
| Shawn O. Pearce | 2ba3ab4 | 2010-02-25 12:10:10 -0800 | [diff] [blame] | 3709 | |
| 3710 | [[theme.textColor]]theme.textColor:: |
| 3711 | + |
| 3712 | Text color for the page, and major data tables like the all |
| 3713 | open changes table or the account dashboard. The value must be a |
| 3714 | valid HTML hex color code, or standard color name. |
| 3715 | + |
| Chad Horohoe | bbdf748 | 2012-11-13 18:23:15 -0800 | [diff] [blame] | 3716 | By default dark grey, `353535`. |
| Shawn O. Pearce | 2ba3ab4 | 2010-02-25 12:10:10 -0800 | [diff] [blame] | 3717 | |
| 3718 | [[theme.trimColor]]theme.trimColor:: |
| 3719 | + |
| 3720 | Primary color used as a background color behind text. This is |
| 3721 | the color of the main menu bar at the top, of table headers, |
| 3722 | and of major UI areas that we want to offset from other portions |
| 3723 | of the page. The value must be a valid HTML hex color code, or |
| 3724 | standard color name. |
| 3725 | + |
| Chad Horohoe | bbdf748 | 2012-11-13 18:23:15 -0800 | [diff] [blame] | 3726 | By default a light grey, `EEEEEE`. |
| Shawn O. Pearce | 2ba3ab4 | 2010-02-25 12:10:10 -0800 | [diff] [blame] | 3727 | |
| 3728 | [[theme.selectionColor]]theme.selectionColor:: |
| 3729 | + |
| 3730 | Background color used within a trimColor area to denote the currently |
| 3731 | selected tab, or the background color used in a table to denote the |
| 3732 | currently selected row. The value must be a valid HTML hex color |
| 3733 | code, or standard color name. |
| 3734 | + |
| Chad Horohoe | bbdf748 | 2012-11-13 18:23:15 -0800 | [diff] [blame] | 3735 | By default a pale blue, `D8EDF9`. |
| Shawn O. Pearce | 2ba3ab4 | 2010-02-25 12:10:10 -0800 | [diff] [blame] | 3736 | |
| Andrew Hutchings | cfd7abb | 2012-06-29 10:57:05 +0100 | [diff] [blame] | 3737 | [[theme.changeTableOutdatedColor]]theme.changeTableOutdatedColor:: |
| 3738 | + |
| 3739 | Background color used for patch outdated messages. The value must be |
| 3740 | a valid HTML hex color code, or standard color name. |
| 3741 | + |
| Edwin Kempin | b034733 | 2012-07-17 10:14:32 +0200 | [diff] [blame] | 3742 | By default a shade of red, `F08080`. |
| Andrew Hutchings | cfd7abb | 2012-06-29 10:57:05 +0100 | [diff] [blame] | 3743 | |
| 3744 | [[theme.tableOddRowColor]]theme.tableOddRowColor:: |
| 3745 | + |
| 3746 | Background color for tables such as lists of open reviews for odd |
| 3747 | rows. This is so you can have a different color for odd and even |
| 3748 | rows of the table. The value must be a valid HTML hex color code, |
| 3749 | or standard color name. |
| 3750 | + |
| 3751 | By default transparent. |
| 3752 | |
| 3753 | [[theme.tableEvenRowColor]]theme.tableEvenRowColor:: |
| 3754 | + |
| 3755 | Background color for tables such as lists of open reviews for even |
| 3756 | rows. This is so you can have a different color for odd and even |
| 3757 | rows of the table. The value must be a valid HTML hex color code, |
| 3758 | or standard color name. |
| 3759 | + |
| 3760 | By default transparent. |
| 3761 | |
| Shawn O. Pearce | a83bb1c | 2011-05-20 08:46:48 -0700 | [diff] [blame] | 3762 | A different theme may be used for signed-in vs. signed-out user status |
| 3763 | by using the "signed-in" and "signed-out" theme sections. Variables |
| 3764 | not specified in a section are inherited from the default theme. |
| 3765 | |
| 3766 | ---- |
| 3767 | [theme] |
| 3768 | backgroundColor = FFFFFF |
| 3769 | [theme "signed-in"] |
| 3770 | backgroundColor = C0C0C0 |
| 3771 | [theme "signed-out"] |
| 3772 | backgroundColor = 00FFFF |
| 3773 | ---- |
| 3774 | |
| David Ostrovsky | 117c603 | 2013-08-09 00:44:56 +0200 | [diff] [blame] | 3775 | As example, here is the theme configuration to have the old green look: |
| 3776 | |
| 3777 | ---- |
| 3778 | [theme] |
| 3779 | backgroundColor = FCFEEF |
| 3780 | textColor = 000000 |
| 3781 | trimColor = D4E9A9 |
| 3782 | selectionColor = FFFFCC |
| 3783 | topMenuColor = D4E9A9 |
| 3784 | changeTableOutdatedColor = F08080 |
| 3785 | [theme "signed-in"] |
| 3786 | backgroundColor = FFFFFF |
| 3787 | ---- |
| 3788 | |
| Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 3789 | [[trackingid]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3790 | === Section trackingid |
| Goran Lungberg | 04132a1 | 2010-06-15 17:20:37 -0700 | [diff] [blame] | 3791 | |
| Shawn O. Pearce | e800b1e | 2010-06-16 17:33:43 -0700 | [diff] [blame] | 3792 | Tagged footer lines containing references to external |
| 3793 | tracking systems, parsed out of the commit message and |
| David Pursehouse | d55a6b6 | 2015-02-27 17:39:38 +0900 | [diff] [blame] | 3794 | saved in Gerrit's secondary index. |
| Shawn Pearce | ff61c8a | 2013-10-07 19:35:53 -0700 | [diff] [blame] | 3795 | |
| 3796 | After making changes to this section, existing changes |
| Shawn Pearce | 9f4de52 | 2013-11-29 11:57:53 -0800 | [diff] [blame] | 3797 | must be reindexed with link:pgm-reindex.html[reindex]. |
| Goran Lungberg | 04132a1 | 2010-06-15 17:20:37 -0700 | [diff] [blame] | 3798 | |
| Edwin Kempin | bb421f1 | 2011-08-25 11:19:00 +0200 | [diff] [blame] | 3799 | The tracking ids are searchable using tr:<tracking id> or |
| Shawn O. Pearce | 91763a0 | 2010-06-16 15:39:33 -0700 | [diff] [blame] | 3800 | bug:<tracking id>. |
| Goran Lungberg | 04132a1 | 2010-06-15 17:20:37 -0700 | [diff] [blame] | 3801 | |
| 3802 | ---- |
| 3803 | [trackingid "jira-bug"] |
| 3804 | footer = Bugfix: |
| David Pursehouse | ce7f686 | 2015-02-19 14:52:45 +0900 | [diff] [blame] | 3805 | footer = Bug: |
| Goran Lungberg | 04132a1 | 2010-06-15 17:20:37 -0700 | [diff] [blame] | 3806 | match = JRA\\d{2,8} |
| 3807 | system = JIRA |
| 3808 | |
| 3809 | [trackingid "jira-feature"] |
| 3810 | footer = Feature |
| 3811 | match = JRA(\\d{2,8}) |
| 3812 | system = JIRA |
| 3813 | ---- |
| 3814 | |
| 3815 | [[trackingid.name.footer]]trackingid.<name>.footer:: |
| 3816 | + |
| David Pursehouse | ce7f686 | 2015-02-19 14:52:45 +0900 | [diff] [blame] | 3817 | A prefix tag that identifies the footer line to parse for tracking ids. |
| 3818 | + |
| 3819 | Several trackingid entries can have the same footer tag, and a single trackingid |
| 3820 | entry can have multiple footer tags. |
| 3821 | + |
| 3822 | If multiple footer tags are specified, each tag will be parsed separately and |
| 3823 | duplicates will be ignored. |
| 3824 | + |
| 3825 | The trailing ":" is optional. |
| Goran Lungberg | 04132a1 | 2010-06-15 17:20:37 -0700 | [diff] [blame] | 3826 | |
| 3827 | [[trackingid.name.match]]trackingid.<name>.match:: |
| 3828 | + |
| Magnus Bäck | e561183 | 2011-02-02 08:57:15 +0100 | [diff] [blame] | 3829 | A link:http://download.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html[standard |
| 3830 | Java regular expression (java.util.regex)] used to match the |
| 3831 | external tracking id part of the footer line. The match can |
| 3832 | result in several entries in the DB. If grouping is used in the |
| 3833 | regex the first group will be interpreted as the tracking id. |
| Christian Aistleitner | 5cec368 | 2013-03-16 23:02:37 +0100 | [diff] [blame] | 3834 | Tracking ids longer than 32 characters will be ignored. |
| Goran Lungberg | 04132a1 | 2010-06-15 17:20:37 -0700 | [diff] [blame] | 3835 | + |
| 3836 | The configuration file parser eats one level of backslashes, so the |
| 3837 | character class `\s` requires `\\s` in the configuration file. The |
| 3838 | parser also terminates the line at the first `#`, so a match |
| 3839 | expression containing # must be wrapped in double quotes. |
| 3840 | |
| 3841 | [[trackingid.name.system]]trackingid.<name>.system:: |
| 3842 | + |
| David Pursehouse | 221d4f6 | 2012-06-08 17:38:08 +0900 | [diff] [blame] | 3843 | The name of the external tracking system (maximum 10 characters). |
| Goran Lungberg | 04132a1 | 2010-06-15 17:20:37 -0700 | [diff] [blame] | 3844 | It is possible to have several trackingid entries for the same |
| 3845 | tracking system. |
| 3846 | |
| Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 3847 | [[transfer]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3848 | === Section transfer |
| Shawn O. Pearce | 6e4dfdd | 2010-05-12 17:26:08 -0700 | [diff] [blame] | 3849 | |
| 3850 | [[transfer.timeout]]transfer.timeout:: |
| 3851 | + |
| 3852 | Number of seconds to wait for a single network read or write |
| 3853 | to complete before giving up and declaring the remote side is |
| 3854 | not responding. If 0, there is no timeout, and this server will |
| 3855 | wait indefinitely for a transfer to finish. |
| 3856 | + |
| 3857 | A timeout should be large enough to mostly transfer the objects to |
| 3858 | the other side. 1 second may be too small for larger projects, |
| 3859 | especially over a WAN link, while 10-30 seconds is a much more |
| 3860 | reasonable timeout value. |
| 3861 | + |
| 3862 | Defaults to 0 seconds, wait indefinitely. |
| 3863 | |
| lincoln | 2be1160 | 2010-07-05 10:53:25 -0300 | [diff] [blame] | 3864 | |
| Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 3865 | [[upload]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3866 | === Section upload |
| Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 3867 | |
| lincoln | 2be1160 | 2010-07-05 10:53:25 -0300 | [diff] [blame] | 3868 | Sets the group of users allowed to execute 'upload-pack' on the |
| 3869 | server, 'upload-pack' is what runs on the server during a user's |
| 3870 | fetch, clone or repo sync command. |
| 3871 | |
| 3872 | ---- |
| 3873 | [upload] |
| 3874 | allowGroup = GROUP_ALLOWED_TO_EXECUTE |
| 3875 | allowGroup = YET_ANOTHER_GROUP_ALLOWED_TO_EXECUTE |
| 3876 | ---- |
| 3877 | |
| 3878 | [[upload.allowGroup]]upload.allowGroup:: |
| 3879 | + |
| 3880 | Name of the groups of users that are allowed to execute 'upload-pack' |
| 3881 | on the server. One or more groups can be set. |
| 3882 | + |
| 3883 | If no groups are added, any user will be allowed to execute |
| 3884 | 'upload-pack' on the server. |
| 3885 | |
| Edwin Kempin | fa0d494 | 2015-07-16 12:38:52 +0200 | [diff] [blame] | 3886 | [[urlAlias]] |
| 3887 | === Section urlAlias |
| 3888 | |
| 3889 | URL aliases define regular expressions for URL tokens that are mapped |
| 3890 | to target URL tokens. |
| 3891 | |
| 3892 | Each URL alias must be specified in its own subsection. The subsection |
| 3893 | name should be a descriptive name. It must be unique, but is not |
| 3894 | interpreted in any way. |
| 3895 | |
| 3896 | The URL aliases are applied in no particular order. The first matching |
| 3897 | URL alias is used and further matches are ignored. |
| 3898 | |
| 3899 | URL aliases can be used to map plugin screens into the Gerrit URL |
| 3900 | namespace, or to replace Gerrit screens by plugin screens. |
| 3901 | |
| 3902 | Example: |
| 3903 | |
| 3904 | ---- |
| 3905 | [urlAlias "MyPluginScreen"] |
| 3906 | match = /myscreen/(.*) |
| 3907 | token = /x/myplugin/myscreen/$1 |
| 3908 | [urlAlias "MyChangeScreen"] |
| 3909 | match = /c/(.*) |
| 3910 | token = /x/myplugin/c/$1 |
| 3911 | ---- |
| 3912 | |
| 3913 | [[urlAlias.match]]urlAlias.match:: |
| 3914 | + |
| 3915 | A regular expression for a URL token. |
| 3916 | + |
| 3917 | The matched URL token is replaced by `urlAlias.token`. |
| 3918 | |
| 3919 | [[urlAlias.token]]urlAlias.token:: |
| 3920 | + |
| 3921 | The target URL token. |
| 3922 | + |
| 3923 | It can contain placeholders for the groups matched by the |
| 3924 | `urlAlias.match` regular expression: `$1` for the first matched group, |
| 3925 | `$2` for the second matched group, etc. |
| lincoln | 2be1160 | 2010-07-05 10:53:25 -0300 | [diff] [blame] | 3926 | |
| Stefan Beller | 0f724ff | 2015-07-17 10:17:51 -0700 | [diff] [blame] | 3927 | [[submodule]] |
| 3928 | === Section submodule |
| 3929 | |
| Shawn Pearce | dc477cd | 2016-03-24 19:56:18 -0700 | [diff] [blame] | 3930 | [[submodule.verbosesuperprojectupdate]]submodule.verboseSuperprojectUpdate:: |
| Stefan Beller | 0f724ff | 2015-07-17 10:17:51 -0700 | [diff] [blame] | 3931 | + |
| 3932 | When using link:user-submodules.html#automatic_update[automatic superproject updates] |
| 3933 | this option will determine if the submodule commit messages are included into |
| 3934 | the commit message of the superproject update. |
| 3935 | + |
| 3936 | By default this is true. |
| 3937 | |
| Shawn Pearce | dc477cd | 2016-03-24 19:56:18 -0700 | [diff] [blame] | 3938 | [[submodule.enableSuperProjectSubscriptions]]submodule.enableSuperProjectSubscriptions:: |
| Stefan Beller | 8cc252e | 2016-03-10 10:06:53 -0800 | [diff] [blame] | 3939 | + |
| 3940 | This allows to enable the superproject subscription mechanism. |
| 3941 | + |
| 3942 | By default this is true. |
| Stefan Beller | 0f724ff | 2015-07-17 10:17:51 -0700 | [diff] [blame] | 3943 | |
| Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 3944 | [[user]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3945 | === Section user |
| Shawn O. Pearce | 0a35191 | 2009-06-01 08:14:46 -0700 | [diff] [blame] | 3946 | |
| Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 3947 | [[user.name]]user.name:: |
| Shawn O. Pearce | 0a35191 | 2009-06-01 08:14:46 -0700 | [diff] [blame] | 3948 | + |
| 3949 | Name that Gerrit calls itself in Git when it creates a new Git |
| 3950 | commit, such as a merge during change submission. |
| 3951 | + |
| 3952 | By default this is "Gerrit Code Review". |
| 3953 | |
| Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 3954 | [[user.email]]user.email:: |
| Shawn O. Pearce | 0a35191 | 2009-06-01 08:14:46 -0700 | [diff] [blame] | 3955 | + |
| 3956 | Email address that Gerrit refers to itself as when it creates a |
| 3957 | new Git commit, such as a merge commit during change submission. |
| 3958 | + |
| 3959 | If not set, Gerrit generates this as "gerrit@`hostname`", where |
| 3960 | `hostname` is the hostname of the system Gerrit is running on. |
| 3961 | + |
| 3962 | By default, not set, generating the value at startup. |
| 3963 | |
| Edwin Kempin | 0e02ded | 2011-09-16 15:10:14 +0200 | [diff] [blame] | 3964 | [[user.anonymousCoward]]user.anonymousCoward:: |
| 3965 | + |
| David Pursehouse | a1d633b | 2014-05-02 17:21:02 +0900 | [diff] [blame] | 3966 | Username that is displayed in the Gerrit Web UI and in e-mail |
| Edwin Kempin | 0e02ded | 2011-09-16 15:10:14 +0200 | [diff] [blame] | 3967 | notifications if the full name of the user is not set. |
| 3968 | + |
| 3969 | By default "Anonymous Coward" is used. |
| 3970 | |
| Shawn O. Pearce | 0bf2f52 | 2009-05-14 11:02:03 -0700 | [diff] [blame] | 3971 | |
| Dave Borowitz | 532342bf | 2015-06-18 20:28:22 -0400 | [diff] [blame] | 3972 | == [[secure.config]]File `etc/secure.config` |
| Shawn O. Pearce | c5fed82 | 2009-11-17 16:10:10 -0800 | [diff] [blame] | 3973 | The optional file `'$site_path'/etc/secure.config` overrides (or |
| 3974 | supplements) the settings supplied by `'$site_path'/etc/gerrit.config`. |
| Shawn O. Pearce | 0d4037a | 2009-11-12 18:33:46 -0800 | [diff] [blame] | 3975 | The file should be readable only by the daemon process and can be |
| 3976 | used to contain private configuration entries that wouldn't normally |
| 3977 | be exposed to everyone. |
| 3978 | |
| Shawn O. Pearce | c5fed82 | 2009-11-17 16:10:10 -0800 | [diff] [blame] | 3979 | Sample `etc/secure.config`: |
| Shawn O. Pearce | 0d4037a | 2009-11-12 18:33:46 -0800 | [diff] [blame] | 3980 | ---- |
| Shawn O. Pearce | 34f38cf | 2011-06-16 19:18:54 -0700 | [diff] [blame] | 3981 | [auth] |
| 3982 | registerEmailPrivateKey = 2zHNrXE2bsoylzUqDxZp0H1cqUmjgWb6 |
| 3983 | |
| Shawn O. Pearce | 0d4037a | 2009-11-12 18:33:46 -0800 | [diff] [blame] | 3984 | [database] |
| Shawn O. Pearce | 9d342a4 | 2009-12-16 15:49:05 -0800 | [diff] [blame] | 3985 | username = webuser |
| 3986 | password = s3kr3t |
| Shawn O. Pearce | 0d4037a | 2009-11-12 18:33:46 -0800 | [diff] [blame] | 3987 | |
| 3988 | [ldap] |
| Shawn O. Pearce | 9d342a4 | 2009-12-16 15:49:05 -0800 | [diff] [blame] | 3989 | password = l3tm3srch |
| Shawn O. Pearce | 0d4037a | 2009-11-12 18:33:46 -0800 | [diff] [blame] | 3990 | |
| 3991 | [httpd] |
| Shawn O. Pearce | 9d342a4 | 2009-12-16 15:49:05 -0800 | [diff] [blame] | 3992 | sslKeyPassword = g3rr1t |
| Shawn O. Pearce | 0d4037a | 2009-11-12 18:33:46 -0800 | [diff] [blame] | 3993 | |
| 3994 | [sendemail] |
| Shawn O. Pearce | 9d342a4 | 2009-12-16 15:49:05 -0800 | [diff] [blame] | 3995 | smtpPass = sp@m |
| Shawn O. Pearce | 7929d87 | 2011-05-15 13:33:15 -0700 | [diff] [blame] | 3996 | |
| 3997 | [remote "bar"] |
| 3998 | password = s3kr3t |
| Shawn O. Pearce | 0d4037a | 2009-11-12 18:33:46 -0800 | [diff] [blame] | 3999 | ---- |
| 4000 | |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4001 | == File `etc/peer_keys` |
| Johan Bjork | 3e5ee30 | 2012-01-27 17:59:54 +0100 | [diff] [blame] | 4002 | |
| 4003 | The optional file `'$site_path'/etc/peer_keys` controls who can |
| 4004 | login as the 'Gerrit Code Review' user, required for the link:cmd-suexec.html[suexec] |
| 4005 | command. |
| 4006 | |
| 4007 | The format is one Base-64 encoded public key per line. |
| 4008 | |
| 4009 | |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4010 | == Database system_config |
| Shawn O. Pearce | 7b40571 | 2009-05-08 18:27:53 -0700 | [diff] [blame] | 4011 | |
| 4012 | Several columns in the `system_config` table within the metadata |
| 4013 | database may be set to control how Gerrit behaves. |
| Shawn O. Pearce | d2b73db | 2009-01-09 11:55:47 -0800 | [diff] [blame] | 4014 | |
| 4015 | [NOTE] |
| 4016 | The contents of the `system_config` table are cached at startup |
| 4017 | by Gerrit. If you modify any columns in this table, Gerrit needs |
| 4018 | to be restarted before it will use the new values. |
| 4019 | |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4020 | === Configurable Parameters |
| Shawn O. Pearce | d2b73db | 2009-01-09 11:55:47 -0800 | [diff] [blame] | 4021 | |
| Shawn O. Pearce | 8e9c73b | 2009-05-08 17:38:25 -0700 | [diff] [blame] | 4022 | site_path:: |
| 4023 | + |
| Shawn O. Pearce | d2b73db | 2009-01-09 11:55:47 -0800 | [diff] [blame] | 4024 | Local filesystem directory holding the site customization assets. |
| 4025 | Placing this directory under version control and/or backup is a |
| 4026 | good idea. |
| Shawn O. Pearce | 8e9c73b | 2009-05-08 17:38:25 -0700 | [diff] [blame] | 4027 | + |
| Shawn O. Pearce | c5fed82 | 2009-11-17 16:10:10 -0800 | [diff] [blame] | 4028 | Files in this directory provide additional configuration. |
| Shawn O. Pearce | 8e9c73b | 2009-05-08 17:38:25 -0700 | [diff] [blame] | 4029 | + |
| Shawn O. Pearce | d2b73db | 2009-01-09 11:55:47 -0800 | [diff] [blame] | 4030 | Other files support site customization. |
| Shawn O. Pearce | 8e9c73b | 2009-05-08 17:38:25 -0700 | [diff] [blame] | 4031 | + |
| Dave Borowitz | 1e49e14 | 2013-04-09 12:14:57 -0700 | [diff] [blame] | 4032 | * link:config-themes.html[Themes] |
| Shawn O. Pearce | d2b73db | 2009-01-09 11:55:47 -0800 | [diff] [blame] | 4033 | |
| Shawn O. Pearce | 5500e69 | 2009-05-28 15:55:01 -0700 | [diff] [blame] | 4034 | GERRIT |
| 4035 | ------ |
| 4036 | Part of link:index.html[Gerrit Code Review] |
| Yuxuan 'fishy' Wang | 99cb68d | 2013-10-31 17:26:00 -0700 | [diff] [blame] | 4037 | |
| 4038 | SEARCHBOX |
| 4039 | --------- |