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 |
Sven Selberg | 2a0beab | 2018-04-20 14:49:20 +0200 | [diff] [blame] | 10 | by Gerrit. For most properties, if they are modified in this file, Gerrit |
| 11 | needs to be restarted before it will use the new values. Some properties |
David Pursehouse | c528621 | 2019-10-21 20:50:17 +0900 | [diff] [blame] | 12 | support being link:#reloadConfig[`reloaded`] without restart. |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 13 | |
Shawn O. Pearce | c5fed82 | 2009-11-17 16:10:10 -0800 | [diff] [blame] | 14 | Sample `etc/gerrit.config`: |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 15 | ---- |
| 16 | [core] |
Shawn O. Pearce | 9d342a4 | 2009-12-16 15:49:05 -0800 | [diff] [blame] | 17 | packedGitLimit = 200 m |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 18 | |
| 19 | [cache] |
David Pursehouse | 64df83a | 2017-07-04 21:20:47 +0900 | [diff] [blame] | 20 | directory = /var/cache/gerrit |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 21 | ---- |
| 22 | |
Sven Selberg | 2a0beab | 2018-04-20 14:49:20 +0200 | [diff] [blame] | 23 | [[reloadConfig]] |
| 24 | === Reload `etc/gerrit.config` |
| 25 | Some properties support being reloaded without restart when a `reload config` |
| 26 | command is issued through link:cmd-reload-config.html[`SSH`] or the |
| 27 | link:rest-api-config.html#reload-config[`REST API`]. If a property supports |
| 28 | this it is specified in the documentation for the property below. |
| 29 | |
| 30 | |
Hongkai Liu | 49799b2 | 2017-04-07 16:54:25 -0400 | [diff] [blame] | 31 | [[accountPatchReviewDb]] |
| 32 | === Section accountPatchReviewDb |
| 33 | |
Gert van Dijk | 49c5613 | 2017-10-17 23:44:25 +0200 | [diff] [blame] | 34 | The AccountPatchReviewDb is a database used to store the user file reviewed |
David Pursehouse | e3eaf9e | 2019-02-01 10:41:20 +0900 | [diff] [blame] | 35 | flags. |
Gert van Dijk | 49c5613 | 2017-10-17 23:44:25 +0200 | [diff] [blame] | 36 | |
Hongkai Liu | 49799b2 | 2017-04-07 16:54:25 -0400 | [diff] [blame] | 37 | [[accountPatchReviewDb.url]]accountPatchReviewDb.url:: |
| 38 | + |
Paladox none | e3a9dd7 | 2017-04-26 12:45:56 +0000 | [diff] [blame] | 39 | The url of accountPatchReviewDb. Supported types are `H2`, `POSTGRESQL`, |
| 40 | `MARIADB`, and `MYSQL`. Drop the driver jar in the lib folder of the site path |
| 41 | if the Jdbc driver of the corresponding Database is not yet in the class path. |
Hongkai Liu | 49799b2 | 2017-04-07 16:54:25 -0400 | [diff] [blame] | 42 | + |
| 43 | Default is to create H2 database in the db folder of the site path. |
| 44 | + |
| 45 | Changing this parameter requires to migrate database using the |
Hugo Arès | 3e1d4cd | 2017-04-26 12:02:53 +0200 | [diff] [blame] | 46 | link:pgm-MigrateAccountPatchReviewDb.html[MigrateAccountPatchReviewDb] program. |
| 47 | Migration cannot be done while the server is running. |
Paladox none | 1a4c01f | 2017-04-29 18:19:37 +0000 | [diff] [blame] | 48 | + |
Dave Borowitz | ada289c | 2018-12-18 13:24:14 -0800 | [diff] [blame] | 49 | Also note that the db_name has to be a new db and not reusing an old ReviewDb |
| 50 | database from a former 2.x site, otherwise gerrit's init will remove the table. |
Hongkai Liu | 49799b2 | 2017-04-07 16:54:25 -0400 | [diff] [blame] | 51 | |
| 52 | ---- |
| 53 | [accountPatchReviewDb] |
| 54 | url = jdbc:postgresql://<host>:<port>/<db_name>?user=<user>&password=<password> |
| 55 | ---- |
| 56 | |
Hector Oswaldo Caballero | 8dead96 | 2017-08-08 05:30:06 -0400 | [diff] [blame] | 57 | [[accountPatchReviewDb.poolLimit]]accountPatchReviewDb.poolLimit:: |
| 58 | + |
| 59 | Maximum number of open database connections. If the server needs |
| 60 | more than this number, request processing threads will wait up |
| 61 | to <<accountPatchReviewDb.poolMaxWait, poolMaxWait>> seconds for a |
| 62 | connection to be released before they abort with an exception. |
| 63 | This limit must be several units higher than the total number of |
| 64 | httpd and sshd threads as some request processing code paths may |
| 65 | need multiple connections. |
| 66 | + |
| 67 | Default is <<sshd.threads, sshd.threads>> |
| 68 | + <<httpd.maxThreads, httpd.maxThreads>> + 2. |
| 69 | + |
| 70 | |
| 71 | [[accountPatchReviewDb.poolMinIdle]]database.poolMinIdle:: |
| 72 | + |
| 73 | Minimum number of connections to keep idle in the pool. |
| 74 | Default is 4. |
| 75 | + |
| 76 | |
| 77 | [[accountPatchReviewDb.poolMaxIdle]]accountPatchReviewDb.poolMaxIdle:: |
| 78 | + |
| 79 | Maximum number of connections to keep idle in the pool. If there |
| 80 | are more idle connections, connections will be closed instead of |
| 81 | being returned back to the pool. |
| 82 | Default is min(<<accountPatchReviewDb.poolLimit, accountPatchReviewDb.poolLimit>>, 16). |
| 83 | + |
| 84 | |
| 85 | [[accountPatchReviewDb.poolMaxWait]]accountPatchReviewDb.poolMaxWait:: |
| 86 | + |
| 87 | Maximum amount of time a request processing thread will wait to |
| 88 | acquire a database connection from the pool. If no connection is |
| 89 | released within this time period, the processing thread will abort |
| 90 | its current operations and return an error to the client. |
| 91 | Values should use common unit suffixes to express their setting: |
| 92 | + |
| 93 | * ms, milliseconds |
| 94 | * s, sec, second, seconds |
| 95 | * m, min, minute, minutes |
| 96 | * h, hr, hour, hours |
| 97 | |
| 98 | + |
Hector Oswaldo Caballero | 8dead96 | 2017-08-08 05:30:06 -0400 | [diff] [blame] | 99 | If a unit suffix is not specified, `milliseconds` is assumed. |
Hector Oswaldo Caballero | 8dead96 | 2017-08-08 05:30:06 -0400 | [diff] [blame] | 100 | Default is `30 seconds`. |
| 101 | |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 102 | [[accounts]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 103 | === Section accounts |
Dave Borowitz | 45baa89 | 2012-02-23 16:43:05 -0800 | [diff] [blame] | 104 | |
Matthias Sohn | f336066 | 2012-04-05 15:42:52 +0200 | [diff] [blame] | 105 | [[accounts.visibility]]accounts.visibility:: |
Dave Borowitz | 45baa89 | 2012-02-23 16:43:05 -0800 | [diff] [blame] | 106 | + |
| 107 | Controls visibility of other users' dashboard pages and |
| 108 | completion suggestions to web users. |
| 109 | + |
| 110 | If `ALL`, all users are visible to all other users, even |
| 111 | anonymous users. |
| 112 | + |
| 113 | If `SAME_GROUP`, only users who are also members of a group the |
| 114 | current user is a member of are visible. |
| 115 | + |
| 116 | If `VISIBLE_GROUP`, only users who are members of at least one group |
| 117 | that is visible to the current user are visible. |
| 118 | + |
| 119 | If `NONE`, no users other than the current user are visible. |
| 120 | + |
| 121 | Default is `ALL`. |
| 122 | |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 123 | [[addreviewer]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 124 | === Section addreviewer |
Edwin Kempin | 49cb3e1 | 2011-06-29 14:35:14 +0200 | [diff] [blame] | 125 | |
| 126 | [[addreviewer.maxWithoutConfirmation]]addreviewer.maxWithoutConfirmation:: |
| 127 | + |
| 128 | The maximum number of reviewers a user can add at once by adding a |
| 129 | group as reviewer without being asked to confirm the operation. |
| 130 | + |
| 131 | If set to 0, the user will never be asked to confirm adding a group |
| 132 | as reviewer. |
| 133 | + |
| 134 | Default is 10. |
Edwin Kempin | 5e65d9b | 2011-07-08 07:35:48 +0200 | [diff] [blame] | 135 | + |
David Pursehouse | a1d633b | 2014-05-02 17:21:02 +0900 | [diff] [blame] | 136 | This setting only applies for adding reviewers in the Gerrit Web UI, |
Edwin Kempin | 5e65d9b | 2011-07-08 07:35:48 +0200 | [diff] [blame] | 137 | but is ignored when adding reviewers with the |
Edwin Kempin | 33e92d0 | 2011-07-11 22:00:57 +0200 | [diff] [blame] | 138 | link:cmd-set-reviewers.html[set-reviewers] command. |
Gustaf Lundh | 25e608f | 2018-04-16 10:54:53 +0200 | [diff] [blame] | 139 | + |
Sven Selberg | 2a0beab | 2018-04-20 14:49:20 +0200 | [diff] [blame] | 140 | This value supports link:#reloadConfig[configuration reloads]. |
Edwin Kempin | 49cb3e1 | 2011-06-29 14:35:14 +0200 | [diff] [blame] | 141 | |
| 142 | [[addreviewer.maxAllowed]]addreviewer.maxAllowed:: |
| 143 | + |
| 144 | The maximum number of reviewers a user can add at once by adding a |
| 145 | group as reviewer. |
| 146 | + |
| 147 | If set to 0, there is no limit for the number of reviewers that can |
| 148 | be added at once by adding a group as reviewer. |
| 149 | + |
| 150 | Default is 20. |
Gustaf Lundh | 25e608f | 2018-04-16 10:54:53 +0200 | [diff] [blame] | 151 | + |
Sven Selberg | 2a0beab | 2018-04-20 14:49:20 +0200 | [diff] [blame] | 152 | This value supports link:#reloadConfig[configuration reloads]. |
Edwin Kempin | 49cb3e1 | 2011-06-29 14:35:14 +0200 | [diff] [blame] | 153 | |
Patrick Hiesel | 87880b0 | 2016-05-03 18:15:08 +0200 | [diff] [blame] | 154 | [[addReviewer.baseWeight]]addReviewer.baseWeight:: |
| 155 | + |
| 156 | The weight that will be applied in the default reviewer ranking algorithm. |
| 157 | This can be increased or decreased to give more or less influence to plugins. |
| 158 | If set to zero, the base ranking will not have any effect. Reviewers will then |
| 159 | be ordered as ranked by the plugins (if there are any). |
| 160 | + |
| 161 | By default 1. |
| 162 | |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 163 | [[auth]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 164 | === Section auth |
Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 165 | |
| 166 | See also link:config-sso.html[SSO configuration]. |
| 167 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 168 | [[auth.type]]auth.type:: |
Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 169 | + |
Shawn O. Pearce | 2920ef3 | 2009-08-03 08:03:34 -0700 | [diff] [blame] | 170 | Type of user authentication employed by Gerrit. The supported |
| 171 | values are: |
Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 172 | + |
| 173 | * `OpenID` |
| 174 | + |
| 175 | The default setting. Gerrit uses any valid OpenID |
| 176 | provider chosen by the end-user. For more information see |
Shawn O. Pearce | 2920ef3 | 2009-08-03 08:03:34 -0700 | [diff] [blame] | 177 | http://openid.net/[openid.net]. |
Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 178 | + |
James E. Blair | ca8bc3b | 2011-12-21 18:12:26 +0000 | [diff] [blame] | 179 | * `OpenID_SSO` |
| 180 | + |
| 181 | Supports OpenID from a single provider. There is no registration |
| 182 | link, and the "Sign In" link sends the user directly to the provider's |
| 183 | SSO entry point. |
| 184 | + |
Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 185 | * `HTTP` |
| 186 | + |
Shawn O. Pearce | 2920ef3 | 2009-08-03 08:03:34 -0700 | [diff] [blame] | 187 | Gerrit relies upon data presented in the HTTP request. This includes |
Edwin Kempin | f1acbb8 | 2011-09-15 12:49:42 +0200 | [diff] [blame] | 188 | HTTP basic authentication, or some types of commercial single-sign-on |
Shawn O. Pearce | 2920ef3 | 2009-08-03 08:03:34 -0700 | [diff] [blame] | 189 | solutions. With this setting enabled the authentication must |
| 190 | take place in the web server or servlet container, and not from |
| 191 | within Gerrit. |
| 192 | + |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 193 | * `HTTP_LDAP` |
| 194 | + |
| 195 | Exactly like `HTTP` (above), but additionally Gerrit pre-populates |
| 196 | a user's full name and email address based on information obtained |
| 197 | from the user's account object in LDAP. The user's group membership |
| 198 | is also pulled from LDAP, making any LDAP groups that a user is a |
David Pursehouse | ef92bec | 2017-08-25 18:45:02 +0900 | [diff] [blame] | 199 | member of available as groups in Gerrit. Hence the `_LDAP` suffix in |
| 200 | the name of this authentication type. Gerrit does NOT authenticate |
| 201 | the user via LDAP. |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 202 | + |
Sasa Zivkov | eabc897 | 2010-10-04 15:47:08 +0200 | [diff] [blame] | 203 | * `CLIENT_SSL_CERT_LDAP` |
| 204 | + |
| 205 | This authentication type is actually kind of SSO. Gerrit will configure |
David Pursehouse | 221d4f6 | 2012-06-08 17:38:08 +0900 | [diff] [blame] | 206 | 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] | 207 | authentication to work a Gerrit administrator has to import the root |
| 208 | certificate of the trust chain used to issue the client's certificate |
| 209 | into the <review-site>/etc/keystore. |
| 210 | After the authentication is done Gerrit will obtain basic user |
| 211 | registration (name and email) from LDAP, and some group memberships. |
David Pursehouse | ef92bec | 2017-08-25 18:45:02 +0900 | [diff] [blame] | 212 | Hence the `_LDAP` suffix in the name of this authentication type. |
| 213 | Gerrit does NOT authenticate the user via LDAP. |
Sasa Zivkov | eabc897 | 2010-10-04 15:47:08 +0200 | [diff] [blame] | 214 | This authentication type can only be used under hosted daemon mode, and |
| 215 | the httpd.listenUrl must use https:// as the protocol. |
Chulho Yang | b72ff8f | 2013-07-04 02:35:53 -0400 | [diff] [blame] | 216 | Optionally, certificate revocation list file can be used |
| 217 | at <review-site>/etc/crl.pem. For details, see httpd.sslCrl. |
Sasa Zivkov | eabc897 | 2010-10-04 15:47:08 +0200 | [diff] [blame] | 218 | + |
Shawn O. Pearce | f7e065e | 2009-09-26 20:01:10 -0700 | [diff] [blame] | 219 | * `LDAP` |
| 220 | + |
| 221 | Gerrit prompts the user to enter a username and a password, which |
| 222 | it then verifies by performing a simple bind against the configured |
| 223 | <<ldap.server,ldap.server>>. In this configuration the web server |
| 224 | is not involved in the user authentication process. |
| 225 | + |
Shawn O. Pearce | c892d34 | 2010-02-17 17:00:50 -0800 | [diff] [blame] | 226 | The actual username used in the LDAP simple bind request is the |
| 227 | account's full DN, which is discovered by first querying the |
| 228 | directory using either an anonymous request, or the configured |
Robin Rosenberg | a3baed0 | 2012-10-14 14:09:32 +0200 | [diff] [blame] | 229 | <<ldap.username,ldap.username>> identity. Gerrit can also use kerberos if |
| 230 | <<ldap.authentication,ldap.authentication>> is set to `GSSAPI`. |
Han-Wen Nienhuys | 84d830b | 2017-02-15 16:36:04 +0100 | [diff] [blame] | 231 | + |
| 232 | If link:#auth.gitBasicAuthPolicy[`auth.gitBasicAuthPolicy`] is set to `HTTP`, |
| 233 | the randomly generated HTTP password is used for authentication. On the other hand, |
| 234 | if link:#auth.gitBasicAuthPolicy[`auth.gitBasicAuthPolicy`] is set to `HTTP_LDAP`, |
| 235 | the password in the request is first checked against the HTTP password and, if |
| 236 | it does not match, it is then validated against the LDAP password. |
| 237 | Service users that only exist in the Gerrit database are authenticated by their |
| 238 | HTTP passwords. |
Shawn O. Pearce | c892d34 | 2010-02-17 17:00:50 -0800 | [diff] [blame] | 239 | |
| 240 | * `LDAP_BIND` |
| 241 | + |
| 242 | Gerrit prompts the user to enter a username and a password, which |
| 243 | it then verifies by performing a simple bind against the configured |
| 244 | <<ldap.server,ldap.server>>. In this configuration the web server |
| 245 | is not involved in the user authentication process. |
| 246 | + |
David Pursehouse | 42f4204 | 2013-08-01 14:02:25 +0900 | [diff] [blame] | 247 | Unlike `LDAP` above, the username used to perform the LDAP simple bind |
David Pursehouse | 1344f5b | 2013-08-09 17:35:47 +0900 | [diff] [blame] | 248 | request is the exact string supplied in the dialog by the user. |
Robin Rosenberg | 524a303 | 2012-10-14 14:24:36 +0200 | [diff] [blame] | 249 | 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] | 250 | account information. |
| 251 | + |
Michael Ochmann | e9e046a | 2015-10-20 15:34:29 +0200 | [diff] [blame] | 252 | * `OAUTH` |
David Ostrovsky | e9707d8 | 2015-02-22 01:14:02 +0100 | [diff] [blame] | 253 | + |
| 254 | OAuth is a protocol that lets external apps request authorization to private |
| 255 | details in a user's account without getting their password. This is |
| 256 | preferred over Basic Authentication because tokens can be limited to specific |
| 257 | types of data, and can be revoked by users at any time. |
| 258 | + |
| 259 | Site owners have to register their application before getting started. Note |
| 260 | that provider specific plugins must be used with this authentication scheme. |
| 261 | + |
Han-Wen Nienhuys | 84d830b | 2017-02-15 16:36:04 +0100 | [diff] [blame] | 262 | Git clients may send OAuth 2 access tokens instead of passwords in the Basic |
| 263 | authentication header. Note that provider specific plugins must be installed to |
| 264 | facilitate this authentication scheme. If multiple OAuth 2 provider plugins are |
| 265 | installed one of them must be selected as default with the |
| 266 | `auth.gitOAuthProvider` option. |
| 267 | + |
Shawn O. Pearce | 2920ef3 | 2009-08-03 08:03:34 -0700 | [diff] [blame] | 268 | * `DEVELOPMENT_BECOME_ANY_ACCOUNT` |
| 269 | + |
| 270 | *DO NOT USE*. Only for use in a development environment. |
| 271 | + |
| 272 | When this is the configured authentication method a hyperlink titled |
| 273 | `Become` appears in the top right corner of the page, taking the |
| 274 | user to a form where they can enter the username of any existing |
| 275 | user account, and immediately login as that account, without any |
David Ostrovsky | 7163dac | 2017-07-29 06:49:38 +0200 | [diff] [blame] | 276 | authentication taking place. |
Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 277 | |
| 278 | + |
| 279 | By default, OpenID. |
| 280 | |
Shawn O. Pearce | 533cafc | 2010-05-11 16:05:27 -0700 | [diff] [blame] | 281 | [[auth.allowedOpenID]]auth.allowedOpenID:: |
| 282 | + |
| 283 | List of permitted OpenID providers. A user may only authenticate |
| 284 | with an OpenID that matches this list. Only used if `auth.type` |
David Pursehouse | 42f4204 | 2013-08-01 14:02:25 +0900 | [diff] [blame] | 285 | is set to `OpenID` (the default). |
Shawn O. Pearce | 533cafc | 2010-05-11 16:05:27 -0700 | [diff] [blame] | 286 | + |
Magnus Bäck | e561183 | 2011-02-02 08:57:15 +0100 | [diff] [blame] | 287 | Patterns may be either a |
| 288 | link:http://download.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html[standard |
| 289 | Java regular expression (java.util.regex)] (start with `^` and |
Shawn O. Pearce | 533cafc | 2010-05-11 16:05:27 -0700 | [diff] [blame] | 290 | end with `$`) or be a simple prefix (any other string). |
| 291 | + |
| 292 | By default, the list contains two values, `http://` and `https://`, |
| 293 | allowing users to authenticate with any OpenID provider. |
| 294 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 295 | [[auth.trustedOpenID]]auth.trustedOpenID:: |
Shawn O. Pearce | d7c026d | 2009-08-05 20:11:22 -0700 | [diff] [blame] | 296 | + |
David Pursehouse | 221d4f6 | 2012-06-08 17:38:08 +0900 | [diff] [blame] | 297 | List of trusted OpenID providers. Only used if `auth.type` is |
David Pursehouse | 42f4204 | 2013-08-01 14:02:25 +0900 | [diff] [blame] | 298 | set to `OpenID` (the default). |
Shawn O. Pearce | d7c026d | 2009-08-05 20:11:22 -0700 | [diff] [blame] | 299 | + |
| 300 | In order for a user to take advantage of permissions beyond those |
| 301 | granted to the `Anonymous Users` and `Registered Users` groups, |
| 302 | the user account must only have OpenIDs which match at least one |
| 303 | pattern from this list. |
| 304 | + |
Magnus Bäck | e561183 | 2011-02-02 08:57:15 +0100 | [diff] [blame] | 305 | Patterns may be either a |
| 306 | link:http://download.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html[standard |
| 307 | Java regular expression (java.util.regex)] (start with `^` and |
Shawn O. Pearce | d7c026d | 2009-08-05 20:11:22 -0700 | [diff] [blame] | 308 | end with `$`) or be a simple prefix (any other string). |
| 309 | + |
| 310 | By default, the list contains two values, `http://` and `https://`, |
| 311 | allowing Gerrit to trust any OpenID it receives. |
| 312 | |
Mike Gouline | d2ab0cd | 2012-12-18 11:20:53 +1100 | [diff] [blame] | 313 | [[auth.openIdDomain]]auth.openIdDomain:: |
| 314 | + |
| 315 | List of allowed OpenID email address domains. Only used if |
David Pursehouse | 42f4204 | 2013-08-01 14:02:25 +0900 | [diff] [blame] | 316 | `auth.type` is set to `OPENID` or `OPENID_SSO`. |
Mike Gouline | d2ab0cd | 2012-12-18 11:20:53 +1100 | [diff] [blame] | 317 | + |
| 318 | Domain is case insensitive and must be in the same form as it |
| 319 | appears in the email address, for example, "example.com". |
| 320 | + |
| 321 | By default, any domain is accepted. |
| 322 | |
Shawn O. Pearce | 89030bc | 2010-04-24 17:25:29 -0700 | [diff] [blame] | 323 | [[auth.maxOpenIdSessionAge]]auth.maxOpenIdSessionAge:: |
| 324 | + |
| 325 | Time in seconds before an OpenID provider must force the user |
| 326 | to authenticate themselves again before authentication to this |
| 327 | Gerrit server. Currently this is only a polite request, and users |
| 328 | coming from providers that don't support the PAPE extension will |
| 329 | be accepted anyway. In the future it may be enforced, rejecting |
| 330 | users coming from providers that don't honor the max session age. |
| 331 | + |
| 332 | If set to 0, the provider will always force the user to authenticate |
| 333 | (e.g. supply their password). Values should use common unit suffixes |
| 334 | to express their setting: |
| 335 | + |
| 336 | * s, sec, second, seconds |
| 337 | * m, min, minute, minutes |
| 338 | * h, hr, hour, hours |
| 339 | * d, day, days |
| 340 | * w, week, weeks (`1 week` is treated as `7 days`) |
| 341 | * mon, month, months (`1 month` is treated as `30 days`) |
| 342 | * y, year, years (`1 year` is treated as `365 days`) |
| 343 | |
| 344 | + |
| 345 | Default is -1, permitting infinite time between authentications. |
| 346 | |
David Pursehouse | 5be35a3 | 2015-09-09 17:35:32 +0900 | [diff] [blame] | 347 | [[auth.registerEmailPrivateKey]]auth.registerEmailPrivateKey:: |
| 348 | + |
| 349 | Private key to use when generating an email verification token. |
| 350 | + |
| 351 | If not set, a random key is generated when running the |
| 352 | link:pgm-init.html[site initialization]. |
| 353 | |
Shawn O. Pearce | 34f38cf | 2011-06-16 19:18:54 -0700 | [diff] [blame] | 354 | [[auth.maxRegisterEmailTokenAge]]auth.maxRegisterEmailTokenAge:: |
| 355 | + |
| 356 | Time in seconds before an email verification token sent to a user in |
| 357 | order to validate their email address expires. |
| 358 | + |
| 359 | * s, sec, second, seconds |
| 360 | * m, min, minute, minutes |
| 361 | * h, hr, hour, hours |
| 362 | * d, day, days |
| 363 | * w, week, weeks (`1 week` is treated as `7 days`) |
| 364 | * mon, month, months (`1 month` is treated as `30 days`) |
| 365 | * y, year, years (`1 year` is treated as `365 days`) |
| 366 | |
| 367 | + |
Shawn O. Pearce | d6bd00b | 2012-01-20 12:40:51 -0800 | [diff] [blame] | 368 | Default is 12 hours. |
Shawn O. Pearce | 34f38cf | 2011-06-16 19:18:54 -0700 | [diff] [blame] | 369 | |
James E. Blair | ca8bc3b | 2011-12-21 18:12:26 +0000 | [diff] [blame] | 370 | [[auth.openIdSsoUrl]]auth.openIdSsoUrl:: |
| 371 | + |
David Pursehouse | 42f4204 | 2013-08-01 14:02:25 +0900 | [diff] [blame] | 372 | The SSO entry point URL. Only used if `auth.type` is set to |
| 373 | `OpenID_SSO`. |
James E. Blair | ca8bc3b | 2011-12-21 18:12:26 +0000 | [diff] [blame] | 374 | + |
| 375 | The "Sign In" link will send users directly to this URL. |
| 376 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 377 | [[auth.httpHeader]]auth.httpHeader:: |
Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 378 | + |
| 379 | HTTP header to trust the username from, or unset to select HTTP basic |
Han-Wen Nienhuys | 84d830b | 2017-02-15 16:36:04 +0100 | [diff] [blame] | 380 | authentication. Only used if `auth.type` is set to `HTTP`. |
Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 381 | |
Luca Milanesio | 384ed6c | 2013-07-30 09:10:07 +0100 | [diff] [blame] | 382 | [[auth.httpDisplaynameHeader]]auth.httpDisplaynameHeader:: |
| 383 | + |
| 384 | HTTP header to retrieve the user's display name from. Only used if `auth.type` |
| 385 | is set to `HTTP`. |
| 386 | + |
| 387 | If set, Gerrit trusts and enforces the user's full name using the HTTP header |
| 388 | and disables the ability to manually modify the user's full name |
| 389 | from the contact information page. |
| 390 | |
| 391 | [[auth.httpEmailHeader]]auth.httpEmailHeader:: |
| 392 | + |
| 393 | HTTP header to retrieve the user's e-mail from. Only used if `auth.type` |
| 394 | is set to `HTTP`. |
| 395 | + |
| 396 | If set, Gerrit trusts and enforces the user's e-mail using the HTTP header |
| 397 | and disables the ability to manually modify or register other e-mails |
| 398 | from the contact information page. |
| 399 | |
Luca Milanesio | 97d0735 | 2014-07-17 08:31:06 +0100 | [diff] [blame] | 400 | [[auth.httpExternalIdHeader]]auth.httpExternalIdHeader:: |
| 401 | + |
| 402 | HTTP header to retrieve the user's external identification token. |
| 403 | Only used if `auth.type` is set to `HTTP`. |
| 404 | + |
| 405 | If set, Gerrit adds the value contained in the HTTP header to the |
| 406 | user's identity. Typical use is with a federated identity token from |
| 407 | an external system (e.g. GitHub OAuth 2.0 authentication) where |
| 408 | the user's auth token exchanged during authentication handshake |
| 409 | needs to be used for authenticated communication to the external |
| 410 | system later on. |
| 411 | + |
| 412 | Example: `auth.httpExternalIdHeader: X-GitHub-OTP` |
| 413 | |
Luca Milanesio | 5185b04 | 2013-07-27 22:03:06 +0100 | [diff] [blame] | 414 | [[auth.loginUrl]]auth.loginUrl:: |
| 415 | + |
| 416 | 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] | 417 | login link in the upper right corner. Only used if `auth.type` is set |
| 418 | to `HTTP` or `HTTP_LDAP`. |
Luca Milanesio | 5185b04 | 2013-07-27 22:03:06 +0100 | [diff] [blame] | 419 | Organizations using an enterprise single-sign-on solution may want to |
| 420 | redirect the browser to the SSO product's sign-in page for completing the |
| 421 | login process and validate their credentials. |
| 422 | + |
David Pursehouse | 42f4204 | 2013-08-01 14:02:25 +0900 | [diff] [blame] | 423 | If set, Gerrit allows anonymous access until the end-user performs the login |
| 424 | and provides a trusted identity through the HTTP header. |
Luca Milanesio | 5185b04 | 2013-07-27 22:03:06 +0100 | [diff] [blame] | 425 | If not set, Gerrit requires the HTTP header with a trusted identity |
David Pursehouse | 42f4204 | 2013-08-01 14:02:25 +0900 | [diff] [blame] | 426 | and returns the error page 'LoginRedirect.html' if such a header is not |
| 427 | present. |
Luca Milanesio | 5185b04 | 2013-07-27 22:03:06 +0100 | [diff] [blame] | 428 | |
| 429 | [[auth.loginText]]auth.loginText:: |
| 430 | + |
David Pursehouse | 42f4204 | 2013-08-01 14:02:25 +0900 | [diff] [blame] | 431 | 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] | 432 | + |
David Pursehouse | 42f4204 | 2013-08-01 14:02:25 +0900 | [diff] [blame] | 433 | If not set, the "Sign In" text is used. |
Luca Milanesio | 5185b04 | 2013-07-27 22:03:06 +0100 | [diff] [blame] | 434 | |
Luca Milanesio | 111e0b7 | 2013-08-15 18:56:42 +0100 | [diff] [blame] | 435 | [[auth.registerPageUrl]]auth.registerPageUrl:: |
| 436 | + |
David Pursehouse | 268744b | 2013-08-17 15:32:11 +0900 | [diff] [blame] | 437 | URL of the registration page to use when a new user logs in to Gerrit for |
| 438 | the first time. Used only when `auth.type` is set to `HTTP`. |
Luca Milanesio | 111e0b7 | 2013-08-15 18:56:42 +0100 | [diff] [blame] | 439 | + |
| 440 | If not set, the standard Gerrit registration page `/#/register/` is displayed. |
| 441 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 442 | [[auth.logoutUrl]]auth.logoutUrl:: |
Shawn O. Pearce | 12b5d84 | 2009-08-15 15:11:10 -0700 | [diff] [blame] | 443 | + |
| 444 | URL to redirect a browser to after the end-user has clicked on the |
| 445 | "Sign Out" link in the upper right corner. Organizations using an |
| 446 | enterprise single-sign-on solution may want to redirect the browser |
| 447 | to the SSO product's sign-out page. |
| 448 | + |
| 449 | If not set, the redirect returns to the list of all open changes. |
| 450 | |
Shawn O. Pearce | c9d26b5 | 2009-12-16 08:05:27 -0800 | [diff] [blame] | 451 | [[auth.registerUrl]]auth.registerUrl:: |
| 452 | + |
| 453 | Target for the "Register" link in the upper right corner. Used only |
Edwin Kempin | 5409315 | 2015-05-08 10:50:35 +0200 | [diff] [blame] | 454 | when `auth.type` is `LDAP`, `LDAP_BIND` or `CUSTOM_EXTENSION`. |
Shawn O. Pearce | c9d26b5 | 2009-12-16 08:05:27 -0800 | [diff] [blame] | 455 | + |
| 456 | If not set, no "Register" link is displayed. |
| 457 | |
Chad Horohoe | 6589708 | 2012-11-10 10:26:25 -0800 | [diff] [blame] | 458 | [[auth.registerText]]auth.registerText:: |
| 459 | + |
| 460 | Text for the "Register" link in the upper right corner. Used only |
Edwin Kempin | 5409315 | 2015-05-08 10:50:35 +0200 | [diff] [blame] | 461 | when `auth.type` is `LDAP`, `LDAP_BIND` or `CUSTOM_EXTENSION`. |
Chad Horohoe | 6589708 | 2012-11-10 10:26:25 -0800 | [diff] [blame] | 462 | + |
| 463 | If not set, defaults to "Register". |
| 464 | |
David Pursehouse | 3d60449 | 2013-01-25 17:41:53 +0900 | [diff] [blame] | 465 | [[auth.editFullNameUrl]]auth.editFullNameUrl:: |
| 466 | + |
| 467 | 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] | 468 | full name. Used only when `auth.type` is `LDAP`, `LDAP_BIND` or |
| 469 | `CUSTOM_EXTENSION`. |
David Pursehouse | 3d60449 | 2013-01-25 17:41:53 +0900 | [diff] [blame] | 470 | |
| 471 | [[auth.httpPasswordUrl]]auth.httpPasswordUrl:: |
| 472 | + |
David Pursehouse | 42f4204 | 2013-08-01 14:02:25 +0900 | [diff] [blame] | 473 | Target for the "Obtain Password" link. Used only when `auth.type` is |
Edwin Kempin | 5409315 | 2015-05-08 10:50:35 +0200 | [diff] [blame] | 474 | `CUSTOM_EXTENSION`. |
Shawn Pearce | e0cafe4 | 2013-08-29 23:28:13 -0700 | [diff] [blame] | 475 | |
| 476 | [[auth.switchAccountUrl]]auth.switchAccountUrl:: |
David Pursehouse | 3d60449 | 2013-01-25 17:41:53 +0900 | [diff] [blame] | 477 | + |
Shawn Pearce | e0cafe4 | 2013-08-29 23:28:13 -0700 | [diff] [blame] | 478 | URL to switch user identities and login as a different account than |
| 479 | the currently active account. This is disabled by default except when |
| 480 | `auth.type` is `OPENID` and `DEVELOPMENT_BECOME_ANY_ACCOUNT`. If set |
| 481 | the "Switch Account" link is displayed next to "Sign Out". |
| 482 | + |
| 483 | When `auth.type` does not normally enable this URL administrators may |
Logan Hanks | 71d1ffd | 2017-03-16 14:12:23 -0700 | [diff] [blame] | 484 | set this to `login/`, allowing users to begin a new web session. This value |
David Ostrovsky | 7163dac | 2017-07-29 06:49:38 +0200 | [diff] [blame] | 485 | is used as an href in PolyGerrit, so absolute URLs like |
Logan Hanks | 71d1ffd | 2017-03-16 14:12:23 -0700 | [diff] [blame] | 486 | `https://someotherhost/login` work as well. |
| 487 | + |
| 488 | If a ${path} parameter is included, then PolyGerrit will substitute the |
| 489 | currently viewed path in the link. Be aware that this path will include |
| 490 | a leading slash, so a value like this might be appropriate: `/login${path}`. |
David Pursehouse | 3d60449 | 2013-01-25 17:41:53 +0900 | [diff] [blame] | 491 | |
Piotr Sikora | 7cec2f8 | 2011-02-26 12:57:30 +0000 | [diff] [blame] | 492 | [[auth.cookiePath]]auth.cookiePath:: |
| 493 | + |
| 494 | Sets "path" attribute of the authentication cookie. |
| 495 | + |
| 496 | If not set, HTTP request's path is used. |
| 497 | |
Sammy Gillespie | 26873c0 | 2016-02-11 14:39:43 +0000 | [diff] [blame] | 498 | [[auth.cookieDomain]]auth.cookieDomain:: |
| 499 | + |
| 500 | Sets "domain" attribute of the authentication cookie. |
| 501 | + |
| 502 | If not set, HTTP request's domain is used. |
| 503 | |
Piotr Sikora | 7cec2f8 | 2011-02-26 12:57:30 +0000 | [diff] [blame] | 504 | [[auth.cookieSecure]]auth.cookieSecure:: |
| 505 | + |
| 506 | Sets "secure" flag of the authentication cookie. If true, cookies |
| 507 | will be transmitted only over HTTPS protocol. |
| 508 | + |
| 509 | By default, false. |
| 510 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 511 | [[auth.emailFormat]]auth.emailFormat:: |
Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 512 | + |
| 513 | Optional format string to construct user email addresses out of |
David Pursehouse | 42f4204 | 2013-08-01 14:02:25 +0900 | [diff] [blame] | 514 | 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] | 515 | or `LDAP`. |
Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 516 | + |
Shawn O. Pearce | 44221bf | 2011-06-27 10:37:30 -0700 | [diff] [blame] | 517 | 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] | 518 | with the login name. E.g. "\{0\}+gerrit@example.com" with a user |
| 519 | login name of "foo" will produce "foo+gerrit@example.com" during |
| 520 | the first time user "foo" registers. |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 521 | + |
Shawn O. Pearce | f7e065e | 2009-09-26 20:01:10 -0700 | [diff] [blame] | 522 | If the site is using `HTTP_LDAP` or `LDAP`, using this option is |
| 523 | discouraged. Setting `ldap.accountEmailAddress` and importing the |
| 524 | email address from the LDAP directory is generally preferred. |
Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 525 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 526 | [[auth.contributorAgreements]]auth.contributorAgreements:: |
Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 527 | + |
| 528 | Controls whether or not the contributor agreement features are |
| 529 | enabled for the Gerrit site. If enabled a user must complete a |
| 530 | contributor agreement before they can upload changes. |
| 531 | + |
Marc Petit-Huguenin | bbb8549 | 2012-12-03 11:11:00 -0800 | [diff] [blame] | 532 | If enabled, the admin must also add one or more |
| 533 | link:config-cla.html[contributor-agreement sections] |
| 534 | in project.config and create agreement files under |
Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 535 | `'$site_path'/static`, so users can actually complete one or |
Grzegorz Kossakowski | 28e4e1b | 2009-09-23 11:33:34 -0700 | [diff] [blame] | 536 | more agreements. |
Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 537 | + |
| 538 | By default this is false (no agreements are used). |
Fredrik Luthander | a3cf354 | 2012-07-04 16:55:35 -0700 | [diff] [blame] | 539 | + |
| 540 | To enable the actual usage of contributor agreement the project |
| 541 | specific config option in the `project.config` must be set: |
| 542 | link:config-project-config.html[receive.requireContributorAgreement]. |
Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 543 | |
Christian Halstrick | a3d88a5 | 2011-08-31 09:21:41 +0200 | [diff] [blame] | 544 | [[auth.trustContainerAuth]]auth.trustContainerAuth:: |
| 545 | + |
| 546 | If true then it is the responsibility of the container hosting |
| 547 | Gerrit to authenticate users. In this case Gerrit will blindly trust |
| 548 | the container. |
| 549 | + |
| 550 | This parameter only affects git over http traffic. If set to false |
Han-Wen Nienhuys | 84d830b | 2017-02-15 16:36:04 +0100 | [diff] [blame] | 551 | then Gerrit will do the authentication (using Basic authentication). |
Christian Halstrick | a3d88a5 | 2011-08-31 09:21:41 +0200 | [diff] [blame] | 552 | + |
| 553 | By default this is set to false. |
| 554 | |
Luca Milanesio | 4205884 | 2012-01-05 21:25:38 +0000 | [diff] [blame] | 555 | |
Hector Oswaldo Caballero | 2a9ad1f | 2016-09-15 18:24:42 -0400 | [diff] [blame] | 556 | [[auth.gitBasicAuthPolicy]]auth.gitBasicAuthPolicy:: |
| 557 | + |
David Pursehouse | f7a1c2a | 2017-08-25 19:12:54 +0900 | [diff] [blame] | 558 | When `auth.type` is `LDAP`, `LDAP_BIND` or `OAUTH`, it allows using either the generated |
Luca Milanesio | 51edcb7 | 2017-03-06 11:59:55 +0000 | [diff] [blame] | 559 | HTTP password, the LDAP or OAUTH password, or a combination of HTTP and LDAP |
| 560 | authentication, to authenticate Git over HTTP and REST API requests. |
| 561 | The supported values are: |
Hector Oswaldo Caballero | 2a9ad1f | 2016-09-15 18:24:42 -0400 | [diff] [blame] | 562 | + |
| 563 | *`HTTP` |
| 564 | + |
David Pursehouse | e292003 | 2017-08-25 19:12:21 +0900 | [diff] [blame] | 565 | Only the HTTP password is accepted when doing Git over HTTP and REST API requests. |
Hector Oswaldo Caballero | 2a9ad1f | 2016-09-15 18:24:42 -0400 | [diff] [blame] | 566 | + |
| 567 | *`LDAP` |
| 568 | + |
| 569 | Only the `LDAP` password is allowed when doing Git over HTTP and REST API |
| 570 | requests. |
| 571 | + |
Luca Milanesio | 51edcb7 | 2017-03-06 11:59:55 +0000 | [diff] [blame] | 572 | *`OAUTH` |
| 573 | + |
David Pursehouse | e292003 | 2017-08-25 19:12:21 +0900 | [diff] [blame] | 574 | Only the `OAUTH` authentication is allowed when doing Git over HTTP and REST API |
Luca Milanesio | 51edcb7 | 2017-03-06 11:59:55 +0000 | [diff] [blame] | 575 | requests. |
| 576 | + |
Hector Oswaldo Caballero | 2a9ad1f | 2016-09-15 18:24:42 -0400 | [diff] [blame] | 577 | *`HTTP_LDAP` |
| 578 | + |
| 579 | The password in the request is first checked against the HTTP password and, if |
| 580 | it does not match, it is then validated against the `LDAP` password. |
| 581 | + |
Luca Milanesio | 51edcb7 | 2017-03-06 11:59:55 +0000 | [diff] [blame] | 582 | By default this is set to `LDAP` when link:#auth.type[`auth.type`] is `LDAP` |
| 583 | and `OAUTH` when link:#auth.type[`auth.type`] is `OAUTH`. |
Hector Oswaldo Caballero | 2a9ad1f | 2016-09-15 18:24:42 -0400 | [diff] [blame] | 584 | Otherwise, the default value is `HTTP`. |
| 585 | |
Michael Ochmann | e9e046a | 2015-10-20 15:34:29 +0200 | [diff] [blame] | 586 | [[auth.gitOAuthProvider]]auth.gitOAuthProvider:: |
| 587 | + |
| 588 | Selects the OAuth 2 provider to authenticate git over HTTP traffic with. |
| 589 | + |
| 590 | In general there is no way to determine from an access token alone, which |
| 591 | OAuth 2 provider to address to verify that token, and the BasicAuth |
| 592 | scheme does not support amending such details. If multiple OAuth provider |
| 593 | plugins in a system offer support for git over HTTP authentication site |
| 594 | administrators must configure, which one to use as default provider. |
| 595 | In case the provider cannot be determined from a request the access token |
| 596 | will be sent to the default provider for verification. |
| 597 | + |
| 598 | The value of this parameter must be the identifier of an OAuth 2 provider |
| 599 | in the form `plugin-name:provider-name`. Consult the respective plugin |
| 600 | documentation for details. |
| 601 | |
Edwin Kempin | 4b9e5e7 | 2011-09-22 15:06:14 +0200 | [diff] [blame] | 602 | [[auth.userNameToLowerCase]]auth.userNameToLowerCase:: |
| 603 | + |
| 604 | If set the username that is received to authenticate a git operation |
| 605 | is converted to lower case for looking up the user account in Gerrit. |
| 606 | + |
| 607 | By setting this parameter a case insensitive authentication for the |
| 608 | git operations can be achieved, if it is ensured that the usernames in |
| 609 | Gerrit (scheme `username`) are stored in lower case (e.g. if the |
| 610 | parameter link:#ldap.accountSshUserName[ldap.accountSshUserName] is |
| 611 | set to `${sAMAccountName.toLowerCase}`). It is important that for all |
| 612 | existing accounts this username is already in lower case. It is not |
| 613 | possible to convert the usernames of the existing accounts to lower |
| 614 | case because this would break the access to existing per-user |
Edwin Kempin | e7ae45c | 2018-09-20 09:57:15 +0200 | [diff] [blame] | 615 | branches and Gerrit provides no tool to do such a conversion. |
| 616 | + |
| 617 | Setting this parameter to `true` will prevent all users from login that |
| 618 | have a non-lower-case username. |
Edwin Kempin | 4b9e5e7 | 2011-09-22 15:06:14 +0200 | [diff] [blame] | 619 | + |
| 620 | This parameter only affects git over http and git over SSH traffic. |
| 621 | + |
| 622 | By default this is set to false. |
| 623 | |
Shawn Pearce | a931fe1 | 2013-06-11 12:29:17 -0700 | [diff] [blame] | 624 | [[auth.enableRunAs]]auth.enableRunAs:: |
| 625 | + |
| 626 | If true HTTP REST APIs will accept the `X-Gerrit-RunAs` HTTP request |
| 627 | header from any users granted the link:access-control.html#capability_runAs[Run As] |
| 628 | capability. The header and capability permit the authenticated user |
| 629 | to impersonate another account. |
| 630 | + |
| 631 | If false the feature is disabled and cannot be re-enabled without |
| 632 | editing gerrit.config and restarting the server. |
| 633 | + |
| 634 | Default is true. |
| 635 | |
David Pursehouse | 21bd07b | 2015-11-27 00:15:42 +0900 | [diff] [blame] | 636 | [[auth.allowRegisterNewEmail]]auth.allowRegisterNewEmail:: |
| 637 | + |
| 638 | Whether users are allowed to register new email addresses. |
| 639 | + |
| 640 | In addition for the HTTP authentication type |
| 641 | link:#auth.httpemailheader[auth.httpemailheader] must *not* be set to |
| 642 | enable registration of new email addresses. |
| 643 | + |
| 644 | By default, true. |
| 645 | |
Owen Li | c24f724 | 2017-06-14 10:04:00 -0400 | [diff] [blame] | 646 | [[auth.autoUpdateAccountActiveStatus]]auth.autoUpdateAccountActiveStatus:: |
| 647 | + |
| 648 | Whether to allow automatic synchronization of an account's inactive flag upon login. |
| 649 | If set to true, upon login, if the authentication back-end reports the account as active, |
| 650 | the account's inactive flag in the internal Gerrit database will be updated to be active. |
| 651 | If the authentication back-end reports the account as inactive, the account's flag will be |
| 652 | updated to be inactive and the login attempt will be blocked. Users enabling this feature |
| 653 | should ensure that their authentication back-end is supported. Currently, only |
| 654 | strict 'LDAP' authentication is supported. |
| 655 | + |
Owen Li | e2877bb | 2017-07-14 09:11:20 -0400 | [diff] [blame] | 656 | In addition, if this parameter is not set, or false, the corresponding scheduled |
| 657 | task to deactivate inactive Gerrit accounts will also be disabled. If this |
| 658 | parameter is set to true, users should also consider configuring the |
| 659 | link:#accountDeactivation[accountDeactivation] section appropriately. |
| 660 | + |
Owen Li | c24f724 | 2017-06-14 10:04:00 -0400 | [diff] [blame] | 661 | By default, false. |
| 662 | |
Patrick Hiesel | 8d0770e | 2018-10-09 13:39:54 +0200 | [diff] [blame] | 663 | [[auth.skipFullRefEvaluationIfAllRefsAreVisible]]auth.skipFullRefEvaluationIfAllRefsAreVisible:: |
| 664 | + |
| 665 | Whether to skip the full ref visibility checks as a performance shortcut when all refs are |
| 666 | visible to a user. Full ref filtering would filter out things like pending edits. |
| 667 | + |
| 668 | By default, true. |
| 669 | |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 670 | [[cache]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 671 | === Section cache |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 672 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 673 | [[cache.directory]]cache.directory:: |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 674 | + |
| 675 | 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] | 676 | future lookup. This local disk cache is used to retain potentially |
| 677 | expensive to compute information across restarts. If the location |
| 678 | does not exist, Gerrit will try to create it. |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 679 | + |
David Pursehouse | a61ee50 | 2016-09-06 16:27:09 +0900 | [diff] [blame] | 680 | Technically, cached entities are persisted as a set of H2 databases |
Saša Živkov | e607d6c | 2016-02-24 10:46:46 +0000 | [diff] [blame] | 681 | inside this directory. |
| 682 | + |
Shawn O. Pearce | 4b21228 | 2009-08-05 19:45:56 -0700 | [diff] [blame] | 683 | If not absolute, the path is resolved relative to `$site_path`. |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 684 | + |
Shawn O. Pearce | 4b21228 | 2009-08-05 19:45:56 -0700 | [diff] [blame] | 685 | Default is unset, no disk cache. |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 686 | |
Saša Živkov | f313457 | 2016-02-09 11:42:46 +0100 | [diff] [blame] | 687 | [[cache.h2CacheSize]]cache.h2CacheSize:: |
| 688 | + |
Björn Pedersen | 64af3ad | 2016-05-20 10:21:07 +0200 | [diff] [blame] | 689 | 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] | 690 | + |
Björn Pedersen | 64af3ad | 2016-05-20 10:21:07 +0200 | [diff] [blame] | 691 | 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] | 692 | H2 uses memory to cache its database content. The parameter `h2CacheSize` |
| 693 | 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] | 694 | caused by the H2 database using too much memory. |
| 695 | + |
Dave Borowitz | 3d1f85c | 2018-11-16 15:36:04 -0800 | [diff] [blame] | 696 | Technically the H2 cache size is configured using the CACHE_SIZE parameter in |
| 697 | the H2 JDBC connection URL, as described |
| 698 | link:http://www.h2database.com/html/features.html#cache_settings[here] |
Saša Živkov | f313457 | 2016-02-09 11:42:46 +0100 | [diff] [blame] | 699 | + |
Björn Pedersen | 64af3ad | 2016-05-20 10:21:07 +0200 | [diff] [blame] | 700 | Default is unset, using up to half of the available memory. |
David Pursehouse | e6976dc | 2017-06-30 16:33:44 +0900 | [diff] [blame] | 701 | + |
Björn Pedersen | 64af3ad | 2016-05-20 10:21:07 +0200 | [diff] [blame] | 702 | 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] | 703 | + |
| 704 | Common unit suffixes of 'k', 'm', or 'g' are supported. |
| 705 | |
Björn Pedersen | 64af3ad | 2016-05-20 10:21:07 +0200 | [diff] [blame] | 706 | [[cache.h2AutoServer]]cache.h2AutoServer:: |
| 707 | + |
| 708 | If set to true, enable H2 autoserver mode for the H2-backed persistent cache |
| 709 | databases. |
| 710 | + |
| 711 | See link:http://www.h2database.com/html/features.html#auto_mixed_mode[here] |
| 712 | for detail. |
| 713 | + |
| 714 | Default is false. |
| 715 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 716 | [[cache.name.maxAge]]cache.<name>.maxAge:: |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 717 | + |
Shawn O. Pearce | 2e1cb2b | 2012-05-24 14:28:40 -0700 | [diff] [blame] | 718 | Maximum age to keep an entry in the cache. Entries are removed from |
| 719 | the cache and refreshed from source data every maxAge interval. |
Shawn O. Pearce | d9c403e | 2009-08-19 08:35:41 -0700 | [diff] [blame] | 720 | Values should use common unit suffixes to express their setting: |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 721 | + |
Shawn O. Pearce | d9c403e | 2009-08-19 08:35:41 -0700 | [diff] [blame] | 722 | * s, sec, second, seconds |
| 723 | * m, min, minute, minutes |
| 724 | * h, hr, hour, hours |
| 725 | * d, day, days |
| 726 | * w, week, weeks (`1 week` is treated as `7 days`) |
| 727 | * mon, month, months (`1 month` is treated as `30 days`) |
| 728 | * y, year, years (`1 year` is treated as `365 days`) |
| 729 | |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 730 | + |
Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 731 | -- |
Edwin Kempin | abcd504 | 2013-03-12 16:04:37 +0100 | [diff] [blame] | 732 | 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] | 733 | supplied, the maximum age is infinite and items are never purged |
| 734 | except when the cache is full. |
Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 735 | |
Shawn O. Pearce | 2e1cb2b | 2012-05-24 14:28:40 -0700 | [diff] [blame] | 736 | Default is `0`, meaning store forever with no expire, except: |
Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 737 | |
Shawn O. Pearce | 05687e9 | 2011-04-04 17:29:03 -0400 | [diff] [blame] | 738 | * `"adv_bases"`: default is `10 minutes` |
Shawn O. Pearce | d9c403e | 2009-08-19 08:35:41 -0700 | [diff] [blame] | 739 | * `"ldap_groups"`: default is `1 hour` |
Shawn O. Pearce | d9c403e | 2009-08-19 08:35:41 -0700 | [diff] [blame] | 740 | * `"web_sessions"`: default is `12 hours` |
Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 741 | -- |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 742 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 743 | [[cache.name.memoryLimit]]cache.<name>.memoryLimit:: |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 744 | + |
Shawn O. Pearce | 2e1cb2b | 2012-05-24 14:28:40 -0700 | [diff] [blame] | 745 | The total cost of entries to retain in memory. The cost computation |
| 746 | varies by the cache. For most caches where the in-memory size of each |
| 747 | entry is relatively the same, memoryLimit is currently defined to be |
| 748 | the number of entries held by the cache (each entry costs 1). |
| 749 | + |
| 750 | For caches where the size of an entry can vary significantly between |
| 751 | individual entries (notably `"diff"`, `"diff_intraline"`), memoryLimit |
| 752 | is an approximation of the total number of bytes stored by the cache. |
| 753 | Larger entries that represent bigger patch sets or longer source files |
| 754 | will consume a bigger portion of the memoryLimit. For these caches the |
| 755 | memoryLimit should be set to roughly the amount of RAM (in bytes) the |
| 756 | administrator can dedicate to the cache. |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 757 | + |
Shawn O. Pearce | efaf979 | 2009-09-02 18:12:52 -0700 | [diff] [blame] | 758 | Default is 1024 for most caches, except: |
| 759 | + |
Shawn O. Pearce | 05687e9 | 2011-04-04 17:29:03 -0400 | [diff] [blame] | 760 | * `"adv_bases"`: default is `4096` |
Shawn O. Pearce | 2e1cb2b | 2012-05-24 14:28:40 -0700 | [diff] [blame] | 761 | * `"diff"`: default is `10m` (10 MiB of memory) |
| 762 | * `"diff_intraline"`: default is `10m` (10 MiB of memory) |
Dave Borowitz | 7388e9e | 2016-09-23 13:20:29 +0200 | [diff] [blame] | 763 | * `"diff_summary"`: default is `10m` (10 MiB of memory) |
Dave Borowitz | 70dfbd6 | 2018-06-05 13:30:48 -0400 | [diff] [blame] | 764 | * `"external_ids_map"`: default is `2` and should not be changed |
Edwin Kempin | d967ec4 | 2017-11-13 15:14:41 +0100 | [diff] [blame] | 765 | * `"groups"`: default is unlimited |
| 766 | * `"groups_byname"`: default is unlimited |
| 767 | * `"groups_byuuid"`: default is unlimited |
Shawn O. Pearce | 2e1cb2b | 2012-05-24 14:28:40 -0700 | [diff] [blame] | 768 | * `"plugin_resources"`: default is 2m (2 MiB of memory) |
| 769 | |
| 770 | + |
| 771 | If set to 0 the cache is disabled. Entries are removed immediately |
| 772 | 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] | 773 | |
Dave Borowitz | 08bac5ca | 2018-06-05 14:58:28 -0400 | [diff] [blame] | 774 | [[cache.name.expireFromMemoryAfterAccess]]cache.<name>.expireFromMemoryAfterAccess:: |
| 775 | + |
| 776 | Time after last access to automatically expire entries from an in-memory |
| 777 | cache. If 0 or not specified, entries are never expired in this manner. |
| 778 | Values may use unit suffixes as in link:#cache.name.maxAge[maxAge]. |
| 779 | + |
| 780 | This option only applies to in-memory caches; persistent cache values are |
| 781 | not expired in this manner, and are only pruned via |
| 782 | link:#cache.name.diskLimit[diskLimit]. |
| 783 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 784 | [[cache.name.diskLimit]]cache.<name>.diskLimit:: |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 785 | + |
Shawn O. Pearce | 2e1cb2b | 2012-05-24 14:28:40 -0700 | [diff] [blame] | 786 | Total size in bytes of the keys and values stored on disk. Caches that |
| 787 | have grown bigger than this size are scanned daily at 1 AM local |
| 788 | server time to trim the cache. Entries are removed in least recently |
| 789 | accessed order until the cache fits within this limit. Caches may |
| 790 | grow larger than this during the day, as the size check is only |
| 791 | performed once every 24 hours. |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 792 | + |
Saša Živkov | e789f2e | 2016-09-22 10:37:34 +0200 | [diff] [blame] | 793 | Default is 128 MiB per cache, except: |
| 794 | + |
Dave Borowitz | bab4586 | 2018-05-01 12:31:48 -0400 | [diff] [blame] | 795 | * `"change_notes"`: disk storage is disabled by default |
Dave Borowitz | 7388e9e | 2016-09-23 13:20:29 +0200 | [diff] [blame] | 796 | * `"diff_summary"`: default is `1g` (1 GiB of disk space) |
Dave Borowitz | b20d23a8 | 2018-08-21 13:43:10 -0700 | [diff] [blame] | 797 | * `"external_ids_map"`: disk storage is disabled by default |
Saša Živkov | e789f2e | 2016-09-22 10:37:34 +0200 | [diff] [blame] | 798 | |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 799 | + |
Dave Borowitz | dab5155 | 2018-05-14 16:35:37 -0700 | [diff] [blame] | 800 | If 0 or negative, disk storage for the cache is disabled. |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 801 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 802 | ==== [[cache_names]]Standard Caches |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 803 | |
Shawn O. Pearce | 4a45271 | 2009-05-28 20:12:33 -0700 | [diff] [blame] | 804 | cache `"accounts"`:: |
| 805 | + |
Shawn O. Pearce | 4dba988 | 2009-08-05 19:55:15 -0700 | [diff] [blame] | 806 | Cache entries contain important details of an active user, including |
Alice Kober-Sotzek | eab3320 | 2017-09-27 13:54:30 +0200 | [diff] [blame] | 807 | their display name, preferences, and known email addresses. Entry |
Dave Borowitz | ada289c | 2018-12-18 13:24:14 -0800 | [diff] [blame] | 808 | information is obtained from NoteDb data in the `All-Users` repo. |
Shawn O. Pearce | 4dba988 | 2009-08-05 19:55:15 -0700 | [diff] [blame] | 809 | |
| 810 | + |
Dave Borowitz | ada289c | 2018-12-18 13:24:14 -0800 | [diff] [blame] | 811 | If direct updates are made to `All-Users`, this cache should be flushed. |
Shawn O. Pearce | 4dba988 | 2009-08-05 19:55:15 -0700 | [diff] [blame] | 812 | |
Shawn O. Pearce | 05687e9 | 2011-04-04 17:29:03 -0400 | [diff] [blame] | 813 | cache `"adv_bases"`:: |
| 814 | + |
| 815 | Used only for push over smart HTTP when branch level access controls |
David Pursehouse | 9246356 | 2013-06-24 10:16:28 +0900 | [diff] [blame] | 816 | are enabled. The cache entry contains all commits that are available |
Shawn O. Pearce | 05687e9 | 2011-04-04 17:29:03 -0400 | [diff] [blame] | 817 | for the client to use as potential delta bases. Push over smart HTTP |
| 818 | requires two HTTP requests, and this cache tries to carry state from |
| 819 | the first request into the second to ensure it can complete. |
| 820 | |
Patrick Hiesel | ace3dc9 | 2019-01-15 14:08:13 +0000 | [diff] [blame] | 821 | cache `"changes"`:: |
Gustaf Lundh | 47ce4e3 | 2012-05-21 11:18:42 +0200 | [diff] [blame] | 822 | + |
Gustaf Lundh | 3353c36 | 2013-04-24 17:25:39 +0200 | [diff] [blame] | 823 | The size of `memoryLimit` determines the number of projects for which |
| 824 | all changes will be cached. If the cache is set to 1024, this means all |
Patrick Hiesel | ace3dc9 | 2019-01-15 14:08:13 +0000 | [diff] [blame] | 825 | changes for up to 1024 projects can be held in the cache. |
Gustaf Lundh | 5349377 | 2012-11-18 18:41:15 -0800 | [diff] [blame] | 826 | + |
Patrick Hiesel | ace3dc9 | 2019-01-15 14:08:13 +0000 | [diff] [blame] | 827 | Default value is 0 (disabled). It is disabled by default due to the fact |
| 828 | that change updates are not communicated between Gerrit servers. Hence |
Han-Wen Nienhuys | 348a603 | 2019-09-24 19:44:57 +0200 | [diff] [blame] | 829 | this cache should be disabled in an multi-master/multi-replica setup. |
Gustaf Lundh | 5349377 | 2012-11-18 18:41:15 -0800 | [diff] [blame] | 830 | + |
Patrick Hiesel | ace3dc9 | 2019-01-15 14:08:13 +0000 | [diff] [blame] | 831 | The cache should be flushed whenever the database changes table is modified |
| 832 | outside of Gerrit. |
Gustaf Lundh | 47ce4e3 | 2012-05-21 11:18:42 +0200 | [diff] [blame] | 833 | |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 834 | cache `"diff"`:: |
| 835 | + |
Shawn O. Pearce | efaf979 | 2009-09-02 18:12:52 -0700 | [diff] [blame] | 836 | Each item caches the differences between two commits, at both the |
| 837 | directory and file levels. Gerrit uses this cache to accelerate |
| 838 | the display of affected file names, as well as file contents. |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 839 | + |
Shawn O. Pearce | 2e1cb2b | 2012-05-24 14:28:40 -0700 | [diff] [blame] | 840 | Entries in this cache are relatively large, so memoryLimit is an |
| 841 | estimate in bytes of memory used. Administrators should try to target |
| 842 | cache.diff.memoryLimit to fit all changes users will view in a 1 or 2 |
| 843 | day span. |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 844 | |
Shawn O. Pearce | f0cfe53 | 2011-04-11 23:40:06 -0400 | [diff] [blame] | 845 | cache `"diff_intraline"`:: |
| 846 | + |
| 847 | Each item caches the intraline difference of one file, when compared |
| 848 | between two commits. Gerrit uses this cache to accelerate display of |
| 849 | intraline differences when viewing a file. |
| 850 | + |
Shawn O. Pearce | 2e1cb2b | 2012-05-24 14:28:40 -0700 | [diff] [blame] | 851 | Entries in this cache are relatively large, so memoryLimit is an |
| 852 | estimate in bytes of memory used. Administrators should try to target |
| 853 | cache.diff.memoryLimit to fit all files users will view in a 1 or 2 |
| 854 | day span. |
Shawn O. Pearce | f0cfe53 | 2011-04-11 23:40:06 -0400 | [diff] [blame] | 855 | |
Dave Borowitz | 7388e9e | 2016-09-23 13:20:29 +0200 | [diff] [blame] | 856 | cache `"diff_summary"`:: |
Saša Živkov | e789f2e | 2016-09-22 10:37:34 +0200 | [diff] [blame] | 857 | + |
| 858 | Each item caches list of file paths which are different between two |
| 859 | commits. Gerrit uses this cache to accelerate computing of the list |
| 860 | of paths of changed files. |
| 861 | + |
| 862 | Ideally, disk limit of this cache is large enough to cover all changes. |
| 863 | This should significantly speed up change reindexing, especially |
| 864 | full offline reindexing. |
| 865 | |
Dave Borowitz | 6f7fa0a | 2018-06-05 13:30:48 -0400 | [diff] [blame] | 866 | cache `"external_ids_map"`:: |
| 867 | + |
| 868 | A singleton cache whose sole entry is a map of the parsed representation |
Dave Borowitz | 70dfbd6 | 2018-06-05 13:30:48 -0400 | [diff] [blame] | 869 | of link:config-accounts.html#external-ids[all current external IDs]. The |
| 870 | cache may temporarily contain 2 entries, but the second one is promptly |
| 871 | expired. |
Dave Borowitz | 6f7fa0a | 2018-06-05 13:30:48 -0400 | [diff] [blame] | 872 | + |
Dave Borowitz | b20d23a8 | 2018-08-21 13:43:10 -0700 | [diff] [blame] | 873 | It is not recommended to change the in-memory attributes of this cache |
| 874 | away from the defaults. The cache may be persisted by setting |
| 875 | `diskLimit`, which is only recommended if cold start performance is |
| 876 | problematic. |
Patrick Hiesel | 42b47b1 | 2019-07-22 09:32:37 +0200 | [diff] [blame] | 877 | + |
| 878 | `external_ids_map` supports computing the new cache value based on a |
| 879 | previously cached state. This applies modifications based on the Git |
| 880 | diff and is almost always faster. |
| 881 | `cache.external_ids_map.enablePartialReloads` turns this behavior on |
Patrick Hiesel | c486edf | 2019-08-19 15:55:17 +0200 | [diff] [blame] | 882 | or off. The default is `true`. |
Dave Borowitz | 6f7fa0a | 2018-06-05 13:30:48 -0400 | [diff] [blame] | 883 | |
Shawn O. Pearce | 2d65d29 | 2011-06-24 08:12:02 -0700 | [diff] [blame] | 884 | cache `"git_tags"`:: |
| 885 | + |
| 886 | If branch or reference level READ access controls are used, this |
| 887 | cache tracks which tags are reachable from the branch tips of a |
| 888 | repository. Gerrit uses this information to determine the set |
| 889 | of tags that a client may access, derived from which tags are |
| 890 | part of the history of a visible branch. |
| 891 | + |
| 892 | The cache is persisted to disk across server restarts as it can |
| 893 | be expensive to compute (60 or more seconds for a large history |
| 894 | like the Linux kernel repository). |
| 895 | |
Shawn O. Pearce | 4a45271 | 2009-05-28 20:12:33 -0700 | [diff] [blame] | 896 | cache `"groups"`:: |
| 897 | + |
Edwin Kempin | 3091e11 | 2017-11-13 15:23:58 +0100 | [diff] [blame] | 898 | Caches the basic group information of internal groups by group ID, |
| 899 | including the group owner, name, and description. |
| 900 | + |
Edwin Kempin | d967ec4 | 2017-11-13 15:14:41 +0100 | [diff] [blame] | 901 | For this cache it is important to configure a size that is larger than |
| 902 | the number of internal Gerrit groups, otherwise general Gerrit |
| 903 | performance may be poor. This is why by default this cache is |
| 904 | unlimited. |
| 905 | + |
Edwin Kempin | 3091e11 | 2017-11-13 15:23:58 +0100 | [diff] [blame] | 906 | External group membership obtained from LDAP is cached under |
| 907 | `"ldap_groups"`. |
| 908 | |
| 909 | cache `"groups_byname"`:: |
| 910 | + |
| 911 | Caches the basic group information of internal groups by group name, |
| 912 | including the group owner, name, and description. |
| 913 | + |
Edwin Kempin | d967ec4 | 2017-11-13 15:14:41 +0100 | [diff] [blame] | 914 | For this cache it is important to configure a size that is larger than |
| 915 | the number of internal Gerrit groups, otherwise general Gerrit |
| 916 | performance may be poor. This is why by default this cache is |
| 917 | unlimited. |
| 918 | + |
Edwin Kempin | 3091e11 | 2017-11-13 15:23:58 +0100 | [diff] [blame] | 919 | External group membership obtained from LDAP is cached under |
| 920 | `"ldap_groups"`. |
| 921 | |
| 922 | cache `"groups_byuuid"`:: |
| 923 | + |
| 924 | Caches the basic group information of internal groups by group UUID, |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 925 | including the group owner, name, and description. |
| 926 | + |
Edwin Kempin | d967ec4 | 2017-11-13 15:14:41 +0100 | [diff] [blame] | 927 | For this cache it is important to configure a size that is larger than |
| 928 | the number of internal Gerrit groups, otherwise general Gerrit |
| 929 | performance may be poor. This is why by default this cache is |
| 930 | unlimited. |
| 931 | + |
Alice Kober-Sotzek | eab3320 | 2017-09-27 13:54:30 +0200 | [diff] [blame] | 932 | External group membership obtained from LDAP is cached under |
| 933 | `"ldap_groups"`. |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 934 | |
Alice Kober-Sotzek | 864ed14 | 2017-10-12 14:24:36 +0200 | [diff] [blame] | 935 | cache `"groups_bymember"`:: |
Matt Fischer | 620255a | 2011-03-22 14:28:23 -0500 | [diff] [blame] | 936 | + |
Alice Kober-Sotzek | 864ed14 | 2017-10-12 14:24:36 +0200 | [diff] [blame] | 937 | Caches the groups which contain a specific member (account). If direct |
| 938 | updates are made to the `account_group_members` table, this cache should |
| 939 | be flushed. |
| 940 | |
Alice Kober-Sotzek | 3e1fe1b | 2017-10-12 14:44:17 +0200 | [diff] [blame] | 941 | cache `"groups_bysubgroups"`:: |
| 942 | + |
| 943 | Caches the parent groups of a subgroup. If direct updates are made |
Matt Fischer | 620255a | 2011-03-22 14:28:23 -0500 | [diff] [blame] | 944 | to the `account_group_includes` table, this cache should be flushed. |
| 945 | |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 946 | cache `"ldap_groups"`:: |
| 947 | + |
| 948 | Caches the LDAP groups that a user belongs to, if LDAP has been |
| 949 | configured on this server. This cache should be configured with a |
| 950 | low maxAge setting, to ensure LDAP modifications are picked up in |
| 951 | a timely fashion. |
Shawn O. Pearce | 4a45271 | 2009-05-28 20:12:33 -0700 | [diff] [blame] | 952 | |
Gustaf Lundh | 0919a49 | 2012-10-19 15:29:23 +0200 | [diff] [blame] | 953 | cache `"ldap_groups_byinclude"`:: |
| 954 | + |
| 955 | Caches the hierarchical structure of LDAP groups. |
| 956 | |
Shawn O. Pearce | 6d26f4a | 2009-08-24 15:43:52 -0700 | [diff] [blame] | 957 | cache `"ldap_usernames"`:: |
| 958 | + |
| 959 | Caches a mapping of LDAP username to Gerrit account identity. The |
| 960 | cache automatically updates when a user first creates their account |
| 961 | within Gerrit, so the cache expire time is largely irrelevant. |
| 962 | |
Shawn O. Pearce | 0c1abdb | 2011-06-24 11:01:25 -0700 | [diff] [blame] | 963 | cache `"permission_sort"`:: |
| 964 | + |
David Pursehouse | 221d4f6 | 2012-06-08 17:38:08 +0900 | [diff] [blame] | 965 | 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] | 966 | reference. Sorting the sections can be expensive when regular |
| 967 | expressions are used, so this cache remembers the ordering for |
| 968 | each branch. |
| 969 | |
Shawn O. Pearce | 2e1cb2b | 2012-05-24 14:28:40 -0700 | [diff] [blame] | 970 | cache `"plugin_resources"`:: |
| 971 | + |
| 972 | Caches formatted plugin resources, such as plugin documentation that |
| 973 | has been converted from Markdown to HTML. The memoryLimit refers to |
| 974 | the bytes of memory dedicated to storing the documentation. |
| 975 | |
Shawn O. Pearce | 4a45271 | 2009-05-28 20:12:33 -0700 | [diff] [blame] | 976 | cache `"projects"`:: |
| 977 | + |
| 978 | Caches the project description records, from the `projects` table |
| 979 | in the database. If a project record is updated or deleted, this |
| 980 | cache should be flushed. Newly inserted projects do not require |
| 981 | a cache flush, as they will be read upon first reference. |
| 982 | |
Dave Borowitz | 08aa8bb | 2018-04-05 12:01:06 -0400 | [diff] [blame] | 983 | cache `"prolog_rules"`:: |
| 984 | + |
| 985 | Caches parsed `rules.pl` contents for each project. This cache uses the same |
| 986 | size as the `projects` cache, and cannot be configured independently. |
| 987 | |
Patrick Hiesel | a57c0d6 | 2019-02-19 09:09:22 +0100 | [diff] [blame] | 988 | cache `"pure_revert"`:: |
| 989 | + |
| 990 | Result of checking if one change or commit is a pure/clean revert of |
| 991 | another. |
| 992 | |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 993 | cache `"sshkeys"`:: |
| 994 | + |
| 995 | Caches unpacked versions of user SSH keys, so the internal SSH daemon |
| 996 | can match against them during authentication. The unit of storage |
| 997 | is per-user, so 1024 items translates to 1024 unique user accounts. |
| 998 | As each individual user account may configure multiple SSH keys, |
| 999 | the total number of keys may be larger than the item count. |
| 1000 | |
Shawn O. Pearce | b09322b | 2009-08-15 17:49:00 -0700 | [diff] [blame] | 1001 | cache `"web_sessions"`:: |
| 1002 | + |
| 1003 | Tracks the live user sessions coming in over HTTP. Flushing this |
| 1004 | cache would cause all users to be signed out immediately, forcing |
Shawn O. Pearce | 727d80f | 2009-08-17 07:57:54 -0700 | [diff] [blame] | 1005 | them to sign-in again. To avoid breaking active users, this cache |
| 1006 | is not flushed automatically by `gerrit flush-caches --all`, but |
| 1007 | instead must be explicitly requested. |
| 1008 | + |
| 1009 | If no disk cache is configured (or `cache.web_sessions.diskLimit` |
| 1010 | is set to 0) a server restart will force all users to sign-out, |
| 1011 | and need to sign-in again after the restart, as the cache was |
| 1012 | unable to persist the session information. Enabling a disk cache |
| 1013 | is strongly recommended. |
| 1014 | + |
Shawn O. Pearce | 2e1cb2b | 2012-05-24 14:28:40 -0700 | [diff] [blame] | 1015 | Session storage is relatively inexpensive. The average entry in |
| 1016 | this cache is approximately 346 bytes. |
Shawn O. Pearce | b09322b | 2009-08-15 17:49:00 -0700 | [diff] [blame] | 1017 | |
Shawn O. Pearce | 4016a93 | 2009-05-28 15:12:40 -0700 | [diff] [blame] | 1018 | See also link:cmd-flush-caches.html[gerrit flush-caches]. |
| 1019 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1020 | ==== [[cache_options]]Cache Options |
Shawn O. Pearce | 29de436 | 2010-03-03 17:51:26 -0800 | [diff] [blame] | 1021 | |
Hugo Arès | 2bc8681 | 2015-03-09 15:20:28 -0400 | [diff] [blame] | 1022 | [[cache.diff.timeout]]cache.diff.timeout:: |
| 1023 | + |
| 1024 | Maximum number of milliseconds to wait for diff data before giving up and |
| 1025 | falling back on a simpler diff algorithm that will not be able to break down |
| 1026 | modified regions into smaller ones. This is a work around for an infinite loop |
| 1027 | bug in the default difference algorithm implementation. |
| 1028 | + |
| 1029 | Values should use common unit suffixes to express their setting: |
| 1030 | + |
| 1031 | * ms, milliseconds |
| 1032 | * s, sec, second, seconds |
| 1033 | * m, min, minute, minutes |
| 1034 | * h, hr, hour, hours |
| 1035 | |
| 1036 | + |
Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 1037 | -- |
Hugo Arès | 2bc8681 | 2015-03-09 15:20:28 -0400 | [diff] [blame] | 1038 | If a unit suffix is not specified, `milliseconds` is assumed. |
Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 1039 | |
Hugo Arès | 2bc8681 | 2015-03-09 15:20:28 -0400 | [diff] [blame] | 1040 | Default is 5 seconds. |
Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 1041 | -- |
Hugo Arès | 2bc8681 | 2015-03-09 15:20:28 -0400 | [diff] [blame] | 1042 | |
Edwin Kempin | 42d2743 | 2013-11-24 17:06:24 +0100 | [diff] [blame] | 1043 | [[cache.diff_intraline.timeout]]cache.diff_intraline.timeout:: |
Shawn O. Pearce | 617aa39 | 2010-11-15 14:03:28 -0800 | [diff] [blame] | 1044 | + |
| 1045 | Maximum number of milliseconds to wait for intraline difference data |
| 1046 | before giving up and disabling it for a particular file pair. This is |
| 1047 | a work around for an infinite loop bug in the intraline difference |
David Pursehouse | e8c1fb9 | 2013-04-17 17:18:43 +0900 | [diff] [blame] | 1048 | implementation. |
| 1049 | + |
| 1050 | If computation takes longer than the timeout, the worker thread is |
| 1051 | terminated, an error message is shown, and no intraline difference is |
| 1052 | displayed for the file pair. |
Shawn O. Pearce | 617aa39 | 2010-11-15 14:03:28 -0800 | [diff] [blame] | 1053 | + |
| 1054 | Values should use common unit suffixes to express their setting: |
| 1055 | + |
| 1056 | * ms, milliseconds |
| 1057 | * s, sec, second, seconds |
| 1058 | * m, min, minute, minutes |
| 1059 | * h, hr, hour, hours |
| 1060 | |
| 1061 | + |
Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 1062 | -- |
Shawn O. Pearce | 617aa39 | 2010-11-15 14:03:28 -0800 | [diff] [blame] | 1063 | If a unit suffix is not specified, `milliseconds` is assumed. |
Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 1064 | |
Shawn O. Pearce | 617aa39 | 2010-11-15 14:03:28 -0800 | [diff] [blame] | 1065 | Default is 5 seconds. |
Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 1066 | -- |
Shawn O. Pearce | 617aa39 | 2010-11-15 14:03:28 -0800 | [diff] [blame] | 1067 | |
Edwin Kempin | 42d2743 | 2013-11-24 17:06:24 +0100 | [diff] [blame] | 1068 | [[cache.diff_intraline.enabled]]cache.diff_intraline.enabled:: |
Shawn O. Pearce | 29de436 | 2010-03-03 17:51:26 -0800 | [diff] [blame] | 1069 | + |
| 1070 | Boolean to enable or disable the computation of intraline differences |
Shawn O. Pearce | 307dd4e | 2010-11-15 12:12:20 -0800 | [diff] [blame] | 1071 | when populating a diff cache entry. This flag is provided primarily |
| 1072 | as a backdoor to disable the intraline difference feature if |
David Pursehouse | 9246356 | 2013-06-24 10:16:28 +0900 | [diff] [blame] | 1073 | necessary. To maintain backwards compatibility with prior versions, |
Shawn O. Pearce | 307dd4e | 2010-11-15 12:12:20 -0800 | [diff] [blame] | 1074 | this setting will fallback to `cache.diff.intraline` if not set in the |
| 1075 | configuration. |
Shawn O. Pearce | 29de436 | 2010-03-03 17:51:26 -0800 | [diff] [blame] | 1076 | + |
| 1077 | Default is true, enabled. |
| 1078 | |
Edwin Kempin | 42d2743 | 2013-11-24 17:06:24 +0100 | [diff] [blame] | 1079 | [[cache.projects.checkFrequency]]cache.projects.checkFrequency:: |
Shawn O. Pearce | b8e4e35 | 2011-05-19 18:09:01 -0700 | [diff] [blame] | 1080 | + |
| 1081 | How often project configuration should be checked for update from Git. |
| 1082 | Gerrit Code Review caches project access rules and configuration in |
| 1083 | memory, checking the refs/meta/config branch every checkFrequency |
| 1084 | minutes to see if a new revision should be loaded and used for future |
| 1085 | access. Values can be specified using standard time unit abbreviations |
| 1086 | ('ms', 'sec', 'min', etc.). |
| 1087 | + |
| 1088 | 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] | 1089 | 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] | 1090 | Administrators may force the cache to flush with |
| 1091 | link:cmd-flush-caches.html[gerrit flush-caches]. |
| 1092 | + |
| 1093 | Default is 5 minutes. |
| 1094 | |
Simon Lei | fc19ff1 | 2014-10-02 13:36:00 -0400 | [diff] [blame] | 1095 | [[cache.projects.loadOnStartup]]cache.projects.loadOnStartup:: |
| 1096 | + |
| 1097 | If the project cache should be loaded during server startup. |
| 1098 | + |
| 1099 | The cache is loaded concurrently. Admins should ensure that the cache |
| 1100 | size set under <<cache.name.memoryLimit,cache.projects.memoryLimit>> |
| 1101 | is not smaller than the number of repos. |
| 1102 | + |
| 1103 | Default is false, disabled. |
| 1104 | |
| 1105 | [[cache.projects.loadThreads]]cache.projects.loadThreads:: |
| 1106 | + |
| 1107 | Only relevant if <<cache.projects.loadOnStartup,cache.projects.loadOnStartup>> |
| 1108 | is true. |
| 1109 | + |
| 1110 | The number of threads to allocate for loading the cache at startup. These |
| 1111 | threads will die out after the cache is loaded. |
| 1112 | + |
| 1113 | Default is the number of CPUs. |
| 1114 | |
Shawn Pearce | 67a3330 | 2016-08-11 11:51:59 -0700 | [diff] [blame] | 1115 | |
| 1116 | [[capability]] |
| 1117 | === Section capability |
| 1118 | |
| 1119 | [[capability.administrateServer]]capability.administrateServer:: |
| 1120 | + |
| 1121 | Names of groups of users that are allowed to exercise the |
Edwin Kempin | 53d52ba | 2017-06-09 10:57:43 +0200 | [diff] [blame] | 1122 | `administrateServer` capability, in addition to those listed in |
Shawn Pearce | 67a3330 | 2016-08-11 11:51:59 -0700 | [diff] [blame] | 1123 | All-Projects. Configuring this option can be a useful fail-safe |
| 1124 | to recover a server in the event an administrator removed all |
Edwin Kempin | 53d52ba | 2017-06-09 10:57:43 +0200 | [diff] [blame] | 1125 | groups from the `administrateServer` capability, or to ensure that |
Shawn Pearce | 67a3330 | 2016-08-11 11:51:59 -0700 | [diff] [blame] | 1126 | specific groups always have administration capabilities. |
| 1127 | + |
| 1128 | ---- |
| 1129 | [capability] |
| 1130 | administrateServer = group Fail Safe Admins |
| 1131 | ---- |
| 1132 | + |
| 1133 | The configuration file uses group names, not UUIDs. If a group is |
| 1134 | renamed the gerrit.config file must be updated to reflect the new |
| 1135 | name. If a group cannot be found for the configured name a warning |
| 1136 | is logged and the server will continue normal startup. |
| 1137 | + |
| 1138 | If not specified (default), only the groups listed by All-Projects |
Edwin Kempin | 53d52ba | 2017-06-09 10:57:43 +0200 | [diff] [blame] | 1139 | may use the `administrateServer` capability. |
| 1140 | |
| 1141 | [[capability.makeFirstUserAdmin]]capability.makeFirstUserAdmin:: |
| 1142 | + |
| 1143 | Whether the first user that logs in to the Gerrit server should |
| 1144 | automatically be added to the administrator group and hence get the |
| 1145 | `administrateServer` capability assigned. This is useful to bootstrap |
| 1146 | the authentication database. |
| 1147 | + |
| 1148 | Default is true. |
Shawn Pearce | 67a3330 | 2016-08-11 11:51:59 -0700 | [diff] [blame] | 1149 | |
| 1150 | |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 1151 | [[change]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1152 | === Section change |
Shawn Pearce | b9ebb66 | 2013-07-19 19:45:25 -0700 | [diff] [blame] | 1153 | |
Gabor Somossy | b72d4c6 | 2015-10-20 23:40:07 +0100 | [diff] [blame] | 1154 | [[change.allowBlame]]change.allowBlame:: |
| 1155 | + |
David Ostrovsky | 7163dac | 2017-07-29 06:49:38 +0200 | [diff] [blame] | 1156 | Allow blame on side by side diff. If set to false, blame cannot be used. |
Gabor Somossy | b72d4c6 | 2015-10-20 23:40:07 +0100 | [diff] [blame] | 1157 | + |
| 1158 | Default is true. |
| 1159 | |
Patrick Hiesel | ca6384d | 2017-12-21 11:51:11 +0100 | [diff] [blame] | 1160 | [[change.api.allowedIdentifier]]change.api.allowedIdentifier:: |
| 1161 | + |
| 1162 | Change identifier(s) that are allowed on the API. See |
| 1163 | link:rest-api-changes.html#change-id[Change Id] for more information. |
| 1164 | + |
| 1165 | Possible values are `ALL`, `TRIPLET`, `NUMERIC_ID`, `I_HASH`, and |
| 1166 | `COMMIT_HASH` or any combination of those as a string list. |
| 1167 | `PROJECT_NUMERIC_ID` is always allowed and doesn't need to be listed |
| 1168 | explicitly. |
| 1169 | + |
| 1170 | Default is `ALL`. |
| 1171 | |
Dave Borowitz | 1f85d3a | 2019-04-16 12:16:04 -0700 | [diff] [blame] | 1172 | [[change.api.excludeMergeableInChangeInfo]]change.api.excludeMergeableInChangeInfo:: |
David Ostrovsky | d1cb918 | 2018-05-07 08:24:05 +0200 | [diff] [blame] | 1173 | + |
Dave Borowitz | 1f85d3a | 2019-04-16 12:16:04 -0700 | [diff] [blame] | 1174 | If true, the mergeability bit in |
| 1175 | link:rest-api-changes.html#change-info[ChangeInfo] will never be set. It can |
| 1176 | be requested separately through the |
| 1177 | link:rest-api-changes.html#get-mergeable[get-mergeable] endpoint. |
David Ostrovsky | d1cb918 | 2018-05-07 08:24:05 +0200 | [diff] [blame] | 1178 | + |
| 1179 | Default is false. |
| 1180 | |
Dave Borowitz | f5e6e04 | 2016-04-25 13:03:42 -0400 | [diff] [blame] | 1181 | [[change.cacheAutomerge]]change.cacheAutomerge:: |
| 1182 | + |
| 1183 | When reviewing diff commits, the left-hand side shows the output of the |
| 1184 | result of JGit's automatic merge algorithm. This option controls whether |
| 1185 | this output is cached in the change repository, or if only the diff is |
| 1186 | cached in the persistent `diff` cache. |
| 1187 | + |
| 1188 | If true, automerge results are stored in the repository under |
| 1189 | `refs/cache-automerge/*`; the results of diffing the change against its |
| 1190 | automerge base are stored in the diff cache. If false, no extra data is |
| 1191 | stored in the repository, only the diff cache. This can result in slight |
| 1192 | performance improvements by reducing the number of refs in the repo. |
| 1193 | + |
| 1194 | Default is true. |
| 1195 | |
Dave Borowitz | 1f85d3a | 2019-04-16 12:16:04 -0700 | [diff] [blame] | 1196 | [[change.disablePrivateChanges]]change.disablePrivateChanges:: |
Patrick Hiesel | db8df48 | 2019-01-24 10:11:23 +0100 | [diff] [blame] | 1197 | + |
Dave Borowitz | 1f85d3a | 2019-04-16 12:16:04 -0700 | [diff] [blame] | 1198 | If set to true, users are not allowed to create private changes. |
Patrick Hiesel | db8df48 | 2019-01-24 10:11:23 +0100 | [diff] [blame] | 1199 | + |
Dave Borowitz | 1f85d3a | 2019-04-16 12:16:04 -0700 | [diff] [blame] | 1200 | The default is false. |
| 1201 | |
| 1202 | [[change.largeChange]]change.largeChange:: |
| 1203 | + |
| 1204 | Number of changed lines from which on a change is considered as a large |
| 1205 | change. The number of changed lines of a change is the sum of the lines |
| 1206 | that were inserted and deleted in the change. |
| 1207 | + |
| 1208 | The specified value is used to visualize the change sizes in the Web UI |
| 1209 | in change tables and user dashboards. |
| 1210 | + |
| 1211 | By default 500. |
| 1212 | |
Dave Borowitz | ca614bc | 2019-04-15 15:29:15 -0700 | [diff] [blame] | 1213 | [[change.maxUpdates]]change.maxUpdates:: |
| 1214 | + |
| 1215 | Maximum number of updates to a change. Counts only updates to the main NoteDb |
| 1216 | meta ref; draft comments, robot comments, stars, etc. do not count towards the |
| 1217 | total. |
| 1218 | + |
| 1219 | Many NoteDb operations require walking the entire change meta ref and loading |
| 1220 | its contents into memory, so changes with arbitrarily many updates may cause |
| 1221 | high CPU usage, memory pressure, persistent cache bloat, and other problems. |
| 1222 | + |
Dave Borowitz | 18e7b55 | 2019-04-17 07:53:38 -0700 | [diff] [blame] | 1223 | The following operations are allowed even when a change is at the limit: |
| 1224 | * Abandon |
| 1225 | * Submit |
| 1226 | * Submit by push with `%submit` |
| 1227 | * Auto-close by pushing directly to the branch |
| 1228 | * Fix with link:rest-api-changes.html#fix-input[`expect_merged_as`] |
| 1229 | + |
Dave Borowitz | ca614bc | 2019-04-15 15:29:15 -0700 | [diff] [blame] | 1230 | By default 1000. |
| 1231 | |
Edwin Kempin | 67229a4 | 2019-10-08 09:13:34 +0200 | [diff] [blame] | 1232 | [[change.move]]change.move:: |
| 1233 | + |
| 1234 | Whether the link:rest-api-changes.html#move-change[Move Change] REST |
| 1235 | endpoint is enabled. |
| 1236 | + |
| 1237 | The move change functionality has some corner cases with undesired side |
| 1238 | effects. Hence administrators may decide to disable this functionality. |
| 1239 | In particular, if a change that has dependencies on other changes is |
| 1240 | moved to a new branch, and the moved change gets submitted to the new |
| 1241 | branch, the changes on which the change depends are silently merged |
| 1242 | into the new branch, although these changes have not been moved to that |
| 1243 | branch (see details in |
| 1244 | link:https://bugs.chromium.org/p/gerrit/issues/detail?id=9877[issue |
| 1245 | 9877]). |
| 1246 | + |
| 1247 | By default true. |
| 1248 | |
Dave Borowitz | 1f85d3a | 2019-04-16 12:16:04 -0700 | [diff] [blame] | 1249 | [[change.replyLabel]]change.replyLabel:: |
| 1250 | + |
| 1251 | Label name for the reply button. In the user interface an ellipsis (…) |
| 1252 | is appended. |
| 1253 | + |
| 1254 | Default is "Reply". In the user interface it becomes "Reply…". |
| 1255 | |
| 1256 | [[change.replyTooltip]]change.replyTooltip:: |
| 1257 | + |
| 1258 | Tooltip for the reply button. In the user interface a note about the |
| 1259 | keyboard shortcut is appended. |
| 1260 | + |
| 1261 | Default is "Reply and score". In the user interface it becomes "Reply |
| 1262 | and score (Shortcut: a)". |
| 1263 | |
| 1264 | [[change.robotCommentSizeLimit]]change.robotCommentSizeLimit:: |
| 1265 | + |
| 1266 | Maximum allowed size of a robot comment that will be accepted. Robot comments |
| 1267 | which exceed the indicated size will be rejected on addition. The specified |
| 1268 | value is interpreted as the maximum size in bytes of the JSON representation of |
| 1269 | the robot comment. Common unit suffixes of 'k', 'm', or 'g' are supported. |
| 1270 | Zero or negative values allow robot comments of unlimited size. |
| 1271 | + |
| 1272 | The default limit is 1024kB. |
Patrick Hiesel | db8df48 | 2019-01-24 10:11:23 +0100 | [diff] [blame] | 1273 | |
Luca Milanesio | f2a275b | 2017-04-10 10:59:34 +0100 | [diff] [blame] | 1274 | [[change.showAssigneeInChangesTable]]change.showAssigneeInChangesTable:: |
Gustaf Lundh | 661d30a | 2016-09-19 14:41:29 +0200 | [diff] [blame] | 1275 | + |
Luca Milanesio | 50057ff | 2017-04-06 09:59:11 +0100 | [diff] [blame] | 1276 | Show assignee field in changes table. If set to false, assignees will |
| 1277 | not be visible in changes table. |
Gustaf Lundh | 661d30a | 2016-09-19 14:41:29 +0200 | [diff] [blame] | 1278 | + |
Luca Milanesio | 50057ff | 2017-04-06 09:59:11 +0100 | [diff] [blame] | 1279 | Default is false. |
Gustaf Lundh | 661d30a | 2016-09-19 14:41:29 +0200 | [diff] [blame] | 1280 | |
Dave Borowitz | 1f85d3a | 2019-04-16 12:16:04 -0700 | [diff] [blame] | 1281 | [[change.strictLabels]]change.strictLabels:: |
| 1282 | + |
| 1283 | Reject invalid label votes: invalid labels or invalid values. This |
David Pursehouse | 33495ab | 2019-10-31 09:38:43 +0900 | [diff] [blame] | 1284 | configuration option is provided for backwards compatibility and may |
Dave Borowitz | 1f85d3a | 2019-04-16 12:16:04 -0700 | [diff] [blame] | 1285 | be removed in future gerrit versions. |
| 1286 | + |
| 1287 | Default is false. |
| 1288 | |
David Ostrovsky | 9933eb3 | 2014-05-20 16:08:20 +0200 | [diff] [blame] | 1289 | [[change.submitLabel]]change.submitLabel:: |
| 1290 | + |
| 1291 | Label name for the submit button. |
| 1292 | + |
| 1293 | Default is "Submit". |
| 1294 | |
Stefan Beller | 7c380d51 | 2015-08-21 10:55:21 -0700 | [diff] [blame] | 1295 | [[change.submitLabelWithParents]]change.submitLabelWithParents:: |
| 1296 | + |
| 1297 | Label name for the submit button if the change has parents which will |
| 1298 | be submitted together with this change. |
| 1299 | + |
| 1300 | Default is "Submit including parents". |
| 1301 | |
David Ostrovsky | 9933eb3 | 2014-05-20 16:08:20 +0200 | [diff] [blame] | 1302 | [[change.submitTooltip]]change.submitTooltip:: |
| 1303 | + |
| 1304 | Tooltip for the submit button. Variables available for replacement |
| 1305 | include `${patchSet}` for the current patch set number (1, 2, 3), |
| 1306 | `${branch}` for the branch name ("master") and `${commit}` for the |
| 1307 | abbreviated commit SHA-1 (`c9c0edb`). |
| 1308 | + |
| 1309 | Default is "Submit patch set ${patchSet} into ${branch}". |
| 1310 | |
Stefan Beller | 0e65554 | 2015-07-20 21:14:38 -0700 | [diff] [blame] | 1311 | [[change.submitTooltipAncestors]]change.submitTooltipAncestors:: |
| 1312 | + |
| 1313 | Tooltip for the submit button if there are ancestors which would |
| 1314 | also be submitted by submitting the change. Additionally to the variables |
| 1315 | as in link:#change.submitTooltip[change.submitTooltip], there is the |
| 1316 | variable `${submitSize}` indicating the number of changes which are |
| 1317 | submitted. |
| 1318 | + |
| 1319 | Default is "Submit all ${topicSize} changes of the same topic (${submitSize} |
| 1320 | changes including ancestors and other changes related by topic)". |
| 1321 | |
Stefan Beller | a038cf7 | 2015-01-13 16:25:10 -0800 | [diff] [blame] | 1322 | [[change.submitTopicLabel]]change.submitTopicLabel:: |
| 1323 | + |
| 1324 | If `change.submitWholeTopic` is set and a change has a topic, |
| 1325 | the label name for the submit button is given here instead of |
| 1326 | the configuration `change.submitLabel`. |
| 1327 | + |
| 1328 | Defaults to "Submit whole topic" |
| 1329 | |
| 1330 | [[change.submitTopicTooltip]]change.submitTopicTooltip:: |
| 1331 | + |
David Pursehouse | a61ee50 | 2016-09-06 16:27:09 +0900 | [diff] [blame] | 1332 | If `change.submitWholeTopic` is configured to true and a change has a |
Stefan Beller | a038cf7 | 2015-01-13 16:25:10 -0800 | [diff] [blame] | 1333 | topic, this configuration determines the tooltip for the submit button |
| 1334 | instead of `change.submitTooltip`. The variable `${topicSize}` is available |
Stefan Beller | 7c380d51 | 2015-08-21 10:55:21 -0700 | [diff] [blame] | 1335 | for the number of changes in the same topic to be submitted. The number of |
| 1336 | all changes to be submitted is in the variable `${submitSize}`. |
Stefan Beller | a038cf7 | 2015-01-13 16:25:10 -0800 | [diff] [blame] | 1337 | + |
Stefan Beller | 7c380d51 | 2015-08-21 10:55:21 -0700 | [diff] [blame] | 1338 | Defaults to "Submit all ${topicSize} changes of the same topic |
| 1339 | (${submitSize} changes including ancestors and other |
| 1340 | changes related by topic)". |
Stefan Beller | a038cf7 | 2015-01-13 16:25:10 -0800 | [diff] [blame] | 1341 | |
Dave Borowitz | 1f85d3a | 2019-04-16 12:16:04 -0700 | [diff] [blame] | 1342 | [[change.submitWholeTopic]]change.submitWholeTopic:: |
Richard Möhn | e4abe9a | 2014-11-13 20:05:13 +0100 | [diff] [blame] | 1343 | + |
Dave Borowitz | 1f85d3a | 2019-04-16 12:16:04 -0700 | [diff] [blame] | 1344 | Determines if the submit button submits the whole topic instead of |
| 1345 | just the current change. |
David Ostrovsky | a304aff | 2018-04-05 23:07:51 +0200 | [diff] [blame] | 1346 | + |
| 1347 | Default is false. |
| 1348 | |
Dave Borowitz | 1f85d3a | 2019-04-16 12:16:04 -0700 | [diff] [blame] | 1349 | [[change.updateDelay]]change.updateDelay:: |
Changcheng Xiao | 1609535 | 2017-12-18 10:03:08 +0100 | [diff] [blame] | 1350 | + |
Dave Borowitz | 1f85d3a | 2019-04-16 12:16:04 -0700 | [diff] [blame] | 1351 | How often in seconds the web interface should poll for updates to the |
| 1352 | currently open change. The poller relies on the client's browser |
| 1353 | cache to use If-Modified-Since and respect `304 Not Modified` HTTP |
| 1354 | responses. This allows for fast polls, often under 8 milliseconds. |
Changcheng Xiao | 1609535 | 2017-12-18 10:03:08 +0100 | [diff] [blame] | 1355 | + |
Dave Borowitz | 1f85d3a | 2019-04-16 12:16:04 -0700 | [diff] [blame] | 1356 | With a configured 30 second delay a server with 4900 active users will |
| 1357 | typically need to dedicate 1 CPU to the update check. 4900 users |
| 1358 | divided by an average delay of 30 seconds is 163 requests arriving per |
| 1359 | second. If requests are served at \~6 ms response time, 1 CPU is |
| 1360 | necessary to keep up with the update request traffic. On a smaller |
| 1361 | user base of 500 active users, the default 30 second delay is only 17 |
| 1362 | requests per second and requires ~10% CPU. |
| 1363 | + |
| 1364 | If 0 the update polling is disabled. |
| 1365 | + |
| 1366 | Default is 5 minutes. |
Changcheng Xiao | 1609535 | 2017-12-18 10:03:08 +0100 | [diff] [blame] | 1367 | |
Edwin Kempin | e326a1d | 2015-06-03 10:27:39 +0200 | [diff] [blame] | 1368 | [[changeCleanup]] |
| 1369 | === Section changeCleanup |
| 1370 | |
| 1371 | This section allows to configure change cleanups and schedules them to |
| 1372 | run periodically. |
| 1373 | |
| 1374 | [[changeCleanup.abandonAfter]]changeCleanup.abandonAfter:: |
| 1375 | + |
| 1376 | Period of inactivity after which open changes should be abandoned |
| 1377 | automatically. |
| 1378 | + |
| 1379 | By default `0`, never abandon open changes. |
| 1380 | + |
| 1381 | [WARNING] Auto-Abandoning changes may confuse/annoy users. When |
| 1382 | enabling this, make sure to choose a reasonably large grace period and |
| 1383 | inform users in advance. |
| 1384 | + |
| 1385 | The following suffixes are supported to define the time unit: |
| 1386 | + |
| 1387 | * `d, day, days` |
| 1388 | * `w, week, weeks` (`1 week` is treated as `7 days`) |
| 1389 | * `mon, month, months` (`1 month` is treated as `30 days`) |
| 1390 | * `y, year, years` (`1 year` is treated as `365 days`) |
| 1391 | |
Edwin Kempin | 7080ef1 | 2015-06-10 15:03:09 +0200 | [diff] [blame] | 1392 | [[changeCleanup.abandonIfMergeable]]changeCleanup.abandonIfMergeable:: |
| 1393 | + |
| 1394 | Whether changes which are mergeable should be auto-abandoned. |
| 1395 | + |
| 1396 | By default `true`. |
| 1397 | |
Jacek Centkowski | 36d3521 | 2019-05-13 14:32:00 +0200 | [diff] [blame] | 1398 | [[changeCleanup.cleanupAccountPatchReview]]changeCleanup.cleanupAccountPatchReview:: |
| 1399 | + |
| 1400 | Whether accountPatchReview data should be also removed when change |
| 1401 | gets auto-abandoned. |
| 1402 | + |
| 1403 | By default `false`. |
| 1404 | |
Edwin Kempin | e326a1d | 2015-06-03 10:27:39 +0200 | [diff] [blame] | 1405 | [[changeCleanup.abandonMessage]]changeCleanup.abandonMessage:: |
| 1406 | + |
| 1407 | Change message that should be posted when a change is abandoned. |
| 1408 | + |
| 1409 | '${URL}' can be used as a placeholder for the Gerrit web URL. |
| 1410 | + |
| 1411 | By default "Auto-Abandoned due to inactivity, see |
| 1412 | ${URL}Documentation/user-change-cleanup.html#auto-abandon\n\n |
| 1413 | If this change is still wanted it should be restored.". |
| 1414 | |
| 1415 | [[changeCleanup.startTime]]changeCleanup.startTime:: |
| 1416 | + |
Edwin Kempin | d33d95a | 2018-02-16 11:44:04 +0100 | [diff] [blame] | 1417 | The link:#schedule-configuration-startTime[start time] for running |
| 1418 | change cleanups. |
Edwin Kempin | e326a1d | 2015-06-03 10:27:39 +0200 | [diff] [blame] | 1419 | |
| 1420 | [[changeCleanup.interval]]changeCleanup.interval:: |
| 1421 | + |
Edwin Kempin | d33d95a | 2018-02-16 11:44:04 +0100 | [diff] [blame] | 1422 | The link:#schedule-configuration-interval[interval] for running |
| 1423 | change cleanups. |
Edwin Kempin | e326a1d | 2015-06-03 10:27:39 +0200 | [diff] [blame] | 1424 | |
Edwin Kempin | d33d95a | 2018-02-16 11:44:04 +0100 | [diff] [blame] | 1425 | link:#schedule-configuration-examples[Schedule examples] can be found |
| 1426 | in the link:#schedule-configuration[Schedule Configuration] section. |
Edwin Kempin | e326a1d | 2015-06-03 10:27:39 +0200 | [diff] [blame] | 1427 | |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 1428 | [[commentlink]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1429 | === Section commentlink |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 1430 | |
Brad Larson | 991a31b | 2009-11-03 14:30:26 -0600 | [diff] [blame] | 1431 | Comment links are find/replace strings applied to change descriptions, |
Chris Harris | 63c7cdd | 2012-11-23 12:17:36 -0500 | [diff] [blame] | 1432 | patch comments, in-line code comments and approval category value descriptions |
| 1433 | to turn set strings into hyperlinks. One common use is for linking to |
| 1434 | bug-tracking systems. |
Brad Larson | 991a31b | 2009-11-03 14:30:26 -0600 | [diff] [blame] | 1435 | |
| 1436 | In the following example configuration the 'changeid' comment link |
Shawn O. Pearce | da866ae | 2009-12-16 15:46:03 -0800 | [diff] [blame] | 1437 | will match typical Gerrit Change-Id values and create a hyperlink |
| 1438 | to changes which reference it. The second configuration 'bugzilla' |
| 1439 | will hyperlink terms such as 'bug 42' to an external bug tracker, |
| 1440 | supplying the argument record number '42' for display. The third |
David Pursehouse | 221d4f6 | 2012-06-08 17:38:08 +0900 | [diff] [blame] | 1441 | configuration 'tracker' uses raw HTML to more precisely control |
Shawn O. Pearce | da866ae | 2009-12-16 15:46:03 -0800 | [diff] [blame] | 1442 | how the replacement is displayed to the user. |
Brad Larson | 991a31b | 2009-11-03 14:30:26 -0600 | [diff] [blame] | 1443 | |
Sven Selberg | 2a0beab | 2018-04-20 14:49:20 +0200 | [diff] [blame] | 1444 | commentlinks supports link:#reloadConfig[configuration reloads]. Though a |
Gustaf Lundh | ca7eb79 | 2018-04-16 10:56:03 +0200 | [diff] [blame] | 1445 | link:cmd-flush-caches.html[flush-caches] of "projects" is needed for the |
| 1446 | commentlinks to be immediately available in the UI. |
| 1447 | |
Shawn O. Pearce | da866ae | 2009-12-16 15:46:03 -0800 | [diff] [blame] | 1448 | ---- |
| 1449 | [commentlink "changeid"] |
| 1450 | match = (I[0-9a-f]{8,40}) |
David Pursehouse | 9f68e1a | 2016-01-28 09:21:03 +0000 | [diff] [blame] | 1451 | link = "#/q/$1" |
Brad Larson | 991a31b | 2009-11-03 14:30:26 -0600 | [diff] [blame] | 1452 | |
Shawn O. Pearce | da866ae | 2009-12-16 15:46:03 -0800 | [diff] [blame] | 1453 | [commentlink "bugzilla"] |
Shawn O. Pearce | c99630a | 2010-02-21 19:11:56 -0800 | [diff] [blame] | 1454 | match = "(bug\\s+#?)(\\d+)" |
Shawn O. Pearce | da866ae | 2009-12-16 15:46:03 -0800 | [diff] [blame] | 1455 | link = http://bugs.example.com/show_bug.cgi?id=$2 |
Brad Larson | 991a31b | 2009-11-03 14:30:26 -0600 | [diff] [blame] | 1456 | |
Shawn O. Pearce | da866ae | 2009-12-16 15:46:03 -0800 | [diff] [blame] | 1457 | [commentlink "tracker"] |
| 1458 | match = ([Bb]ug:\\s+)(\\d+) |
| 1459 | html = $1<a href=\"http://trak.example.com/$2\">$2</a> |
| 1460 | ---- |
| 1461 | |
Dave Borowitz | 13b3800 | 2013-04-08 12:03:29 -0700 | [diff] [blame] | 1462 | Comment links can also be specified in `project.config` and sections in |
| 1463 | children override those in parents. The only restriction is that to |
| 1464 | avoid injecting arbitrary user-supplied HTML in the page, comment links |
| 1465 | defined in `project.config` may only supply `link`, not `html`. |
| 1466 | |
Shawn O. Pearce | da866ae | 2009-12-16 15:46:03 -0800 | [diff] [blame] | 1467 | [[commentlink.name.match]]commentlink.<name>.match:: |
Brad Larson | 991a31b | 2009-11-03 14:30:26 -0600 | [diff] [blame] | 1468 | + |
Shawn O. Pearce | da866ae | 2009-12-16 15:46:03 -0800 | [diff] [blame] | 1469 | A JavaScript regular expression to match positions to be replaced |
| 1470 | with a hyperlink. Subexpressions of the matched string can be |
| 1471 | stored using groups and accessed with `$'n'` syntax, where 'n' |
| 1472 | is the group number, starting from 1. |
Brad Larson | 991a31b | 2009-11-03 14:30:26 -0600 | [diff] [blame] | 1473 | + |
Shawn O. Pearce | c99630a | 2010-02-21 19:11:56 -0800 | [diff] [blame] | 1474 | The configuration file parser eats one level of backslashes, so the |
| 1475 | character class `\s` requires `\\s` in the configuration file. The |
| 1476 | parser also terminates the line at the first `#`, so a match |
| 1477 | expression containing # must be wrapped in double quotes. |
Shawn O. Pearce | da866ae | 2009-12-16 15:46:03 -0800 | [diff] [blame] | 1478 | + |
Shawn O. Pearce | 665beaa | 2010-02-21 22:41:03 -0800 | [diff] [blame] | 1479 | To match case insensitive strings, a character class with both the |
| 1480 | upper and lower case character for each position must be used. For |
| 1481 | example, to match the string `bug` in a case insensitive way the match |
| 1482 | pattern `[bB][uU][gG]` needs to be used. |
| 1483 | + |
David Ostrovsky | 7163dac | 2017-07-29 06:49:38 +0200 | [diff] [blame] | 1484 | The commentlink.name.match regular expressions are applied to the raw, |
| 1485 | unformatted and unescaped text form. Regex matching against HTML is not |
| 1486 | supported. Comment link patterns that are written in this style should |
| 1487 | be updated to match text formats. |
Matthew Webber | cd7d2bf | 2015-10-14 15:54:06 +0100 | [diff] [blame] | 1488 | + |
Shawn O. Pearce | da866ae | 2009-12-16 15:46:03 -0800 | [diff] [blame] | 1489 | A common pattern to match is `bug\\s+(\\d+)`. |
Brad Larson | 991a31b | 2009-11-03 14:30:26 -0600 | [diff] [blame] | 1490 | |
Shawn O. Pearce | da866ae | 2009-12-16 15:46:03 -0800 | [diff] [blame] | 1491 | [[commentlink.name.link]]commentlink.<name>.link:: |
Brad Larson | 991a31b | 2009-11-03 14:30:26 -0600 | [diff] [blame] | 1492 | + |
Shawn O. Pearce | da866ae | 2009-12-16 15:46:03 -0800 | [diff] [blame] | 1493 | The URL to direct the user to whenever the regular expression is |
| 1494 | matched. Groups in the match expression may be accessed as `$'n'`. |
| 1495 | + |
| 1496 | The link property is used only when the html property is not present. |
| 1497 | |
| 1498 | [[commentlink.name.html]]commentlink.<name>.html:: |
| 1499 | + |
| 1500 | HTML to replace the entire matched string with. If present, |
| 1501 | this property overrides the link property above. Groups in the |
| 1502 | match expression may be accessed as `$'n'`. |
| 1503 | + |
| 1504 | The configuration file eats double quotes, so escaping them as |
| 1505 | `\"` is necessary to protect them from the parser. |
Brad Larson | 991a31b | 2009-11-03 14:30:26 -0600 | [diff] [blame] | 1506 | |
Dave Borowitz | 82d79c0 | 2013-04-08 15:45:12 -0700 | [diff] [blame] | 1507 | [[commentlink.name.enabled]]commentlink.<name>.enabled:: |
| 1508 | + |
| 1509 | Whether the comment link is enabled. A child project may override a |
| 1510 | section in a parent or the site-wide config that is disabled by |
| 1511 | specifying `enabled = true`. |
| 1512 | + |
| 1513 | Disabling sections in `gerrit.config` can be used by site administrators |
| 1514 | to create a library of comment links with `html` set that are not |
| 1515 | user-supplied and thus can be verified to be XSS-free, but are only |
| 1516 | enabled for a subset of projects. |
| 1517 | + |
David Pursehouse | 6f1af47 | 2013-12-11 19:23:33 +0900 | [diff] [blame] | 1518 | By default, true. |
| 1519 | + |
Dave Borowitz | 82d79c0 | 2013-04-08 15:45:12 -0700 | [diff] [blame] | 1520 | Note that the names and contents of disabled sections are visible even |
| 1521 | to anonymous users via the |
| 1522 | link:rest-api-projects.html#get-config[REST API]. |
| 1523 | |
Brad Larson | 991a31b | 2009-11-03 14:30:26 -0600 | [diff] [blame] | 1524 | |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 1525 | [[container]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1526 | === Section container |
Shawn O. Pearce | e24c71fb | 2009-12-07 20:32:40 -0800 | [diff] [blame] | 1527 | |
| 1528 | These settings are applied only if Gerrit is started as the container |
| 1529 | process through Gerrit's 'gerrit.sh' rc.d compatible wrapper script. |
| 1530 | |
| 1531 | [[container.heapLimit]]container.heapLimit:: |
| 1532 | + |
| 1533 | Maximum heap size of the Java process running Gerrit, in bytes. |
| 1534 | This property is translated into the '-Xmx' flag for the JVM. |
| 1535 | + |
| 1536 | Default is platform and JVM specific. |
| 1537 | + |
| 1538 | Common unit suffixes of 'k', 'm', or 'g' are supported. |
| 1539 | |
| 1540 | [[container.javaHome]]container.javaHome:: |
| 1541 | + |
| 1542 | Path of the JRE/JDK installation to run Gerrit with. If not set, the |
| 1543 | Gerrit startup script will attempt to search your system and guess |
| 1544 | a suitable JRE. Overrides the environment variable 'JAVA_HOME'. |
| 1545 | |
| 1546 | [[container.javaOptions]]container.javaOptions:: |
| 1547 | + |
| 1548 | Additional options to pass along to the Java runtime. If multiple |
| 1549 | values are configured, they are passed in order on the command line, |
| 1550 | separated by spaces. These options are appended onto 'JAVA_OPTIONS'. |
| 1551 | |
David Ostrovsky | c772bd8 | 2013-10-03 10:37:51 +0200 | [diff] [blame] | 1552 | For example, it is possible to overwrite Gerrit's default log4j |
| 1553 | configuration: |
| 1554 | |
| 1555 | ---- |
| 1556 | javaOptions = -Dlog4j.configuration=file:///home/gerrit/site/etc/log4j.properties |
| 1557 | ---- |
| 1558 | |
Hugo Arès | 6710f0a | 2014-11-04 10:28:42 -0500 | [diff] [blame] | 1559 | [[container.daemonOpt]]container.daemonOpt:: |
| 1560 | + |
| 1561 | Additional options to pass to the daemon (e.g. '--enable-httpd'). If |
| 1562 | multiple values are configured, they are passed in that order to the command |
| 1563 | line, separated by spaces. |
| 1564 | + |
| 1565 | Execute `java -jar gerrit.war daemon --help` to see all possible |
| 1566 | options. |
| 1567 | |
Han-Wen Nienhuys | a51f1c0 | 2019-10-14 18:56:01 +0200 | [diff] [blame] | 1568 | [[container.replica]]container.replica:: |
Fredrik Luthander | b8f7d6d | 2010-05-18 21:11:22 +0200 | [diff] [blame] | 1569 | + |
Han-Wen Nienhuys | 348a603 | 2019-09-24 19:44:57 +0200 | [diff] [blame] | 1570 | Used on Gerrit replica installations. If set to true the Gerrit JVM is |
| 1571 | called with the '--replica' switch, enabling replica mode. If no value is |
Matt Baker | 8ce12fc | 2013-11-26 21:43:12 -0700 | [diff] [blame] | 1572 | set (or any other value), Gerrit defaults to master mode. |
Fredrik Luthander | b8f7d6d | 2010-05-18 21:11:22 +0200 | [diff] [blame] | 1573 | |
David Ostrovsky | 21fca75 | 2019-10-18 08:50:29 +0200 | [diff] [blame] | 1574 | [[container.slave]]container.slave:: |
Han-Wen Nienhuys | a51f1c0 | 2019-10-14 18:56:01 +0200 | [diff] [blame] | 1575 | + |
| 1576 | Backward compatibility for 'container.slave' config setting. |
| 1577 | |
Khai Do | 6168beb | 2016-12-19 17:26:28 -0800 | [diff] [blame] | 1578 | [[container.startupTimeout]]container.startupTimeout:: |
| 1579 | + |
| 1580 | The maximum time (in seconds) to wait for a gerrit.sh start command |
| 1581 | to run a new Gerrit daemon successfully. If not set, defaults to |
| 1582 | 90 seconds. |
| 1583 | |
Shawn O. Pearce | e24c71fb | 2009-12-07 20:32:40 -0800 | [diff] [blame] | 1584 | [[container.user]]container.user:: |
| 1585 | + |
| 1586 | Login name (or UID) of the operating system user the Gerrit JVM |
| 1587 | will execute as. If not set, defaults to the user who launched |
| 1588 | the 'gerrit.sh' wrapper script. |
| 1589 | |
| 1590 | [[container.war]]container.war:: |
| 1591 | + |
| 1592 | Path of the JAR file to start daemon execution with. This should |
| 1593 | be the path of the local 'gerrit.war' archive. Overrides the |
| 1594 | environment variable 'GERRIT_WAR'. |
| 1595 | + |
| 1596 | If not set, defaults to '$site_path/bin/gerrit.war', or to |
| 1597 | '$HOME/gerrit.war'. |
| 1598 | |
| 1599 | |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 1600 | [[core]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1601 | === Section core |
Shawn O. Pearce | 6854bdc | 2009-06-01 08:14:15 -0700 | [diff] [blame] | 1602 | |
Saša Živkov | d34dfe3 | 2017-11-20 11:14:35 +0100 | [diff] [blame] | 1603 | [NOTE] |
| 1604 | The link:#jgitConfig[etc/jgit.config] file supports configuration of all JGit |
| 1605 | options. |
| 1606 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 1607 | [[core.packedGitWindowSize]]core.packedGitWindowSize:: |
Shawn O. Pearce | 6854bdc | 2009-06-01 08:14:15 -0700 | [diff] [blame] | 1608 | + |
| 1609 | Number of bytes of a pack file to load into memory in a single |
| 1610 | read operation. This is the "page size" of the JGit buffer cache, |
| 1611 | used for all pack access operations. All disk IO occurs as single |
| 1612 | window reads. Setting this too large may cause the process to load |
| 1613 | more data than is required; setting this too small may increase |
| 1614 | the frequency of `read()` system calls. |
| 1615 | + |
| 1616 | Default on JGit is 8 KiB on all platforms. |
| 1617 | + |
| 1618 | Common unit suffixes of 'k', 'm', or 'g' are supported. |
| 1619 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 1620 | [[core.packedGitLimit]]core.packedGitLimit:: |
Shawn O. Pearce | 6854bdc | 2009-06-01 08:14:15 -0700 | [diff] [blame] | 1621 | + |
| 1622 | Maximum number of bytes to load and cache in memory from pack files. |
| 1623 | If JGit needs to access more than this many bytes it will unload less |
| 1624 | frequently used windows to reclaim memory space within the process. |
| 1625 | As this buffer must be shared with the rest of the JVM heap, it |
| 1626 | should be a fraction of the total memory available. |
| 1627 | + |
| 1628 | Default on JGit is 10 MiB on all platforms. |
| 1629 | + |
| 1630 | Common unit suffixes of 'k', 'm', or 'g' are supported. |
| 1631 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 1632 | [[core.deltaBaseCaseLimit]]core.deltaBaseCacheLimit:: |
Shawn O. Pearce | 6854bdc | 2009-06-01 08:14:15 -0700 | [diff] [blame] | 1633 | + |
| 1634 | Maximum number of bytes to reserve for caching base objects |
| 1635 | that multiple deltafied objects reference. By storing the entire |
| 1636 | decompressed base object in a cache Git is able to avoid unpacking |
| 1637 | and decompressing frequently used base objects multiple times. |
| 1638 | + |
| 1639 | Default on JGit is 10 MiB on all platforms. You probably do not |
| 1640 | need to adjust this value. |
| 1641 | + |
| 1642 | Common unit suffixes of 'k', 'm', or 'g' are supported. |
| 1643 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 1644 | [[core.packedGitOpenFiles]]core.packedGitOpenFiles:: |
Shawn O. Pearce | 6854bdc | 2009-06-01 08:14:15 -0700 | [diff] [blame] | 1645 | + |
| 1646 | Maximum number of pack files to have open at once. A pack file |
| 1647 | must be opened in order for any of its data to be available in |
| 1648 | a cached window. |
| 1649 | + |
| 1650 | If you increase this to a larger setting you may need to also adjust |
| 1651 | the ulimit on file descriptors for the host JVM, as Gerrit needs |
| 1652 | additional file descriptors available for network sockets and other |
| 1653 | repository data manipulation. |
| 1654 | + |
| 1655 | Default on JGit is 128 file descriptors on all platforms. |
| 1656 | |
Shawn O. Pearce | 329fe79 | 2010-09-03 15:44:23 -0700 | [diff] [blame] | 1657 | [[core.streamFileThreshold]]core.streamFileThreshold:: |
| 1658 | + |
| 1659 | Largest object size, in bytes, that JGit will allocate as a |
| 1660 | contiguous byte array. Any file revision larger than this threshold |
| 1661 | will have to be streamed, typically requiring the use of temporary |
David Pursehouse | 9246356 | 2013-06-24 10:16:28 +0900 | [diff] [blame] | 1662 | files under '$GIT_DIR/objects' to implement pseudo-random access |
Shawn O. Pearce | 329fe79 | 2010-09-03 15:44:23 -0700 | [diff] [blame] | 1663 | during delta decompression. |
| 1664 | + |
| 1665 | Servers with very high traffic should set this to be larger than |
| 1666 | the size of their common big files. For example a server managing |
| 1667 | the Android platform typically has to deal with ~10-12 MiB XML |
| 1668 | files, so `15 m` would be a reasonable setting in that environment. |
| 1669 | Setting this too high may cause the JVM to run out of heap space |
| 1670 | when handling very big binary files, such as device firmware or |
| 1671 | CD-ROM ISO images. |
| 1672 | + |
Edwin Kempin | 7f5a4af | 2014-11-12 10:05:03 +0100 | [diff] [blame] | 1673 | Defaults to 25% of the available JVM heap, limited to 2048m. |
Shawn O. Pearce | 329fe79 | 2010-09-03 15:44:23 -0700 | [diff] [blame] | 1674 | + |
| 1675 | Common unit suffixes of 'k', 'm', or 'g' are supported. |
| 1676 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 1677 | [[core.packedGitMmap]]core.packedGitMmap:: |
Shawn O. Pearce | 6854bdc | 2009-06-01 08:14:15 -0700 | [diff] [blame] | 1678 | + |
| 1679 | When true, JGit will use `mmap()` rather than `malloc()+read()` |
| 1680 | to load data from pack files. The use of mmap can be problematic |
| 1681 | on some JVMs as the garbage collector must deduce that a memory |
| 1682 | mapped segment is no longer in use before a call to `munmap()` |
| 1683 | can be made by the JVM native code. |
| 1684 | + |
| 1685 | In server applications (such as Gerrit) that need to access many |
David Pursehouse | 9246356 | 2013-06-24 10:16:28 +0900 | [diff] [blame] | 1686 | pack files, setting this to true risks artificially running out |
Shawn O. Pearce | 6854bdc | 2009-06-01 08:14:15 -0700 | [diff] [blame] | 1687 | of virtual address space, as the garbage collector cannot reclaim |
| 1688 | unused mapped spaces fast enough. |
| 1689 | + |
| 1690 | Default on JGit is false. Although potentially slower, it yields |
| 1691 | much more predictable behavior. |
| 1692 | |
Sasa Zivkov | f69aeb1 | 2012-06-11 14:05:14 +0200 | [diff] [blame] | 1693 | [[core.asyncLoggingBufferSize]]core.asyncLoggingBufferSize:: |
| 1694 | + |
| 1695 | Size of the buffer to store logging events for asynchronous logging. |
| 1696 | Putting a larger value can protect threads from stalling when the |
| 1697 | AsyncAppender threads are not fast enough to consume the logging events |
David Pursehouse | 1ff91c0 | 2015-05-19 15:05:26 +0900 | [diff] [blame] | 1698 | 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] | 1699 | + |
| 1700 | Default is 64 entries. |
| 1701 | |
Dave Borowitz | 1bec65a | 2013-03-13 10:59:01 -0700 | [diff] [blame] | 1702 | [[core.useRecursiveMerge]]core.useRecursiveMerge:: |
| 1703 | + |
Edwin Kempin | 71831d2 | 2014-07-15 08:54:29 +0200 | [diff] [blame] | 1704 | Use JGit's recursive merger for three-way merges. This only affects |
Sebastian Schuberth | 774aac9 | 2015-04-16 13:21:04 +0200 | [diff] [blame] | 1705 | projects that allow content merges. |
Edwin Kempin | 71831d2 | 2014-07-15 08:54:29 +0200 | [diff] [blame] | 1706 | + |
| 1707 | As explained in this |
| 1708 | link:http://codicesoftware.blogspot.com/2011/09/merge-recursive-strategy.html[ |
| 1709 | blog], the recursive merge produces better results if the two commits |
| 1710 | that are merged have more than one common predecessor. |
Dave Borowitz | 1bec65a | 2013-03-13 10:59:01 -0700 | [diff] [blame] | 1711 | + |
Edwin Kempin | 7853c5b | 2014-07-15 08:57:17 +0200 | [diff] [blame] | 1712 | Default is true. |
Dave Borowitz | 1bec65a | 2013-03-13 10:59:01 -0700 | [diff] [blame] | 1713 | |
Hugo Arès | 4734437 | 2016-06-27 10:23:17 -0400 | [diff] [blame] | 1714 | [[core.repositoryCacheCleanupDelay]]core.repositoryCacheCleanupDelay:: |
| 1715 | + |
| 1716 | Delay between each periodic cleanup of expired repositories. |
| 1717 | + |
| 1718 | Values can be specified using standard time unit abbreviations (`ms`, `sec`, |
| 1719 | `min`, etc.). |
| 1720 | + |
| 1721 | Set it to 0 in order to switch off cache expiration. If cache expiration is |
| 1722 | switched off, the JVM can still evict cache entries when it is running low |
| 1723 | on available heap memory. |
| 1724 | + |
| 1725 | Set it to -1 to automatically derive cleanup delay from |
| 1726 | `core.repositoryCacheExpireAfter` (lowest value between 1/10 of |
| 1727 | `core.repositoryCacheExpireAfter` and 10 minutes). |
| 1728 | + |
| 1729 | Default is -1. |
| 1730 | |
| 1731 | [[core.repositoryCacheExpireAfter]]core.repositoryCacheExpireAfter:: |
| 1732 | + |
| 1733 | Time an unused repository should expire and be evicted from the repository |
| 1734 | cache. |
| 1735 | + |
| 1736 | Values can be specified using standard time unit abbreviations (`ms`, `sec`, |
| 1737 | `min`, etc.). |
| 1738 | + |
| 1739 | Default is 1 hour. |
| 1740 | |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 1741 | [[download]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1742 | === Section download |
monica.dionisio | 3f63044 | 2010-06-29 15:42:57 -0300 | [diff] [blame] | 1743 | |
| 1744 | ---- |
| 1745 | [download] |
Edwin Kempin | 08b03a2 | 2012-09-14 16:32:57 +0200 | [diff] [blame] | 1746 | command = checkout |
| 1747 | command = cherry_pick |
| 1748 | command = pull |
| 1749 | command = format_patch |
monica.dionisio | 3f63044 | 2010-06-29 15:42:57 -0300 | [diff] [blame] | 1750 | scheme = ssh |
| 1751 | scheme = http |
| 1752 | scheme = anon_http |
| 1753 | scheme = anon_git |
| 1754 | scheme = repo_download |
| 1755 | ---- |
| 1756 | |
| 1757 | The download section configures the allowed download methods. |
| 1758 | |
Edwin Kempin | 08b03a2 | 2012-09-14 16:32:57 +0200 | [diff] [blame] | 1759 | [[download.command]]download.command:: |
| 1760 | + |
| 1761 | Commands that should be offered to download changes. |
| 1762 | + |
| 1763 | Multiple commands are supported: |
| 1764 | + |
| 1765 | * `checkout` |
| 1766 | + |
| 1767 | Command to fetch and checkout the patch set. |
| 1768 | + |
| 1769 | * `cherry_pick` |
| 1770 | + |
| 1771 | Command to fetch the patch set and to cherry-pick it onto the current |
| 1772 | commit. |
| 1773 | + |
| 1774 | * `pull` |
| 1775 | + |
| 1776 | Command to pull the patch set. |
| 1777 | + |
| 1778 | * `format_patch` |
| 1779 | + |
| 1780 | Command to fetch the patch set and to feed it into the `format-patch` |
| 1781 | command. |
| 1782 | |
| 1783 | + |
| 1784 | If `download.command` is not specified, all download commands are |
| 1785 | offered. |
| 1786 | |
monica.dionisio | 3f63044 | 2010-06-29 15:42:57 -0300 | [diff] [blame] | 1787 | [[download.scheme]]download.scheme:: |
| 1788 | + |
| 1789 | Schemes that should be used to download changes. |
| 1790 | + |
| 1791 | Multiple schemes are supported: |
| 1792 | + |
| 1793 | * `http` |
| 1794 | + |
Shawn O. Pearce | 5c46a07 | 2010-08-23 08:33:32 -0700 | [diff] [blame] | 1795 | Authenticated HTTP download is allowed. |
monica.dionisio | 3f63044 | 2010-06-29 15:42:57 -0300 | [diff] [blame] | 1796 | + |
| 1797 | * `ssh` |
| 1798 | + |
Shawn O. Pearce | 5c46a07 | 2010-08-23 08:33:32 -0700 | [diff] [blame] | 1799 | Authenticated SSH download is allowed. |
monica.dionisio | 3f63044 | 2010-06-29 15:42:57 -0300 | [diff] [blame] | 1800 | + |
| 1801 | * `anon_http` |
| 1802 | + |
| 1803 | Anonymous HTTP download is allowed. |
| 1804 | + |
| 1805 | * `anon_git` |
| 1806 | + |
Shawn O. Pearce | 5c46a07 | 2010-08-23 08:33:32 -0700 | [diff] [blame] | 1807 | Anonymous Git download is allowed. This is not default, it is also |
| 1808 | necessary to set <<gerrit.canonicalGitUrl,gerrit.canonicalGitUrl>> |
| 1809 | variable. |
monica.dionisio | 3f63044 | 2010-06-29 15:42:57 -0300 | [diff] [blame] | 1810 | + |
| 1811 | * `repo_download` |
| 1812 | + |
Shawn O. Pearce | 5c46a07 | 2010-08-23 08:33:32 -0700 | [diff] [blame] | 1813 | Gerrit advertises patch set downloads with the `repo download` |
| 1814 | command, assuming that all projects managed by this instance are |
| 1815 | generally worked on with the repo multi-repository tool. This is |
| 1816 | not default, as not all instances will deploy repo. |
monica.dionisio | 3f63044 | 2010-06-29 15:42:57 -0300 | [diff] [blame] | 1817 | |
| 1818 | + |
Edwin Kempin | 08b03a2 | 2012-09-14 16:32:57 +0200 | [diff] [blame] | 1819 | If `download.scheme` is not specified, SSH, HTTP and Anonymous HTTP |
Shawn O. Pearce | 5c46a07 | 2010-08-23 08:33:32 -0700 | [diff] [blame] | 1820 | downloads are allowed. |
Shawn O. Pearce | fb5548e | 2009-11-11 07:39:21 -0800 | [diff] [blame] | 1821 | |
Edwin Kempin | 322db67 | 2015-07-03 08:50:46 +0200 | [diff] [blame] | 1822 | [[download.checkForHiddenChangeRefs]]download.checkForHiddenChangeRefs:: |
| 1823 | + |
| 1824 | Whether the download commands should be adapted when the change refs |
| 1825 | are hidden. |
| 1826 | + |
| 1827 | Git has a configuration option to hide refs from the initial |
| 1828 | advertisement (`uploadpack.hideRefs`). This option can be used to hide |
| 1829 | the change refs from the client. As consequence fetching changes by |
| 1830 | change ref does not work anymore. However by setting |
| 1831 | `uploadpack.allowTipSha1InWant` to `true` fetching changes by commit ID |
| 1832 | is possible. If `download.checkForHiddenChangeRefs` is set to `true` |
| 1833 | the git download commands use the commit ID instead of the change ref |
| 1834 | when a project is configured like this. |
| 1835 | + |
| 1836 | Example git configuration on a project: |
| 1837 | + |
| 1838 | ---- |
| 1839 | [uploadpack] |
| 1840 | hideRefs = refs/changes/ |
| 1841 | hideRefs = refs/cache-automerge/ |
| 1842 | allowTipSha1InWant = true |
| 1843 | ---- |
| 1844 | + |
| 1845 | By default `false`. |
| 1846 | |
David Ostrovsky | fc9cdf0 | 2014-03-26 14:46:45 -0700 | [diff] [blame] | 1847 | [[download.archive]]download.archive:: |
| 1848 | + |
| 1849 | Specifies which archive formats, if any, should be offered on the change |
Francois Ferrand | 1e93388 | 2014-09-25 11:19:08 +0200 | [diff] [blame] | 1850 | screen and supported for `git-upload-archive` operation: |
David Ostrovsky | fc9cdf0 | 2014-03-26 14:46:45 -0700 | [diff] [blame] | 1851 | + |
| 1852 | ---- |
| 1853 | [download] |
| 1854 | archive = tar |
| 1855 | archive = tbz2 |
| 1856 | archive = tgz |
| 1857 | archive = txz |
Francois Ferrand | 1e93388 | 2014-09-25 11:19:08 +0200 | [diff] [blame] | 1858 | archive = zip |
David Ostrovsky | fc9cdf0 | 2014-03-26 14:46:45 -0700 | [diff] [blame] | 1859 | ---- |
| 1860 | |
Shawn Pearce | 6edde31 | 2014-03-26 22:00:26 -0700 | [diff] [blame] | 1861 | If `download.archive` is not specified defaults to all archive |
| 1862 | commands. Set to `off` or empty string to disable. |
David Ostrovsky | fc9cdf0 | 2014-03-26 14:46:45 -0700 | [diff] [blame] | 1863 | |
Francois Ferrand | 1e93388 | 2014-09-25 11:19:08 +0200 | [diff] [blame] | 1864 | Zip is not supported because it may be interpreted by a Java plugin as a |
| 1865 | valid JAR file, whose code would have access to cookies on the domain. |
| 1866 | For this reason `zip` format is always excluded from formats offered |
| 1867 | through the `Download` drop down or accessible in the REST API. |
| 1868 | |
Stefan Beller | e1b2ad3 | 2016-11-29 14:54:13 -0800 | [diff] [blame] | 1869 | [[download.maxBundleSize]]download.maxBundleSize:: |
| 1870 | + |
| 1871 | Specifies the maximum size of a bundle in bytes that can be downloaded. |
| 1872 | As bundles are kept in memory this setting is to protect the server |
| 1873 | from a single request consuming too much heap when generating |
| 1874 | a bundle and thereby impacting other users. |
| 1875 | + |
| 1876 | Defaults to 100MB. |
| 1877 | |
Matthias Sohn | 0fb2c99 | 2014-06-03 01:42:59 +0200 | [diff] [blame] | 1878 | [[gc]] |
| 1879 | === Section gc |
| 1880 | |
| 1881 | This section allows to configure the git garbage collection and schedules it |
| 1882 | to run periodically. It will be triggered and executed sequentially for all |
| 1883 | projects. |
| 1884 | |
Christian Halstrick | e6c6832 | 2015-03-11 15:21:42 +0100 | [diff] [blame] | 1885 | [[gc.aggressive]]gc.aggressive:: |
| 1886 | + |
| 1887 | Determines if scheduled garbage collections and garbage collections triggered |
| 1888 | through Web-UI should run in aggressive mode or not. Aggressive garbage |
| 1889 | collections are more expensive but may lead to significantly smaller |
| 1890 | repositories. |
| 1891 | + |
| 1892 | Valid values are "true" and "false," default is "false". |
| 1893 | |
Matthias Sohn | 0fb2c99 | 2014-06-03 01:42:59 +0200 | [diff] [blame] | 1894 | [[gc.startTime]]gc.startTime:: |
| 1895 | + |
Edwin Kempin | d33d95a | 2018-02-16 11:44:04 +0100 | [diff] [blame] | 1896 | The link:#schedule-configuration-startTime[start time] for running the |
| 1897 | git garbage collection. |
Matthias Sohn | 0fb2c99 | 2014-06-03 01:42:59 +0200 | [diff] [blame] | 1898 | |
| 1899 | [[gc.interval]]gc.interval:: |
| 1900 | + |
Edwin Kempin | d33d95a | 2018-02-16 11:44:04 +0100 | [diff] [blame] | 1901 | The link:#schedule-configuration-interval[interval] for running the |
| 1902 | git garbage collection. |
Matthias Sohn | 0fb2c99 | 2014-06-03 01:42:59 +0200 | [diff] [blame] | 1903 | |
Edwin Kempin | d33d95a | 2018-02-16 11:44:04 +0100 | [diff] [blame] | 1904 | link:#schedule-configuration-examples[Schedule examples] can be found |
| 1905 | in the link:#schedule-configuration[Schedule Configuration] section. |
Matthias Sohn | 0fb2c99 | 2014-06-03 01:42:59 +0200 | [diff] [blame] | 1906 | |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 1907 | [[gerrit]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1908 | === Section gerrit |
Shawn O. Pearce | eb7f8ce | 2009-06-01 09:57:15 -0700 | [diff] [blame] | 1909 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 1910 | [[gerrit.basePath]]gerrit.basePath:: |
Shawn O. Pearce | 9743d0b | 2009-06-01 10:10:06 -0700 | [diff] [blame] | 1911 | + |
| 1912 | Local filesystem directory holding all Git repositories that |
| 1913 | Gerrit knows about and can process changes for. A project |
| 1914 | entity in Gerrit maps to a local Git repository by creating |
Edwin Kempin | cdb0e00 | 2011-09-08 14:23:30 +0200 | [diff] [blame] | 1915 | the path string `"${basePath}/${project_name}.git"`. |
Shawn O. Pearce | 9743d0b | 2009-06-01 10:10:06 -0700 | [diff] [blame] | 1916 | + |
| 1917 | If relative, the path is resolved relative to `'$site_path'`. |
| 1918 | |
Shawn O. Pearce | 897d921 | 2011-06-16 16:59:59 -0700 | [diff] [blame] | 1919 | [[gerrit.allProjects]]gerrit.allProjects:: |
| 1920 | + |
| 1921 | Name of the permissions-only project defining global server |
| 1922 | access controls and settings. These are inherited into every |
| 1923 | other project managed by the running server. The name is |
| 1924 | relative to `gerrit.basePath`. |
| 1925 | + |
| 1926 | Defaults to `All-Projects` if not set. |
| 1927 | |
Edwin Kempin | 2bf5edd | 2014-03-25 22:21:23 +0100 | [diff] [blame] | 1928 | [[gerrit.allUsers]]gerrit.allUsers:: |
| 1929 | + |
| 1930 | Name of the project in which meta data of all users is stored. |
| 1931 | The name is relative to `gerrit.basePath`. |
| 1932 | + |
| 1933 | Defaults to `All-Users` if not set. |
| 1934 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 1935 | [[gerrit.canonicalWebUrl]]gerrit.canonicalWebUrl:: |
Shawn O. Pearce | eb7f8ce | 2009-06-01 09:57:15 -0700 | [diff] [blame] | 1936 | + |
| 1937 | The default URL for Gerrit to be accessed through. |
| 1938 | + |
Sebastian Schuberth | 6403713 | 2016-07-28 13:40:16 +0200 | [diff] [blame] | 1939 | Typically this would be set to something like "http://review.example.com/" |
| 1940 | or "http://example.com:8080/gerrit/" so Gerrit can output links that point |
Shawn O. Pearce | eb7f8ce | 2009-06-01 09:57:15 -0700 | [diff] [blame] | 1941 | back to itself. |
| 1942 | + |
| 1943 | Setting this is highly recommended, as its necessary for the upload |
| 1944 | code invoked by "git push" or "repo upload" to output hyperlinks |
| 1945 | to the newly uploaded changes. |
| 1946 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 1947 | [[gerrit.canonicalGitUrl]]gerrit.canonicalGitUrl:: |
Shawn O. Pearce | eb7f8ce | 2009-06-01 09:57:15 -0700 | [diff] [blame] | 1948 | + |
| 1949 | Optional base URL for repositories available over the anonymous git |
| 1950 | protocol. For example, set this to `git://mirror.example.com/base/` |
| 1951 | to have Gerrit display patch set download URLs in the UI. Gerrit |
| 1952 | automatically appends the project name onto the end of the URL. |
| 1953 | + |
| 1954 | By default unset, as the git daemon must be configured externally |
| 1955 | by the system administrator, and might not even be running on the |
| 1956 | same host as Gerrit. |
| 1957 | |
Dave Borowitz | a5d3fec | 2015-07-09 14:24:02 -0700 | [diff] [blame] | 1958 | [[gerrit.docUrl]]gerrit.docUrl:: |
| 1959 | + |
| 1960 | Optional base URL for documentation, under which one can find |
| 1961 | "index.html", "rest-api.html", etc. Used as the base for the fixed set |
| 1962 | of links in the "Documentation" tab. A slash is implicitly appended. |
| 1963 | (For finer control over the top menu, consider writing a |
| 1964 | link:dev-plugins.html#top-menu-extensions[plugin].) |
| 1965 | + |
| 1966 | If unset or empty, the documentation tab will only be shown if |
| 1967 | `/Documentation/index.html` can be reached by the browser at app load |
| 1968 | time. |
| 1969 | |
Dave Borowitz | a17a984 | 2015-09-15 09:58:17 -0400 | [diff] [blame] | 1970 | [[gerrit.editGpgKeys]]gerrit.editGpgKeys:: |
| 1971 | + |
| 1972 | If enabled and server-side signed push validation is also |
| 1973 | link:#receive.enableSignedPush[enabled], enable the |
| 1974 | link:rest-api-accounts.html#list-gpg-keys[REST API endpoints] and web UI |
| 1975 | for editing GPG keys. If disabled, GPG keys can only be added by |
| 1976 | administrators with direct git access to All-Users. |
| 1977 | + |
| 1978 | Defaults to true. |
| 1979 | |
Dave Borowitz | 76ab1a1 | 2013-05-10 17:01:29 +0100 | [diff] [blame] | 1980 | [[gerrit.installCommitMsgHookCommand]]gerrit.installCommitMsgHookCommand:: |
| 1981 | + |
| 1982 | Optional command to install the `commit-msg` hook. Typically of the |
| 1983 | form: |
David Pursehouse | 05588e5 | 2015-01-07 14:25:11 +0900 | [diff] [blame] | 1984 | + |
Dave Borowitz | 76ab1a1 | 2013-05-10 17:01:29 +0100 | [diff] [blame] | 1985 | ---- |
| 1986 | fetch-cmd some://url/to/commit-msg .git/hooks/commit-msg ; chmod +x .git/hooks/commit-msg |
| 1987 | ---- |
| 1988 | + |
| 1989 | By default unset; falls back to using scp from the canonical SSH host, |
| 1990 | or curl from the canonical HTTP URL for the server. Only necessary if a |
| 1991 | proxy or other server/network configuration prevents clients from |
| 1992 | fetching from the default location. |
| 1993 | |
Shawn O. Pearce | 5d6de52 | 2011-10-07 18:00:16 -0700 | [diff] [blame] | 1994 | [[gerrit.gitHttpUrl]]gerrit.gitHttpUrl:: |
| 1995 | + |
| 1996 | Optional base URL for repositories available over the HTTP |
| 1997 | protocol. For example, set this to `http://mirror.example.com/base/` |
| 1998 | to have Gerrit display URLs from this server, rather than itself. |
| 1999 | + |
| 2000 | By default unset, as the HTTP daemon must be configured externally |
| 2001 | by the system administrator, and might not even be running on the |
| 2002 | same host as Gerrit. |
| 2003 | |
Luca Milanesio | b8ec7e2 | 2019-04-29 07:26:11 +0100 | [diff] [blame] | 2004 | [[gerrit.installDbModule]]gerrit.installDbModule:: |
| 2005 | + |
| 2006 | Repeatable list of class name of additional Guice modules to load at |
| 2007 | Gerrit startup as part of the dbInjector and during the init phases. |
| 2008 | Classes are resolved using the primary Gerrit class loader, hence the |
| 2009 | class needs to be either declared in Gerrit or an additional JAR |
| 2010 | located under the `/lib` directory. |
| 2011 | + |
| 2012 | By default unset. |
| 2013 | |
Luca Milanesio | 62cc350 | 2016-11-15 10:22:38 -0800 | [diff] [blame] | 2014 | [[gerrit.installModule]]gerrit.installModule:: |
| 2015 | + |
| 2016 | Repeatable list of class name of additional Guice modules to load at |
Luca Milanesio | b8ec7e2 | 2019-04-29 07:26:11 +0100 | [diff] [blame] | 2017 | Gerrit startup as part of the sysInjector and during the init phases. |
Luca Milanesio | 62cc350 | 2016-11-15 10:22:38 -0800 | [diff] [blame] | 2018 | Classes are resolved using the primary Gerrit class loader, hence the |
| 2019 | class needs to be either declared in Gerrit or an additional JAR |
| 2020 | located under the `/lib` directory. |
| 2021 | + |
| 2022 | By default unset. |
| 2023 | + |
| 2024 | Example: |
| 2025 | ---- |
| 2026 | [gerrit] |
| 2027 | installModule = com.googlesource.gerrit.libmodule.MyModule |
| 2028 | installModule = com.example.abc.OurSpecialSauceModule |
Luca Milanesio | b8ec7e2 | 2019-04-29 07:26:11 +0100 | [diff] [blame] | 2029 | installDbModule = com.example.def.OurCustomProvider |
Luca Milanesio | 62cc350 | 2016-11-15 10:22:38 -0800 | [diff] [blame] | 2030 | ---- |
| 2031 | |
Luca Milanesio | 9225485 | 2019-02-14 01:33:14 +0000 | [diff] [blame] | 2032 | [[gerrit.listProjectsFromIndex]]gerrit.listProjectsFromIndex:: |
| 2033 | + |
| 2034 | Enable rendering of project list from the secondary index instead |
| 2035 | of purely relying on the in-memory cache. |
| 2036 | + |
| 2037 | By default false. |
| 2038 | + |
| 2039 | [NOTE] |
| 2040 | The in-memory cache (set to false) rendering provides an **unlimited list** as a result |
| 2041 | of the list project API, causing the full list of projects to be |
| 2042 | returned as a result of the link:rest-api-projects.html[/projects/] REST API |
| 2043 | or the link:cmd-ls-projects.html[gerrit ls-projects] SSH command. |
| 2044 | When the rendering from the secondary index (set to true), |
| 2045 | the **list is limited** by the global capability |
| 2046 | link:access-control.html#capability_queryLimit[queryLimit] |
| 2047 | which is defaulted to 500 entries. |
| 2048 | |
Sven Selberg | e63e92d | 2019-01-22 18:19:19 +0100 | [diff] [blame] | 2049 | [[gerrit.primaryWeblinkName]]gerrit.primaryWeblinkName:: |
| 2050 | + |
| 2051 | Name of the link:dev-plugins.html#links-to-external-tools[Weblink] that should |
| 2052 | be chosen in cases where only one Weblink can be used in the UI, for example in |
| 2053 | inline links. |
| 2054 | + |
| 2055 | By default unset, meaning that the UI is responsible for trying to identify |
| 2056 | a weblink to be used in these cases, most likely weblinks that links to code |
| 2057 | browsers with known integrations with Gerrit (like Gitiles and Gitweb). |
| 2058 | + |
| 2059 | Example: |
| 2060 | ---- |
| 2061 | [gerrit] |
| 2062 | primaryWeblinkName = gitiles |
| 2063 | ---- |
| 2064 | |
Shawn O. Pearce | b8bea1b | 2012-08-16 17:18:58 -0700 | [diff] [blame] | 2065 | [[gerrit.reportBugUrl]]gerrit.reportBugUrl:: |
| 2066 | + |
David Pursehouse | 214ab86 | 2014-12-01 11:48:26 +0900 | [diff] [blame] | 2067 | URL to direct users to when they need to report a bug. |
| 2068 | + |
| 2069 | By default unset, meaning no bug report URL will be displayed. Administrators |
| 2070 | 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] | 2071 | |
David Pursehouse | 46a2f6c | 2018-11-30 11:12:19 +0900 | [diff] [blame] | 2072 | [[gerrit.enableReverseDnsLookup]]gerrit.enableReverseDnsLookup:: |
Dariusz Luksza | 45ee73e | 2014-08-20 09:38:09 +0200 | [diff] [blame] | 2073 | + |
David Pursehouse | 793525f | 2018-11-30 11:20:02 +0900 | [diff] [blame] | 2074 | Enable reverse DNS lookup during computing ref log entry for identified user, |
| 2075 | to record the actual hostname of the user's host in the ref log. |
Dariusz Luksza | 45ee73e | 2014-08-20 09:38:09 +0200 | [diff] [blame] | 2076 | + |
David Pursehouse | 793525f | 2018-11-30 11:20:02 +0900 | [diff] [blame] | 2077 | Enabling reverse DNS lookup can cause performance issues on git push when |
| 2078 | the reverse DNS lookup is slow. |
| 2079 | + |
| 2080 | Defaults to false, reverse DNS lookup is disabled. The user's IP address |
| 2081 | will be recorded in the ref log rather than their hostname. |
Dariusz Luksza | 45ee73e | 2014-08-20 09:38:09 +0200 | [diff] [blame] | 2082 | |
David Pursehouse | 962e118 | 2014-12-03 17:17:52 +0900 | [diff] [blame] | 2083 | [[gerrit.secureStoreClass]]gerrit.secureStoreClass:: |
| 2084 | + |
| 2085 | Use the secure store implementation from a specified class. |
| 2086 | + |
| 2087 | If specified, must be the fully qualified class name of a class that implements |
| 2088 | the `com.google.gerrit.server.securestore.SecureStore` interface, and the jar |
| 2089 | file containing the class must be placed in the `$site_path/lib` folder. |
| 2090 | + |
| 2091 | If not specified, the default no-op implementation is used. |
| 2092 | |
Dariusz Luksza | 7a046da | 2014-04-03 17:05:47 +0200 | [diff] [blame] | 2093 | [[gerrit.canLoadInIFrame]]gerrit.canLoadInIFrame:: |
| 2094 | + |
| 2095 | For security reasons Gerrit will always jump out of iframe. |
| 2096 | Setting this option to true will prevent this behavior. |
| 2097 | + |
| 2098 | By default false. |
| 2099 | |
Wyatt Allen | 414659c | 2017-03-15 09:55:31 -0700 | [diff] [blame] | 2100 | [[gerrit.cdnPath]]gerrit.cdnPath:: |
| 2101 | + |
| 2102 | Path prefix for PolyGerrit's static resources if using a CDN. |
| 2103 | |
Viktar Donich | 65ae748 | 2017-10-20 14:13:31 -0700 | [diff] [blame] | 2104 | [[gerrit.faviconPath]]gerrit.faviconPath:: |
| 2105 | + |
| 2106 | Path for PolyGerrit's favicon after link:#gerrit.canonicalWebUrl[default URL], |
| 2107 | including icon name and extension (.ico should be used). |
| 2108 | |
Maxime Guerreiro | 8d129d4 | 2018-03-21 18:59:27 +0100 | [diff] [blame] | 2109 | |
| 2110 | [[gerrit.instanceName]]gerrit.instanceName:: |
| 2111 | + |
| 2112 | Short identifier for this Gerrit instance. |
| 2113 | A good name should be short but precise enough so that users can identify the instance among others. |
| 2114 | + |
| 2115 | Defaults to the full hostname of the Gerrit server. |
| 2116 | |
| 2117 | |
Sven Selberg | 327c2e4 | 2018-04-10 11:42:19 +0200 | [diff] [blame] | 2118 | [[gerrit.serverId]]gerrit.serverId:: |
| 2119 | + |
| 2120 | Used by NoteDb to, amongst other things, identify author identities from |
| 2121 | per-server specific account IDs. |
| 2122 | + |
| 2123 | If this value is not set on startup it is automatically set to a random UUID. |
| 2124 | + |
| 2125 | [NOTE] |
| 2126 | If this value doesn't match the serverId used when creating an already existing |
| 2127 | NoteDb, Gerrit will not be able to use that instance of NoteDb. The serverId |
| 2128 | used to create the NoteDb will show in the resulting exception message in case |
| 2129 | the value differs. |
| 2130 | |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 2131 | [[gitweb]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2132 | === Section gitweb |
Shawn O. Pearce | d7ba11f | 2009-06-01 09:35:41 -0700 | [diff] [blame] | 2133 | |
Shawn O. Pearce | 618dae2 | 2010-03-12 19:07:43 -0800 | [diff] [blame] | 2134 | Gerrit can forward requests to either an internally managed gitweb |
| 2135 | (which allows Gerrit to enforce some access controls), or to an |
| 2136 | externally managed gitweb (where the web server manages access). |
Shawn O. Pearce | d7ba11f | 2009-06-01 09:35:41 -0700 | [diff] [blame] | 2137 | See also link:config-gitweb.html[Gitweb Integration]. |
| 2138 | |
Shawn O. Pearce | 618dae2 | 2010-03-12 19:07:43 -0800 | [diff] [blame] | 2139 | [[gitweb.cgi]]gitweb.cgi:: |
| 2140 | + |
| 2141 | Path to the locally installed `gitweb.cgi` executable. This CGI will |
| 2142 | be called by Gerrit Code Review when the URL `/gitweb` is accessed. |
| 2143 | Project level access controls are enforced prior to calling the CGI. |
| 2144 | + |
David Pursehouse | a89dc98 | 2016-09-15 09:35:44 +0200 | [diff] [blame] | 2145 | Defaults to `/usr/lib/cgi-bin/gitweb.cgi` if `gitweb.url` is not set. |
Shawn O. Pearce | 618dae2 | 2010-03-12 19:07:43 -0800 | [diff] [blame] | 2146 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 2147 | [[gitweb.url]]gitweb.url:: |
Shawn O. Pearce | d7ba11f | 2009-06-01 09:35:41 -0700 | [diff] [blame] | 2148 | + |
| 2149 | Optional URL of an affiliated gitweb service. Defines the |
| 2150 | web location where a `gitweb.cgi` is installed to browse |
David Pursehouse | a89dc98 | 2016-09-15 09:35:44 +0200 | [diff] [blame] | 2151 | `gerrit.basePath` and the repositories it contains. |
Shawn O. Pearce | d7ba11f | 2009-06-01 09:35:41 -0700 | [diff] [blame] | 2152 | + |
| 2153 | Gerrit appends any necessary query arguments onto the end of this URL. |
David Pursehouse | a89dc98 | 2016-09-15 09:35:44 +0200 | [diff] [blame] | 2154 | For example, `?p=$project.git;h=$commit`. |
Shawn O. Pearce | d7ba11f | 2009-06-01 09:35:41 -0700 | [diff] [blame] | 2155 | |
Shane Mc Cormack | 27868a4 | 2009-12-28 04:49:39 +0000 | [diff] [blame] | 2156 | [[gitweb.type]]gitweb.type:: |
| 2157 | + |
| 2158 | Optional type of affiliated gitweb service. This allows using |
David Pursehouse | a66f7ff | 2016-09-05 21:11:10 +0900 | [diff] [blame] | 2159 | alternatives to gitweb, such as cgit. |
Shane Mc Cormack | 27868a4 | 2009-12-28 04:49:39 +0000 | [diff] [blame] | 2160 | + |
Shawn O. Pearce | 2b11da0 | 2011-09-06 16:18:12 -0700 | [diff] [blame] | 2161 | Valid values are `gitweb`, `cgit`, `disabled` or `custom`. |
David Pursehouse | a66f7ff | 2016-09-05 21:11:10 +0900 | [diff] [blame] | 2162 | + |
| 2163 | If not set, or set to `disabled`, there is no gitweb hyperlinking |
| 2164 | support. |
Shane Mc Cormack | 27868a4 | 2009-12-28 04:49:39 +0000 | [diff] [blame] | 2165 | |
Edwin Kempin | d86909c | 2012-03-26 10:36:29 +0200 | [diff] [blame] | 2166 | [[gitweb.revision]]gitweb.revision:: |
Shane Mc Cormack | 27868a4 | 2009-12-28 04:49:39 +0000 | [diff] [blame] | 2167 | + |
| 2168 | Optional pattern to use for constructing the gitweb URL when pointing |
David Pursehouse | a89dc98 | 2016-09-15 09:35:44 +0200 | [diff] [blame] | 2169 | at a specific commit when `gitweb.type` is set to `custom`. |
Shane Mc Cormack | 27868a4 | 2009-12-28 04:49:39 +0000 | [diff] [blame] | 2170 | + |
Edwin Kempin | cdb0e00 | 2011-09-08 14:23:30 +0200 | [diff] [blame] | 2171 | Valid replacements are `${project}` for the project name in Gerrit |
| 2172 | and `${commit}` for the SHA1 hash for the commit. |
Shane Mc Cormack | 27868a4 | 2009-12-28 04:49:39 +0000 | [diff] [blame] | 2173 | |
Edwin Kempin | d86909c | 2012-03-26 10:36:29 +0200 | [diff] [blame] | 2174 | [[gitweb.project]]gitweb.project:: |
Shane Mc Cormack | 27868a4 | 2009-12-28 04:49:39 +0000 | [diff] [blame] | 2175 | + |
| 2176 | Optional pattern to use for constructing the gitweb URL when pointing |
David Pursehouse | a89dc98 | 2016-09-15 09:35:44 +0200 | [diff] [blame] | 2177 | at a specific project when `gitweb.type` is set to `custom`. |
Shane Mc Cormack | 27868a4 | 2009-12-28 04:49:39 +0000 | [diff] [blame] | 2178 | + |
Edwin Kempin | cdb0e00 | 2011-09-08 14:23:30 +0200 | [diff] [blame] | 2179 | Valid replacements are `${project}` for the project name in Gerrit. |
Shane Mc Cormack | 27868a4 | 2009-12-28 04:49:39 +0000 | [diff] [blame] | 2180 | |
Edwin Kempin | d86909c | 2012-03-26 10:36:29 +0200 | [diff] [blame] | 2181 | [[gitweb.branch]]gitweb.branch:: |
Shane Mc Cormack | 27868a4 | 2009-12-28 04:49:39 +0000 | [diff] [blame] | 2182 | + |
| 2183 | Optional pattern to use for constructing the gitweb URL when pointing |
David Pursehouse | a89dc98 | 2016-09-15 09:35:44 +0200 | [diff] [blame] | 2184 | at a specific branch when `gitweb.type` is set to `custom`. |
Shane Mc Cormack | 27868a4 | 2009-12-28 04:49:39 +0000 | [diff] [blame] | 2185 | + |
Edwin Kempin | cdb0e00 | 2011-09-08 14:23:30 +0200 | [diff] [blame] | 2186 | Valid replacements are `${project}` for the project name in Gerrit |
| 2187 | and `${branch}` for the name of the branch. |
Shane Mc Cormack | 27868a4 | 2009-12-28 04:49:39 +0000 | [diff] [blame] | 2188 | |
Paladox none | 5759f2c | 2017-10-27 18:13:54 +0000 | [diff] [blame] | 2189 | [[gitweb.tag]]gitweb.tag:: |
| 2190 | + |
| 2191 | Optional pattern to use for constructing the gitweb URL when pointing |
| 2192 | at a specific tag when `gitweb.type` is set to `custom`. |
| 2193 | + |
| 2194 | Valid replacements are `${project}` for the project name in Gerrit |
| 2195 | and `${tag}` for the name of the tag. |
| 2196 | |
Colby Ranger | 79d4ebe | 2013-12-16 14:19:18 -0800 | [diff] [blame] | 2197 | [[gitweb.roottree]]gitweb.roottree:: |
| 2198 | + |
| 2199 | Optional pattern to use for constructing the gitweb URL when pointing |
David Pursehouse | a89dc98 | 2016-09-15 09:35:44 +0200 | [diff] [blame] | 2200 | at the contents of the root tree in a specific commit when `gitweb.type` |
| 2201 | is set to `custom`. |
Colby Ranger | 79d4ebe | 2013-12-16 14:19:18 -0800 | [diff] [blame] | 2202 | + |
| 2203 | Valid replacements are `${project}` for the project name in Gerrit |
| 2204 | and `${commit}` for the SHA1 hash for the commit. |
| 2205 | |
| 2206 | [[gitweb.file]]gitweb.file:: |
| 2207 | + |
| 2208 | Optional pattern to use for constructing the gitweb URL when pointing |
David Pursehouse | a89dc98 | 2016-09-15 09:35:44 +0200 | [diff] [blame] | 2209 | at the contents of a file in a specific commit when `gitweb.type` is |
| 2210 | set to `custom`. |
Colby Ranger | 79d4ebe | 2013-12-16 14:19:18 -0800 | [diff] [blame] | 2211 | + |
| 2212 | Valid replacements are `${project}` for the project name in Gerrit, |
| 2213 | `${file}` for the file name and `${commit}` for the SHA1 hash for |
| 2214 | the commit. |
| 2215 | |
Edwin Kempin | 6401156 | 2012-03-26 10:50:12 +0200 | [diff] [blame] | 2216 | [[gitweb.filehistory]]gitweb.filehistory:: |
| 2217 | + |
| 2218 | Optional pattern to use for constructing the gitweb URL when pointing |
David Pursehouse | a89dc98 | 2016-09-15 09:35:44 +0200 | [diff] [blame] | 2219 | at the history of a file in a specific branch when when `gitweb.type` |
| 2220 | is set to `custom`. |
Edwin Kempin | 6401156 | 2012-03-26 10:50:12 +0200 | [diff] [blame] | 2221 | + |
| 2222 | Valid replacements are `${project}` for the project name in Gerrit, |
| 2223 | `${file}` for the file name and `${branch}` for the name of the |
| 2224 | branch. |
| 2225 | |
Gustaf Lundh | a07d2e7 | 2011-10-27 15:26:35 -0700 | [diff] [blame] | 2226 | [[gitweb.linkname]]gitweb.linkname:: |
| 2227 | + |
| 2228 | Optional setting for modifying the link name presented to the user |
| 2229 | in the Gerrit web-UI. |
| 2230 | + |
David Pursehouse | a89dc98 | 2016-09-15 09:35:44 +0200 | [diff] [blame] | 2231 | The default linkname for custom type is `gitweb`. |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 2232 | |
Adrian Goerler | f200707 | 2011-11-10 08:39:55 +0100 | [diff] [blame] | 2233 | [[gitweb.pathSeparator]]gitweb.pathSeparator:: |
| 2234 | + |
| 2235 | Optional character to substitute the standard path separator (slash) in |
| 2236 | project names and branch names. |
| 2237 | + |
| 2238 | By default, Gerrit will use hexadecimal encoding for slashes in project and |
| 2239 | branch names. Some web servers, such as Tomcat, reject this hexadecimal |
| 2240 | encoding in the URL. |
| 2241 | + |
| 2242 | Some alternative gitweb services, such as link:http://gitblit.com[Gitblit], |
| 2243 | allow using an alternative path separator character. In Gitblit, this can be |
| 2244 | configured through the property link:http://gitblit.com/properties.html[web.forwardSlashCharacter]. |
| 2245 | In Gerrit, the alternative path separator can be configured correspondingly |
David Pursehouse | a89dc98 | 2016-09-15 09:35:44 +0200 | [diff] [blame] | 2246 | using the property `gitweb.pathSeparator`. |
Adrian Goerler | f200707 | 2011-11-10 08:39:55 +0100 | [diff] [blame] | 2247 | + |
David Pursehouse | a89dc98 | 2016-09-15 09:35:44 +0200 | [diff] [blame] | 2248 | Valid values are the characters `*`, `(` and `)`. |
Adrian Goerler | f200707 | 2011-11-10 08:39:55 +0100 | [diff] [blame] | 2249 | |
David Pursehouse | 5d592e8 | 2016-06-09 05:12:26 +0000 | [diff] [blame] | 2250 | [[gitweb.urlEncode]]gitweb.urlEncode:: |
Luca Milanesio | 2531203 | 2013-10-11 11:34:39 +0100 | [diff] [blame] | 2251 | + |
| 2252 | Whether or not Gerrit should encode the generated viewer URL. |
| 2253 | + |
| 2254 | Gerrit composes the viewer URL using information about the project, branch, file |
| 2255 | or commit of the target object to be displayed. Typically viewers such as CGit |
David Pursehouse | a89dc98 | 2016-09-15 09:35:44 +0200 | [diff] [blame] | 2256 | 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] | 2257 | for being correctly parsed. |
| 2258 | However other viewers could instead require an unencoded URL (e.g. GitHub web |
David Pursehouse | a89dc98 | 2016-09-15 09:35:44 +0200 | [diff] [blame] | 2259 | based viewer). |
Luca Milanesio | 2531203 | 2013-10-11 11:34:39 +0100 | [diff] [blame] | 2260 | + |
David Pursehouse | a89dc98 | 2016-09-15 09:35:44 +0200 | [diff] [blame] | 2261 | Valid values are `true` and `false`. The default is `true`. |
Luca Milanesio | 2531203 | 2013-10-11 11:34:39 +0100 | [diff] [blame] | 2262 | |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 2263 | [[groups]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2264 | === Section groups |
Edwin Kempin | 4bbff70 | 2013-01-11 09:59:53 +0100 | [diff] [blame] | 2265 | |
| 2266 | [[groups.newGroupsVisibleToAll]]groups.newGroupsVisibleToAll:: |
| 2267 | + |
| 2268 | Controls whether newly created groups should be by default visible to |
| 2269 | all registered users. |
| 2270 | + |
| 2271 | By default, false. |
| 2272 | |
Edwin Kempin | f3eddd5 | 2017-01-20 14:05:47 +0100 | [diff] [blame] | 2273 | [[groups.uuid.name]]groups.<uuid>.name:: |
| 2274 | + |
| 2275 | Display name for group with the given UUID. |
| 2276 | + |
| 2277 | This option is only supported for system groups (scheme 'global'). |
| 2278 | + |
| 2279 | E.g. this parameter can be used to configure another name for the |
| 2280 | `Anonymous Users` group: |
| 2281 | + |
| 2282 | ---- |
| 2283 | [groups "global:Anonymous-Users"] |
| 2284 | name = All Users |
| 2285 | ---- |
| 2286 | + |
| 2287 | When setting this parameter it should be verified that there is no |
| 2288 | existing group with the same name (case-insensitive). Configuring an |
| 2289 | ambiguous name makes Gerrit fail on startup. Once set Gerrit ensures |
| 2290 | that it is not possible to create a group with this name. Gerrit also |
| 2291 | keeps the default name reserved so that it cannot be used for new |
| 2292 | groups either. This means there is no danger of ambiguous group names |
| 2293 | when this parameter is removed and the system group uses the default |
| 2294 | name again. |
| 2295 | |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 2296 | [[http]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2297 | === Section http |
Shawn O. Pearce | 309d8d3 | 2009-11-17 16:03:16 -0800 | [diff] [blame] | 2298 | |
| 2299 | [[http.proxy]]http.proxy:: |
Shawn O. Pearce | 9d342a4 | 2009-12-16 15:49:05 -0800 | [diff] [blame] | 2300 | + |
| 2301 | URL of the proxy server when making outgoing HTTP |
| 2302 | connections for OpenID login transactions. Syntax |
| 2303 | should be `http://`'hostname'`:`'port'. |
Shawn O. Pearce | 309d8d3 | 2009-11-17 16:03:16 -0800 | [diff] [blame] | 2304 | |
| 2305 | [[http.proxyUsername]]http.proxyUsername:: |
Shawn O. Pearce | 9d342a4 | 2009-12-16 15:49:05 -0800 | [diff] [blame] | 2306 | + |
| 2307 | Optional username to authenticate to the HTTP proxy with. |
Robin Rosenberg | 524a303 | 2012-10-14 14:24:36 +0200 | [diff] [blame] | 2308 | This property is honored only if the username does not |
Shawn O. Pearce | 9d342a4 | 2009-12-16 15:49:05 -0800 | [diff] [blame] | 2309 | appear in the http.proxy property above. |
Shawn O. Pearce | 309d8d3 | 2009-11-17 16:03:16 -0800 | [diff] [blame] | 2310 | |
| 2311 | [[http.proxyPassword]]http.proxyPassword:: |
Shawn O. Pearce | 9d342a4 | 2009-12-16 15:49:05 -0800 | [diff] [blame] | 2312 | + |
| 2313 | Optional password to authenticate to the HTTP proxy with. |
Robin Rosenberg | 524a303 | 2012-10-14 14:24:36 +0200 | [diff] [blame] | 2314 | This property is honored only if the password does not |
Shawn O. Pearce | 9d342a4 | 2009-12-16 15:49:05 -0800 | [diff] [blame] | 2315 | appear in the http.proxy property above. |
Shawn O. Pearce | 309d8d3 | 2009-11-17 16:03:16 -0800 | [diff] [blame] | 2316 | |
Hugo Arès | 88e33ac | 2014-03-03 13:52:45 -0500 | [diff] [blame] | 2317 | [[http.addUserAsRequestAttribute]]http.addUserAsRequestAttribute:: |
| 2318 | + |
| 2319 | If true, 'User' attribute will be added to the request attributes so it |
| 2320 | can be accessed outside the request scope (will be set to username or id |
| 2321 | if username not configured). |
| 2322 | + |
| 2323 | This attribute can be used by the servlet container to log user in the |
| 2324 | http access log. |
| 2325 | + |
| 2326 | When running the embedded servlet container, this attribute is used to |
| 2327 | print user in the httpd_log. |
| 2328 | + |
| 2329 | * `%{User}r` |
| 2330 | + |
| 2331 | Pattern to print user in Tomcat AccessLog. |
| 2332 | |
| 2333 | + |
| 2334 | Default value is true. |
Shawn O. Pearce | 309d8d3 | 2009-11-17 16:03:16 -0800 | [diff] [blame] | 2335 | |
Gustaf Lundh | e45c333 | 2018-05-02 10:52:11 +0200 | [diff] [blame] | 2336 | [[http.addUserAsResponseHeader]]http.addUserAsResponseHeader:: |
| 2337 | + |
| 2338 | If true, the header 'User' will be added to the list of response headers so it |
| 2339 | can be accessed from a reverse proxy for logging purposes. |
| 2340 | |
| 2341 | + |
| 2342 | Default value is false. |
| 2343 | |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 2344 | [[httpd]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2345 | === Section httpd |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 2346 | |
| 2347 | The httpd section configures the embedded servlet container. |
| 2348 | |
| 2349 | [[httpd.listenUrl]]httpd.listenUrl:: |
| 2350 | + |
Gert van Dijk | 70e2661 | 2019-09-29 16:20:25 +0200 | [diff] [blame] | 2351 | Configuration for the listening sockets of the internal HTTP daemon. |
| 2352 | Each entry of `listenUrl` combines the following options for a |
| 2353 | listening socket: protocol, network address, port and context path. |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 2354 | + |
Gert van Dijk | 70e2661 | 2019-09-29 16:20:25 +0200 | [diff] [blame] | 2355 | _Protocol_ can be either `http://`, `https://`, `proxy-http://` or |
| 2356 | `proxy-https://`. The latter two are special forms of `http://` with |
| 2357 | awareness of a reverse proxy (see below). _Network address_ selects |
| 2358 | the interface and/or scope of the listening socket. For notes |
| 2359 | examples, see below. _Port_ is the TCP port number and is optional |
| 2360 | (default value depends on the protocol). _Context path_ is the |
| 2361 | optional "base URI" for the Gerrit Code Review as application to |
| 2362 | serve on. |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 2363 | + |
Gert van Dijk | 70e2661 | 2019-09-29 16:20:25 +0200 | [diff] [blame] | 2364 | **Protocol** schemes: |
| 2365 | + |
| 2366 | * `http://` |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 2367 | + |
| 2368 | Plain-text HTTP protocol. If port is not supplied, defaults to 80, |
| 2369 | the standard HTTP port. |
| 2370 | + |
Gert van Dijk | 70e2661 | 2019-09-29 16:20:25 +0200 | [diff] [blame] | 2371 | * `https://` |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 2372 | + |
| 2373 | SSL encrypted HTTP protocol. If port is not supplied, defaults to |
| 2374 | 443, the standard HTTPS port. |
| 2375 | + |
Gert van Dijk | 70e2661 | 2019-09-29 16:20:25 +0200 | [diff] [blame] | 2376 | For configuration of the certificate and private key, see |
| 2377 | <<httpd.sslKeyStore,httpd.sslKeyStore>>. |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 2378 | + |
Gert van Dijk | 70e2661 | 2019-09-29 16:20:25 +0200 | [diff] [blame] | 2379 | [NOTE] |
| 2380 | SSL/TLS configuration capabilities of Gerrit internal HTTP daemon |
| 2381 | are very limited. Externally facing production sites are strongly |
| 2382 | encouraged to use a reverse proxy configuration to handle SSL/TLS |
| 2383 | and use a `proxy-https://` scheme here (below) for security and |
| 2384 | performance reasons. |
| 2385 | + |
| 2386 | * `proxy-http://` |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 2387 | + |
| 2388 | Plain-text HTTP relayed from a reverse proxy. If port is not |
| 2389 | supplied, defaults to 8080. |
| 2390 | + |
Gert van Dijk | 70e2661 | 2019-09-29 16:20:25 +0200 | [diff] [blame] | 2391 | Like `http://`, but additional header parsing features are |
| 2392 | enabled to honor `X-Forwarded-For`, `X-Forwarded-Host` and |
| 2393 | `X-Forwarded-Server`. These headers are typically set by Apache's |
| 2394 | link:https://httpd.apache.org/docs/2.4/mod/mod_proxy.html#x-headers[mod_proxy]. |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 2395 | + |
Gert van Dijk | 70e2661 | 2019-09-29 16:20:25 +0200 | [diff] [blame] | 2396 | [NOTE] |
| 2397 | -- |
| 2398 | For secruity reasons, make sure to only allow connections from a |
| 2399 | trusted reverse proxy in your network, as clients could otherwise |
| 2400 | easily spoof these headers and thus spoof their originating IP |
| 2401 | address effectively. If the reverse proxy is running on the same |
| 2402 | machine as Gerrit daemon, the use of a _loopback_ network address |
| 2403 | to bind to (see below) is strongly recommended to mitigate this. |
| 2404 | |
| 2405 | If not using Apache's mod_proxy, validate that your reverse proxy |
| 2406 | sets these headers on all requests. If not, either configure it to |
| 2407 | sanitize them from the origin, or use the `http://` scheme instead. |
| 2408 | -- |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 2409 | + |
Gert van Dijk | 70e2661 | 2019-09-29 16:20:25 +0200 | [diff] [blame] | 2410 | * `proxy-https://` |
| 2411 | + |
| 2412 | Plain-text HTTP relayed from a reverse proxy that has already |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 2413 | handled the SSL encryption/decryption. If port is not supplied, |
| 2414 | defaults to 8080. |
| 2415 | + |
Gert van Dijk | 70e2661 | 2019-09-29 16:20:25 +0200 | [diff] [blame] | 2416 | Behaves exactly like `proxy-http://`, but also sets the scheme to |
| 2417 | assume `https://` is the proper URL back to the server. |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 2418 | |
| 2419 | + |
Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 2420 | -- |
Gert van Dijk | 70e2661 | 2019-09-29 16:20:25 +0200 | [diff] [blame] | 2421 | **Network address** forms: |
| 2422 | |
| 2423 | * Loopback (localhost): `127.0.0.1` (IPv4) or `[::1]` (IPv6). |
| 2424 | * All (unspecified): `0.0.0.0` (IPv4), `[::]` (IPv6) or `*` |
| 2425 | (IPv4 and IPv6) |
| 2426 | * Interface IP address, e.g. `1.2.3.4` (IPv4) or |
| 2427 | `[2001:db8::a00:20ff:fea7:ccea]` (IPv6) |
| 2428 | * Hostname, resolved at startup time to an address. |
| 2429 | |
| 2430 | **Context path** is the local part of the URL to be used to access |
| 2431 | Gerrit on ('base URL'). E.g. `/gerrit/` to serve Gerrit on that URI |
| 2432 | as base. If set, consider to align this with the |
| 2433 | <<gerrit.canonicalWebUrl,gerrit.canonicalWebUrl>> setting. Correct |
| 2434 | settings may depend on the reverse proxy configuration as well. By |
| 2435 | default, this is `/` so that Gerrit serves requests on the root. |
| 2436 | |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 2437 | If multiple values are supplied, the daemon will listen on all |
| 2438 | of them. |
Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 2439 | |
Gert van Dijk | 70e2661 | 2019-09-29 16:20:25 +0200 | [diff] [blame] | 2440 | Examples: |
| 2441 | |
| 2442 | ---- |
| 2443 | [httpd] |
| 2444 | listenUrl = proxy-https://127.0.0.1:9999/gerrit/ |
| 2445 | [gerrit] |
| 2446 | # Reverse proxy is configured to serve with SSL/TLS on |
| 2447 | # example.com and to relay requests on /gerrit/ onto |
| 2448 | # http://127.0.0.1:9999/gerrit/ |
| 2449 | canonicalWebUrl = https://example.com/gerrit/ |
| 2450 | ---- |
| 2451 | |
| 2452 | ---- |
| 2453 | [httpd] |
| 2454 | # Listen on specific external interface with plaintext |
| 2455 | # HTTP on IPv6. |
| 2456 | listenUrl = http://[2001:db8::a00:20ff:fea7:ccea] |
| 2457 | |
| 2458 | # Also listen on specific internal interface for use with |
| 2459 | # reverse proxy run on another host. |
| 2460 | listenUrl = proxy-https://192.168.100.123 |
| 2461 | ---- |
| 2462 | |
| 2463 | See also the page on link:config-reverseproxy.html[reverse proxy] |
| 2464 | configuration. |
| 2465 | |
| 2466 | By default, `\http://*:8080`. |
Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 2467 | -- |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 2468 | |
| 2469 | [[httpd.reuseAddress]]httpd.reuseAddress:: |
| 2470 | + |
| 2471 | If true, permits the daemon to bind to the port even if the port |
| 2472 | is already in use. If false, the daemon ensures the port is not |
| 2473 | in use before starting. Busy sites may need to set this to true |
| 2474 | to permit fast restarts. |
| 2475 | + |
| 2476 | By default, true. |
| 2477 | |
Luca Milanesio | 4e2bb45 | 2018-03-21 09:07:24 +0000 | [diff] [blame] | 2478 | [[httpd.gracefulStopTimeout]]httpd.gracefulStopTimeout:: |
| 2479 | + |
| 2480 | Set a graceful stop time. If set, the daemon ensures that all incoming |
| 2481 | calls are preserved for a maximum period of time, before starting |
| 2482 | the graceful shutdown process. Sites behind a workload balancer such as |
| 2483 | HAProxy would need this to be set for avoiding serving errors during |
| 2484 | rolling restarts. |
| 2485 | + |
| 2486 | Values should use common unit suffixes to express their setting: |
| 2487 | + |
| 2488 | * s, sec, second, seconds |
| 2489 | * m, min, minute, minutes |
| 2490 | + |
| 2491 | By default, 0 seconds (immediate shutdown). |
| 2492 | |
Thomas Meyer | aa93fdf | 2016-10-23 10:53:48 +0200 | [diff] [blame] | 2493 | [[httpd.inheritChannel]]httpd.inheritChannel:: |
| 2494 | + |
| 2495 | If true, permits the daemon to inherit its server socket channel |
| 2496 | from fd0/1(stdin/stdout). When set to true, the server can be socket |
| 2497 | activated via systemd or xinetd. |
| 2498 | + |
| 2499 | By default, false. |
| 2500 | |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 2501 | [[httpd.requestHeaderSize]]httpd.requestHeaderSize:: |
| 2502 | + |
| 2503 | Size, in bytes, of the buffer used to parse the HTTP headers of an |
| 2504 | incoming HTTP request. The entire request headers, including any |
| 2505 | cookies sent by the browser, must fit within this buffer, otherwise |
| 2506 | the server aborts with the response '413 Request Entity Too Large'. |
| 2507 | + |
| 2508 | One buffer of this size is allocated per active connection. |
| 2509 | Allocating a buffer that is too large wastes memory that cannot be |
| 2510 | reclaimed, allocating a buffer that is too small may cause unexpected |
| 2511 | errors caused by very long Referer URLs or large cookie values. |
| 2512 | + |
| 2513 | By default, 16384 (16 K), which is sufficient for most OpenID and |
| 2514 | other web-based single-sign-on integrations. |
| 2515 | |
Chulho Yang | b72ff8f | 2013-07-04 02:35:53 -0400 | [diff] [blame] | 2516 | [[httpd.sslCrl]]httpd.sslCrl:: |
| 2517 | + |
| 2518 | Path of the certificate revocation list file in PEM format. This |
| 2519 | crl file is optional, and available for CLIENT_SSL_CERT_LDAP |
| 2520 | authentication. |
| 2521 | + |
| 2522 | To create and view a crl using openssl: |
| 2523 | + |
| 2524 | ---- |
| 2525 | openssl ca -gencrl -out crl.pem |
| 2526 | openssl crl -in crl.pem -text |
| 2527 | ---- |
| 2528 | + |
| 2529 | If not absolute, the path is resolved relative to `$site_path`. |
| 2530 | + |
| 2531 | By default, `$site_path/etc/crl.pem`. |
| 2532 | |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 2533 | [[httpd.sslKeyStore]]httpd.sslKeyStore:: |
| 2534 | + |
| 2535 | Path of the Java keystore containing the server's SSL certificate |
| 2536 | and private key. This keystore is required for `https://` in URL. |
| 2537 | + |
| 2538 | To create a self-signed certificate for simple internal usage: |
| 2539 | + |
Shawn O. Pearce | 9d342a4 | 2009-12-16 15:49:05 -0800 | [diff] [blame] | 2540 | ---- |
| 2541 | keytool -keystore keystore -alias jetty -genkey -keyalg RSA |
| 2542 | chmod 600 keystore |
| 2543 | ---- |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 2544 | + |
| 2545 | If not absolute, the path is resolved relative to `$site_path`. |
| 2546 | + |
Shawn O. Pearce | c5fed82 | 2009-11-17 16:10:10 -0800 | [diff] [blame] | 2547 | By default, `$site_path/etc/keystore`. |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 2548 | |
| 2549 | [[httpd.sslKeyPassword]]httpd.sslKeyPassword:: |
| 2550 | + |
| 2551 | Password used to decrypt the private portion of the sslKeyStore. |
David Pursehouse | 221d4f6 | 2012-06-08 17:38:08 +0900 | [diff] [blame] | 2552 | Java keystores require a password, even if the administrator |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 2553 | doesn't want to enable one. |
| 2554 | + |
| 2555 | If set to the empty string the embedded server will prompt for the |
| 2556 | password during startup. |
| 2557 | + |
| 2558 | By default, `gerrit`. |
| 2559 | |
Shawn O. Pearce | 1766f50 | 2010-01-15 10:49:46 -0800 | [diff] [blame] | 2560 | [[httpd.requestLog]]httpd.requestLog:: |
| 2561 | + |
| 2562 | Enable (or disable) the `'$site_path'/logs/httpd_log` request log. |
| 2563 | If enabled, an NCSA combined log format request log file is written |
| 2564 | out by the internal HTTP daemon. |
| 2565 | + |
David Ostrovsky | 8e4a990 | 2013-11-19 23:57:48 +0100 | [diff] [blame] | 2566 | `log4j.appender` with the name `httpd_log` can be configured to overwrite |
| 2567 | programmatic configuration. |
| 2568 | + |
Shawn O. Pearce | 1766f50 | 2010-01-15 10:49:46 -0800 | [diff] [blame] | 2569 | By default, true if httpd.listenUrl uses http:// or https://, |
| 2570 | and false if httpd.listenUrl uses proxy-http:// or proxy-https://. |
| 2571 | |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 2572 | [[httpd.acceptorThreads]]httpd.acceptorThreads:: |
| 2573 | + |
| 2574 | Number of worker threads dedicated to accepting new incoming TCP |
David Pursehouse | 221d4f6 | 2012-06-08 17:38:08 +0900 | [diff] [blame] | 2575 | connections and allocating them connection-specific resources. |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 2576 | + |
| 2577 | By default, 2, which should be suitable for most high-traffic sites. |
| 2578 | |
| 2579 | [[httpd.minThreads]]httpd.minThreads:: |
| 2580 | + |
| 2581 | Minimum number of spare threads to keep in the worker thread pool. |
| 2582 | This number must be at least 1 larger than httpd.acceptorThreads |
David Pursehouse | 9246356 | 2013-06-24 10:16:28 +0900 | [diff] [blame] | 2583 | multiplied by the number of httpd.listenUrls configured. |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 2584 | + |
| 2585 | By default, 5, suitable for most lower-volume traffic sites. |
| 2586 | |
| 2587 | [[httpd.maxThreads]]httpd.maxThreads:: |
| 2588 | + |
| 2589 | Maximum number of threads to permit in the worker thread pool. |
| 2590 | + |
| 2591 | By default 25, suitable for most lower-volume traffic sites. |
Saša Živkov | 3d4ed9f | 2017-10-13 15:30:29 +0200 | [diff] [blame] | 2592 | + |
| 2593 | [NOTE] |
| 2594 | Unless SSH daemon is disabled, see <<sshd.listenAddress, sshd.listenAddress>>, |
| 2595 | the max number of concurrent Git requests over HTTP and SSH together is |
| 2596 | defined by the <<sshd.threads, sshd.threads>> and |
| 2597 | <<sshd.batchThreads, sshd.batchThreads>>. |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 2598 | |
| 2599 | [[httpd.maxQueued]]httpd.maxQueued:: |
| 2600 | + |
| 2601 | Maximum number of client connections which can enter the worker |
| 2602 | thread pool waiting for a worker thread to become available. |
David Ostrovsky | 14fe8bc | 2014-03-26 06:03:44 -0700 | [diff] [blame] | 2603 | 0 sets the queue size to the Integer.MAX_VALUE. |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 2604 | + |
Luca Milanesio | 0ae62fe | 2015-09-04 07:56:00 -0700 | [diff] [blame] | 2605 | By default 200. |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 2606 | |
Shawn O. Pearce | e5452b7 | 2010-01-15 14:32:50 -0800 | [diff] [blame] | 2607 | [[httpd.maxWait]]httpd.maxWait:: |
| 2608 | + |
David Pursehouse | 221d4f6 | 2012-06-08 17:38:08 +0900 | [diff] [blame] | 2609 | Maximum amount of time a client will wait for an available |
Shawn O. Pearce | e5452b7 | 2010-01-15 14:32:50 -0800 | [diff] [blame] | 2610 | thread to handle a project clone, fetch or push request over the |
| 2611 | smart HTTP transport. |
| 2612 | + |
| 2613 | Values should use common unit suffixes to express their setting: |
| 2614 | + |
| 2615 | * s, sec, second, seconds |
| 2616 | * m, min, minute, minutes |
| 2617 | * h, hr, hour, hours |
| 2618 | * d, day, days |
| 2619 | * w, week, weeks (`1 week` is treated as `7 days`) |
| 2620 | * mon, month, months (`1 month` is treated as `30 days`) |
| 2621 | * y, year, years (`1 year` is treated as `365 days`) |
| 2622 | |
| 2623 | + |
Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 2624 | -- |
Shawn O. Pearce | e5452b7 | 2010-01-15 14:32:50 -0800 | [diff] [blame] | 2625 | If a unit suffix is not specified, `minutes` is assumed. If 0 |
| 2626 | is supplied, the maximum age is infinite and connections will not |
| 2627 | abort until the client disconnects. |
Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 2628 | |
Shawn O. Pearce | e5452b7 | 2010-01-15 14:32:50 -0800 | [diff] [blame] | 2629 | By default, 5 minutes. |
Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 2630 | -- |
Shawn O. Pearce | e5452b7 | 2010-01-15 14:32:50 -0800 | [diff] [blame] | 2631 | |
Luca Milanesio | ce7b745 | 2013-06-18 11:40:49 +0100 | [diff] [blame] | 2632 | [[httpd.filterClass]]httpd.filterClass:: |
| 2633 | + |
| 2634 | Class that implements the javax.servlet.Filter interface |
| 2635 | for filtering any HTTP related traffic going through the Gerrit |
| 2636 | HTTP protocol. |
| 2637 | Class is loaded and configured in the Gerrit Jetty container |
| 2638 | and run in front of all Gerrit URL handlers, allowing the filter |
| 2639 | to inspect, modify, allow or reject each request. |
| 2640 | It needs to be provided as JAR library |
| 2641 | under $GERRIT_SITE/lib as it is resolved using the default Gerrit class |
| 2642 | loader and cannot be dynamically loaded by a plugin. |
| 2643 | + |
| 2644 | Failing to load the Filter class would result in a Gerrit start-up |
| 2645 | failure, as this class is supposed to provide mandatory filtering |
| 2646 | in front of Gerrit HTTP protocol. |
| 2647 | + |
David Pursehouse | 42f4204 | 2013-08-01 14:02:25 +0900 | [diff] [blame] | 2648 | Typical usage is in conjunction with the `auth.type=HTTP` as replacement |
Luca Milanesio | ce7b745 | 2013-06-18 11:40:49 +0100 | [diff] [blame] | 2649 | of an Apache HTTP proxy layer as security enforcement on top of Gerrit |
| 2650 | by returning a trusted username as HTTP Header. |
| 2651 | + |
Luca Milanesio | dcb4bd5 | 2017-05-03 22:20:51 +0100 | [diff] [blame] | 2652 | Allow multiple values to install multiple servlet filters. |
| 2653 | + |
Luca Milanesio | ce7b745 | 2013-06-18 11:40:49 +0100 | [diff] [blame] | 2654 | Example of using a security library secure.jar under $GERRIT_SITE/lib |
Luca Milanesio | dcb4bd5 | 2017-05-03 22:20:51 +0100 | [diff] [blame] | 2655 | that provides a org.anyorg.MySecureHeaderFilter Servlet Filter that enforces |
| 2656 | a trusted username in the `TRUSTED_USER` HTTP Header and |
| 2657 | org.anyorg.MySecureIPFilter that performs source IP security filtering: |
Dyrone Teng | 14fc083 | 2019-09-27 16:59:02 +0800 | [diff] [blame] | 2658 | + |
Luca Milanesio | ce7b745 | 2013-06-18 11:40:49 +0100 | [diff] [blame] | 2659 | ---- |
| 2660 | [auth] |
| 2661 | type = HTTP |
| 2662 | httpHeader = TRUSTED_USER |
| 2663 | |
Dariusz Luksza | aac0113 | 2015-02-11 12:13:07 +0100 | [diff] [blame] | 2664 | [httpd] |
Luca Milanesio | dcb4bd5 | 2017-05-03 22:20:51 +0100 | [diff] [blame] | 2665 | filterClass = org.anyorg.MySecureHeaderFilter |
| 2666 | filterClass = org.anyorg.MySecureIPFilter |
Luca Milanesio | ce7b745 | 2013-06-18 11:40:49 +0100 | [diff] [blame] | 2667 | ---- |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 2668 | |
Teng Long | c192ca9 | 2019-09-23 11:22:03 +0800 | [diff] [blame] | 2669 | [[filterClass.className.initParam]]filterClass.<className>.initParam:: |
| 2670 | + |
| 2671 | Gerrit supports customized pluggable HTTP filters as `filterClass`. This |
| 2672 | option allows to pass extra initialization parameters to the filter. It |
| 2673 | allows for multiple key/value pairs to be passed in this pattern: |
| 2674 | + |
| 2675 | ---- |
| 2676 | initParam = <key>=<value> |
| 2677 | ---- |
| 2678 | For a comprehensive example: |
| 2679 | + |
| 2680 | ---- |
| 2681 | [httpd] |
| 2682 | filterClass = org.anyorg.AFilter |
| 2683 | filterClass = org.anyorg.BFilter |
| 2684 | [filterClass "org.anyorg.AFilter"] |
| 2685 | key1 = value1 |
| 2686 | key2 = value2 |
| 2687 | [filterClass "org.anyorg.BFilter"] |
| 2688 | key3 = value3 |
| 2689 | ---- |
| 2690 | |
Luca Milanesio | dca95d5 | 2017-05-09 21:22:21 +0100 | [diff] [blame] | 2691 | [[httpd.idleTimeout]]httpd.idleTimeout:: |
| 2692 | + |
| 2693 | Maximum idle time for a connection, which roughly translates to the |
| 2694 | TCP socket `SO_TIMEOUT`. |
| 2695 | + |
Luca Milanesio | dca95d5 | 2017-05-09 21:22:21 +0100 | [diff] [blame] | 2696 | This value is interpreted as the maximum time between some progress |
| 2697 | being made on the connection. So if a single byte is read or written, |
| 2698 | then the timeout is reset. |
| 2699 | + |
David Pursehouse | 9f0e5bc | 2017-06-30 16:16:53 +0900 | [diff] [blame] | 2700 | The max idle time is applied: |
| 2701 | + |
| 2702 | * When waiting for a new message to be received on a connection |
| 2703 | * When waiting for a new message to be sent on a connection |
| 2704 | |
| 2705 | + |
Luca Milanesio | dca95d5 | 2017-05-09 21:22:21 +0100 | [diff] [blame] | 2706 | By default, 30 seconds. |
| 2707 | |
Juan Hernandez | ec51256 | 2013-08-06 16:30:50 +0200 | [diff] [blame] | 2708 | [[httpd.robotsFile]]httpd.robotsFile:: |
| 2709 | + |
| 2710 | Location of an external robots.txt file to be used instead of the one |
| 2711 | bundled with the .war of the application. |
| 2712 | + |
| 2713 | If not absolute, the path is resolved relative to `$site_path`. |
| 2714 | + |
| 2715 | If the file doesn't exist or can't be read the default robots.txt file |
| 2716 | bundled with the .war will be used instead. |
| 2717 | |
Dariusz Luksza | 011cfed | 2014-04-03 10:23:35 +0200 | [diff] [blame] | 2718 | [[httpd.registerMBeans]]httpd.registerMBeans:: |
| 2719 | + |
| 2720 | Enable (or disable) registration of Jetty MBeans for Java JMX. |
| 2721 | + |
| 2722 | By default, false. |
| 2723 | |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 2724 | [[index]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2725 | === Section index |
David Pursehouse | 6d45843 | 2013-08-23 16:17:18 +0900 | [diff] [blame] | 2726 | |
| 2727 | The index section configures the secondary index. |
| 2728 | |
David Pursehouse | 3fc5ee3 | 2014-03-17 18:35:32 +0900 | [diff] [blame] | 2729 | Note that after enabling the secondary index, the index must be built |
| 2730 | using the link:pgm-reindex.html[reindex program] before restarting the |
| 2731 | Gerrit server. |
| 2732 | |
David Pursehouse | 6d45843 | 2013-08-23 16:17:18 +0900 | [diff] [blame] | 2733 | [[index.type]]index.type:: |
| 2734 | + |
| 2735 | Type of secondary indexing employed by Gerrit. The supported |
| 2736 | values are: |
| 2737 | + |
| 2738 | * `LUCENE` |
| 2739 | + |
| 2740 | A link:http://lucene.apache.org/[Lucene] index is used. |
| 2741 | + |
David Pursehouse | 8e72f53 | 2014-06-24 11:01:28 +0900 | [diff] [blame] | 2742 | + |
Dariusz Luksza | ea52988 | 2017-04-25 15:11:31 +0200 | [diff] [blame] | 2743 | * `ELASTICSEARCH` look into link:#elasticsearch[Elasticsearch section] |
David Pursehouse | 8e72f53 | 2014-06-24 11:01:28 +0900 | [diff] [blame] | 2744 | + |
David Pursehouse | d09c594 | 2018-04-20 10:22:31 +0200 | [diff] [blame] | 2745 | An link:https://www.elastic.co/products/elasticsearch[Elasticsearch] index is |
David Pursehouse | 2e79e5b | 2018-04-20 10:23:29 +0200 | [diff] [blame] | 2746 | used. Refer to the link:#elasticsearch[Elasticsearch section] for further |
| 2747 | configuration details. |
David Pursehouse | 6d45843 | 2013-08-23 16:17:18 +0900 | [diff] [blame] | 2748 | |
| 2749 | + |
Shawn Pearce | d4ae3a16 | 2013-11-24 17:00:31 -0800 | [diff] [blame] | 2750 | By default, `LUCENE`. |
David Pursehouse | 6d45843 | 2013-08-23 16:17:18 +0900 | [diff] [blame] | 2751 | |
David Pursehouse | 904db30 | 2014-03-17 18:55:38 +0900 | [diff] [blame] | 2752 | [[index.threads]]index.threads:: |
| 2753 | + |
Hugo Arès | fab0670 | 2016-06-10 12:49:52 -0400 | [diff] [blame] | 2754 | Number of threads to use for indexing in normal interactive operations. Setting |
| 2755 | it to 0 disables the dedicated thread pool and indexing will be done in the same |
| 2756 | thread as the operation. |
David Pursehouse | 904db30 | 2014-03-17 18:55:38 +0900 | [diff] [blame] | 2757 | + |
Patrick Hiesel | bdbee9c | 2018-07-04 10:54:26 +0200 | [diff] [blame] | 2758 | If not set or set to a zero, defaults to the number of logical CPUs as returned |
| 2759 | by the JVM. If set to a negative value, defaults to a direct executor. |
David Pursehouse | 00c8214 | 2014-01-22 17:41:09 +0900 | [diff] [blame] | 2760 | |
Dave Borowitz | 787af5f | 2014-10-22 16:26:00 -0700 | [diff] [blame] | 2761 | [[index.batchThreads]]index.batchThreads:: |
| 2762 | + |
| 2763 | Number of threads to use for indexing in background operations, such as |
| 2764 | online schema upgrades. |
| 2765 | + |
Patrick Hiesel | bdbee9c | 2018-07-04 10:54:26 +0200 | [diff] [blame] | 2766 | If not set or set to a zero, defaults to the number of logical CPUs as returned |
| 2767 | by the JVM. If set to a negative value, defaults to a direct executor. |
Dave Borowitz | 787af5f | 2014-10-22 16:26:00 -0700 | [diff] [blame] | 2768 | |
Dave Borowitz | d80b934 | 2015-03-25 10:32:21 -0700 | [diff] [blame] | 2769 | [[index.onlineUpgrade]]index.onlineUpgrade:: |
| 2770 | + |
| 2771 | Whether to upgrade to new index schema versions while the server is |
| 2772 | running. This is recommended as it prevents additional downtime during |
| 2773 | Gerrit version upgrades (avoiding the need for an offline reindex step |
| 2774 | using Reindex), but can add additional server load during the upgrade. |
| 2775 | + |
| 2776 | If set to false, there is no way to upgrade the index schema to take |
| 2777 | advantage of new search features without restarting the server. |
| 2778 | + |
| 2779 | Defaults to true. |
| 2780 | |
Dave Borowitz | b82fbcb | 2015-04-22 16:43:54 -0700 | [diff] [blame] | 2781 | [[index.maxLimit]]index.maxLimit:: |
| 2782 | + |
| 2783 | Maximum limit to allow for search queries. Requesting results above this |
| 2784 | limit will truncate the list (but will still set `_more_changes` on |
| 2785 | result lists). Set to 0 for no limit. |
| 2786 | + |
David Pursehouse | 7c1f4a4 | 2018-03-15 17:03:40 +0900 | [diff] [blame] | 2787 | When `index.type` is set to `ELASTICSEARCH`, this value should not exceed |
| 2788 | the `index.max_result_window` value configured on the Elasticsearch |
David Pursehouse | 52c2b4a | 2018-04-10 23:38:57 +0900 | [diff] [blame] | 2789 | server. If a value is not configured during site initialization, defaults to |
| 2790 | 10000, which is the default value of `index.max_result_window` in Elasticsearch. |
David Pursehouse | 7c1f4a4 | 2018-03-15 17:03:40 +0900 | [diff] [blame] | 2791 | + |
David Pursehouse | 52c2b4a | 2018-04-10 23:38:57 +0900 | [diff] [blame] | 2792 | When `index.type` is set to `LUCENE`, defaults to no limit. |
Dave Borowitz | b82fbcb | 2015-04-22 16:43:54 -0700 | [diff] [blame] | 2793 | |
Dave Borowitz | f56d365 | 2015-04-22 17:35:34 -0700 | [diff] [blame] | 2794 | [[index.maxPages]]index.maxPages:: |
| 2795 | + |
| 2796 | Maximum number of pages of search results to allow, as index |
| 2797 | implementations may have to scan through large numbers of skipped |
| 2798 | results when searching with an offset. Requesting results starting past |
| 2799 | this threshold times the requested limit will result in an error. Set to |
| 2800 | 0 for no limit. |
| 2801 | + |
| 2802 | Defaults to no limit. |
| 2803 | |
Dave Borowitz | d034ca8 | 2015-10-15 11:20:30 -0400 | [diff] [blame] | 2804 | [[index.maxTerms]]index.maxTerms:: |
| 2805 | + |
| 2806 | Maximum number of leaf terms to allow in a query. Too-large queries may |
| 2807 | perform poorly, so setting this option causes query parsing to fail fast |
Dave Borowitz | ada289c | 2018-12-18 13:24:14 -0800 | [diff] [blame] | 2808 | before attempting to send them to the secondary index. |
Dave Borowitz | d034ca8 | 2015-10-15 11:20:30 -0400 | [diff] [blame] | 2809 | + |
Marco Miller | 6da2282 | 2016-01-29 12:31:38 -0500 | [diff] [blame] | 2810 | When the index type is `LUCENE`, also sets the maximum number of clauses |
| 2811 | permitted per BooleanQuery. This is so that all enforced query limits |
| 2812 | are the same. |
| 2813 | + |
| 2814 | Defaults to 1024. |
Dave Borowitz | d034ca8 | 2015-10-15 11:20:30 -0400 | [diff] [blame] | 2815 | |
Dave Borowitz | 6115562 | 2017-04-17 16:53:13 -0400 | [diff] [blame] | 2816 | [[index.reindexAfterRefUpdate]]index.reindexAfterRefUpdate:: |
| 2817 | + |
| 2818 | Whether to reindex all affected open changes after a ref is updated. This |
| 2819 | includes reindexing all open changes to recompute the "mergeable" bit every time |
| 2820 | the destination branch moves, as well as reindexing changes to take into account |
| 2821 | new project configuration (e.g. label definitions). |
| 2822 | + |
| 2823 | Leaving this enabled may result in fresher results, but may cause performance |
| 2824 | problems if there are lots of open changes on a project whose branches advance |
| 2825 | frequently. |
| 2826 | + |
| 2827 | Defaults to true. |
| 2828 | |
Dave Borowitz | 3747f0f | 2017-06-23 14:29:31 -0400 | [diff] [blame] | 2829 | [[index.autoReindexIfStale]]index.autoReindexIfStale:: |
| 2830 | + |
| 2831 | Whether to automatically check if a document became stale in the index |
| 2832 | immediately after indexing it. If false, there is a race condition during two |
| 2833 | simultaneous writes that may cause one of the writes to not be reflected in the |
| 2834 | index. The check to avoid this does consume some resources. |
| 2835 | + |
Dave Borowitz | b7da076 | 2018-03-19 09:08:45 -0400 | [diff] [blame] | 2836 | Defaults to false. |
Dave Borowitz | 3747f0f | 2017-06-23 14:29:31 -0400 | [diff] [blame] | 2837 | |
Edwin Kempin | 0f0de86 | 2018-02-08 16:24:11 +0100 | [diff] [blame] | 2838 | [[index.scheduledIndexer]] |
| 2839 | ==== Subsection index.scheduledIndexer |
| 2840 | |
| 2841 | This section configures periodic indexing. Periodic indexing is |
Han-Wen Nienhuys | 348a603 | 2019-09-24 19:44:57 +0200 | [diff] [blame] | 2842 | intended to run only on replicas and only updates the group index. |
| 2843 | Replication to replicas happens on Git level so that Gerrit is not aware |
| 2844 | of incoming replication events. But replicas need an updated group index |
Edwin Kempin | 0f0de86 | 2018-02-08 16:24:11 +0100 | [diff] [blame] | 2845 | to resolve memberships of users for ACL validation. To keep the group |
Han-Wen Nienhuys | 348a603 | 2019-09-24 19:44:57 +0200 | [diff] [blame] | 2846 | index in replicas up-to-date the Gerrit replica periodically scans the |
Edwin Kempin | 0f0de86 | 2018-02-08 16:24:11 +0100 | [diff] [blame] | 2847 | group refs in the All-Users repository to reindex groups if they are |
| 2848 | stale. |
| 2849 | |
| 2850 | The scheduled reindexer is not able to detect group deletions that |
Han-Wen Nienhuys | 348a603 | 2019-09-24 19:44:57 +0200 | [diff] [blame] | 2851 | happened while the replica was offline, but since group deletions are not |
Edwin Kempin | 0f0de86 | 2018-02-08 16:24:11 +0100 | [diff] [blame] | 2852 | supported this should never happen. If nevertheless groups refs were |
Han-Wen Nienhuys | 348a603 | 2019-09-24 19:44:57 +0200 | [diff] [blame] | 2853 | deleted while a replica was offline a full offline link:pgm-reindex.html[ |
Edwin Kempin | 0f0de86 | 2018-02-08 16:24:11 +0100 | [diff] [blame] | 2854 | reindex] must be performed. |
| 2855 | |
Han-Wen Nienhuys | 348a603 | 2019-09-24 19:44:57 +0200 | [diff] [blame] | 2856 | This section is only used if Gerrit runs in replica mode, otherwise it is |
Edwin Kempin | 0f0de86 | 2018-02-08 16:24:11 +0100 | [diff] [blame] | 2857 | ignored. |
| 2858 | |
Edwin Kempin | a32d443 | 2018-02-16 17:18:31 +0100 | [diff] [blame] | 2859 | [[index.scheduledIndexer.runOnStartup]]index.scheduledIndexer.runOnStartup:: |
| 2860 | + |
| 2861 | Whether the scheduled indexer should run once immediately on startup. |
Han-Wen Nienhuys | 348a603 | 2019-09-24 19:44:57 +0200 | [diff] [blame] | 2862 | If set to `true` the replica startup is blocked until all stale groups |
| 2863 | were reindexed. Enabling this allows to prevent that replicas that were |
Edwin Kempin | a32d443 | 2018-02-16 17:18:31 +0100 | [diff] [blame] | 2864 | offline for a longer period of time run with outdated group information |
| 2865 | until the first scheduled indexing is done. |
| 2866 | + |
| 2867 | Defaults to `true`. |
| 2868 | |
Edwin Kempin | 0f0de86 | 2018-02-08 16:24:11 +0100 | [diff] [blame] | 2869 | [[index.scheduledIndexer.enabled]]index.scheduledIndexer.enabled:: |
| 2870 | + |
| 2871 | Whether the scheduled indexer is enabled. If the scheduled indexer is |
| 2872 | disabled you must implement other means to keep the group index for the |
Han-Wen Nienhuys | 348a603 | 2019-09-24 19:44:57 +0200 | [diff] [blame] | 2873 | replica up-to-date (e.g. by using ElasticSearch for the indexes). |
Edwin Kempin | 0f0de86 | 2018-02-08 16:24:11 +0100 | [diff] [blame] | 2874 | + |
| 2875 | Defaults to `true`. |
| 2876 | |
| 2877 | [[index.scheduledIndexer.startTime]]index.scheduledIndexer.startTime:: |
| 2878 | + |
| 2879 | The link:#schedule-configuration-startTime[start time] for running |
| 2880 | the scheduled indexer. |
| 2881 | + |
| 2882 | Defaults to `00:00`. |
| 2883 | |
| 2884 | [[index.scheduledIndexer.interval]]index.scheduledIndexer.interval:: |
| 2885 | + |
| 2886 | The link:#schedule-configuration-interval[interval] for running |
| 2887 | the scheduled indexer. |
| 2888 | + |
| 2889 | Defaults to `5m`. |
| 2890 | |
| 2891 | link:#schedule-configuration-examples[Schedule examples] can be found |
| 2892 | in the link:#schedule-configuration[Schedule Configuration] section. |
| 2893 | |
David Pursehouse | 902b3ee | 2014-07-09 16:17:49 +0900 | [diff] [blame] | 2894 | ==== Lucene configuration |
| 2895 | |
| 2896 | Open and closed changes are indexed in separate indexes named |
| 2897 | 'open' and 'closed' respectively. |
| 2898 | |
| 2899 | The following settings are only used when the index type is `LUCENE`. |
David Pursehouse | ac88c36 | 2014-02-06 12:01:34 +0900 | [diff] [blame] | 2900 | |
David Pursehouse | 00c8214 | 2014-01-22 17:41:09 +0900 | [diff] [blame] | 2901 | [[index.name.ramBufferSize]]index.name.ramBufferSize:: |
| 2902 | + |
David Pursehouse | 00c8214 | 2014-01-22 17:41:09 +0900 | [diff] [blame] | 2903 | Determines the amount of RAM that may be used for buffering added documents |
| 2904 | and deletions before they are flushed to the index. See the |
| 2905 | link:http://lucene.apache.org/core/4_6_0/core/org/apache/lucene/index/LiveIndexWriterConfig.html#setRAMBufferSizeMB(double)[ |
| 2906 | Lucene documentation] for further details. |
| 2907 | + |
| 2908 | Defaults to 16M. |
| 2909 | |
| 2910 | [[index.name.maxBufferedDocs]]index.name.maxBufferedDocs:: |
| 2911 | + |
David Pursehouse | 00c8214 | 2014-01-22 17:41:09 +0900 | [diff] [blame] | 2912 | Determines the minimal number of documents required before the buffered |
| 2913 | in-memory documents are flushed to the index. Large values generally |
| 2914 | give faster indexing. See the |
| 2915 | link:http://lucene.apache.org/core/4_6_0/core/org/apache/lucene/index/LiveIndexWriterConfig.html#setMaxBufferedDocs(int)[ |
| 2916 | Lucene documentation] for further details. |
| 2917 | + |
| 2918 | Defaults to -1, meaning no maximum is set and the writer will flush |
| 2919 | according to RAM usage. |
| 2920 | |
Dave Borowitz | d08b045 | 2014-02-13 11:56:03 -0800 | [diff] [blame] | 2921 | [[index.name.commitWithin]]index.name.commitWithin:: |
| 2922 | + |
Dave Borowitz | d08b045 | 2014-02-13 11:56:03 -0800 | [diff] [blame] | 2923 | Determines the period at which changes are automatically committed to |
| 2924 | stable store on disk. This is a costly operation and may block |
| 2925 | additional index writes, so lower with caution. |
| 2926 | + |
Bruce Zu | af058e6 | 2014-03-21 10:03:05 +0800 | [diff] [blame] | 2927 | If zero, changes are committed after every write. This is very costly |
| 2928 | but may be useful if offline reindexing is infeasible, or for development |
| 2929 | servers. |
Dave Borowitz | d08b045 | 2014-02-13 11:56:03 -0800 | [diff] [blame] | 2930 | + |
Bruce Zu | af058e6 | 2014-03-21 10:03:05 +0800 | [diff] [blame] | 2931 | Values can be specified using standard time unit abbreviations (`ms`, `sec`, |
| 2932 | `min`, etc.). |
David Pursehouse | 9354c1a | 2014-03-22 12:23:43 -0700 | [diff] [blame] | 2933 | + |
Bruce Zu | af058e6 | 2014-03-21 10:03:05 +0800 | [diff] [blame] | 2934 | If negative, `commitWithin` is disabled. Changes are flushed to disk when |
| 2935 | the in-memory buffer fills, but only committed and guaranteed to be synced |
| 2936 | to disk when the process finishes. |
David Pursehouse | 902b3ee | 2014-07-09 16:17:49 +0900 | [diff] [blame] | 2937 | + |
Dave Borowitz | d08b045 | 2014-02-13 11:56:03 -0800 | [diff] [blame] | 2938 | Defaults to 300000 ms (5 minutes). |
| 2939 | |
Trevor Getty | 8fb5db5 | 2019-08-26 14:33:19 +0200 | [diff] [blame] | 2940 | |
| 2941 | [[index.name.maxMergeCount]]index.name.maxMergeCount:: |
| 2942 | + |
| 2943 | Determines the max number of simultaneous merges that are allowed. If a merge |
| 2944 | is necessary yet we already have this many threads running, the incoming thread |
| 2945 | (that is calling add/updateDocument) will block until a merge thread has |
| 2946 | completed. Note that Lucene will only run the smallest maxThreadCount merges |
| 2947 | at a time. See the |
| 2948 | link:https://lucene.apache.org/core/5_5_0/core/org/apache/lucene/index/ConcurrentMergeScheduler.html#setDefaultMaxMergesAndThreads(boolean)[ |
| 2949 | Lucene documentation] for further details. |
| 2950 | + |
| 2951 | Defaults to -1 for (auto detection). |
| 2952 | |
| 2953 | |
| 2954 | [[index.name.maxThreadCount]]index.name.maxThreadCount:: |
| 2955 | + |
| 2956 | Determines the max number of simultaneous Lucene merge threads that should be running at |
| 2957 | once. This must be less than or equal to maxMergeCount. See the |
| 2958 | link:https://lucene.apache.org/core/5_5_0/core/org/apache/lucene/index/ConcurrentMergeScheduler.html#setDefaultMaxMergesAndThreads(boolean)[ |
| 2959 | Lucene documentation] for further details. |
| 2960 | + |
| 2961 | For further details on Lucene index configuration (auto detection) which |
| 2962 | affects maxThreadCount and maxMergeCount settings. |
| 2963 | See the |
| 2964 | link:https://lucene.apache.org/core/5_5_0/core/org/apache/lucene/index/ConcurrentMergeScheduler.html#AUTO_DETECT_MERGES_AND_THREADS[ |
| 2965 | Lucene documentation] |
| 2966 | + |
| 2967 | Defaults to -1 for (auto detection). |
| 2968 | |
| 2969 | [[index.name.enableAutoIOThrottle]]index.name.enableAutoIOThrottle:: |
| 2970 | + |
| 2971 | Allows the control of whether automatic IO throttling is enabled and used by |
| 2972 | default in the lucene merge queue. Automatic dynamic IO throttling, which when |
| 2973 | on is used to adaptively rate limit writes bytes/sec to the minimal rate necessary |
| 2974 | so merges do not fall behind. See the |
| 2975 | link:https://lucene.apache.org/core/5_5_0/core/org/apache/lucene/index/ConcurrentMergeScheduler.html#enableAutoIOThrottle()[ |
| 2976 | Lucene documentation] for further details. |
| 2977 | + |
| 2978 | Defaults to true (throttling enabled). |
| 2979 | |
David Pursehouse | 902b3ee | 2014-07-09 16:17:49 +0900 | [diff] [blame] | 2980 | Sample Lucene index configuration: |
David Pursehouse | 00c8214 | 2014-01-22 17:41:09 +0900 | [diff] [blame] | 2981 | ---- |
| 2982 | [index] |
| 2983 | type = LUCENE |
| 2984 | |
| 2985 | [index "changes_open"] |
| 2986 | ramBufferSize = 60 m |
| 2987 | maxBufferedDocs = 3000 |
Trevor Getty | 8fb5db5 | 2019-08-26 14:33:19 +0200 | [diff] [blame] | 2988 | maxThreadCount = 5 |
| 2989 | maxMergeCount = 50 |
| 2990 | |
David Pursehouse | 00c8214 | 2014-01-22 17:41:09 +0900 | [diff] [blame] | 2991 | |
| 2992 | [index "changes_closed"] |
| 2993 | ramBufferSize = 20 m |
| 2994 | maxBufferedDocs = 500 |
Trevor Getty | 8fb5db5 | 2019-08-26 14:33:19 +0200 | [diff] [blame] | 2995 | maxThreadCount = 10 |
| 2996 | maxMergeCount = 100 |
| 2997 | enableIOThrottle = false |
| 2998 | |
David Pursehouse | 00c8214 | 2014-01-22 17:41:09 +0900 | [diff] [blame] | 2999 | ---- |
| 3000 | |
Dariusz Luksza | ea52988 | 2017-04-25 15:11:31 +0200 | [diff] [blame] | 3001 | [[elasticsearch]] |
| 3002 | === Section elasticsearch |
David Pursehouse | 8e72f53 | 2014-06-24 11:01:28 +0900 | [diff] [blame] | 3003 | |
David Pursehouse | 1a82b37 | 2018-06-19 11:14:21 +0900 | [diff] [blame] | 3004 | WARNING: Support for Elasticsearch is still experimental and is not recommended |
David Pursehouse | 7e566dc | 2018-09-20 14:12:15 +0900 | [diff] [blame] | 3005 | for production use. For compatibility information, please refer to the |
| 3006 | link:https://www.gerritcodereview.com/elasticsearch.html[project homepage]. |
David Pursehouse | 8e72f53 | 2014-06-24 11:01:28 +0900 | [diff] [blame] | 3007 | |
David Pursehouse | 0e39a8d | 2018-11-27 20:25:43 +0900 | [diff] [blame] | 3008 | When using Elasticsearch version 5.6, the open and closed changes are |
David Pursehouse | 1a82b37 | 2018-06-19 11:14:21 +0900 | [diff] [blame] | 3009 | indexed in a single index, separated into types `open_changes` and `closed_changes` |
| 3010 | respectively. When using version 6.2 or later, the open and closed changes are |
| 3011 | merged into the default `_doc` type. The latter is also used for the accounts and |
| 3012 | groups indices starting with Elasticsearch 6.2. |
David Pursehouse | 8e72f53 | 2014-06-24 11:01:28 +0900 | [diff] [blame] | 3013 | |
David Pursehouse | 6ea2532 | 2018-07-03 21:26:07 +0900 | [diff] [blame] | 3014 | Note that when Gerrit is configured to use Elasticsearch, the Elasticsearch |
| 3015 | server(s) must be reachable during the site initialization. |
| 3016 | |
Dariusz Luksza | ea52988 | 2017-04-25 15:11:31 +0200 | [diff] [blame] | 3017 | [[elasticsearch.prefix]]elasticsearch.prefix:: |
David Pursehouse | 8e72f53 | 2014-06-24 11:01:28 +0900 | [diff] [blame] | 3018 | + |
Hugo Arès | 3ba6dfe | 2016-11-15 15:12:55 -0800 | [diff] [blame] | 3019 | This setting can be used to prefix index names to allow multiple Gerrit |
David Pursehouse | 997cf2a | 2018-05-10 15:40:47 +0900 | [diff] [blame] | 3020 | instances in a single Elasticsearch cluster. Prefix `gerrit1_` would result in a |
| 3021 | change index named `gerrit1_changes_0001`. |
David Pursehouse | 8e72f53 | 2014-06-24 11:01:28 +0900 | [diff] [blame] | 3022 | + |
Hugo Arès | 3ba6dfe | 2016-11-15 15:12:55 -0800 | [diff] [blame] | 3023 | Not set by default. |
David Pursehouse | 8e72f53 | 2014-06-24 11:01:28 +0900 | [diff] [blame] | 3024 | |
David Pursehouse | 479c50b | 2018-07-02 12:47:07 +0900 | [diff] [blame] | 3025 | [[elasticsearch.server]]elasticsearch.server:: |
Dariusz Luksza | ea52988 | 2017-04-25 15:11:31 +0200 | [diff] [blame] | 3026 | + |
David Pursehouse | 479c50b | 2018-07-02 12:47:07 +0900 | [diff] [blame] | 3027 | Elasticsearch server URI in the form `http[s]://hostname:port`. The `port` is |
| 3028 | optional and defaults to `9200` if not specified. |
Dariusz Luksza | ea52988 | 2017-04-25 15:11:31 +0200 | [diff] [blame] | 3029 | + |
David Pursehouse | 479c50b | 2018-07-02 12:47:07 +0900 | [diff] [blame] | 3030 | At least one server must be specified. May be specified multiple times to |
| 3031 | configure multiple Elasticsearch servers. |
Dariusz Luksza | ea52988 | 2017-04-25 15:11:31 +0200 | [diff] [blame] | 3032 | + |
David Pursehouse | 479c50b | 2018-07-02 12:47:07 +0900 | [diff] [blame] | 3033 | Note that the site initialization program only allows to configure a single |
| 3034 | server. To configure multiple servers the `gerrit.config` file must be edited |
| 3035 | manually. |
Dariusz Luksza | 4ca46be | 2017-04-25 11:40:29 +0200 | [diff] [blame] | 3036 | |
David Pursehouse | 499f7fe | 2018-11-30 16:07:21 +0900 | [diff] [blame] | 3037 | [[elasticsearch.numberOfShards]]elasticsearch.numberOfShards:: |
| 3038 | + |
| 3039 | Sets the number of shards to use per index. Refer to the |
Marco Miller | 13906f2 | 2019-06-17 14:56:10 -0400 | [diff] [blame] | 3040 | link:https://www.elastic.co/guide/en/elasticsearch/reference/current/getting-started-concepts.html#getting-started-shards-and-replicas[ |
David Pursehouse | 499f7fe | 2018-11-30 16:07:21 +0900 | [diff] [blame] | 3041 | Elasticsearch documentation] for details. |
| 3042 | + |
Marco Miller | 082139a | 2019-06-17 15:00:35 -0400 | [diff] [blame] | 3043 | Defaults to 5 for Elasticsearch versions 5 and 6, and to 1 starting with Elasticsearch 7. |
David Pursehouse | 499f7fe | 2018-11-30 16:07:21 +0900 | [diff] [blame] | 3044 | |
| 3045 | [[elasticsearch.numberOfReplicas]]elasticsearch.numberOfReplicas:: |
| 3046 | + |
| 3047 | Sets the number of replicas to use per index. Refer to the |
Marco Miller | 13906f2 | 2019-06-17 14:56:10 -0400 | [diff] [blame] | 3048 | link:https://www.elastic.co/guide/en/elasticsearch/reference/current/getting-started-concepts.html#getting-started-shards-and-replicas[ |
David Pursehouse | 499f7fe | 2018-11-30 16:07:21 +0900 | [diff] [blame] | 3049 | Elasticsearch documentation] for details. |
| 3050 | + |
| 3051 | Defaults to 1. |
| 3052 | |
David Pursehouse | 13f1d63 | 2018-07-02 14:37:36 +0900 | [diff] [blame] | 3053 | ==== Elasticsearch Security |
Dariusz Luksza | ea52988 | 2017-04-25 15:11:31 +0200 | [diff] [blame] | 3054 | |
David Pursehouse | 13f1d63 | 2018-07-02 14:37:36 +0900 | [diff] [blame] | 3055 | When security is enabled in Elasticsearch, the username and password must be provided. |
| 3056 | Note that the same username and password are used for all servers. |
Dariusz Luksza | 4ca46be | 2017-04-25 11:40:29 +0200 | [diff] [blame] | 3057 | |
David Pursehouse | 13f1d63 | 2018-07-02 14:37:36 +0900 | [diff] [blame] | 3058 | For further information about Elasticsearch security, please refer to the documentation: |
Dariusz Luksza | 4ca46be | 2017-04-25 11:40:29 +0200 | [diff] [blame] | 3059 | |
David Pursehouse | 13f1d63 | 2018-07-02 14:37:36 +0900 | [diff] [blame] | 3060 | * link:https://www.elastic.co/guide/en/x-pack/5.6/security-getting-started.html[Elasticsearch 5.6] |
| 3061 | * link:https://www.elastic.co/guide/en/x-pack/6.2/security-getting-started.html[Elasticsearch 6.2] |
| 3062 | * link:https://www.elastic.co/guide/en/elastic-stack-overview/6.3/security-getting-started.html[Elasticsearch 6.3] |
David Pursehouse | b54aee3 | 2018-09-20 14:13:17 +0900 | [diff] [blame] | 3063 | * link:https://www.elastic.co/guide/en/elastic-stack-overview/6.4/security-getting-started.html[Elasticsearch 6.4] |
David Pursehouse | a348a01 | 2018-11-30 16:10:22 +0900 | [diff] [blame] | 3064 | * link:https://www.elastic.co/guide/en/elastic-stack-overview/6.5/security-getting-started.html[Elasticsearch 6.5] |
Marco Miller | 2a898de | 2019-01-30 14:26:11 -0500 | [diff] [blame] | 3065 | * link:https://www.elastic.co/guide/en/elastic-stack-overview/6.6/security-getting-started.html[Elasticsearch 6.6] |
Dariusz Luksza | 4ca46be | 2017-04-25 11:40:29 +0200 | [diff] [blame] | 3066 | |
Shawn O. Pearce | f7e065e | 2009-09-26 20:01:10 -0700 | [diff] [blame] | 3067 | [[elasticsearch.username]]elasticsearch.username:: |
Dariusz Luksza | 4ca46be | 2017-04-25 11:40:29 +0200 | [diff] [blame] | 3068 | + |
Shawn O. Pearce | 02c2e80 | 2009-10-29 14:46:03 -0700 | [diff] [blame] | 3069 | Username used to connect to Elasticsearch. |
Dariusz Luksza | 4ca46be | 2017-04-25 11:40:29 +0200 | [diff] [blame] | 3070 | + |
David Pursehouse | 975fdd2 | 2018-07-02 14:23:07 +0900 | [diff] [blame] | 3071 | If a password is set, defaults to `elastic`, otherwise not set by default. |
Dariusz Luksza | 4ca46be | 2017-04-25 11:40:29 +0200 | [diff] [blame] | 3072 | |
Dariusz Luksza | 4ca46be | 2017-04-25 11:40:29 +0200 | [diff] [blame] | 3073 | [[elasticsearch.password]]elasticsearch.password:: |
| 3074 | + |
| 3075 | Password used to connect to Elasticsearch. |
| 3076 | + |
| 3077 | Not set by default. |
Dariusz Luksza | 4ca46be | 2017-04-25 11:40:29 +0200 | [diff] [blame] | 3078 | |
Patrick Hiesel | da69247 | 2019-10-07 16:03:23 +0200 | [diff] [blame] | 3079 | [[event]] |
| 3080 | === Section event |
| 3081 | |
| 3082 | [[event.payload.listChangeOptions]]events.payload.listChangeOptions:: |
| 3083 | + |
| 3084 | List of options that Gerrit applies when rendering the payload of an |
| 3085 | internal event. This is the same set of options that are documented |
| 3086 | link:rest-api-changes.html#query-options[here]. |
| 3087 | + |
| 3088 | Depending on the setup, these events might get serialized using stream |
| 3089 | events. |
| 3090 | + |
| 3091 | This can be set to the set of minimal options that consumers of Gerrit's |
| 3092 | events need. A minimal set would be (`SKIP_MERGEABLE`,`SKIP_DIFFSTAT`). |
| 3093 | + |
| 3094 | Every option that gets added here will have a performance impact. The |
| 3095 | general recommendation is therefore to set this to a minimal set of |
| 3096 | required options. |
| 3097 | + |
| 3098 | Defaults to all available options minus `CHANGE_ACTIONS`, |
| 3099 | `CURRENT_ACTIONS` and `CHECK`. This is a rich default to make sure the |
| 3100 | config is backwards compatible with what the default was before the config |
| 3101 | was added. |
| 3102 | |
| 3103 | |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 3104 | [[ldap]] |
| 3105 | === Section ldap |
| 3106 | |
| 3107 | LDAP integration is only enabled if `auth.type` is set to |
| 3108 | `HTTP_LDAP`, `LDAP` or `CLIENT_SSL_CERT_LDAP`. See above for a |
| 3109 | detailed description of the `auth.type` settings and their |
| 3110 | implications. |
| 3111 | |
| 3112 | An example LDAP configuration follows, and then discussion of |
| 3113 | the parameters introduced here. Suitable defaults for most |
Shawn O. Pearce | 37dc1f8 | 2009-08-19 09:49:07 -0700 | [diff] [blame] | 3114 | parameters are automatically guessed based on the type of server |
Michal Pasierb | 3e26274 | 2017-01-23 12:50:48 +0100 | [diff] [blame] | 3115 | detected during startup. The guessed defaults support |
| 3116 | link:http://www.ietf.org/rfc/rfc2307.txt[RFC 2307], Active |
| 3117 | Directory and link:https://www.freeipa.org[FreeIPA]. |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 3118 | |
| 3119 | ---- |
| 3120 | [ldap] |
| 3121 | server = ldap://ldap.example.com |
| 3122 | |
| 3123 | accountBase = ou=people,dc=example,dc=com |
| 3124 | accountPattern = (&(objectClass=person)(uid=${username})) |
| 3125 | accountFullName = displayName |
| 3126 | accountEmailAddress = mail |
| 3127 | |
| 3128 | groupBase = ou=groups,dc=example,dc=com |
| 3129 | groupMemberPattern = (&(objectClass=group)(member=${dn})) |
| 3130 | ---- |
| 3131 | |
Luca Milanesio | a05d42b | 2018-12-19 01:13:06 +0000 | [diff] [blame] | 3132 | [[ldap.guessRelevantGroups]]ldap.guessRelevantGroups:: |
| 3133 | + |
| 3134 | Filter the groups found in LDAP by guessing the ones relevant to |
| 3135 | Gerrit and removing the others from list completions and ACL evaluations. |
| 3136 | The guess is based on two elements: the projects most recently |
| 3137 | accessed in the cache and the list of LDAP groups included in their ACLs. |
| 3138 | + |
| 3139 | Please note that projects rarely used and thus not cached may be |
| 3140 | temporarily inaccessible by users even with LDAP membership and grants |
| 3141 | referenced in the ACLs. |
| 3142 | + |
| 3143 | By default, true. |
| 3144 | |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 3145 | [[ldap.server]]ldap.server:: |
| 3146 | + |
| 3147 | URL of the organization's LDAP server to query for user information |
| 3148 | and group membership from. Must be of the form `ldap://host` or |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 3149 | `ldaps://host` to bind with either a plaintext or SSL connection. |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 3150 | + |
| 3151 | If `auth.type` is `LDAP` this setting should use `ldaps://` to |
| 3152 | ensure the end user's plaintext password is transmitted only over |
| 3153 | an encrypted connection. |
| 3154 | |
Alon Bar-Lev | 8ae444d | 2017-05-08 20:11:09 +0300 | [diff] [blame] | 3155 | [[ldap.startTls]]ldap.startTls:: |
| 3156 | + |
| 3157 | If true, Gerrit will perform StartTLS extended operation. |
| 3158 | + |
| 3159 | By default, false, StartTLS will not be enabled. |
| 3160 | |
Alon Bar-Lev | e39c35c | 2019-06-10 12:59:55 +0300 | [diff] [blame] | 3161 | [[ldap.supportAnonymous]]ldap.supportAnonymous:: |
| 3162 | + |
| 3163 | If false, Gerrit will provide credentials only at connection open, this is |
| 3164 | required for some `LDAP` implementations that do not allow anonymous bind |
| 3165 | for StartTLS or for reauthentication. |
| 3166 | + |
| 3167 | By default, true. |
| 3168 | |
Shawn O. Pearce | 02c2e80 | 2009-10-29 14:46:03 -0700 | [diff] [blame] | 3169 | [[ldap.sslVerify]]ldap.sslVerify:: |
| 3170 | + |
Alon Bar-Lev | 8ae444d | 2017-05-08 20:11:09 +0300 | [diff] [blame] | 3171 | If false and ldap.server is an `ldaps://` style URL or `ldap.startTls` |
| 3172 | is true, Gerrit will not verify the server certificate when it connects |
| 3173 | to perform a query. |
Shawn O. Pearce | 02c2e80 | 2009-10-29 14:46:03 -0700 | [diff] [blame] | 3174 | + |
| 3175 | By default, true, requiring the certificate to be verified. |
| 3176 | |
Olga Grinberg | cf1b06a | 2015-02-03 15:54:48 -0500 | [diff] [blame] | 3177 | [[ldap.groupsVisibleToAll]]ldap.groupsVisibleToAll:: |
| 3178 | + |
| 3179 | If true, LDAP groups are visible to all registered users. |
| 3180 | + |
| 3181 | By default, false, LDAP groups are visible only to administrators and |
| 3182 | group members. |
| 3183 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 3184 | [[ldap.username]]ldap.username:: |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 3185 | + |
| 3186 | _(Optional)_ Username to bind to the LDAP server with. If not set, |
| 3187 | an anonymous connection to the LDAP server is attempted. |
| 3188 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 3189 | [[ldap.password]]ldap.password:: |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 3190 | + |
| 3191 | _(Optional)_ Password for the user identified by `ldap.username`. |
| 3192 | If not set, an anonymous (or passwordless) connection to the LDAP |
| 3193 | server is attempted. |
| 3194 | |
Ben Wu | 0410a15 | 2010-06-04 16:17:24 +0800 | [diff] [blame] | 3195 | [[ldap.referral]]ldap.referral:: |
| 3196 | + |
| 3197 | _(Optional)_ How an LDAP referral should be handled if it is |
| 3198 | encountered during directory traversal. Set to `follow` to |
James Y Knight | 1244ed0 | 2011-01-04 02:40:32 -0500 | [diff] [blame] | 3199 | automatically follow any referrals, or `ignore` to ignore the |
| 3200 | referrals. |
Ben Wu | 0410a15 | 2010-06-04 16:17:24 +0800 | [diff] [blame] | 3201 | + |
| 3202 | By default, `ignore`. |
| 3203 | |
Sasa Zivkov | 100bd4b | 2011-11-07 14:58:46 +0100 | [diff] [blame] | 3204 | [[ldap.readTimeout]]ldap.readTimeout:: |
| 3205 | + |
| 3206 | _(Optional)_ The read timeout for an LDAP operation. The value is |
| 3207 | in the usual time-unit format like "1 s", "100 ms", etc... |
| 3208 | 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] | 3209 | threads in case the LDAP server becomes slow. |
Sasa Zivkov | 100bd4b | 2011-11-07 14:58:46 +0100 | [diff] [blame] | 3210 | + |
| 3211 | By default there is no timeout and Gerrit will wait for the LDAP |
| 3212 | server to respond until the TCP connection times out. |
| 3213 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 3214 | [[ldap.accountBase]]ldap.accountBase:: |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 3215 | + |
| 3216 | Root of the tree containing all user accounts. This is typically |
| 3217 | of the form `ou=people,dc=example,dc=com`. |
David Pursehouse | 82d5563 | 2015-12-14 10:31:27 +0000 | [diff] [blame] | 3218 | + |
| 3219 | This setting may be added multiple times to specify more than |
| 3220 | one root. |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 3221 | |
Shawn O. Pearce | 304ccdb | 2009-08-25 12:25:27 -0700 | [diff] [blame] | 3222 | [[ldap.accountScope]]ldap.accountScope:: |
| 3223 | + |
| 3224 | Scope of the search performed for accounts. Must be one of: |
| 3225 | + |
| 3226 | * `one`: Search only one level below accountBase, but not recursive |
| 3227 | * `sub` or `subtree`: Search recursively below accountBase |
| 3228 | * `base` or `object`: Search exactly accountBase; probably not desired |
| 3229 | |
| 3230 | + |
| 3231 | Default is `subtree` as many directories have several levels. |
| 3232 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 3233 | [[ldap.accountPattern]]ldap.accountPattern:: |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 3234 | + |
| 3235 | Query pattern to use when searching for a user account. This may be |
| 3236 | any valid LDAP query expression, including the standard `(&...)` and |
David Pursehouse | 42f4204 | 2013-08-01 14:02:25 +0900 | [diff] [blame] | 3237 | `(|...)` operators. If `auth.type` is `HTTP_LDAP` then the variable |
Edwin Kempin | cdb0e00 | 2011-09-08 14:23:30 +0200 | [diff] [blame] | 3238 | `${username}` is replaced with a parameter set to the username |
David Pursehouse | 42f4204 | 2013-08-01 14:02:25 +0900 | [diff] [blame] | 3239 | 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] | 3240 | the variable `${username}` is replaced by the string entered by |
Shawn O. Pearce | f7e065e | 2009-09-26 20:01:10 -0700 | [diff] [blame] | 3241 | the end user. |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 3242 | + |
| 3243 | This pattern is used to search the objects contained directly under |
| 3244 | the `ldap.accountBase` tree. A typical setting for this parameter |
Edwin Kempin | cdb0e00 | 2011-09-08 14:23:30 +0200 | [diff] [blame] | 3245 | is `(uid=${username})` or `(cn=${username})`, but the proper |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 3246 | setting depends on the LDAP schema used by the directory server. |
| 3247 | + |
Michal Pasierb | 3e26274 | 2017-01-23 12:50:48 +0100 | [diff] [blame] | 3248 | Default is `(uid=${username})` for FreeIPA and RFC 2307 servers, |
Shawn O. Pearce | 02c2e80 | 2009-10-29 14:46:03 -0700 | [diff] [blame] | 3249 | and `(&(objectClass=user)(sAMAccountName=${username}))` |
| 3250 | for Active Directory. |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 3251 | |
Shawn O. Pearce | 37dc1f8 | 2009-08-19 09:49:07 -0700 | [diff] [blame] | 3252 | [[ldap.accountFullName]]ldap.accountFullName:: |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 3253 | + |
| 3254 | _(Optional)_ Name of an attribute on the user account object which |
| 3255 | contains the initial value for the user's full name field in Gerrit. |
| 3256 | Typically this is the `displayName` property in LDAP, but could |
| 3257 | also be `legalName` or `cn`. |
| 3258 | + |
David Pursehouse | 221d4f6 | 2012-06-08 17:38:08 +0900 | [diff] [blame] | 3259 | Attribute values may be concatenated with literal strings. For |
| 3260 | example to join given name and surname together, use the pattern |
Edwin Kempin | cdb0e00 | 2011-09-08 14:23:30 +0200 | [diff] [blame] | 3261 | `${givenName} ${SN}`. |
Shawn O. Pearce | b86ae00 | 2009-09-26 16:54:05 -0700 | [diff] [blame] | 3262 | + |
Shawn O. Pearce | 3ca1dcf | 2009-08-20 08:56:23 -0700 | [diff] [blame] | 3263 | If set, users will be unable to modify their full name field, as |
| 3264 | Gerrit will populate it only from the LDAP data. |
| 3265 | + |
Michal Pasierb | 3e26274 | 2017-01-23 12:50:48 +0100 | [diff] [blame] | 3266 | Default is `displayName` for FreeIPA and RFC 2307 servers, |
Shawn O. Pearce | 02c2e80 | 2009-10-29 14:46:03 -0700 | [diff] [blame] | 3267 | and `${givenName} ${sn}` for Active Directory. |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 3268 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 3269 | [[ldap.accountEmailAddress]]ldap.accountEmailAddress:: |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 3270 | + |
| 3271 | _(Optional)_ Name of an attribute on the user account object which |
| 3272 | contains the user's Internet email address, as defined by this |
| 3273 | LDAP server. |
| 3274 | + |
Shawn O. Pearce | b86ae00 | 2009-09-26 16:54:05 -0700 | [diff] [blame] | 3275 | Attribute values may be concatenated with literal strings, |
| 3276 | for example to set the email address to the lowercase form |
| 3277 | of sAMAccountName followed by a constant domain name, use |
Edwin Kempin | cdb0e00 | 2011-09-08 14:23:30 +0200 | [diff] [blame] | 3278 | `${sAMAccountName.toLowerCase}@example.com`. |
Shawn O. Pearce | b86ae00 | 2009-09-26 16:54:05 -0700 | [diff] [blame] | 3279 | + |
Shawn O. Pearce | 3ca1dcf | 2009-08-20 08:56:23 -0700 | [diff] [blame] | 3280 | If set, the preferred email address will be prefilled from LDAP, |
David Pursehouse | 221d4f6 | 2012-06-08 17:38:08 +0900 | [diff] [blame] | 3281 | but users may still be able to register additional email addresses, |
Shawn O. Pearce | 3ca1dcf | 2009-08-20 08:56:23 -0700 | [diff] [blame] | 3282 | and select a different preferred email address. |
| 3283 | + |
Shawn O. Pearce | 02c2e80 | 2009-10-29 14:46:03 -0700 | [diff] [blame] | 3284 | Default is `mail`. |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 3285 | |
Shawn O. Pearce | 59e0922 | 2009-08-19 09:04:49 -0700 | [diff] [blame] | 3286 | [[ldap.accountSshUserName]]ldap.accountSshUserName:: |
| 3287 | + |
| 3288 | _(Optional)_ Name of an attribute on the user account object which |
| 3289 | contains the initial value for the user's SSH username field in |
| 3290 | Gerrit. Typically this is the `uid` property in LDAP, but could |
| 3291 | also be `cn`. Administrators should prefer to match the attribute |
| 3292 | corresponding to the user's workstation username, as this is what |
| 3293 | SSH clients will default to. |
| 3294 | + |
Shawn O. Pearce | b86ae00 | 2009-09-26 16:54:05 -0700 | [diff] [blame] | 3295 | Attribute values may also be forced to lowercase, or to uppercase in |
Edwin Kempin | cdb0e00 | 2011-09-08 14:23:30 +0200 | [diff] [blame] | 3296 | an expression. For example, `${sAMAccountName.toLowerCase}` will |
Shawn O. Pearce | b86ae00 | 2009-09-26 16:54:05 -0700 | [diff] [blame] | 3297 | force the value of sAMAccountName, if defined, to be all lowercase. |
| 3298 | The suffix `.toUpperCase` can be used for the other direction. |
| 3299 | The suffix `.localPart` can be used to split attribute values of |
| 3300 | 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] | 3301 | example `${userPrincipalName.localPart}` would provide only 'user'. |
Shawn O. Pearce | b86ae00 | 2009-09-26 16:54:05 -0700 | [diff] [blame] | 3302 | + |
Shawn O. Pearce | 3ca1dcf | 2009-08-20 08:56:23 -0700 | [diff] [blame] | 3303 | If set, users will be unable to modify their SSH username field, as |
David Pursehouse | c12da50 | 2016-08-11 20:45:03 +0900 | [diff] [blame] | 3304 | Gerrit will populate it only from the LDAP data. Note that once the |
| 3305 | username has been set it cannot be changed, therefore it is |
| 3306 | recommended not to make changes to this setting that would cause the |
| 3307 | value to differ, as this will prevent users from logging in. |
Shawn O. Pearce | 3ca1dcf | 2009-08-20 08:56:23 -0700 | [diff] [blame] | 3308 | + |
Michal Pasierb | 3e26274 | 2017-01-23 12:50:48 +0100 | [diff] [blame] | 3309 | Default is `uid` for FreeIPA and RFC 2307 servers, |
Shawn O. Pearce | 02c2e80 | 2009-10-29 14:46:03 -0700 | [diff] [blame] | 3310 | and `${sAMAccountName.toLowerCase}` for Active Directory. |
Shawn O. Pearce | 59e0922 | 2009-08-19 09:04:49 -0700 | [diff] [blame] | 3311 | |
Shawn O. Pearce | 7d25f78 | 2009-10-30 08:01:03 -0700 | [diff] [blame] | 3312 | [[ldap.accountMemberField]]ldap.accountMemberField:: |
Anthony | 93de7db | 2009-10-03 10:01:50 -0400 | [diff] [blame] | 3313 | + |
| 3314 | _(Optional)_ Name of an attribute on the user account object which |
Shawn O. Pearce | 7d25f78 | 2009-10-30 08:01:03 -0700 | [diff] [blame] | 3315 | contains the groups the user is part of. Typically used for Active |
Michal Pasierb | 3e26274 | 2017-01-23 12:50:48 +0100 | [diff] [blame] | 3316 | Directory and FreeIPA servers. |
Anthony | 93de7db | 2009-10-03 10:01:50 -0400 | [diff] [blame] | 3317 | + |
Shawn O. Pearce | 02c2e80 | 2009-10-29 14:46:03 -0700 | [diff] [blame] | 3318 | Default is unset for RFC 2307 servers (disabled) |
Michal Pasierb | 3e26274 | 2017-01-23 12:50:48 +0100 | [diff] [blame] | 3319 | and `memberOf` for Active Directory and FreeIPA. |
| 3320 | |
| 3321 | [[ldap.accountMemberExpandGroups]]ldap.accountMemberExpandGroups:: |
| 3322 | + |
| 3323 | _(Optional)_ Whether to expand nested groups recursively. This |
| 3324 | setting is used only if `ldap.accountMemberField` is set. |
| 3325 | + |
| 3326 | Default is unset for FreeIPA and `true` for RFC 2307 servers |
| 3327 | and Active Directory. |
Anthony | 93de7db | 2009-10-03 10:01:50 -0400 | [diff] [blame] | 3328 | |
Saša Živkov | c81291f | 2015-02-04 17:19:20 +0100 | [diff] [blame] | 3329 | [[ldap.fetchMemberOfEagerly]]ldap.fetchMemberOfEagerly:: |
| 3330 | + |
| 3331 | _(Optional)_ Whether to fetch the `memberOf` account attribute on |
| 3332 | login. Setups which use LDAP for user authentication but don't make |
| 3333 | use of the LDAP groups may benefit from setting this option to `false` |
| 3334 | as this will result in a much faster LDAP login. |
| 3335 | + |
| 3336 | Default is unset for RFC 2307 servers (disabled) and `true` for |
Michal Pasierb | 3e26274 | 2017-01-23 12:50:48 +0100 | [diff] [blame] | 3337 | Active Directory and FreeIPA. |
Saša Živkov | c81291f | 2015-02-04 17:19:20 +0100 | [diff] [blame] | 3338 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 3339 | [[ldap.groupBase]]ldap.groupBase:: |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 3340 | + |
| 3341 | Root of the tree containing all group objects. This is typically |
| 3342 | of the form `ou=groups,dc=example,dc=com`. |
David Pursehouse | 82d5563 | 2015-12-14 10:31:27 +0000 | [diff] [blame] | 3343 | + |
| 3344 | This setting may be added multiple times to specify more than |
| 3345 | one root. |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 3346 | |
Shawn O. Pearce | 304ccdb | 2009-08-25 12:25:27 -0700 | [diff] [blame] | 3347 | [[ldap.groupScope]]ldap.groupScope:: |
| 3348 | + |
| 3349 | Scope of the search performed for group objects. Must be one of: |
| 3350 | + |
| 3351 | * `one`: Search only one level below groupBase, but not recursive |
| 3352 | * `sub` or `subtree`: Search recursively below groupBase |
| 3353 | * `base` or `object`: Search exactly groupBase; probably not desired |
| 3354 | |
| 3355 | + |
| 3356 | Default is `subtree` as many directories have several levels. |
| 3357 | |
Shawn O. Pearce | 7d25f78 | 2009-10-30 08:01:03 -0700 | [diff] [blame] | 3358 | [[ldap.groupPattern]]ldap.groupPattern:: |
| 3359 | + |
| 3360 | Query pattern used when searching for an LDAP group to connect |
| 3361 | to a Gerrit group. This may be any valid LDAP query expression, |
| 3362 | including the standard `(&...)` and `(|...)` operators. The variable |
Edwin Kempin | cdb0e00 | 2011-09-08 14:23:30 +0200 | [diff] [blame] | 3363 | `${groupname}` is replaced with the search term supplied by the |
Shawn O. Pearce | 7d25f78 | 2009-10-30 08:01:03 -0700 | [diff] [blame] | 3364 | group owner. |
| 3365 | + |
Michal Pasierb | 3e26274 | 2017-01-23 12:50:48 +0100 | [diff] [blame] | 3366 | Default is `(cn=${groupname})` for FreeIPA and RFC 2307 servers, |
Edwin Kempin | cdb0e00 | 2011-09-08 14:23:30 +0200 | [diff] [blame] | 3367 | and `(&(objectClass=group)(cn=${groupname}))` for Active Directory. |
Shawn O. Pearce | 7d25f78 | 2009-10-30 08:01:03 -0700 | [diff] [blame] | 3368 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 3369 | [[ldap.groupMemberPattern]]ldap.groupMemberPattern:: |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 3370 | + |
| 3371 | Query pattern to use when searching for the groups that a user |
| 3372 | account is currently a member of. This may be any valid LDAP query |
| 3373 | expression, including the standard `(&...)` and `(|...)` operators. |
| 3374 | + |
David Pursehouse | 42f4204 | 2013-08-01 14:02:25 +0900 | [diff] [blame] | 3375 | If `auth.type` is `HTTP_LDAP` then the variable `${username}` is |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 3376 | replaced with a parameter set to the username that was supplied |
| 3377 | by the HTTP server. Other variables appearing in the pattern, |
Edwin Kempin | cdb0e00 | 2011-09-08 14:23:30 +0200 | [diff] [blame] | 3378 | such as `${fooBarAttribute}`, are replaced with the value of the |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 3379 | corresponding attribute (in this case, `fooBarAttribute`) as read |
| 3380 | from the user's account object matched under `ldap.accountBase`. |
Edwin Kempin | cdb0e00 | 2011-09-08 14:23:30 +0200 | [diff] [blame] | 3381 | Attributes such as `${dn}` or `${uidNumber}` may be useful. |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 3382 | + |
Scott Dial | 5045750 | 2013-08-11 16:52:51 -0400 | [diff] [blame] | 3383 | Default is `(|(memberUid=${username})(gidNumber=${gidNumber}))` for |
Michal Pasierb | 3e26274 | 2017-01-23 12:50:48 +0100 | [diff] [blame] | 3384 | RFC 2307, and unset (disabled) for Active Directory and FreeIPA. |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 3385 | |
Auke Schrijnen | 5780913 | 2012-09-26 21:05:39 +0200 | [diff] [blame] | 3386 | [[ldap.groupName]]ldap.groupName:: |
| 3387 | + |
David Pursehouse | 39489ae | 2012-10-12 13:50:04 +0900 | [diff] [blame] | 3388 | _(Optional)_ Name of the attribute on the group object which contains |
| 3389 | the value to use as the group name in Gerrit. |
Auke Schrijnen | 5780913 | 2012-09-26 21:05:39 +0200 | [diff] [blame] | 3390 | + |
David Pursehouse | 39489ae | 2012-10-12 13:50:04 +0900 | [diff] [blame] | 3391 | Typically the attribute name is `cn` for RFC 2307 and Active Directory |
| 3392 | servers. For other servers the attribute name may differ, for example |
| 3393 | `apple-group-realname` on Apple MacOS X Server. |
Auke Schrijnen | 5780913 | 2012-09-26 21:05:39 +0200 | [diff] [blame] | 3394 | + |
David Pursehouse | 39489ae | 2012-10-12 13:50:04 +0900 | [diff] [blame] | 3395 | It is also possible to specify a literal string containing a pattern of |
| 3396 | attribute values. For example to create a Gerrit group name consisting of |
| 3397 | LDAP group name and group ID, use the pattern `${cn} (${gidNumber})`. |
| 3398 | + |
| 3399 | Default is `cn`. |
Auke Schrijnen | 5780913 | 2012-09-26 21:05:39 +0200 | [diff] [blame] | 3400 | |
Gustaf Lundh | daf41af | 2016-12-05 19:05:09 +0100 | [diff] [blame] | 3401 | [[ldap.mandatoryGroup]]ldap.mandatoryGroup:: |
| 3402 | + |
| 3403 | All users must be a member of this group to allow account creation or |
| 3404 | authentication. |
| 3405 | + |
| 3406 | Setting mandatoryGroup implies enabling of `ldap.fetchMemberOfEagerly` |
| 3407 | + |
| 3408 | By default, unset. |
| 3409 | |
Edwin Kempin | b3b0d29 | 2011-09-14 14:17:34 +0200 | [diff] [blame] | 3410 | [[ldap.localUsernameToLowerCase]]ldap.localUsernameToLowerCase:: |
| 3411 | + |
| 3412 | Converts the local username, that is used to login into the Gerrit |
David Pursehouse | a1d633b | 2014-05-02 17:21:02 +0900 | [diff] [blame] | 3413 | Web UI, to lower case before doing the LDAP authentication. By setting |
| 3414 | 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] | 3415 | can be achieved. |
| 3416 | + |
| 3417 | If set, it must be ensured that the local usernames for all existing |
| 3418 | accounts are converted to lower case, otherwise a user that has a |
David Pursehouse | 221d4f6 | 2012-06-08 17:38:08 +0900 | [diff] [blame] | 3419 | 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] | 3420 | anymore. The local usernames for the existing accounts can be |
| 3421 | converted to lower case by running the server program |
| 3422 | link:pgm-LocalUsernamesToLowerCase.html[LocalUsernamesToLowerCase]. |
| 3423 | Please be aware that the conversion of the local usernames to lower |
| 3424 | case can't be undone. For newly created accounts the local username |
| 3425 | will be directly stored in lower case. |
| 3426 | + |
| 3427 | By default, unset/false. |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 3428 | |
Robin Rosenberg | a3baed0 | 2012-10-14 14:09:32 +0200 | [diff] [blame] | 3429 | [[ldap.authentication]]ldap.authentication:: |
| 3430 | + |
| 3431 | Defines how Gerrit authenticates with the server. When set to `GSSAPI` |
| 3432 | Gerrit will use Kerberos. To use kerberos the |
| 3433 | `java.security.auth.login.config` system property must point to a |
| 3434 | login to a JAAS configuration file and, if Java 6 is used, the system |
| 3435 | property `java.security.krb5.conf` must point to the appropriate |
| 3436 | krb5.ini file with references to the KDC. |
| 3437 | |
| 3438 | Typical jaas.conf. |
| 3439 | |
| 3440 | ---- |
| 3441 | KerberosLogin { |
| 3442 | com.sun.security.auth.module.Krb5LoginModule |
| 3443 | required |
| 3444 | useTicketCache=true |
| 3445 | doNotPrompt=true |
| 3446 | renewTGT=true; |
| 3447 | }; |
| 3448 | ---- |
| 3449 | |
| 3450 | See Java documentation on how to create the krb5.ini file. |
| 3451 | |
| 3452 | Note the `renewTGT` property to make sure the TGT does not expire, |
| 3453 | and `useTicketCache` to use the TGT supplied by the operating system. As |
| 3454 | the whole point of using GSSAPI is to have passwordless authentication |
David Pursehouse | 9246356 | 2013-06-24 10:16:28 +0900 | [diff] [blame] | 3455 | 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] | 3456 | |
| 3457 | On Windows servers the registry key `HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\Kerberos\Parameters` |
| 3458 | must have the DWORD value `allowtgtsessionkey` set to 1 and the account must not |
| 3459 | have local administrator privileges. |
| 3460 | |
Bruce Zu | cd04bbc | 2014-07-25 15:48:09 +0800 | [diff] [blame] | 3461 | [[ldap.useConnectionPooling]]ldap.useConnectionPooling:: |
| 3462 | + |
| 3463 | _(Optional)_ Enable the LDAP connection pooling or not. |
| 3464 | + |
| 3465 | If it is true, the LDAP service provider maintains a pool of (possibly) |
| 3466 | previously used connections and assigns them to a Context instance as |
| 3467 | needed. When a Context instance is done with a connection (closed or |
| 3468 | garbage collected), the connection is returned to the pool for future use. |
| 3469 | + |
| 3470 | For details, see link:http://docs.oracle.com/javase/tutorial/jndi/ldap/pool.html[ |
| 3471 | LDAP connection management (Pool)] and link:http://docs.oracle.com/javase/tutorial/jndi/ldap/config.html[ |
| 3472 | LDAP connection management (Configuration)] |
| 3473 | + |
| 3474 | By default, false. |
| 3475 | |
| 3476 | [[ldap.connectTimeout]]ldap.connectTimeout:: |
| 3477 | + |
Saša Živkov | 303701a | 2015-01-19 16:24:44 +0100 | [diff] [blame] | 3478 | _(Optional)_ Timeout period for establishment of an LDAP connection. |
Bruce Zu | cd04bbc | 2014-07-25 15:48:09 +0800 | [diff] [blame] | 3479 | + |
| 3480 | The value is in the usual time-unit format like "1 s", "100 ms", |
| 3481 | etc... |
| 3482 | + |
| 3483 | By default there is no timeout and Gerrit will wait indefinitely. |
| 3484 | |
Saša Živkov | 5049f51 | 2015-01-19 17:04:43 +0100 | [diff] [blame] | 3485 | [[ldap-connection-pooling]] |
| 3486 | ==== LDAP Connection Pooling |
| 3487 | Once LDAP connection pooling is enabled by setting the link:#ldap.useConnectionPooling[ |
| 3488 | ldap.useConnectionPooling] configuration property to `true`, the connection pool |
| 3489 | can be configured using JVM system properties as explained in the |
| 3490 | link:http://docs.oracle.com/javase/7/docs/technotes/guides/jndi/jndi-ldap.html#POOL[ |
| 3491 | Java SE Documentation]. |
Bruce Zu | cd04bbc | 2014-07-25 15:48:09 +0800 | [diff] [blame] | 3492 | |
Saša Živkov | 5049f51 | 2015-01-19 17:04:43 +0100 | [diff] [blame] | 3493 | For standalone Gerrit (running with the embedded Jetty), JVM system properties |
| 3494 | are specified in the link:#container[container section]: |
Bruce Zu | cd04bbc | 2014-07-25 15:48:09 +0800 | [diff] [blame] | 3495 | |
Saša Živkov | 5049f51 | 2015-01-19 17:04:43 +0100 | [diff] [blame] | 3496 | ---- |
| 3497 | javaOptions = -Dcom.sun.jndi.ldap.connect.pool.maxsize=20 |
| 3498 | javaOptions = -Dcom.sun.jndi.ldap.connect.pool.prefsize=10 |
| 3499 | javaOptions = -Dcom.sun.jndi.ldap.connect.pool.timeout=300000 |
| 3500 | ---- |
Bruce Zu | cd04bbc | 2014-07-25 15:48:09 +0800 | [diff] [blame] | 3501 | |
Saša Živkov | ca7a67e | 2015-12-01 14:25:10 +0100 | [diff] [blame] | 3502 | [[lfs]] |
| 3503 | === Section lfs |
| 3504 | |
| 3505 | [[lfs.plugin]]lfs.plugin:: |
| 3506 | + |
David Pursehouse | 2463c54 | 2016-08-02 16:04:58 +0900 | [diff] [blame] | 3507 | The name of a plugin which serves the |
| 3508 | link:https://github.com/github/git-lfs/blob/master/docs/api/v1/http-v1-batch.md[ |
| 3509 | LFS protocol] on the `<project-name>/info/lfs/objects/batch` endpoint. When |
| 3510 | not configured Gerrit will respond with `501 Not Implemented` on LFS protocol |
| 3511 | requests. |
Saša Živkov | ca7a67e | 2015-12-01 14:25:10 +0100 | [diff] [blame] | 3512 | + |
| 3513 | By default unset. |
| 3514 | |
Gustaf Lundh | aef9012 | 2015-04-27 16:48:19 +0200 | [diff] [blame] | 3515 | [[log]] |
| 3516 | === Section log |
| 3517 | |
| 3518 | [[log.jsonLogging]]log.jsonLogging:: |
| 3519 | + |
| 3520 | If set to true, enables error logging in JSON format (file name: "logs/error_log.json"). |
| 3521 | + |
| 3522 | Defaults to false. |
| 3523 | |
| 3524 | [[log.textLogging]]log.textLogging:: |
| 3525 | + |
| 3526 | If set to true, enables error logging in regular plain text format. Can only be disabled |
| 3527 | if `jsonLogging` is enabled. |
| 3528 | + |
| 3529 | Defaults to true. |
| 3530 | |
David Pursehouse | 2281fef | 2017-11-21 21:27:17 +0900 | [diff] [blame] | 3531 | [[log.compress]]log.compress:: |
| 3532 | + |
| 3533 | If set to true, log files are compressed at server startup and then daily at 11pm |
| 3534 | (in the server's local time zone). |
| 3535 | + |
| 3536 | Defaults to true. |
| 3537 | |
David Pursehouse | 633fff3 | 2017-11-21 22:08:12 +0900 | [diff] [blame] | 3538 | [[log.rotate]]log.rotate:: |
| 3539 | + |
| 3540 | If set to true, log files are rotated daily at midnight (GMT). |
| 3541 | + |
| 3542 | Defaults to true. |
| 3543 | |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 3544 | [[mimetype]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3545 | === Section mimetype |
Shawn O. Pearce | 01cb1190 | 2009-07-15 08:19:01 -0700 | [diff] [blame] | 3546 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 3547 | [[mimetype.name.safe]]mimetype.<name>.safe:: |
Shawn O. Pearce | 01cb1190 | 2009-07-15 08:19:01 -0700 | [diff] [blame] | 3548 | + |
| 3549 | If set to true, files with the MIME type `<name>` will be sent as |
| 3550 | direct downloads to the user's browser, rather than being wrapped up |
| 3551 | inside of zipped archives. The type name may be a complete type |
Jonathan Nieder | 5758f18 | 2015-03-30 11:28:55 -0700 | [diff] [blame] | 3552 | name, e.g. `image/gif`, a generic media type, e.g. `+image/*+`, |
| 3553 | or the wildcard `+*/*+` to match all types. |
Shawn O. Pearce | 01cb1190 | 2009-07-15 08:19:01 -0700 | [diff] [blame] | 3554 | + |
| 3555 | By default, false for all MIME types. |
| 3556 | |
| 3557 | Common examples: |
Shawn O. Pearce | 9d342a4 | 2009-12-16 15:49:05 -0800 | [diff] [blame] | 3558 | ---- |
| 3559 | [mimetype "image/*"] |
| 3560 | safe = true |
| 3561 | |
| 3562 | [mimetype "application/pdf"] |
| 3563 | safe = true |
| 3564 | |
| 3565 | [mimetype "application/msword"] |
| 3566 | safe = true |
| 3567 | |
| 3568 | [mimetype "application/vnd.ms-excel"] |
| 3569 | safe = true |
| 3570 | ---- |
Shawn O. Pearce | 01cb1190 | 2009-07-15 08:19:01 -0700 | [diff] [blame] | 3571 | |
Dave Borowitz | bc31491 | 2017-03-21 14:23:35 -0700 | [diff] [blame] | 3572 | [[note-db]] |
| 3573 | === Section noteDb |
| 3574 | |
Dave Borowitz | ada289c | 2018-12-18 13:24:14 -0800 | [diff] [blame] | 3575 | NoteDb is the Git-based database storage backend for Gerrit. For more |
| 3576 | information, including how to migrate data from an older Gerrit version, see the |
| 3577 | link:note-db.html[documentation]. |
Dave Borowitz | bc31491 | 2017-03-21 14:23:35 -0700 | [diff] [blame] | 3578 | |
Edwin Kempin | 5be9c31 | 2017-07-07 10:40:55 +0200 | [diff] [blame] | 3579 | [[notedb.accounts.sequenceBatchSize]]notedb.accounts.sequenceBatchSize:: |
| 3580 | + |
Edwin Kempin | 311d570 | 2017-07-28 15:10:24 +0200 | [diff] [blame] | 3581 | The next available account sequence number is stored as UTF-8 text in a |
| 3582 | blob pointed to by the `refs/sequences/accounts` ref in the `All-Users` |
Edwin Kempin | 5be9c31 | 2017-07-07 10:40:55 +0200 | [diff] [blame] | 3583 | repository. Multiple processes share the same sequence by incrementing |
| 3584 | the counter using normal git ref updates. To amortize the cost of these |
| 3585 | ref updates, processes increment the counter by a larger number and |
| 3586 | hand out numbers from that range in memory until they run out. This |
| 3587 | configuration parameter controls the size of the account ID batch that |
| 3588 | each process retrieves at once. |
| 3589 | + |
Edwin Kempin | 5be9c31 | 2017-07-07 10:40:55 +0200 | [diff] [blame] | 3590 | By default, 1. |
| 3591 | |
Han-Wen Nienhuys | e5ca19c | 2017-11-08 13:33:33 +0100 | [diff] [blame] | 3592 | |
Michael Ochmann | 6981326 | 2016-01-27 17:53:55 +0100 | [diff] [blame] | 3593 | [[oauth]] |
| 3594 | === Section oauth |
| 3595 | |
| 3596 | OAuth integration is only enabled if `auth.type` is set to `OAUTH`. See |
| 3597 | link:#auth.type[above] for a detailed description of the `auth.type` settings |
| 3598 | and their implications. |
| 3599 | |
| 3600 | By default, contact information, like the full name and email address, |
| 3601 | is retrieved from the selected OAuth provider when a user account is created, |
| 3602 | or when a user requests to reload that information in the settings UI. If |
| 3603 | that is not supported by the OAuth provider, users can be allowed to edit |
| 3604 | their contact information manually. |
| 3605 | |
| 3606 | [[oauth.allowEditFullName]]oauth.allowEditFullName:: |
| 3607 | + |
| 3608 | If true, the full name can be edited in the contact information. |
| 3609 | + |
| 3610 | Default is false. |
| 3611 | |
| 3612 | [[oauth.allowRegisterNewEmail]]oauth.allowRegisterNewEmail:: |
| 3613 | + |
| 3614 | If true, additional email addresses can be registered in the contact |
| 3615 | information. |
| 3616 | + |
| 3617 | Default is false. |
Shawn O. Pearce | 5f11b29 | 2010-08-05 17:57:35 -0700 | [diff] [blame] | 3618 | |
Zac Livingston | 70a1610 | 2018-11-20 15:07:34 -0700 | [diff] [blame] | 3619 | [[operator-alias]] |
| 3620 | === Section operator alias |
| 3621 | |
| 3622 | Operator aliasing allows global aliases to be defined for query operators. |
| 3623 | Currently only change queries are supported. The alias name is the git |
| 3624 | config key name, and the operator being aliased is the git config value. |
| 3625 | |
| 3626 | For example: |
| 3627 | |
| 3628 | ---- |
| 3629 | [operator-alias "change"] |
| 3630 | oldage = age |
| 3631 | number = change |
| 3632 | ---- |
| 3633 | |
| 3634 | This section is particularly useful to alias operator names which may be |
| 3635 | long and clunky because they include a plugin name in them to a shorter |
| 3636 | name without the plugin name. |
| 3637 | |
| 3638 | Aliases are resolved dynamically at invocation time to any currently |
| 3639 | loaded versions of plugins. If the alias points to an operator provided |
| 3640 | by a plugin which is not currently loaded, or the plugin does not define |
| 3641 | the operator, then "unsupported operator" is returned to the user. |
| 3642 | |
| 3643 | Aliases will override existing operators. In the case of multiple aliases |
| 3644 | with the same name, the last one defined will be used. |
| 3645 | |
| 3646 | When the target of an alias doesn't exist, the operator with the name |
| 3647 | of the alias will be used (if present). This enables an admin to config |
| 3648 | the system to override a core operator with an operator provided by a |
| 3649 | plugin when present and otherwise fall back to the operator provided by |
| 3650 | core. |
| 3651 | |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 3652 | [[pack]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3653 | === Section pack |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 3654 | |
Shawn O. Pearce | 5f11b29 | 2010-08-05 17:57:35 -0700 | [diff] [blame] | 3655 | Global settings controlling how Gerrit Code Review creates pack |
| 3656 | streams for Git clients running clone, fetch, or pull. Most of these |
| 3657 | variables are per-client request, and thus should be carefully set |
| 3658 | given the expected concurrent request load and available CPU and |
| 3659 | memory resources. |
| 3660 | |
| 3661 | [[pack.deltacompression]]pack.deltacompression:: |
| 3662 | + |
| 3663 | If true, delta compression between objects is enabled. This may |
| 3664 | result in a smaller overall transfer for the client, but requires |
| 3665 | more server memory and CPU time. |
| 3666 | + |
| 3667 | False (off) by default, matching Gerrit Code Review 2.1.4. |
| 3668 | |
| 3669 | [[pack.threads]]pack.threads:: |
| 3670 | + |
| 3671 | Maximum number of threads to use for delta compression (if enabled). |
| 3672 | This is per-client request. If set to 0 then the number of CPUs is |
| 3673 | auto-detected and one thread per CPU is used, per client request. |
| 3674 | + |
| 3675 | By default, 1. |
| 3676 | |
| 3677 | |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 3678 | [[plugins]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3679 | === Section plugins |
Shawn O. Pearce | 5ad16ea | 2012-05-09 14:24:25 -0700 | [diff] [blame] | 3680 | |
| 3681 | [[plugins.checkFrequency]]plugins.checkFrequency:: |
| 3682 | + |
| 3683 | How often plugins should be examined for new plugins to load, removed |
| 3684 | plugins to be unloaded, or updated plugins to be reloaded. Values can |
| 3685 | be specified using standard time unit abbreviations ('ms', 'sec', |
| 3686 | 'min', etc.). |
| 3687 | + |
| 3688 | If set to 0, automatic plugin reloading is disabled. Administrators |
Christian Aistleitner | 8ce1a4e | 2015-06-05 01:54:15 +0200 | [diff] [blame] | 3689 | 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] | 3690 | + |
| 3691 | Default is 1 minute. |
| 3692 | |
Shawn Pearce | fd03350 | 2014-02-14 16:42:35 -0800 | [diff] [blame] | 3693 | [[plugins.allowRemoteAdmin]]plugins.allowRemoteAdmin:: |
| 3694 | + |
| 3695 | Enable remote installation, enable and disable of plugins over HTTP |
| 3696 | and SSH. If set to true Administrators can install new plugins |
| 3697 | remotely, or disable existing plugins. Defaults to false. |
| 3698 | |
Saša Živkov | 350fc68 | 2019-05-13 14:13:51 +0200 | [diff] [blame] | 3699 | [[plugins.mandatory]]plugins.mandatory:: |
| 3700 | + |
| 3701 | List of mandatory plugins. If a plugin from this list does not load, |
David Pursehouse | f06aefb | 2019-10-18 20:39:53 +0900 | [diff] [blame] | 3702 | Gerrit will fail to start. |
| 3703 | + |
| 3704 | Disabling and restarting of a mandatory plugin is rejected, but reloading |
| 3705 | of a mandatory plugin is still possible. |
Saša Živkov | 350fc68 | 2019-05-13 14:13:51 +0200 | [diff] [blame] | 3706 | |
Dariusz Luksza | 98f2352 | 2015-03-11 11:41:41 +0100 | [diff] [blame] | 3707 | [[plugins.jsLoadTimeout]]plugins.jsLoadTimeout:: |
| 3708 | + |
| 3709 | Set the timeout value for loading JavaScript plugins in Gerrit UI. |
| 3710 | Values can be specified using standard time unit abbreviations ('ms', |
| 3711 | 'sec', 'min', etc.). |
| 3712 | + |
| 3713 | Default is 5 seconds. Negative values will be converted to 0. |
Shawn O. Pearce | 5ad16ea | 2012-05-09 14:24:25 -0700 | [diff] [blame] | 3714 | |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 3715 | [[receive]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3716 | === Section receive |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 3717 | |
Dave Borowitz | ff24389 | 2015-08-31 15:35:28 -0400 | [diff] [blame] | 3718 | This section is used to configure behavior of the 'receive-pack' |
| 3719 | handler, which responds to 'git push' requests. |
lincoln | 2be1160 | 2010-07-05 10:53:25 -0300 | [diff] [blame] | 3720 | |
Dave Borowitz | ff24389 | 2015-08-31 15:35:28 -0400 | [diff] [blame] | 3721 | [[receive.allowGroup]]receive.allowGroup:: |
Dave Borowitz | 532342bf | 2015-06-18 20:28:22 -0400 | [diff] [blame] | 3722 | + |
Dave Borowitz | ff24389 | 2015-08-31 15:35:28 -0400 | [diff] [blame] | 3723 | Name of the groups of users that are allowed to execute |
| 3724 | 'receive-pack' on the server. One or more groups can be set. |
Dave Borowitz | 532342bf | 2015-06-18 20:28:22 -0400 | [diff] [blame] | 3725 | + |
Dave Borowitz | ff24389 | 2015-08-31 15:35:28 -0400 | [diff] [blame] | 3726 | If no groups are added, any user will be allowed to execute |
| 3727 | 'receive-pack' on the server. |
Dave Borowitz | 532342bf | 2015-06-18 20:28:22 -0400 | [diff] [blame] | 3728 | |
| 3729 | [[receive.certNonceSeed]]receive.certNonceSeed:: |
| 3730 | + |
| 3731 | If set to a non-empty value and server-side signed push validation is |
| 3732 | link:#receive.enableSignedPush[enabled], use this value as the seed to |
| 3733 | the HMAC SHA-1 nonce generator. If unset, a 64-byte random seed will be |
| 3734 | generated at server startup. |
| 3735 | + |
| 3736 | As this is used as the seed of a cryptographic algorithm, it is |
| 3737 | recommended to be placed in link:#secure-config[`secure.config`]. |
| 3738 | + |
| 3739 | Defaults to unset. |
| 3740 | |
| 3741 | [[receive.certNonceSlop]]receive.certNonceSlop:: |
| 3742 | + |
| 3743 | When validating the nonce passed as part of the signed push protocol, |
| 3744 | accept valid nonces up to this many seconds old. This allows |
| 3745 | certificate verification to work over HTTP where there is a lag between |
| 3746 | the HTTP response providing the nonce to sign and the next request |
| 3747 | containing the signed nonce. This can be significant on large |
| 3748 | repositories, since the lag also includes the time to count objects on |
| 3749 | the client. |
| 3750 | + |
| 3751 | Default is 5 minutes. |
| 3752 | |
Dave Borowitz | ff24389 | 2015-08-31 15:35:28 -0400 | [diff] [blame] | 3753 | [[receive.changeUpdateThreads]]receive.changeUpdateThreads:: |
| 3754 | + |
| 3755 | Number of threads to perform change creation or patch set updates |
| 3756 | concurrently. Each thread uses its own database connection from |
| 3757 | the database connection pool, and if all threads are busy then |
| 3758 | main receive thread will also perform a change creation or patch |
| 3759 | set update. |
| 3760 | + |
| 3761 | Defaults to 1, using only the main receive thread. This feature is for |
| 3762 | databases with very high latency that can benefit from concurrent |
| 3763 | operations when multiple changes are impacted at once. |
| 3764 | |
Shawn Pearce | 5cb31bf | 2013-02-27 16:20:26 -0800 | [diff] [blame] | 3765 | [[receive.checkMagicRefs]]receive.checkMagicRefs:: |
| 3766 | + |
| 3767 | If true, Gerrit will verify the destination repository has |
David Ostrovsky | 6ffb7d9 | 2017-02-13 21:16:58 +0100 | [diff] [blame] | 3768 | no references under the magic 'refs/for' branch namespace. Names under |
| 3769 | these locations confuse clients when trying to upload code reviews so |
| 3770 | Gerrit requires them to be empty. |
Shawn Pearce | 5cb31bf | 2013-02-27 16:20:26 -0800 | [diff] [blame] | 3771 | + |
| 3772 | If false Gerrit skips the sanity check and assumes administrators |
| 3773 | have ensured the repository does not contain any magic references. |
| 3774 | Setting to false to skip the check can decrease latency during push. |
| 3775 | + |
| 3776 | Default is true. |
| 3777 | |
Gustaf Lundh | fd5fcf4 | 2018-06-25 16:15:21 +0200 | [diff] [blame] | 3778 | [[receive.allowProjectOwnersToChangeParent]]receive.allowProjectOwnersToChangeParent:: |
| 3779 | + |
| 3780 | If true, Gerrit will allow project owners to change the parent of a project. |
| 3781 | + |
| 3782 | By default only Gerrit administrators are allowed to change the parent |
| 3783 | of a project. By allowing project owners to change parents, it may |
| 3784 | allow the owner to circumvent certain enforced rules (like important |
| 3785 | BLOCK rules). |
| 3786 | + |
| 3787 | Default is false. |
Rikard Almgren | e9221be | 2018-09-18 11:12:03 +0200 | [diff] [blame] | 3788 | + |
| 3789 | This value supports configuration reloads: |
| 3790 | link:cmd-reload-config.html[reload-config] |
Gustaf Lundh | fd5fcf4 | 2018-06-25 16:15:21 +0200 | [diff] [blame] | 3791 | |
Gustaf Lundh | 9062fd6 | 2013-02-14 17:23:11 +0100 | [diff] [blame] | 3792 | [[receive.checkReferencedObjectsAreReachable]]receive.checkReferencedObjectsAreReachable:: |
| 3793 | + |
| 3794 | If set to true, Gerrit will validate that all referenced objects that |
| 3795 | are not included in the received pack are reachable by the user. |
| 3796 | + |
| 3797 | Carrying out this check on gits with many refs and commits can be a |
| 3798 | very CPU-heavy operation. For non public Gerrit-servers this check may |
| 3799 | be overkill. |
| 3800 | + |
| 3801 | Only disable this check if you trust the clients not to forge SHA1 |
| 3802 | references to access commits intended to be hidden from the user. |
| 3803 | + |
| 3804 | Default is true. |
| 3805 | |
Patrick Hiesel | 24653be | 2019-10-22 09:47:32 +0200 | [diff] [blame] | 3806 | [[receive.enableInMemoryRefCache]]receive.enableInMemoryRefCache:: |
| 3807 | + |
| 3808 | If true, Gerrit will cache all refs advertised during push in memory and |
| 3809 | base later receive operations on that cache. |
| 3810 | + |
| 3811 | Turning this cache off is considered experimental. |
| 3812 | + |
| 3813 | This cache provides value when the ref database is slow and/or does not |
| 3814 | offer an inverse lookup of object ID to ref name. When RefTable is used, |
| 3815 | this cache can be turned off (experimental) to get speed improvements. |
| 3816 | + |
| 3817 | Default is true. |
| 3818 | |
Dave Borowitz | ff24389 | 2015-08-31 15:35:28 -0400 | [diff] [blame] | 3819 | [[receive.enableSignedPush]]receive.enableSignedPush:: |
lincoln | 2be1160 | 2010-07-05 10:53:25 -0300 | [diff] [blame] | 3820 | + |
Dave Borowitz | ff24389 | 2015-08-31 15:35:28 -0400 | [diff] [blame] | 3821 | If true, server-side signed push validation is enabled. |
lincoln | 2be1160 | 2010-07-05 10:53:25 -0300 | [diff] [blame] | 3822 | + |
Dave Borowitz | ff24389 | 2015-08-31 15:35:28 -0400 | [diff] [blame] | 3823 | When a client pushes with `git push --signed`, this ensures that the |
| 3824 | 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] | 3825 | the `refs/meta/gpg-keys` branch of `All-Users`. |
Dave Borowitz | ff24389 | 2015-08-31 15:35:28 -0400 | [diff] [blame] | 3826 | + |
| 3827 | Defaults to false. |
| 3828 | |
| 3829 | [[receive.maxBatchChanges]]receive.maxBatchChanges:: |
| 3830 | + |
| 3831 | The maximum number of changes that Gerrit allows to be pushed |
| 3832 | in a batch for review. When this number is exceeded Gerrit rejects |
| 3833 | the push with an error message. |
| 3834 | + |
| 3835 | May be overridden for certain groups by specifying a limit in the |
| 3836 | link:access-control.html#capability_batchChangesLimit['Batch Changes Limit'] |
| 3837 | global capability. |
| 3838 | + |
| 3839 | This setting can be used to prevent users from uploading large |
| 3840 | number of changes for review by mistake. |
| 3841 | + |
| 3842 | Default is zero, no limit. |
lincoln | 2be1160 | 2010-07-05 10:53:25 -0300 | [diff] [blame] | 3843 | |
Dave Borowitz | 7854219 | 2017-08-31 10:45:47 -0400 | [diff] [blame] | 3844 | [[receive.maxBatchCommits]]receive.maxBatchCommits:: |
| 3845 | + |
| 3846 | The maximum number of commits that Gerrit allows to be pushed in a batch |
| 3847 | directly to a branch when link:user-upload.html#bypass_review[bypassing review]. |
| 3848 | This limit can be bypassed if a user link:user-upload.html#skip_validation[skips |
| 3849 | validation]. |
| 3850 | + |
| 3851 | Default is 10000. |
| 3852 | |
Sasa Zivkov | 59d89c3 | 2011-11-18 15:32:35 +0100 | [diff] [blame] | 3853 | [[receive.maxObjectSizeLimit]]receive.maxObjectSizeLimit:: |
| 3854 | + |
| 3855 | Maximum allowed Git object size that 'receive-pack' will accept. |
| 3856 | If an object is larger than the given size the pack-parsing will abort |
| 3857 | and the push operation will fail. If set to zero then there is no |
| 3858 | limit. |
| 3859 | + |
David Pursehouse | 221d4f6 | 2012-06-08 17:38:08 +0900 | [diff] [blame] | 3860 | Gerrit administrators can use this setting to prevent developers |
Sasa Zivkov | 59d89c3 | 2011-11-18 15:32:35 +0100 | [diff] [blame] | 3861 | from pushing objects which are too large to Gerrit. |
| 3862 | + |
Fredrik Luthander | a3cf354 | 2012-07-04 16:55:35 -0700 | [diff] [blame] | 3863 | This setting can also be set in the `project.config` |
David Pursehouse | 2e54868 | 2018-08-01 15:12:47 +0200 | [diff] [blame] | 3864 | (link:config-project-config.html[receive.maxObjectSizeLimit]) in order |
Fredrik Luthander | a3cf354 | 2012-07-04 16:55:35 -0700 | [diff] [blame] | 3865 | to further reduce the global setting. The project specific setting is |
| 3866 | only honored when it further reduces the global limit. |
Sasa Zivkov | 5a708a8 | 2013-06-28 17:07:55 +0200 | [diff] [blame] | 3867 | + |
Sasa Zivkov | 59d89c3 | 2011-11-18 15:32:35 +0100 | [diff] [blame] | 3868 | Default is zero. |
| 3869 | + |
| 3870 | Common unit suffixes of 'k', 'm', or 'g' are supported. |
| 3871 | |
David Pursehouse | 3f9c740 | 2018-09-05 18:43:03 +0900 | [diff] [blame] | 3872 | [[receive.inheritProjectMaxObjectSizeLimit]]receive.inheritProjectMaxObjectSizeLimit:: |
| 3873 | + |
| 3874 | Controls whether the project-level link:config-project-config.html[`receive.maxObjectSizeLimit`] |
| 3875 | value is inherited from the parent project. When `true`, the value is |
| 3876 | inherited, otherwise it is not inherited. |
| 3877 | + |
| 3878 | Default is false, the value is not inherited. |
| 3879 | |
Dave Borowitz | 1bb4949 | 2015-08-31 15:36:59 -0400 | [diff] [blame] | 3880 | [[receive.maxTrustDepth]]receive.maxTrustDepth:: |
| 3881 | + |
| 3882 | If signed push validation is link:#receive.enableSignedPush[enabled], |
| 3883 | set to the maximum depth to search when checking if a key is |
| 3884 | link:#receive.trustedKey[trusted]. |
| 3885 | + |
| 3886 | Default is 0, meaning only explicitly trusted keys are allowed. |
| 3887 | |
Dave Borowitz | 234734a | 2012-03-01 14:22:29 -0800 | [diff] [blame] | 3888 | [[receive.threadPoolSize]]receive.threadPoolSize:: |
| 3889 | + |
| 3890 | Maximum size of the thread pool in which the change data in received packs is |
| 3891 | processed. |
| 3892 | + |
| 3893 | Defaults to the number of available CPUs according to the Java runtime. |
| 3894 | |
Dave Borowitz | 1c40136 | 2012-03-02 17:39:17 -0800 | [diff] [blame] | 3895 | [[receive.timeout]]receive.timeout:: |
| 3896 | + |
Shawn O. Pearce | 00dd12d | 2012-03-12 15:52:11 -0700 | [diff] [blame] | 3897 | Overall timeout on the time taken to process the change data in |
| 3898 | received packs. Only includes the time processing Gerrit changes |
| 3899 | and updating references, not the time to index the pack. Values can |
| 3900 | be specified using standard time unit abbreviations ('ms', 'sec', |
| 3901 | 'min', etc.). |
Dave Borowitz | 1c40136 | 2012-03-02 17:39:17 -0800 | [diff] [blame] | 3902 | + |
Dariusz Luksza | de482b0 | 2015-11-09 18:25:04 +0100 | [diff] [blame] | 3903 | Default is 4 minutes. If no unit is specified, milliseconds |
Shawn O. Pearce | 00dd12d | 2012-03-12 15:52:11 -0700 | [diff] [blame] | 3904 | is assumed. |
Dave Borowitz | 1c40136 | 2012-03-02 17:39:17 -0800 | [diff] [blame] | 3905 | |
Dave Borowitz | 1bb4949 | 2015-08-31 15:36:59 -0400 | [diff] [blame] | 3906 | [[receive.trustedKey]]receive.trustedKey:: |
| 3907 | + |
| 3908 | List of GPG key fingerprints that should be considered trust roots by |
| 3909 | the server when signed push validation is |
| 3910 | link:#receive.enableSignedPush[enabled]. A key is trusted by the server |
| 3911 | if it is either in this list, or a path of trust signatures leads from |
| 3912 | the key to a configured trust root. The maximum length of the path is |
| 3913 | determined by link:#receive.maxTrustDepth[`receive.maxTrustDepth`]. |
| 3914 | + |
| 3915 | Key fingerprints can be displayed with `gpg --list-keys |
| 3916 | --with-fingerprint`. |
| 3917 | + |
| 3918 | Trust signatures can be added to a key using the `tsign` command to |
| 3919 | link:https://www.gnupg.org/documentation/manuals/gnupg/OpenPGP-Key-Management.html[ |
| 3920 | `gpg --edit-key`], after which the signed key should be re-uploaded. |
| 3921 | + |
| 3922 | If no keys are specified, web-of-trust checks are disabled. This is the |
| 3923 | default behavior. |
| 3924 | |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 3925 | [[repository]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3926 | === Section repository |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 3927 | |
Hugo Josefson | 072b470 | 2010-04-21 19:27:11 +0200 | [diff] [blame] | 3928 | Repositories in this sense are the same as projects. |
| 3929 | |
Shawn O. Pearce | 897d921 | 2011-06-16 16:59:59 -0700 | [diff] [blame] | 3930 | In the following example configuration `Registered Users` is set |
| 3931 | to be the default owner of new projects. |
Hugo Josefson | 072b470 | 2010-04-21 19:27:11 +0200 | [diff] [blame] | 3932 | |
| 3933 | ---- |
| 3934 | [repository "*"] |
Hugo Josefson | 072b470 | 2010-04-21 19:27:11 +0200 | [diff] [blame] | 3935 | ownerGroup = Registered Users |
| 3936 | ---- |
| 3937 | |
Hugo Arès | 7d2b942 | 2014-11-25 15:33:42 -0500 | [diff] [blame] | 3938 | The only matching patterns supported are exact match or wildcard matching which |
| 3939 | can be specified by ending the name with a `*`. If a project matches more than one |
| 3940 | repository configuration, then the configuration from the more precise match |
| 3941 | will be used. In the following example, the default submit type for a project |
| 3942 | named `project/plugins/a` would be `CHERRY_PICK`. |
| 3943 | |
| 3944 | ---- |
| 3945 | [repository "project/*"] |
| 3946 | defaultSubmitType = MERGE_IF_NECESSARY |
| 3947 | [repository "project/plugins/*"] |
| 3948 | defaultSubmitType = CHERRY_PICK |
| 3949 | ---- |
| 3950 | |
Michael Ochmann | 8129ece | 2016-07-08 11:25:25 +0200 | [diff] [blame] | 3951 | [NOTE] |
| 3952 | All properties are used from the matching repository configuration. In |
Hugo Arès | 7d2b942 | 2014-11-25 15:33:42 -0500 | [diff] [blame] | 3953 | the previous example, all properties will be used from `project/plugins/\*` |
| 3954 | section and no properties will be inherited nor overridden from `project/*`. |
Hugo Josefson | 072b470 | 2010-04-21 19:27:11 +0200 | [diff] [blame] | 3955 | |
Hugo Arès | 218bb3b | 2015-04-22 15:05:14 -0400 | [diff] [blame] | 3956 | [[repository.name.basePath]]repository.<name>.basePath:: |
| 3957 | + |
| 3958 | Alternate to <<gerrit.basePath,gerrit.basePath>>. The repository will be created |
| 3959 | and used from this location instead: ${alternateBasePath}/${projectName}.git. |
| 3960 | + |
| 3961 | If configuring the basePath for an existing project in gerrit, make sure to stop |
| 3962 | gerrit, move the repository in the alternate basePath, configure basePath for |
| 3963 | this repository and then start Gerrit. |
| 3964 | + |
| 3965 | Path must be absolute. |
| 3966 | |
Edwin Kempin | a79ea55 | 2013-11-19 11:24:37 +0100 | [diff] [blame] | 3967 | [[repository.name.defaultSubmitType]]repository.<name>.defaultSubmitType:: |
| 3968 | + |
| 3969 | The default submit type for newly created projects. Supported values |
Dave Borowitz | c8f8d2e | 2017-10-23 11:18:23 -0400 | [diff] [blame] | 3970 | are `INHERIT`, `MERGE_IF_NECESSARY`, `FAST_FORWARD_ONLY`, `REBASE_IF_NECESSARY`, |
Gert van Dijk | a4e49d0 | 2017-08-27 22:50:40 +0200 | [diff] [blame] | 3971 | `REBASE_ALWAYS`, `MERGE_ALWAYS` and `CHERRY_PICK`. |
| 3972 | + |
Changcheng Xiao | 2188598 | 2019-01-15 18:16:51 +0100 | [diff] [blame] | 3973 | For more details see link:config-project-config.html#submit-type[Submit Types]. |
Edwin Kempin | a79ea55 | 2013-11-19 11:24:37 +0100 | [diff] [blame] | 3974 | + |
Changcheng Xiao | 2188598 | 2019-01-15 18:16:51 +0100 | [diff] [blame] | 3975 | Default is link:config-project-config.html#submit_type_inherit[`INHERIT`]. |
Dave Borowitz | cad4d26 | 2018-01-22 10:02:22 -0500 | [diff] [blame] | 3976 | + |
Dave Borowitz | 03e5174 | 2018-01-09 07:57:01 -0500 | [diff] [blame] | 3977 | This submit type is only applied at project creation time if a submit type is |
| 3978 | omitted from the link:rest-api-projects.html#project-input[ProjectInput]. If the |
Dave Borowitz | cad4d26 | 2018-01-22 10:02:22 -0500 | [diff] [blame] | 3979 | submit type is unset in the project config at runtime, for backwards |
| 3980 | compatibility purposes, it defaults to |
| 3981 | link:project-configuration.html#merge_if_necessary[`MERGE_IF_NECESSARY`] rather |
| 3982 | than `INHERIT`. |
Edwin Kempin | a79ea55 | 2013-11-19 11:24:37 +0100 | [diff] [blame] | 3983 | |
Hugo Josefson | 072b470 | 2010-04-21 19:27:11 +0200 | [diff] [blame] | 3984 | [[repository.name.ownerGroup]]repository.<name>.ownerGroup:: |
| 3985 | + |
| 3986 | A name of a group which exists in the database. Zero, one or many |
| 3987 | groups are allowed. Each on its own line. Groups which don't exist |
| 3988 | in the database are ignored. |
Hugo Josefson | 072b470 | 2010-04-21 19:27:11 +0200 | [diff] [blame] | 3989 | |
Edwin Kempin | 22687fa | 2018-01-22 11:55:07 +0100 | [diff] [blame] | 3990 | [[retry]] |
| 3991 | === Section retry |
| 3992 | |
| 3993 | [[retry.maxWait]]retry.maxWait:: |
| 3994 | + |
| 3995 | Maximum time to wait between attempts to retry an operations when one attempt |
| 3996 | fails (e.g. on NoteDb updates due to contention, aka lock failure, on the |
| 3997 | underlying ref storage). Operations are retried with exponential backoff, plus |
| 3998 | some random jitter, until the interval reaches this limit. After that, retries |
| 3999 | continue to occur after a fixed timeout (plus jitter), up to |
| 4000 | link:#retry.timeout[`retry.timeout`]. |
| 4001 | + |
| 4002 | Defaults to 5 seconds; unit suffixes are supported, and assumes milliseconds if |
| 4003 | not specified. |
| 4004 | |
| 4005 | [[retry.timeout]]retry.timeout:: |
| 4006 | + |
| 4007 | Total timeout for retrying operations when one attempt fails. |
| 4008 | + |
| 4009 | It is possible to overwrite this default timeout based on operation types by |
| 4010 | setting link:#retry.operationType.timeout[`retry.<operationType>.timeout`]. |
| 4011 | + |
| 4012 | Defaults to 20 seconds; unit suffixes are supported, and assumes milliseconds if |
| 4013 | not specified. |
| 4014 | |
| 4015 | [[retry.operationType.timeout]]retry.<operationType>.timeout:: |
| 4016 | + |
| 4017 | Total timeout for retrying operations of type `<operationType>` when one |
| 4018 | attempt fails. `<operationType>` can be `ACCOUNT_UPDATE`, `CHANGE_UPDATE`, |
| 4019 | `GROUP_UPDATE` and `INDEX_QUERY`. |
| 4020 | + |
| 4021 | Defaults to link:#retry.timeout[`retry.timeout`]; unit suffixes are supported, |
| 4022 | and assumes milliseconds if not specified. |
| 4023 | |
Edwin Kempin | dd837ae | 2019-06-18 11:42:14 +0200 | [diff] [blame] | 4024 | [[retry.retryWithTraceOnFailure]]retry.retryWithTraceOnFailure:: |
| 4025 | + |
| 4026 | Whether Gerrit should automatically retry operations on failure with tracing |
| 4027 | enabled. The automatically generated traces can help with debugging. Please |
| 4028 | note that only some of the REST endpoints support automatic retry. |
| 4029 | + |
| 4030 | By default this is set to false. |
| 4031 | |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 4032 | [[rules]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4033 | === Section rules |
Shawn O. Pearce | 94860ee | 2011-09-29 13:11:08 -0700 | [diff] [blame] | 4034 | |
| 4035 | [[rules.enable]]rules.enable:: |
| 4036 | + |
Matt Baker | 8ce12fc | 2013-11-26 21:43:12 -0700 | [diff] [blame] | 4037 | 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] | 4038 | project's refs/meta/config branch, if present. When set to false, |
| 4039 | only the default internal rules will be used. |
| 4040 | + |
| 4041 | Default is true, to execute project specific rules. |
| 4042 | |
Shawn Pearce | ed001d7 | 2014-12-17 14:25:55 -0800 | [diff] [blame] | 4043 | [[rules.reductionLimit]]rules.reductionLimit:: |
| 4044 | + |
| 4045 | Maximum number of Prolog reductions that can be performed when |
| 4046 | evaluating rules for a single change. Each function call made |
| 4047 | in user rule code, internal Gerrit Prolog code, or the Prolog |
| 4048 | interpreter counts against this limit. |
| 4049 | + |
| 4050 | Sites using very complex rules that need many reductions should |
| 4051 | compile Prolog to Java bytecode with link:pgm-rulec.html[rulec]. |
| 4052 | This eliminates the dynamic Prolog interpreter from charging its |
| 4053 | own reductions against the limit, enabling more logic to execute |
| 4054 | within the same bounds. |
| 4055 | + |
| 4056 | A reductionLimit of 0 is nearly infinite, implemented by setting |
| 4057 | the internal limit to 2^31-1. |
| 4058 | + |
| 4059 | Default is 100,000 reductions (about 14 ms on Intel Core i7 CPU). |
| 4060 | |
| 4061 | [[rules.compileReductionLimit]]rules.compileReductionLimit:: |
| 4062 | + |
| 4063 | Maximum number of Prolog reductions that can be performed when |
| 4064 | compiling source code to internal Prolog machine code. |
| 4065 | + |
| 4066 | Default is 10x reductionLimit (1,000,000). |
| 4067 | |
Shawn Pearce | a2b9852 | 2015-11-21 09:47:32 -0800 | [diff] [blame] | 4068 | [[rules.maxSourceBytes]]rules.maxSourceBytes:: |
| 4069 | + |
| 4070 | Maximum input size (in bytes) of a Prolog rules.pl file. Larger |
| 4071 | source files may need a larger rules.compileReductionLimit. Consider |
| 4072 | using link:pgm-rulec.html[rulec] to precompile larger rule files. |
| 4073 | + |
| 4074 | A size of 0 bytes disables rules, same as rules.enable = false. |
| 4075 | + |
David Pursehouse | 0c1dadf | 2015-11-24 09:14:21 +0000 | [diff] [blame] | 4076 | Common unit suffixes of 'k', 'm', or 'g' are supported. |
| 4077 | + |
Shawn Pearce | a2b9852 | 2015-11-21 09:47:32 -0800 | [diff] [blame] | 4078 | Default is 128 KiB. |
| 4079 | |
| 4080 | [[rules.maxPrologDatabaseSize]]rules.maxPrologDatabaseSize:: |
| 4081 | + |
| 4082 | Number of predicate clauses allowed to be defined in the Prolog |
| 4083 | database by project rules. Very complex rules may need more than the |
| 4084 | default 256 limit, but cost more memory and may need more time to |
| 4085 | evaluate. Consider using link:pgm-rulec.html[rulec] to precompile |
| 4086 | larger rule files. |
| 4087 | + |
| 4088 | Default is 256. |
| 4089 | |
David Pursehouse | 511a35b | 2014-04-04 10:27:13 +0900 | [diff] [blame] | 4090 | [[execution]] |
| 4091 | === Section execution |
Bruce Zu | a7e3431 | 2014-04-01 17:35:41 +0800 | [diff] [blame] | 4092 | |
| 4093 | [[execution.defaultThreadPoolSize]]execution.defaultThreadPoolSize:: |
| 4094 | + |
| 4095 | The default size of the background execution thread pool in |
| 4096 | which miscellaneous tasks are handled. |
| 4097 | + |
| 4098 | Default is 1. |
| 4099 | |
Patrick Hiesel | 2ed3982 | 2018-04-16 12:04:02 +0200 | [diff] [blame] | 4100 | [[execution.fanOutThreadPoolSize]]execution.fanOutThreadPoolSize:: |
| 4101 | + |
| 4102 | Maximum size of thread pool to on which a serving thread can fan-out |
| 4103 | work to parallelize it. |
| 4104 | + |
| 4105 | When set to 0, a direct executor will be used. |
| 4106 | + |
| 4107 | By default, 25 which means that formatting happens in the caller thread. |
| 4108 | |
Patrick Hiesel | 328b761 | 2016-10-21 16:43:13 +0200 | [diff] [blame] | 4109 | [[receiveemail]] |
| 4110 | === Section receiveemail |
| 4111 | |
| 4112 | [[receiveemail.protocol]]receiveemail.protocol:: |
| 4113 | + |
| 4114 | Specifies the protocol used for receiving emails. Valid options are |
| 4115 | 'POP3', 'IMAP' and 'NONE'. Note that Gerrit will automatically switch between |
| 4116 | POP3 and POP3s as well as IMAP and IMAPS depending on the specified |
| 4117 | link:#receiveemail.encryption[encryption]. |
| 4118 | + |
| 4119 | Defaults to 'NONE' which means that receiving emails is disabled. |
| 4120 | |
| 4121 | [[receiveemail.host]]receiveemail.host:: |
| 4122 | + |
| 4123 | The hostname of the mailserver. Example: 'imap.gmail.com'. |
| 4124 | + |
| 4125 | Defaults to an empty string which means that receiving emails is disabled. |
| 4126 | |
| 4127 | [[receiveemail.port]]receiveemail.port:: |
| 4128 | + |
David Pursehouse | 4b06775 | 2017-03-03 15:54:53 +0900 | [diff] [blame] | 4129 | The port the email server exposes for receiving emails. |
Patrick Hiesel | 328b761 | 2016-10-21 16:43:13 +0200 | [diff] [blame] | 4130 | + |
| 4131 | Defaults to the industry standard for a given protocol and encryption: |
David Pursehouse | 3490744 | 2017-04-04 09:55:38 +0900 | [diff] [blame] | 4132 | POP3: 110; POP3S: 995; IMAP: 143; IMAPS: 993. |
Patrick Hiesel | 328b761 | 2016-10-21 16:43:13 +0200 | [diff] [blame] | 4133 | |
| 4134 | [[receiveemail.username]]receiveemail.username:: |
| 4135 | + |
| 4136 | Username used for authenticating with the email server. |
| 4137 | + |
| 4138 | Defaults to an empty string. |
| 4139 | |
| 4140 | [[receiveemail.password]]receiveemail.password:: |
| 4141 | + |
| 4142 | Password used for authenticating with the email server. |
| 4143 | + |
| 4144 | Defaults to an empty string. |
| 4145 | |
| 4146 | [[receiveemail.encryption]]receiveemail.encryption:: |
| 4147 | + |
| 4148 | Encryption standard used for transport layer security between Gerrit and the |
| 4149 | email server. Possible values include 'NONE', 'SSL' and 'TLS'. |
| 4150 | + |
| 4151 | Defaults to 'NONE'. |
| 4152 | |
| 4153 | [[receiveemail.fetchInterval]]receiveemail.fetchInterval:: |
| 4154 | + |
| 4155 | Time between two consecutive fetches from the email server. Communication with |
| 4156 | the email server is not kept alive. Examples: 60s, 10m, 1h. |
| 4157 | + |
| 4158 | Defaults to 60 seconds. |
| 4159 | |
| 4160 | [[receiveemail.enableImapIdle]]receiveemail.enableImapIdle:: |
| 4161 | + |
| 4162 | If the IMAP protocol is used for retrieving emails, IMAPv4 IDLE can be used to |
| 4163 | keep the connection with the email server alive and receive a push when a new |
| 4164 | email is delivered to the inbox. In this case, Gerrit will process the email |
| 4165 | immediately and will not have a fetch delay. |
Patrick Hiesel | 328b761 | 2016-10-21 16:43:13 +0200 | [diff] [blame] | 4166 | + |
| 4167 | Defaults to false. |
| 4168 | |
Patrick Hiesel | 4266cf7 | 2017-02-03 08:18:19 +0100 | [diff] [blame] | 4169 | [[receiveemail.filter.mode]]receiveemail.filter.mode:: |
| 4170 | + |
| 4171 | A black- and whitelist filter to filter incoming emails. |
| 4172 | + |
| 4173 | If `OFF`, emails are not filtered by the list filter. |
| 4174 | + |
| 4175 | If `WHITELIST`, only emails where a pattern from |
| 4176 | <<receiveemail.filter.patterns,receiveemail.filter.patterns>> |
| 4177 | matches 'From' will be processed. |
| 4178 | + |
| 4179 | If `BLACKLIST`, only emails where no pattern from |
| 4180 | <<receiveemail.filter.patterns,receiveemail.filter.patterns>> |
| 4181 | matches 'From' will be processed. |
| 4182 | + |
| 4183 | Defaults to `OFF`. |
| 4184 | |
| 4185 | [[receiveemail.filter.patterns]]receiveemail.filter.patterns:: |
| 4186 | + |
| 4187 | A list of regular expressions to match the email sender against. This can also |
| 4188 | be a list of addresses when regular expression characters are escaped. |
| 4189 | |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 4190 | [[sendemail]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4191 | === Section sendemail |
Shawn O. Pearce | b0572c6 | 2009-06-01 14:18:22 -0700 | [diff] [blame] | 4192 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 4193 | [[sendemail.enable]]sendemail.enable:: |
Shawn O. Pearce | 2e4573b | 2009-06-02 09:09:50 -0700 | [diff] [blame] | 4194 | + |
| 4195 | If false Gerrit will not send email messages, for any reason, |
| 4196 | and all other properties of section sendemail are ignored. |
| 4197 | + |
| 4198 | By default, true, allowing notifications to be sent. |
| 4199 | |
Jonathan Nieder | dabd8c2 | 2016-09-20 14:10:11 -0700 | [diff] [blame] | 4200 | [[sendemail.html]]sendemail.html:: |
| 4201 | + |
| 4202 | If false, Gerrit will only send plain-text emails. |
| 4203 | If true, Gerrit will send multi-part emails with an HTML and |
| 4204 | plain text part. |
| 4205 | + |
| 4206 | By default, true, allowing HTML in the emails Gerrit sends. |
| 4207 | |
Bruce Zu | a7e3431 | 2014-04-01 17:35:41 +0800 | [diff] [blame] | 4208 | [[sendemail.connectTimeout]]sendemail.connectTimeout:: |
| 4209 | + |
| 4210 | The connection timeout of opening a socket connected to a |
| 4211 | remote SMTP server. |
| 4212 | + |
| 4213 | Values can be specified using standard time unit abbreviations |
| 4214 | ('ms', 'sec', 'min', etc.). |
| 4215 | If no unit is specified, milliseconds is assumed. |
| 4216 | + |
| 4217 | Default is 0. A timeout of zero is interpreted as an infinite |
| 4218 | timeout. The connection will then block until established or |
| 4219 | an error occurs. |
| 4220 | |
| 4221 | [[sendemail.threadPoolSize]]sendemail.threadPoolSize:: |
| 4222 | + |
| 4223 | Maximum size of thread pool in which the review comments |
| 4224 | notifications are sent out asynchronously. |
| 4225 | + |
| 4226 | By default, 1. |
| 4227 | |
Shawn O. Pearce | 5c31bd7 | 2009-09-10 18:13:33 -0700 | [diff] [blame] | 4228 | [[sendemail.from]]sendemail.from:: |
| 4229 | + |
| 4230 | Designates what name and address Gerrit will place in the From |
| 4231 | field of any generated email messages. The supported values are: |
| 4232 | + |
| 4233 | * `USER` |
| 4234 | + |
| 4235 | Gerrit will set the From header to use the current user's |
David Pursehouse | 9246356 | 2013-06-24 10:16:28 +0900 | [diff] [blame] | 4236 | Full Name and Preferred Email. This may cause messages to be |
Shawn O. Pearce | 5c31bd7 | 2009-09-10 18:13:33 -0700 | [diff] [blame] | 4237 | classified as spam if the user's domain has SPF or DKIM enabled |
| 4238 | and <<sendemail.smtpServer,sendemail.smtpServer>> is not a trusted |
Zhen Chen | ae765aa | 2016-08-08 15:49:44 -0700 | [diff] [blame] | 4239 | relay for that domain. You can specify |
| 4240 | <<sendemail.allowedDomain,sendemail.allowedDomain>> to instruct Gerrit to only |
| 4241 | send as USER if USER is from those domains. |
Shawn O. Pearce | 5c31bd7 | 2009-09-10 18:13:33 -0700 | [diff] [blame] | 4242 | + |
| 4243 | * `MIXED` |
| 4244 | + |
Edwin Kempin | cdb0e00 | 2011-09-08 14:23:30 +0200 | [diff] [blame] | 4245 | Shorthand for `${user} (Code Review) <review@example.com>` where |
Shawn O. Pearce | 5c31bd7 | 2009-09-10 18:13:33 -0700 | [diff] [blame] | 4246 | `review@example.com` is the same as <<user.email,user.email>>. |
| 4247 | See below for a description of how the replacement is handled. |
| 4248 | + |
| 4249 | * `SERVER` |
| 4250 | + |
| 4251 | Gerrit will set the From header to the same name and address |
| 4252 | it records in any commits Gerrit creates. This is set by |
| 4253 | <<user.name,user.name>> and <<user.email,user.email>>, or guessed |
| 4254 | from the local operating system. |
| 4255 | + |
Edwin Kempin | ebfbbac | 2015-07-01 16:02:39 +0200 | [diff] [blame] | 4256 | * `Code Review <review@example.com>` |
Shawn O. Pearce | 5c31bd7 | 2009-09-10 18:13:33 -0700 | [diff] [blame] | 4257 | + |
| 4258 | If set to a name and email address in brackets, Gerrit will use |
| 4259 | this name and email address for any messages, overriding the name |
| 4260 | 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] | 4261 | Optionally, the name portion may contain the placeholder `${user}`, |
Shawn O. Pearce | 5c31bd7 | 2009-09-10 18:13:33 -0700 | [diff] [blame] | 4262 | which is replaced by the Full Name of the current user. |
| 4263 | |
| 4264 | + |
| 4265 | By default, MIXED. |
| 4266 | |
Zhen Chen | ae765aa | 2016-08-08 15:49:44 -0700 | [diff] [blame] | 4267 | [[sendemail.allowedDomain]]sendemail.allowedDomain:: |
| 4268 | + |
| 4269 | Only used when `sendemail.from` is set to `USER`. |
| 4270 | List of allowed domains. If user's email matches one of the domains, emails will |
| 4271 | be sent as USER, otherwise as MIXED mode. Wildcards may be specified by |
Maxime Guerreiro | ebac2d4 | 2018-03-21 13:54:51 +0100 | [diff] [blame] | 4272 | including `\*` to match any number of characters, for example `*.example.com` |
Zhen Chen | ae765aa | 2016-08-08 15:49:44 -0700 | [diff] [blame] | 4273 | matches any subdomain of `example.com`. |
| 4274 | + |
| 4275 | By default, `*`. |
| 4276 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 4277 | [[sendemail.smtpServer]]sendemail.smtpServer:: |
Shawn O. Pearce | b0572c6 | 2009-06-01 14:18:22 -0700 | [diff] [blame] | 4278 | + |
| 4279 | Hostname (or IP address) of a SMTP server that will relay |
| 4280 | messages generated by Gerrit to end users. |
| 4281 | + |
| 4282 | By default, 127.0.0.1 (aka localhost). |
| 4283 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 4284 | [[sendemail.smtpServerPort]]sendemail.smtpServerPort:: |
Shawn O. Pearce | b0572c6 | 2009-06-01 14:18:22 -0700 | [diff] [blame] | 4285 | + |
| 4286 | Port number of the SMTP server in sendemail.smtpserver. |
| 4287 | + |
Shawn O. Pearce | 6e9a83f | 2009-11-02 10:30:48 -0800 | [diff] [blame] | 4288 | By default, 25, or 465 if smtpEncryption is 'ssl'. |
| 4289 | |
| 4290 | [[sendemail.smtpEncryption]]sendemail.smtpEncryption:: |
| 4291 | + |
| 4292 | Specify the encryption to use, either 'ssl' or 'tls'. |
| 4293 | + |
| 4294 | By default, 'none', indicating no encryption is used. |
| 4295 | |
| 4296 | [[sendemail.sslVerify]]sendemail.sslVerify:: |
| 4297 | + |
| 4298 | If false and sendemail.smtpEncryption is 'ssl' or 'tls', Gerrit |
| 4299 | will not verify the server certificate when it connects to send |
| 4300 | an email message. |
| 4301 | + |
| 4302 | By default, true, requiring the certificate to be verified. |
Shawn O. Pearce | b0572c6 | 2009-06-01 14:18:22 -0700 | [diff] [blame] | 4303 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 4304 | [[sendemail.smtpUser]]sendemail.smtpUser:: |
Shawn O. Pearce | b0572c6 | 2009-06-01 14:18:22 -0700 | [diff] [blame] | 4305 | + |
| 4306 | User name to authenticate with, if required for relay. |
| 4307 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 4308 | [[sendemail.smtpPass]]sendemail.smtpPass:: |
Shawn O. Pearce | b0572c6 | 2009-06-01 14:18:22 -0700 | [diff] [blame] | 4309 | + |
| 4310 | Password for the account named by sendemail.smtpUser. |
| 4311 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 4312 | [[sendemail.allowrcpt]]sendemail.allowrcpt:: |
Shawn O. Pearce | 219a8ee | 2009-06-01 18:13:57 -0700 | [diff] [blame] | 4313 | + |
| 4314 | If present, each value adds one entry to the whitelist of email |
| 4315 | addresses that Gerrit can send email to. If set to a complete |
| 4316 | email address, that one address is added to the white list. |
| 4317 | If set to a domain name, any address at that domain can receive |
| 4318 | email from Gerrit. |
| 4319 | + |
| 4320 | By default, unset, permitting delivery to any email address. |
| 4321 | |
Shawn O. Pearce | 02aacbc | 2012-06-12 13:44:22 -0700 | [diff] [blame] | 4322 | [[sendemail.includeDiff]]sendemail.includeDiff:: |
| 4323 | + |
Bruce Zu | eb00ff3 | 2012-11-27 17:38:10 +0800 | [diff] [blame] | 4324 | If true, new change emails and merged change emails from Gerrit |
| 4325 | will include the complete unified diff of the change. |
| 4326 | Variable maxmimumDiffSize places an upper limit on how large the |
| 4327 | email can get when this option is enabled. |
Shawn O. Pearce | 02aacbc | 2012-06-12 13:44:22 -0700 | [diff] [blame] | 4328 | + |
| 4329 | By default, false. |
| 4330 | |
Shawn O. Pearce | 28a950b | 2012-06-12 14:36:34 -0700 | [diff] [blame] | 4331 | [[sendemail.maximumDiffSize]]sendemail.maximumDiffSize:: |
| 4332 | + |
| 4333 | Largest size of unified diff output to include in an email. When |
| 4334 | the diff exceeds this size the file paths will be listed instead. |
| 4335 | Standard byte unit suffixes are supported. |
| 4336 | + |
| 4337 | By default, 256 KiB. |
| 4338 | |
Alex Blewitt | 9cca740 | 2011-02-11 01:39:30 +0000 | [diff] [blame] | 4339 | [[sendemail.importance]]sendemail.importance:: |
| 4340 | + |
| 4341 | If present, emails sent from Gerrit will have the given level |
| 4342 | of importance. Valid values include 'high' and 'low', which |
| 4343 | email clients will render in different ways. |
| 4344 | + |
| 4345 | By default, unset, so no Importance header is generated. |
| 4346 | |
| 4347 | [[sendemail.expiryDays]]sendemail.expiryDays:: |
| 4348 | + |
| 4349 | If present, emails sent from Gerrit will expire after the given |
| 4350 | number of days. This will add the Expiry-Date header and |
| 4351 | email clients may expire or expunge mails whose Expiry-Date |
| 4352 | header is in the past. This should be a positive non-zero |
| 4353 | number indicating how many days in the future the mails |
| 4354 | should expire. |
| 4355 | + |
| 4356 | By default, unset, so no Expiry-Date header is generated. |
| 4357 | |
Patrick Hiesel | 31d60f0 | 2017-02-09 17:38:40 +0100 | [diff] [blame] | 4358 | [[sendemail.replyToAddress]]sendemail.replyToAddress:: |
| 4359 | + |
| 4360 | A custom Reply-To address should only be provided if Gerrit is set up to |
| 4361 | receive emails and the inbound address differs from |
| 4362 | <<sendemail.from,sendemail.from>>. |
| 4363 | It will be set as Reply-To header on all types of outgoing email where |
| 4364 | Gerrit can parse back a user's reply. |
| 4365 | + |
| 4366 | Defaults to an empty string which adds <<sendemail.from,sendemail.from>> as |
| 4367 | Reply-To if inbound email is enabled and the review's author otherwise. |
Shawn O. Pearce | dba9764 | 2011-09-07 20:12:31 -0700 | [diff] [blame] | 4368 | |
David Pursehouse | 917b726 | 2017-04-21 18:18:52 +0200 | [diff] [blame] | 4369 | [[sendemail.allowTLD]]sendemail.allowTLD:: |
| 4370 | + |
| 4371 | List of custom TLDs to allow sending emails to in addition to those specified |
| 4372 | in the link:http://data.iana.org/TLD/[IANA list]. |
| 4373 | + |
| 4374 | Defaults to an empty list, meaning no additional TLDs are allowed. |
| 4375 | |
Maxime Guerreiro | 8d129d4 | 2018-03-21 18:59:27 +0100 | [diff] [blame] | 4376 | |
| 4377 | [[sendemail.addInstanceNameInSubject]]sendemail.addInstanceNameInSubject:: |
| 4378 | + |
| 4379 | When set to true, Gerrit will add its short name to the email subject, allowing recipients to quickly identify |
| 4380 | what Gerrit instance the email came from. |
| 4381 | + |
| 4382 | The short name can be customized via the gerrit.instanceName option. |
| 4383 | + |
Luca Milanesio | fdfca77 | 2018-04-04 23:42:32 +0100 | [diff] [blame] | 4384 | Defaults to false. |
Maxime Guerreiro | 8d129d4 | 2018-03-21 18:59:27 +0100 | [diff] [blame] | 4385 | |
| 4386 | |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 4387 | [[site]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4388 | === Section site |
Shawn O. Pearce | dba9764 | 2011-09-07 20:12:31 -0700 | [diff] [blame] | 4389 | |
Shawn Pearce | c896eaa | 2016-08-23 19:38:58 -0700 | [diff] [blame] | 4390 | [[site.allowOriginRegex]]site.allowOriginRegex:: |
| 4391 | + |
| 4392 | List of regular expressions matching origins that should be permitted |
Shawn Pearce | 53ebad4 | 2017-06-10 11:14:20 -0700 | [diff] [blame] | 4393 | to use the full Gerrit REST API. These should be trusted applications, |
| 4394 | as the sites may be able to use the user's credentials. Applies to |
| 4395 | all requests, including state changing methods (PUT, DELETE, POST). |
| 4396 | + |
| 4397 | Expressions should not require trailing slash. For example a valid |
| 4398 | pattern might be `https://build-status[.]example[.]com`. |
Shawn Pearce | c896eaa | 2016-08-23 19:38:58 -0700 | [diff] [blame] | 4399 | + |
| 4400 | By default, unset, denying all cross-origin requests. |
| 4401 | |
Shawn O. Pearce | dba9764 | 2011-09-07 20:12:31 -0700 | [diff] [blame] | 4402 | [[site.refreshHeaderFooter]]site.refreshHeaderFooter:: |
| 4403 | + |
| 4404 | If true the server checks the site header, footer and CSS files for |
| 4405 | updated versions. If false, a server restart is required to change |
| 4406 | any of these resources. Default is true, allowing automatic reloads. |
| 4407 | |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 4408 | [[ssh-alias]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4409 | === Section ssh-alias |
Shawn O. Pearce | 521380a | 2012-05-11 14:57:56 -0700 | [diff] [blame] | 4410 | |
| 4411 | Variables in section ssh-alias permit the site administrator to alias |
| 4412 | another command from Gerrit or a plugin into the `gerrit` command |
| 4413 | namespace. To alias `replication start` to `gerrit replicate`: |
| 4414 | |
| 4415 | ---- |
| 4416 | [ssh-alias] |
| 4417 | replicate = replication start |
| 4418 | ---- |
Shawn O. Pearce | dba9764 | 2011-09-07 20:12:31 -0700 | [diff] [blame] | 4419 | |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 4420 | [[sshd]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4421 | === Section sshd |
Shawn O. Pearce | 9410f2c | 2009-05-14 10:26:47 -0700 | [diff] [blame] | 4422 | |
Gustaf Lundh | d60e90f | 2015-08-03 16:18:33 +0200 | [diff] [blame] | 4423 | [[sshd.enableCompression]]sshd.enableCompression:: |
| 4424 | + |
| 4425 | In the general case, we want to disable transparent compression, since |
| 4426 | the majority of our data transfer is highly compressed Git pack files |
| 4427 | and we cannot make them any smaller than they already are. |
| 4428 | + |
| 4429 | However, if there are CPU in abundance and the server is reachable |
| 4430 | through slow networks, gits with huge amount of refs can benefit from |
| 4431 | SSH-compression since git does not compress the ref announcement during |
| 4432 | handshake. |
| 4433 | + |
Han-Wen Nienhuys | 348a603 | 2019-09-24 19:44:57 +0200 | [diff] [blame] | 4434 | Compression can be especially useful when Gerrit replicas are being used |
Gustaf Lundh | d60e90f | 2015-08-03 16:18:33 +0200 | [diff] [blame] | 4435 | for the larger clones and fetches and the master server mostly takes |
| 4436 | small receive-packs. |
| 4437 | + |
| 4438 | By default, `false`. |
| 4439 | |
David Ostrovsky | e2921b6 | 2015-03-04 22:36:10 +0100 | [diff] [blame] | 4440 | [[sshd.backend]]sshd.backend:: |
| 4441 | + |
| 4442 | Starting from version 0.9.0 Apache SSHD project added support for NIO2 |
Orgad Shaneh | b7bb735 | 2019-09-19 10:26:19 +0300 | [diff] [blame] | 4443 | IoSession. To use the old MINA session the `backend` option must be set |
| 4444 | to `MINA`. |
David Ostrovsky | e2921b6 | 2015-03-04 22:36:10 +0100 | [diff] [blame] | 4445 | + |
Luca Milanesio | fc1ed9c | 2016-03-01 18:28:36 +0000 | [diff] [blame] | 4446 | By default, `NIO2`. |
David Ostrovsky | e2921b6 | 2015-03-04 22:36:10 +0100 | [diff] [blame] | 4447 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 4448 | [[sshd.listenAddress]]sshd.listenAddress:: |
Shawn O. Pearce | 1d3cb444 | 2009-05-30 14:03:31 -0700 | [diff] [blame] | 4449 | + |
| 4450 | Specifies the local addresses the internal SSHD should listen |
| 4451 | for connections on. The following forms may be used to specify |
| 4452 | an address. In any form, `:'port'` may be omitted to use the |
David Pursehouse | a3af255 | 2016-08-02 14:04:44 +0900 | [diff] [blame] | 4453 | default of `29418`. |
Shawn O. Pearce | 1d3cb444 | 2009-05-30 14:03:31 -0700 | [diff] [blame] | 4454 | + |
David Pursehouse | a3af255 | 2016-08-02 14:04:44 +0900 | [diff] [blame] | 4455 | * `'hostname':'port'` (for example `review.example.com:29418`) |
| 4456 | * `'IPv4':'port'` (for example `10.0.0.1:29418`) |
| 4457 | * `['IPv6']:'port'` (for example `[ff02::1]:29418`) |
| 4458 | * `+*:'port'+` (for example `+*:29418+`) |
Shawn O. Pearce | 1d3cb444 | 2009-05-30 14:03:31 -0700 | [diff] [blame] | 4459 | |
| 4460 | + |
Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 4461 | -- |
Shawn O. Pearce | 1d3cb444 | 2009-05-30 14:03:31 -0700 | [diff] [blame] | 4462 | If multiple values are supplied, the daemon will listen on all |
| 4463 | of them. |
Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 4464 | |
Shawn O. Pearce | 6af6f5f | 2010-06-08 17:38:43 -0700 | [diff] [blame] | 4465 | To disable the internal SSHD, set listenAddress to `off`. |
Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 4466 | |
David Pursehouse | a3af255 | 2016-08-02 14:04:44 +0900 | [diff] [blame] | 4467 | By default, `*:29418`. |
Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 4468 | -- |
Shawn O. Pearce | 1d3cb444 | 2009-05-30 14:03:31 -0700 | [diff] [blame] | 4469 | |
James Y Knight | 910bd86 | 2011-01-11 20:05:56 -0500 | [diff] [blame] | 4470 | [[sshd.advertisedAddress]]sshd.advertisedAddress:: |
| 4471 | + |
| 4472 | Specifies the addresses clients should be told to connect to. |
| 4473 | This may differ from sshd.listenAddress if a firewall based port |
| 4474 | redirector is being used, making Gerrit appear to answer on port |
| 4475 | 22. The following forms may be used to specify an address. In any |
| 4476 | 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] | 4477 | |
David Pursehouse | a3af255 | 2016-08-02 14:04:44 +0900 | [diff] [blame] | 4478 | * `'hostname':'port'` (for example `review.example.com:22`) |
| 4479 | * `'IPv4':'port'` (for example `10.0.0.1:29418`) |
| 4480 | * `['IPv6']:'port'` (for example `[ff02::1]:29418`) |
James Y Knight | 910bd86 | 2011-01-11 20:05:56 -0500 | [diff] [blame] | 4481 | |
| 4482 | + |
Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 4483 | -- |
James Y Knight | 910bd86 | 2011-01-11 20:05:56 -0500 | [diff] [blame] | 4484 | If multiple values are supplied, the daemon will advertise all |
| 4485 | of them. |
Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 4486 | |
David Pursehouse | a3af255 | 2016-08-02 14:04:44 +0900 | [diff] [blame] | 4487 | By default uses the value of `sshd.listenAddress`. |
Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 4488 | -- |
James Y Knight | 910bd86 | 2011-01-11 20:05:56 -0500 | [diff] [blame] | 4489 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 4490 | [[sshd.tcpKeepAlive]]sshd.tcpKeepAlive:: |
Shawn O. Pearce | fc9081f | 2009-05-14 10:26:59 -0700 | [diff] [blame] | 4491 | + |
| 4492 | If true, enables TCP keepalive messages to the other side, so |
| 4493 | the daemon can terminate connections if the peer disappears. |
| 4494 | + |
David Ostrovsky | e5b7f1a | 2013-10-23 21:10:39 +0200 | [diff] [blame] | 4495 | Only effective when `sshd.backend` is set to `MINA`. |
| 4496 | + |
David Pursehouse | a3af255 | 2016-08-02 14:04:44 +0900 | [diff] [blame] | 4497 | By default, `true`. |
Shawn O. Pearce | fc9081f | 2009-05-14 10:26:59 -0700 | [diff] [blame] | 4498 | |
Shawn O. Pearce | 1a4580b | 2009-11-19 17:37:10 -0800 | [diff] [blame] | 4499 | [[sshd.threads]]sshd.threads:: |
| 4500 | + |
| 4501 | Number of threads to use when executing SSH command requests. |
| 4502 | If additional requests are received while all threads are busy they |
David Pursehouse | 221d4f6 | 2012-06-08 17:38:08 +0900 | [diff] [blame] | 4503 | are queued and serviced in a first-come-first-served order. |
Shawn O. Pearce | 1a4580b | 2009-11-19 17:37:10 -0800 | [diff] [blame] | 4504 | + |
Florian Klink | 2a38946 | 2019-07-23 14:14:32 +0200 | [diff] [blame] | 4505 | By default, 2x the number of CPUs available to the JVM (but at least 4 |
| 4506 | threads). |
Saša Živkov | 3d4ed9f | 2017-10-13 15:30:29 +0200 | [diff] [blame] | 4507 | + |
| 4508 | [NOTE] |
| 4509 | When SSH daemon is enabled then this setting also defines the max number of |
| 4510 | concurrent Git requests for interactive users over SSH and HTTP together. |
Shawn O. Pearce | 1a4580b | 2009-11-19 17:37:10 -0800 | [diff] [blame] | 4511 | |
Nico Sallembien | fc53f7f | 2010-05-18 16:40:10 -0700 | [diff] [blame] | 4512 | [[sshd.batchThreads]]sshd.batchThreads:: |
| 4513 | + |
| 4514 | Number of threads to allocate for SSH command requests from |
Fredrik Luthander | 4684302 | 2012-03-13 16:11:02 +0100 | [diff] [blame] | 4515 | link:access-control.html#non-interactive_users[non-interactive users]. |
| 4516 | If equals to 0, then all non-interactive requests are executed in the same |
| 4517 | queue as interactive requests. |
Nico Sallembien | fc53f7f | 2010-05-18 16:40:10 -0700 | [diff] [blame] | 4518 | + |
| 4519 | Any other value will remove the number of threads from the queue |
| 4520 | allocated to interactive users, and create a separate thread pool |
| 4521 | of the requested size, which will be used to run commands from |
| 4522 | non-interactive users. |
| 4523 | + |
| 4524 | If the number of threads requested for non-interactive users is larger |
| 4525 | than the total number of threads allocated in sshd.threads, then the |
David Pursehouse | 9246356 | 2013-06-24 10:16:28 +0900 | [diff] [blame] | 4526 | value of sshd.threads is increased to accommodate the requested value. |
Nico Sallembien | fc53f7f | 2010-05-18 16:40:10 -0700 | [diff] [blame] | 4527 | + |
Dariusz Luksza | 145de47 | 2015-11-09 18:44:35 +0100 | [diff] [blame] | 4528 | By default is 1 on single core node, 2 otherwise. |
Saša Živkov | 3d4ed9f | 2017-10-13 15:30:29 +0200 | [diff] [blame] | 4529 | + |
| 4530 | [NOTE] |
| 4531 | When SSH daemon is enabled then this setting also defines the max number of |
| 4532 | concurrent Git requests for batch users over SSH and HTTP together. |
Nico Sallembien | fc53f7f | 2010-05-18 16:40:10 -0700 | [diff] [blame] | 4533 | |
Kenny Root | 15ac1b8 | 2010-02-24 00:29:20 -0800 | [diff] [blame] | 4534 | [[sshd.streamThreads]]sshd.streamThreads:: |
| 4535 | + |
| 4536 | Number of threads to use when formatting events to asynchronous |
| 4537 | streaming clients. Event formatting is multiplexed onto this thread |
| 4538 | pool by a simple FIFO scheduling system. |
| 4539 | + |
| 4540 | By default, 1 plus the number of CPUs available to the JVM. |
| 4541 | |
Edwin Kempin | b5df3b8 | 2011-10-10 11:31:14 +0200 | [diff] [blame] | 4542 | [[sshd.commandStartThreads]]sshd.commandStartThreads:: |
Shawn O. Pearce | d629655 | 2011-05-15 13:56:30 -0700 | [diff] [blame] | 4543 | + |
| 4544 | Number of threads used to parse a command line submitted by a client |
| 4545 | over SSH for execution, create the internal data structures used by |
| 4546 | that command, and schedule it for execution on another thread. |
| 4547 | + |
| 4548 | By default, 2. |
| 4549 | |
Shawn O. Pearce | 8a0bf36 | 2010-11-05 17:49:41 -0700 | [diff] [blame] | 4550 | [[sshd.maxAuthTries]]sshd.maxAuthTries:: |
| 4551 | + |
| 4552 | Maximum number of authentication attempts before the server |
| 4553 | disconnects the client. Each public key that a client has loaded |
| 4554 | into its local agent counts as one auth request. Users can work |
| 4555 | around the server's limit by loading less keys into their agent, |
| 4556 | or selecting a specific key in their `~/.ssh/config` file with |
| 4557 | the `IdentityFile` option. |
| 4558 | + |
| 4559 | By default, 6. |
| 4560 | |
| 4561 | [[sshd.loginGraceTime]]sshd.loginGraceTime:: |
| 4562 | + |
| 4563 | Time in seconds that a client has to authenticate before the server |
| 4564 | automatically terminates their connection. Values should use common |
| 4565 | unit suffixes to express their setting: |
| 4566 | + |
| 4567 | * s, sec, second, seconds |
| 4568 | * m, min, minute, minutes |
| 4569 | * h, hr, hour, hours |
| 4570 | * d, day, days |
| 4571 | |
| 4572 | + |
| 4573 | By default, 2 minutes. |
| 4574 | |
Christian Aistleitner | 3d79459 | 2013-04-08 00:19:40 +0200 | [diff] [blame] | 4575 | [[sshd.idleTimeout]]sshd.idleTimeout:: |
| 4576 | + |
| 4577 | Time in seconds after which the server automatically terminates idle |
Luca Milanesio | 9ba08ea | 2017-10-16 16:04:28 +0000 | [diff] [blame] | 4578 | connections (or 0 to disable closing of idle connections) not waiting for |
| 4579 | any server operation to complete. |
| 4580 | Values should use common unit suffixes to express their setting: |
Christian Aistleitner | 3d79459 | 2013-04-08 00:19:40 +0200 | [diff] [blame] | 4581 | + |
| 4582 | * s, sec, second, seconds |
| 4583 | * m, min, minute, minutes |
| 4584 | * h, hr, hour, hours |
| 4585 | * d, day, days |
| 4586 | |
| 4587 | + |
| 4588 | By default, 0. |
| 4589 | |
Paladox none | daafdb6 | 2017-10-14 16:18:42 +0000 | [diff] [blame] | 4590 | [[sshd.waitTimeout]]sshd.waitTimeout:: |
| 4591 | + |
Luca Milanesio | 9ba08ea | 2017-10-16 16:04:28 +0000 | [diff] [blame] | 4592 | Time in seconds after which the server automatically terminates |
| 4593 | connections waiting for a server operation to complete, like for instance |
| 4594 | cloning a very large repo with lots of refs. |
Paladox none | daafdb6 | 2017-10-14 16:18:42 +0000 | [diff] [blame] | 4595 | Values should use common unit suffixes to express their setting: |
| 4596 | + |
| 4597 | * s, sec, second, seconds |
| 4598 | * m, min, minute, minutes |
| 4599 | * h, hr, hour, hours |
| 4600 | * d, day, days |
| 4601 | |
| 4602 | + |
| 4603 | By default, 30s. |
| 4604 | |
Shawn O. Pearce | 8a0bf36 | 2010-11-05 17:49:41 -0700 | [diff] [blame] | 4605 | [[sshd.maxConnectionsPerUser]]sshd.maxConnectionsPerUser:: |
| 4606 | + |
| 4607 | Maximum number of concurrent SSH sessions that a user account |
| 4608 | 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] | 4609 | 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] | 4610 | the number of commands a user may issue over a single connection. |
| 4611 | If set to 0, there is no limit. |
| 4612 | + |
| 4613 | By default, 64. |
| 4614 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 4615 | [[sshd.cipher]]sshd.cipher:: |
Shawn O. Pearce | 0bf2f52 | 2009-05-14 11:02:03 -0700 | [diff] [blame] | 4616 | + |
| 4617 | Available ciphers. To permit multiple ciphers, specify multiple |
| 4618 | `sshd.cipher` keys in the configuration file, one cipher name |
| 4619 | per key. Cipher names starting with `+` are enabled in addition |
| 4620 | to the default ciphers, cipher names starting with `-` are removed |
| 4621 | from the default cipher set. |
| 4622 | + |
Gert van Dijk | cc03e8a | 2017-10-23 23:45:24 +0200 | [diff] [blame] | 4623 | Supported ciphers: |
| 4624 | + |
| 4625 | * `aes128-ctr` |
| 4626 | * `aes192-ctr` |
| 4627 | * `aes256-ctr` |
| 4628 | * `aes128-cbc` |
| 4629 | * `aes192-cbc` |
| 4630 | * `aes256-cbc` |
| 4631 | * `blowfish-cbc` |
| 4632 | * `3des-cbc` |
| 4633 | * `arcfour128` |
| 4634 | * `arcfour256` |
| 4635 | * `none` |
Shawn O. Pearce | 0bf2f52 | 2009-05-14 11:02:03 -0700 | [diff] [blame] | 4636 | + |
| 4637 | By default, all supported ciphers except `none` are available. |
Gert van Dijk | cc03e8a | 2017-10-23 23:45:24 +0200 | [diff] [blame] | 4638 | + |
| 4639 | If your setup allows for it, it's recommended to disable all ciphers except |
| 4640 | the AES-CTR modes. |
Shawn O. Pearce | 0bf2f52 | 2009-05-14 11:02:03 -0700 | [diff] [blame] | 4641 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 4642 | [[sshd.mac]]sshd.mac:: |
Shawn O. Pearce | 0bf2f52 | 2009-05-14 11:02:03 -0700 | [diff] [blame] | 4643 | + |
| 4644 | Available MAC (message authentication code) algorithms. To permit |
| 4645 | multiple algorithms, specify multiple `sshd.mac` keys in the |
| 4646 | configuration file, one MAC per key. MAC names starting with `+` |
| 4647 | are enabled in addition to the default MACs, MAC names starting with |
| 4648 | `-` are removed from the default MACs. |
| 4649 | + |
Gert van Dijk | cc03e8a | 2017-10-23 23:45:24 +0200 | [diff] [blame] | 4650 | Supported MACs: |
| 4651 | + |
| 4652 | * `hmac-md5` |
| 4653 | * `hmac-md5-96` |
| 4654 | * `hmac-sha1` |
| 4655 | * `hmac-sha1-96` |
| 4656 | * `hmac-sha2-256` |
| 4657 | * `hmac-sha2-512` |
Shawn O. Pearce | 0bf2f52 | 2009-05-14 11:02:03 -0700 | [diff] [blame] | 4658 | + |
| 4659 | By default, all supported MACs are available. |
| 4660 | |
Scott Dial | b4a04fa | 2016-03-15 09:44:11 -0400 | [diff] [blame] | 4661 | [[sshd.kex]]sshd.kex:: |
| 4662 | + |
| 4663 | -- |
| 4664 | Available key exchange algorithms. To permit multiple algorithms, |
| 4665 | specify multiple `sshd.kex` keys in the configuration file, one key |
| 4666 | exchange algorithm per key. Key exchange algorithm names starting |
| 4667 | with `+` are enabled in addition to the default key exchange |
| 4668 | algorithms, key exchange algorithm names starting with `-` are |
| 4669 | removed from the default key exchange algorithms. |
| 4670 | |
| 4671 | In the following example configuration, support for the 1024-bit |
| 4672 | `diffie-hellman-group1-sha1` key exchange is disabled while leaving |
| 4673 | all of the other default algorithms enabled: |
| 4674 | |
| 4675 | ---- |
| 4676 | [sshd] |
| 4677 | kex = -diffie-hellman-group1-sha1 |
| 4678 | ---- |
| 4679 | |
| 4680 | Supported key exchange algorithms: |
| 4681 | |
| 4682 | * `ecdh-sha2-nistp521` |
| 4683 | * `ecdh-sha2-nistp384` |
| 4684 | * `ecdh-sha2-nistp256` |
| 4685 | * `diffie-hellman-group-exchange-sha256` |
| 4686 | * `diffie-hellman-group-exchange-sha1` |
| 4687 | * `diffie-hellman-group14-sha1` |
| 4688 | * `diffie-hellman-group1-sha1` |
| 4689 | |
| 4690 | By default, all supported key exchange algorithms are available. |
Gert van Dijk | cc03e8a | 2017-10-23 23:45:24 +0200 | [diff] [blame] | 4691 | |
| 4692 | It is strongly recommended to disable at least `diffie-hellman-group1-sha1` |
| 4693 | as it's known to be vulnerable (logjam attack). Additionally, if your setup |
| 4694 | allows for it, it is recommended to disable the remaining two `sha1` key |
| 4695 | exchange algorithms. |
Scott Dial | b4a04fa | 2016-03-15 09:44:11 -0400 | [diff] [blame] | 4696 | -- |
| 4697 | |
Alex Blewitt | 7efb06f | 2013-04-01 12:46:48 -0400 | [diff] [blame] | 4698 | [[sshd.kerberosKeytab]]sshd.kerberosKeytab:: |
| 4699 | + |
| 4700 | Enable kerberos authentication for SSH connections. To permit |
| 4701 | kerberos authentication, the server must have a host principal |
| 4702 | (see `sshd.kerberosPrincipal`) which is acquired from a keytab. |
| 4703 | This must be provisioned by the kerberos administrators, and is |
| 4704 | typically installed into `/etc/krb5.keytab` on host machines. |
| 4705 | + |
| 4706 | The keytab must contain at least one `host/` principal, typically |
| 4707 | using the host's canonical name. If it does not use the |
| 4708 | canonical name, the `sshd.kerberosPrincipal` should be configured |
| 4709 | with the correct name. |
| 4710 | + |
| 4711 | By default, not set and so kerberos authentication is not enabled. |
| 4712 | |
| 4713 | [[sshd.kerberosPrincipal]]sshd.kerberosPrincipal:: |
| 4714 | + |
| 4715 | If kerberos authentication is enabled with `sshd.kerberosKeytab`, |
| 4716 | instead use the given principal name instead of the default. |
| 4717 | If the principal does not begin with `host/` a warning message is |
| 4718 | printed and may prevent successful authentication. |
| 4719 | + |
| 4720 | This may be useful if the host is behind an IP load balancer or |
| 4721 | other SSH forwarding systems, since the principal name is constructed |
| 4722 | by the client and must match for kerberos authentication to work. |
| 4723 | + |
| 4724 | By default, `host/canonical.host.name` |
| 4725 | |
Shawn Pearce | 318bfca | 2013-10-17 22:15:38 -0700 | [diff] [blame] | 4726 | [[sshd.requestLog]]sshd.requestLog:: |
| 4727 | + |
| 4728 | Enable (or disable) the `'$site_path'/logs/sshd_log` request log. |
| 4729 | If enabled, a request log file is written out by the SSH daemon. |
| 4730 | + |
David Ostrovsky | 8e4a990 | 2013-11-19 23:57:48 +0100 | [diff] [blame] | 4731 | `log4j.appender` with the name `sshd_log` can be configured to overwrite |
| 4732 | programmatic configuration. |
| 4733 | + |
David Pursehouse | a3af255 | 2016-08-02 14:04:44 +0900 | [diff] [blame] | 4734 | By default, `true`. |
Gustaf Lundh | 4e85993 | 2018-04-16 10:56:31 +0200 | [diff] [blame] | 4735 | + |
Sven Selberg | 2a0beab | 2018-04-20 14:49:20 +0200 | [diff] [blame] | 4736 | This value supports link:#reloadConfig[configuration reloads]. |
Shawn Pearce | 318bfca | 2013-10-17 22:15:38 -0700 | [diff] [blame] | 4737 | |
David Ostrovsky | 985201b | 2015-03-04 22:37:33 +0100 | [diff] [blame] | 4738 | [[sshd.rekeyBytesLimit]]sshd.rekeyBytesLimit:: |
| 4739 | + |
| 4740 | The SSH daemon will issue a rekeying after a certain amount of data. |
| 4741 | This configuration option allows you to tweak that setting. |
| 4742 | + |
| 4743 | By default, 1073741824 (bytes, 1GB). |
| 4744 | + |
David Pursehouse | a3af255 | 2016-08-02 14:04:44 +0900 | [diff] [blame] | 4745 | The `rekeyBytesLimit` cannot be set to lower than 32. |
David Ostrovsky | 985201b | 2015-03-04 22:37:33 +0100 | [diff] [blame] | 4746 | |
| 4747 | [[sshd.rekeyTimeLimit]]sshd.rekeyTimeLimit:: |
| 4748 | + |
| 4749 | The SSH daemon will issue a rekeying after a certain amount of time. |
| 4750 | This configuration option allows you to tweak that setting. |
| 4751 | + |
| 4752 | By default, 1h. |
| 4753 | + |
| 4754 | Set to 0 to disable this check. |
| 4755 | |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 4756 | [[suggest]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4757 | === Section suggest |
Shawn O. Pearce | 07bd6fb | 2011-04-29 19:15:47 -0700 | [diff] [blame] | 4758 | |
Sven Selberg | 42d9d29 | 2014-08-13 11:20:11 +0200 | [diff] [blame] | 4759 | [[suggest.maxSuggestedReviewers]]suggest.maxSuggestedReviewers:: |
| 4760 | + |
| 4761 | The maximum numbers of reviewers suggested. |
| 4762 | + |
| 4763 | By default 10. |
Gustaf Lundh | 25e608f | 2018-04-16 10:54:53 +0200 | [diff] [blame] | 4764 | + |
Sven Selberg | 2a0beab | 2018-04-20 14:49:20 +0200 | [diff] [blame] | 4765 | This value supports link:#reloadConfig[configuration reloads]. |
Sven Selberg | 42d9d29 | 2014-08-13 11:20:11 +0200 | [diff] [blame] | 4766 | |
Edwin Kempin | f957dc2 | 2012-10-19 20:41:18 +0200 | [diff] [blame] | 4767 | [[suggest.from]]suggest.from:: |
| 4768 | + |
| 4769 | The number of characters that a user must have typed before suggestions |
Patrick Hiesel | 87880b0 | 2016-05-03 18:15:08 +0200 | [diff] [blame] | 4770 | are provided. If set to 0, suggestions are always provided. This is only |
| 4771 | used for suggesting accounts when adding members to a group. |
Edwin Kempin | f957dc2 | 2012-10-19 20:41:18 +0200 | [diff] [blame] | 4772 | + |
| 4773 | By default 0. |
| 4774 | |
Edwin Kempin | 0a49eca | 2019-06-21 09:38:46 +0200 | [diff] [blame] | 4775 | [[tracing]] |
| 4776 | === Section tracing |
| 4777 | |
| 4778 | [[tracing.performanceLogging]]tracing.performanceLogging:: |
| 4779 | + |
| 4780 | Whether performance logging is enabled. |
| 4781 | + |
| 4782 | When performance logging is enabled, performance events for some |
| 4783 | operations are collected in memory while a request is running. At the |
| 4784 | end of the request the performance events are handed over to the |
| 4785 | link:dev-plugins.html#performance-logger[PerformanceLogger] plugins. |
| 4786 | This means if performance logging is enabled, the memory footprint of |
| 4787 | requests is slightly increased. |
| 4788 | + |
| 4789 | This setting has no effect if no |
| 4790 | link:dev-plugins.html#performance-logger[PerformanceLogger] plugins are |
| 4791 | installed, because then performance logging is always disabled. |
| 4792 | + |
| 4793 | By default, true. |
| 4794 | |
Edwin Kempin | 2cba298 | 2019-07-05 13:19:43 +0200 | [diff] [blame] | 4795 | [[tracing.traceid]] |
| 4796 | ==== Subsection tracing.<trace-id> |
| 4797 | |
| 4798 | There can be multiple `tracing.<trace-id>` subsections to configure |
| 4799 | automatic tracing of requests. To be traced a request must match all |
| 4800 | conditions of one `tracing.<trace-id>` subsection. The subsection name |
| 4801 | is used as trace ID. Using this trace ID administrators can find |
| 4802 | matching log entries. |
| 4803 | |
| 4804 | [[tracing.traceid.requestType]]tracing.<trace-id>.requestType:: |
| 4805 | + |
| 4806 | Type of request for which request tracing should be always enabled (can |
| 4807 | be `GIT_RECEIVE`, `GIT_UPLOAD`, `REST` and `SSH`). |
| 4808 | + |
| 4809 | May be specified multiple times. |
| 4810 | + |
| 4811 | By default, unset (all request types are matched). |
| 4812 | |
Edwin Kempin | b0ddb0b | 2019-07-08 12:11:32 +0200 | [diff] [blame] | 4813 | [[tracing.traceid.requestUriPattern]]tracing.<trace-id>.requestUriPattern:: |
| 4814 | + |
| 4815 | Regular expression to match request URIs for which request tracing |
| 4816 | should be always enabled. Request URIs are only available for REST |
| 4817 | requests. Request URIs never include the '/a' prefix. |
| 4818 | + |
| 4819 | May be specified multiple times. |
| 4820 | + |
| 4821 | By default, unset (all request URIs are matched). |
| 4822 | |
Edwin Kempin | 2cba298 | 2019-07-05 13:19:43 +0200 | [diff] [blame] | 4823 | [[tracing.traceid.account]]tracing.<trace-id>.account:: |
| 4824 | + |
| 4825 | Account ID of an account for which request tracing should be always |
| 4826 | enabled. |
| 4827 | + |
| 4828 | May be specified multiple times. |
| 4829 | + |
| 4830 | By default, unset (all accounts are matched). |
| 4831 | |
| 4832 | [[tracing.traceid.projectPattern]]tracing.<trace-id>.projectPattern:: |
| 4833 | + |
| 4834 | Regular expression to match project names for which request tracing |
| 4835 | should be always enabled. |
| 4836 | + |
| 4837 | May be specified multiple times. |
| 4838 | + |
| 4839 | By default, unset (all projects are matched). |
| 4840 | |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 4841 | [[trackingid]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4842 | === Section trackingid |
Goran Lungberg | 04132a1 | 2010-06-15 17:20:37 -0700 | [diff] [blame] | 4843 | |
Shawn O. Pearce | e800b1e | 2010-06-16 17:33:43 -0700 | [diff] [blame] | 4844 | Tagged footer lines containing references to external |
| 4845 | tracking systems, parsed out of the commit message and |
David Pursehouse | d55a6b6 | 2015-02-27 17:39:38 +0900 | [diff] [blame] | 4846 | saved in Gerrit's secondary index. |
Shawn Pearce | ff61c8a | 2013-10-07 19:35:53 -0700 | [diff] [blame] | 4847 | |
| 4848 | After making changes to this section, existing changes |
Shawn Pearce | 9f4de52 | 2013-11-29 11:57:53 -0800 | [diff] [blame] | 4849 | must be reindexed with link:pgm-reindex.html[reindex]. |
Goran Lungberg | 04132a1 | 2010-06-15 17:20:37 -0700 | [diff] [blame] | 4850 | |
Edwin Kempin | bb421f1 | 2011-08-25 11:19:00 +0200 | [diff] [blame] | 4851 | The tracking ids are searchable using tr:<tracking id> or |
Shawn O. Pearce | 91763a0 | 2010-06-16 15:39:33 -0700 | [diff] [blame] | 4852 | bug:<tracking id>. |
Goran Lungberg | 04132a1 | 2010-06-15 17:20:37 -0700 | [diff] [blame] | 4853 | |
| 4854 | ---- |
| 4855 | [trackingid "jira-bug"] |
| 4856 | footer = Bugfix: |
David Pursehouse | ce7f686 | 2015-02-19 14:52:45 +0900 | [diff] [blame] | 4857 | footer = Bug: |
Goran Lungberg | 04132a1 | 2010-06-15 17:20:37 -0700 | [diff] [blame] | 4858 | match = JRA\\d{2,8} |
| 4859 | system = JIRA |
| 4860 | |
| 4861 | [trackingid "jira-feature"] |
| 4862 | footer = Feature |
| 4863 | match = JRA(\\d{2,8}) |
| 4864 | system = JIRA |
| 4865 | ---- |
| 4866 | |
| 4867 | [[trackingid.name.footer]]trackingid.<name>.footer:: |
| 4868 | + |
David Pursehouse | ce7f686 | 2015-02-19 14:52:45 +0900 | [diff] [blame] | 4869 | A prefix tag that identifies the footer line to parse for tracking ids. |
| 4870 | + |
| 4871 | Several trackingid entries can have the same footer tag, and a single trackingid |
| 4872 | entry can have multiple footer tags. |
| 4873 | + |
| 4874 | If multiple footer tags are specified, each tag will be parsed separately and |
| 4875 | duplicates will be ignored. |
| 4876 | + |
| 4877 | The trailing ":" is optional. |
Goran Lungberg | 04132a1 | 2010-06-15 17:20:37 -0700 | [diff] [blame] | 4878 | |
| 4879 | [[trackingid.name.match]]trackingid.<name>.match:: |
| 4880 | + |
Magnus Bäck | e561183 | 2011-02-02 08:57:15 +0100 | [diff] [blame] | 4881 | A link:http://download.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html[standard |
| 4882 | Java regular expression (java.util.regex)] used to match the |
| 4883 | external tracking id part of the footer line. The match can |
| 4884 | result in several entries in the DB. If grouping is used in the |
| 4885 | regex the first group will be interpreted as the tracking id. |
Christian Aistleitner | 5cec368 | 2013-03-16 23:02:37 +0100 | [diff] [blame] | 4886 | Tracking ids longer than 32 characters will be ignored. |
Goran Lungberg | 04132a1 | 2010-06-15 17:20:37 -0700 | [diff] [blame] | 4887 | + |
| 4888 | The configuration file parser eats one level of backslashes, so the |
| 4889 | character class `\s` requires `\\s` in the configuration file. The |
| 4890 | parser also terminates the line at the first `#`, so a match |
| 4891 | expression containing # must be wrapped in double quotes. |
| 4892 | |
| 4893 | [[trackingid.name.system]]trackingid.<name>.system:: |
| 4894 | + |
David Pursehouse | 221d4f6 | 2012-06-08 17:38:08 +0900 | [diff] [blame] | 4895 | The name of the external tracking system (maximum 10 characters). |
Goran Lungberg | 04132a1 | 2010-06-15 17:20:37 -0700 | [diff] [blame] | 4896 | It is possible to have several trackingid entries for the same |
| 4897 | tracking system. |
| 4898 | |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 4899 | [[transfer]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4900 | === Section transfer |
Shawn O. Pearce | 6e4dfdd | 2010-05-12 17:26:08 -0700 | [diff] [blame] | 4901 | |
| 4902 | [[transfer.timeout]]transfer.timeout:: |
| 4903 | + |
| 4904 | Number of seconds to wait for a single network read or write |
| 4905 | to complete before giving up and declaring the remote side is |
| 4906 | not responding. If 0, there is no timeout, and this server will |
| 4907 | wait indefinitely for a transfer to finish. |
| 4908 | + |
| 4909 | A timeout should be large enough to mostly transfer the objects to |
| 4910 | the other side. 1 second may be too small for larger projects, |
| 4911 | especially over a WAN link, while 10-30 seconds is a much more |
| 4912 | reasonable timeout value. |
| 4913 | + |
| 4914 | Defaults to 0 seconds, wait indefinitely. |
| 4915 | |
lincoln | 2be1160 | 2010-07-05 10:53:25 -0300 | [diff] [blame] | 4916 | |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 4917 | [[upload]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4918 | === Section upload |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 4919 | |
Dave Borowitz | b179514 | 2017-10-12 07:13:37 -0700 | [diff] [blame] | 4920 | Options to control the behavior of `upload-pack` on the server side, |
| 4921 | which handles a user's fetch, clone, or repo sync command. |
lincoln | 2be1160 | 2010-07-05 10:53:25 -0300 | [diff] [blame] | 4922 | |
| 4923 | ---- |
| 4924 | [upload] |
| 4925 | allowGroup = GROUP_ALLOWED_TO_EXECUTE |
| 4926 | allowGroup = YET_ANOTHER_GROUP_ALLOWED_TO_EXECUTE |
| 4927 | ---- |
| 4928 | |
| 4929 | [[upload.allowGroup]]upload.allowGroup:: |
| 4930 | + |
Dave Borowitz | b179514 | 2017-10-12 07:13:37 -0700 | [diff] [blame] | 4931 | Name of the groups of users that are allowed to execute 'upload-pack'. |
| 4932 | One or more groups can be set. |
lincoln | 2be1160 | 2010-07-05 10:53:25 -0300 | [diff] [blame] | 4933 | + |
| 4934 | If no groups are added, any user will be allowed to execute |
| 4935 | 'upload-pack' on the server. |
| 4936 | |
Owen Li | e2877bb | 2017-07-14 09:11:20 -0400 | [diff] [blame] | 4937 | [[accountDeactivation]] |
| 4938 | === Section accountDeactivation |
| 4939 | |
| 4940 | Configures the parameters for the scheduled task to sweep and deactivate Gerrit |
| 4941 | accounts according to their status reported by the auth backend. Currently only |
| 4942 | supported for LDAP backends. |
| 4943 | |
| 4944 | [[accountDeactivation.startTime]]accountDeactivation.startTime:: |
| 4945 | + |
Edwin Kempin | d33d95a | 2018-02-16 11:44:04 +0100 | [diff] [blame] | 4946 | The link:#schedule-configuration-startTime[start time] for running |
| 4947 | account deactivations. |
Owen Li | e2877bb | 2017-07-14 09:11:20 -0400 | [diff] [blame] | 4948 | |
| 4949 | [[accountDeactivation.interval]]accountDeactivation.interval:: |
| 4950 | + |
Edwin Kempin | d33d95a | 2018-02-16 11:44:04 +0100 | [diff] [blame] | 4951 | The link:#schedule-configuration-interval[interval] for running |
| 4952 | account deactivations. |
| 4953 | |
| 4954 | link:#schedule-configuration-examples[Schedule examples] can be found |
| 4955 | in the link:#schedule-configuration[Schedule Configuration] section. |
Owen Li | e2877bb | 2017-07-14 09:11:20 -0400 | [diff] [blame] | 4956 | |
Stefan Beller | 0f724ff | 2015-07-17 10:17:51 -0700 | [diff] [blame] | 4957 | [[submodule]] |
| 4958 | === Section submodule |
| 4959 | |
Shawn Pearce | dc477cd | 2016-03-24 19:56:18 -0700 | [diff] [blame] | 4960 | [[submodule.verbosesuperprojectupdate]]submodule.verboseSuperprojectUpdate:: |
Stefan Beller | 0f724ff | 2015-07-17 10:17:51 -0700 | [diff] [blame] | 4961 | + |
| 4962 | When using link:user-submodules.html#automatic_update[automatic superproject updates] |
Zhen Chen | c877ca9 | 2016-07-27 14:22:37 -0700 | [diff] [blame] | 4963 | this option will determine how the submodule commit messages are included into |
Stefan Beller | 0f724ff | 2015-07-17 10:17:51 -0700 | [diff] [blame] | 4964 | the commit message of the superproject update. |
| 4965 | + |
Zhen Chen | c877ca9 | 2016-07-27 14:22:37 -0700 | [diff] [blame] | 4966 | If `FALSE`, will not include any commit messages for the gitlink update. |
| 4967 | + |
| 4968 | If `SUBJECT_ONLY`, will include only the commit subjects. |
| 4969 | + |
| 4970 | If `TRUE`, will include full commit messages. |
| 4971 | + |
| 4972 | By default this is `TRUE`. |
Stefan Beller | 0f724ff | 2015-07-17 10:17:51 -0700 | [diff] [blame] | 4973 | |
Shawn Pearce | dc477cd | 2016-03-24 19:56:18 -0700 | [diff] [blame] | 4974 | [[submodule.enableSuperProjectSubscriptions]]submodule.enableSuperProjectSubscriptions:: |
Stefan Beller | 8cc252e | 2016-03-10 10:06:53 -0800 | [diff] [blame] | 4975 | + |
| 4976 | This allows to enable the superproject subscription mechanism. |
| 4977 | + |
| 4978 | By default this is true. |
Stefan Beller | 0f724ff | 2015-07-17 10:17:51 -0700 | [diff] [blame] | 4979 | |
Patrick Hiesel | 44e5d6e | 2017-08-24 16:07:26 +0200 | [diff] [blame] | 4980 | [[submodule.maxCombinedCommitMessageSize]]submodule.maxCombinedCommitMessageSize:: |
| 4981 | + |
| 4982 | This allows to limit the length of the commit message for a submodule. |
| 4983 | + |
| 4984 | By default this is 262144 (256 KiB). |
| 4985 | + |
| 4986 | Common unit suffixes of k, m, or g are supported. |
| 4987 | |
| 4988 | [[submodule.maxCommitMessages]]submodule.maxCommitMessages:: |
| 4989 | + |
| 4990 | This allows to limit the number of commit messages that should be combined when creating |
| 4991 | a commit message for a submodule. |
| 4992 | + |
| 4993 | By default this is 1000. |
| 4994 | |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 4995 | [[user]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4996 | === Section user |
Shawn O. Pearce | 0a35191 | 2009-06-01 08:14:46 -0700 | [diff] [blame] | 4997 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 4998 | [[user.name]]user.name:: |
Shawn O. Pearce | 0a35191 | 2009-06-01 08:14:46 -0700 | [diff] [blame] | 4999 | + |
| 5000 | Name that Gerrit calls itself in Git when it creates a new Git |
| 5001 | commit, such as a merge during change submission. |
| 5002 | + |
| 5003 | By default this is "Gerrit Code Review". |
| 5004 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 5005 | [[user.email]]user.email:: |
Shawn O. Pearce | 0a35191 | 2009-06-01 08:14:46 -0700 | [diff] [blame] | 5006 | + |
| 5007 | Email address that Gerrit refers to itself as when it creates a |
| 5008 | new Git commit, such as a merge commit during change submission. |
| 5009 | + |
| 5010 | If not set, Gerrit generates this as "gerrit@`hostname`", where |
| 5011 | `hostname` is the hostname of the system Gerrit is running on. |
| 5012 | + |
| 5013 | By default, not set, generating the value at startup. |
| 5014 | |
Edwin Kempin | 0e02ded | 2011-09-16 15:10:14 +0200 | [diff] [blame] | 5015 | [[user.anonymousCoward]]user.anonymousCoward:: |
| 5016 | + |
David Pursehouse | a1d633b | 2014-05-02 17:21:02 +0900 | [diff] [blame] | 5017 | 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] | 5018 | notifications if the full name of the user is not set. |
| 5019 | + |
Han-Wen Nienhuys | 3fb723d | 2017-11-20 19:21:13 +0100 | [diff] [blame] | 5020 | By default "Name of user not set" is used. |
Edwin Kempin | 0e02ded | 2011-09-16 15:10:14 +0200 | [diff] [blame] | 5021 | |
Edwin Kempin | d33d95a | 2018-02-16 11:44:04 +0100 | [diff] [blame] | 5022 | [[schedule-configuration]] |
| 5023 | === Schedule Configuration |
| 5024 | |
| 5025 | Schedule configurations are used for running periodic background jobs. |
| 5026 | |
| 5027 | A schedule configuration consists of two parameters: |
| 5028 | |
| 5029 | [[schedule-configuration-interval]] |
| 5030 | * `interval`: |
| 5031 | Interval for running the periodic background job. The interval must be |
| 5032 | larger than zero. The following suffixes are supported to define the |
| 5033 | time unit for the interval: |
| 5034 | ** `s`, `sec`, `second`, `seconds` |
| 5035 | ** `m`, `min`, `minute`, `minutes` |
| 5036 | ** `h`, `hr`, `hour`, `hours` |
| 5037 | ** `d`, `day`, `days` |
| 5038 | ** `w`, `week`, `weeks` (`1 week` is treated as `7 days`) |
| 5039 | ** `mon`, `month`, `months` (`1 month` is treated as `30 days`) |
| 5040 | ** `y`, `year`, `years` (`1 year` is treated as `365 days`) |
| 5041 | |
| 5042 | [[schedule-configuration-startTime]] |
| 5043 | * `startTime`: |
| 5044 | The start time defines the first execution of the periodic background |
| 5045 | job. If the configured `interval` is shorter than `startTime - now` the |
| 5046 | start time will be preponed by the maximum integral multiple of |
| 5047 | `interval` so that the start time is still in the future. `startTime` |
| 5048 | must have one of the following formats: |
| 5049 | |
| 5050 | ** `<day of week> <hours>:<minutes>` |
| 5051 | ** `<hours>:<minutes>` |
| 5052 | |
| 5053 | + |
| 5054 | The placeholders can have the following values: |
| 5055 | |
| 5056 | *** `<day of week>`: |
| 5057 | `Mon`, `Tue`, `Wed`, `Thu`, `Fri`, `Sat`, `Sun` |
| 5058 | *** `<hours>`: |
| 5059 | `00`-`23` |
| 5060 | *** `<minutes>`: |
| 5061 | `00`-`59` |
| 5062 | |
| 5063 | + |
| 5064 | The time zone cannot be specified but is always the system default |
David Pursehouse | 18f388a | 2019-04-10 09:36:18 +0900 | [diff] [blame] | 5065 | time zone. Hours must be zero-padded, i.e. `06:00` rather than `6:00`. |
Edwin Kempin | d33d95a | 2018-02-16 11:44:04 +0100 | [diff] [blame] | 5066 | |
| 5067 | The section (and optionally the subsection) in which the `interval` and |
| 5068 | `startTime` keys must be set depends on the background job for which a |
| 5069 | schedule should be configured. E.g. for the change cleanup job the keys |
| 5070 | must be set in the link:#changeCleanup[changeCleanup] section: |
| 5071 | |
| 5072 | ---- |
| 5073 | [changeCleanup] |
| 5074 | startTime = Fri 10:30 |
| 5075 | interval = 2 days |
| 5076 | ---- |
| 5077 | |
| 5078 | [[schedule-configuration-examples]] |
| 5079 | Examples for a schedule configuration: |
| 5080 | |
| 5081 | * Example 1: |
| 5082 | + |
| 5083 | ---- |
| 5084 | startTime = Fri 10:30 |
| 5085 | interval = 2 days |
| 5086 | ---- |
| 5087 | + |
| 5088 | Assuming that the server is started on `Mon 07:00` then |
| 5089 | `startTime - now` is `4 days 3:30 hours`. This is larger than the |
| 5090 | interval hence the start time is preponed by the maximum integral |
| 5091 | multiple of the interval so that start time is still in the future, |
| 5092 | i.e. preponed by 4 days. This yields a start time of `Mon 10:30`, next |
| 5093 | executions are `Wed 10:30`, `Fri 10:30`. etc. |
| 5094 | |
| 5095 | * Example 2: |
| 5096 | + |
| 5097 | ---- |
| 5098 | startTime = 06:00 |
| 5099 | interval = 1 day |
| 5100 | ---- |
| 5101 | + |
| 5102 | Assuming that the server is started on `Mon 07:00` then this yields the |
| 5103 | first run on Tuesday at 06:00 and a repetition interval of 1 day. |
| 5104 | |
Dave Borowitz | d4fdc93 | 2018-11-02 15:06:25 -0700 | [diff] [blame] | 5105 | [[All-Projects-project.config]] |
| 5106 | == File `etc/All-Projects/project.config` |
| 5107 | |
| 5108 | The optional file `'$site_path'/etc/All-Projects/project.config` provides |
| 5109 | defaults for configuration read from |
| 5110 | link:config-project-config.html[`project.config`] in the |
| 5111 | `All-Projects` repo. Unlike `gerrit.config`, this file contains project-type |
| 5112 | configuration rather than server-type configuration. |
| 5113 | |
| 5114 | Most administrators will not need this file, and should instead make commits to |
| 5115 | `All-Projects` to modify global config. However, a separate file can be useful |
| 5116 | when managing multiple Gerrit servers, since pushing changes to defaults using |
| 5117 | Puppet or a similar tool can be easier than scripting git updates to |
| 5118 | `All-Projects`. |
| 5119 | |
| 5120 | The contents of the file are loaded each time the `All-Projects` project is |
| 5121 | reloaded. Updating the file requires either evicting the project cache or |
| 5122 | restarting the server. |
| 5123 | |
| 5124 | Caveats: |
| 5125 | |
| 5126 | * The path from which the file is read corresponds to the name of the repo, |
| 5127 | which is link:#gerrit.allProjects[configurable]. |
| 5128 | * Although the file lives in a directory that shares a name with a repository, |
| 5129 | this directory is not a Git repository. |
| 5130 | * Only the file `project.config` is read from this directory to provide |
| 5131 | defaults; any other files in this directory, such as `rules.pl`, are ignored. |
| 5132 | (This behavior may change in the future.) |
| 5133 | * Group names listed in the access config in this file are resolved to UUIDs |
| 5134 | using the `groups` file in the repository, not in the config directory. As a |
| 5135 | result, setting ACLs in this file is not recommended. |
| 5136 | |
Hector Oswaldo Caballero | 98952b0 | 2017-08-24 06:31:28 -0400 | [diff] [blame] | 5137 | [[secure.config]] |
| 5138 | == File `etc/secure.config` |
Shawn O. Pearce | 0bf2f52 | 2009-05-14 11:02:03 -0700 | [diff] [blame] | 5139 | |
Shawn O. Pearce | c5fed82 | 2009-11-17 16:10:10 -0800 | [diff] [blame] | 5140 | The optional file `'$site_path'/etc/secure.config` overrides (or |
| 5141 | supplements) the settings supplied by `'$site_path'/etc/gerrit.config`. |
Shawn O. Pearce | 0d4037a | 2009-11-12 18:33:46 -0800 | [diff] [blame] | 5142 | The file should be readable only by the daemon process and can be |
| 5143 | used to contain private configuration entries that wouldn't normally |
| 5144 | be exposed to everyone. |
| 5145 | |
Shawn O. Pearce | c5fed82 | 2009-11-17 16:10:10 -0800 | [diff] [blame] | 5146 | Sample `etc/secure.config`: |
Shawn O. Pearce | 0d4037a | 2009-11-12 18:33:46 -0800 | [diff] [blame] | 5147 | ---- |
Shawn O. Pearce | 34f38cf | 2011-06-16 19:18:54 -0700 | [diff] [blame] | 5148 | [auth] |
| 5149 | registerEmailPrivateKey = 2zHNrXE2bsoylzUqDxZp0H1cqUmjgWb6 |
| 5150 | |
Shawn O. Pearce | 0d4037a | 2009-11-12 18:33:46 -0800 | [diff] [blame] | 5151 | [database] |
Shawn O. Pearce | 9d342a4 | 2009-12-16 15:49:05 -0800 | [diff] [blame] | 5152 | username = webuser |
| 5153 | password = s3kr3t |
Shawn O. Pearce | 0d4037a | 2009-11-12 18:33:46 -0800 | [diff] [blame] | 5154 | |
| 5155 | [ldap] |
Shawn O. Pearce | 9d342a4 | 2009-12-16 15:49:05 -0800 | [diff] [blame] | 5156 | password = l3tm3srch |
Shawn O. Pearce | 0d4037a | 2009-11-12 18:33:46 -0800 | [diff] [blame] | 5157 | |
| 5158 | [httpd] |
Shawn O. Pearce | 9d342a4 | 2009-12-16 15:49:05 -0800 | [diff] [blame] | 5159 | sslKeyPassword = g3rr1t |
Shawn O. Pearce | 0d4037a | 2009-11-12 18:33:46 -0800 | [diff] [blame] | 5160 | |
| 5161 | [sendemail] |
Shawn O. Pearce | 9d342a4 | 2009-12-16 15:49:05 -0800 | [diff] [blame] | 5162 | smtpPass = sp@m |
Shawn O. Pearce | 7929d87 | 2011-05-15 13:33:15 -0700 | [diff] [blame] | 5163 | |
| 5164 | [remote "bar"] |
| 5165 | password = s3kr3t |
Shawn O. Pearce | 0d4037a | 2009-11-12 18:33:46 -0800 | [diff] [blame] | 5166 | ---- |
| 5167 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 5168 | == File `etc/peer_keys` |
Johan Bjork | 3e5ee30 | 2012-01-27 17:59:54 +0100 | [diff] [blame] | 5169 | |
| 5170 | The optional file `'$site_path'/etc/peer_keys` controls who can |
| 5171 | login as the 'Gerrit Code Review' user, required for the link:cmd-suexec.html[suexec] |
| 5172 | command. |
| 5173 | |
| 5174 | The format is one Base-64 encoded public key per line. |
| 5175 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 5176 | === Configurable Parameters |
Shawn O. Pearce | d2b73db | 2009-01-09 11:55:47 -0800 | [diff] [blame] | 5177 | |
Shawn O. Pearce | 8e9c73b | 2009-05-08 17:38:25 -0700 | [diff] [blame] | 5178 | site_path:: |
| 5179 | + |
Shawn O. Pearce | d2b73db | 2009-01-09 11:55:47 -0800 | [diff] [blame] | 5180 | Local filesystem directory holding the site customization assets. |
| 5181 | Placing this directory under version control and/or backup is a |
| 5182 | good idea. |
Shawn O. Pearce | 8e9c73b | 2009-05-08 17:38:25 -0700 | [diff] [blame] | 5183 | + |
Shawn O. Pearce | c5fed82 | 2009-11-17 16:10:10 -0800 | [diff] [blame] | 5184 | Files in this directory provide additional configuration. |
Shawn O. Pearce | 8e9c73b | 2009-05-08 17:38:25 -0700 | [diff] [blame] | 5185 | + |
Shawn O. Pearce | d2b73db | 2009-01-09 11:55:47 -0800 | [diff] [blame] | 5186 | Other files support site customization. |
Shawn O. Pearce | 8e9c73b | 2009-05-08 17:38:25 -0700 | [diff] [blame] | 5187 | + |
Dave Borowitz | 1e49e14 | 2013-04-09 12:14:57 -0700 | [diff] [blame] | 5188 | * link:config-themes.html[Themes] |
Shawn O. Pearce | d2b73db | 2009-01-09 11:55:47 -0800 | [diff] [blame] | 5189 | |
Saša Živkov | d34dfe3 | 2017-11-20 11:14:35 +0100 | [diff] [blame] | 5190 | [[jgitConfig]] |
| 5191 | == File `etc/jgit.config` |
| 5192 | |
| 5193 | Gerrit uses the `$site_path/etc/jgit.config` file instead of the |
| 5194 | system-wide and user-global Git configuration for its runtime JGit |
| 5195 | configuration. |
| 5196 | |
| 5197 | Sample `etc/jgit.config` file: |
| 5198 | ---- |
| 5199 | [core] |
| 5200 | trustFolderStat = false |
| 5201 | ---- |
| 5202 | |
Shawn O. Pearce | 5500e69 | 2009-05-28 15:55:01 -0700 | [diff] [blame] | 5203 | GERRIT |
| 5204 | ------ |
| 5205 | Part of link:index.html[Gerrit Code Review] |
Yuxuan 'fishy' Wang | 99cb68d | 2013-10-31 17:26:00 -0700 | [diff] [blame] | 5206 | |
| 5207 | SEARCHBOX |
| 5208 | --------- |