Marian Harbach | ebeb154 | 2019-12-13 10:42:46 +0100 | [diff] [blame] | 1 | :linkattrs: |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2 | = Gerrit Code Review - Configuration |
Shawn O. Pearce | d2b73db | 2009-01-09 11:55:47 -0800 | [diff] [blame] | 3 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4 | == File `etc/gerrit.config` |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 5 | |
Shawn O. Pearce | c5fed82 | 2009-11-17 16:10:10 -0800 | [diff] [blame] | 6 | The optional file `'$site_path'/etc/gerrit.config` is a Git-style |
| 7 | config file that controls many host specific settings for Gerrit. |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 8 | |
| 9 | [NOTE] |
Shawn O. Pearce | c5fed82 | 2009-11-17 16:10:10 -0800 | [diff] [blame] | 10 | The contents of the `etc/gerrit.config` file are cached at startup |
Sven Selberg | 2a0beab | 2018-04-20 14:49:20 +0200 | [diff] [blame] | 11 | by Gerrit. For most properties, if they are modified in this file, Gerrit |
| 12 | 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] | 13 | support being link:#reloadConfig[`reloaded`] without restart. |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 14 | |
Shawn O. Pearce | c5fed82 | 2009-11-17 16:10:10 -0800 | [diff] [blame] | 15 | Sample `etc/gerrit.config`: |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 16 | ---- |
| 17 | [core] |
Shawn O. Pearce | 9d342a4 | 2009-12-16 15:49:05 -0800 | [diff] [blame] | 18 | packedGitLimit = 200 m |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 19 | |
| 20 | [cache] |
David Pursehouse | 64df83a | 2017-07-04 21:20:47 +0900 | [diff] [blame] | 21 | directory = /var/cache/gerrit |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 22 | ---- |
| 23 | |
Sven Selberg | 2a0beab | 2018-04-20 14:49:20 +0200 | [diff] [blame] | 24 | [[reloadConfig]] |
| 25 | === Reload `etc/gerrit.config` |
| 26 | Some properties support being reloaded without restart when a `reload config` |
| 27 | command is issued through link:cmd-reload-config.html[`SSH`] or the |
| 28 | link:rest-api-config.html#reload-config[`REST API`]. If a property supports |
| 29 | this it is specified in the documentation for the property below. |
| 30 | |
| 31 | |
Hongkai Liu | 49799b2 | 2017-04-07 16:54:25 -0400 | [diff] [blame] | 32 | [[accountPatchReviewDb]] |
| 33 | === Section accountPatchReviewDb |
| 34 | |
Gert van Dijk | 49c5613 | 2017-10-17 23:44:25 +0200 | [diff] [blame] | 35 | The AccountPatchReviewDb is a database used to store the user file reviewed |
David Pursehouse | e3eaf9e | 2019-02-01 10:41:20 +0900 | [diff] [blame] | 36 | flags. |
Gert van Dijk | 49c5613 | 2017-10-17 23:44:25 +0200 | [diff] [blame] | 37 | |
Hongkai Liu | 49799b2 | 2017-04-07 16:54:25 -0400 | [diff] [blame] | 38 | [[accountPatchReviewDb.url]]accountPatchReviewDb.url:: |
| 39 | + |
Wendy Wang | 1dd445d | 2023-09-04 14:00:27 +0200 | [diff] [blame] | 40 | The url of accountPatchReviewDb. Supported types are `CLOUDSPANNER`, `H2`, |
| 41 | `POSTGRESQL`, `MARIADB`, and `MYSQL`. Drop the driver jar in the lib folder of |
| 42 | the site path if the Jdbc driver of the corresponding Database is not yet in |
| 43 | the class path. |
Hongkai Liu | 49799b2 | 2017-04-07 16:54:25 -0400 | [diff] [blame] | 44 | + |
| 45 | Default is to create H2 database in the db folder of the site path. |
| 46 | + |
| 47 | Changing this parameter requires to migrate database using the |
Hugo Arès | 3e1d4cd | 2017-04-26 12:02:53 +0200 | [diff] [blame] | 48 | link:pgm-MigrateAccountPatchReviewDb.html[MigrateAccountPatchReviewDb] program. |
| 49 | Migration cannot be done while the server is running. |
Paladox none | 1a4c01f | 2017-04-29 18:19:37 +0000 | [diff] [blame] | 50 | + |
Dave Borowitz | ada289c | 2018-12-18 13:24:14 -0800 | [diff] [blame] | 51 | Also note that the db_name has to be a new db and not reusing an old ReviewDb |
| 52 | 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] | 53 | |
| 54 | ---- |
| 55 | [accountPatchReviewDb] |
| 56 | url = jdbc:postgresql://<host>:<port>/<db_name>?user=<user>&password=<password> |
| 57 | ---- |
| 58 | |
Hector Oswaldo Caballero | 8dead96 | 2017-08-08 05:30:06 -0400 | [diff] [blame] | 59 | [[accountPatchReviewDb.poolLimit]]accountPatchReviewDb.poolLimit:: |
| 60 | + |
| 61 | Maximum number of open database connections. If the server needs |
| 62 | more than this number, request processing threads will wait up |
| 63 | to <<accountPatchReviewDb.poolMaxWait, poolMaxWait>> seconds for a |
| 64 | connection to be released before they abort with an exception. |
| 65 | This limit must be several units higher than the total number of |
| 66 | httpd and sshd threads as some request processing code paths may |
| 67 | need multiple connections. |
| 68 | + |
| 69 | Default is <<sshd.threads, sshd.threads>> |
| 70 | + <<httpd.maxThreads, httpd.maxThreads>> + 2. |
| 71 | + |
| 72 | |
| 73 | [[accountPatchReviewDb.poolMinIdle]]database.poolMinIdle:: |
| 74 | + |
| 75 | Minimum number of connections to keep idle in the pool. |
| 76 | Default is 4. |
| 77 | + |
| 78 | |
| 79 | [[accountPatchReviewDb.poolMaxIdle]]accountPatchReviewDb.poolMaxIdle:: |
| 80 | + |
| 81 | Maximum number of connections to keep idle in the pool. If there |
| 82 | are more idle connections, connections will be closed instead of |
| 83 | being returned back to the pool. |
| 84 | Default is min(<<accountPatchReviewDb.poolLimit, accountPatchReviewDb.poolLimit>>, 16). |
| 85 | + |
| 86 | |
| 87 | [[accountPatchReviewDb.poolMaxWait]]accountPatchReviewDb.poolMaxWait:: |
| 88 | + |
| 89 | Maximum amount of time a request processing thread will wait to |
| 90 | acquire a database connection from the pool. If no connection is |
| 91 | released within this time period, the processing thread will abort |
| 92 | its current operations and return an error to the client. |
| 93 | Values should use common unit suffixes to express their setting: |
| 94 | + |
| 95 | * ms, milliseconds |
| 96 | * s, sec, second, seconds |
| 97 | * m, min, minute, minutes |
| 98 | * h, hr, hour, hours |
| 99 | |
| 100 | + |
Hector Oswaldo Caballero | 8dead96 | 2017-08-08 05:30:06 -0400 | [diff] [blame] | 101 | If a unit suffix is not specified, `milliseconds` is assumed. |
Hector Oswaldo Caballero | 8dead96 | 2017-08-08 05:30:06 -0400 | [diff] [blame] | 102 | Default is `30 seconds`. |
| 103 | |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 104 | [[accounts]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 105 | === Section accounts |
Dave Borowitz | 45baa89 | 2012-02-23 16:43:05 -0800 | [diff] [blame] | 106 | |
Matthias Sohn | f336066 | 2012-04-05 15:42:52 +0200 | [diff] [blame] | 107 | [[accounts.visibility]]accounts.visibility:: |
Dave Borowitz | 45baa89 | 2012-02-23 16:43:05 -0800 | [diff] [blame] | 108 | + |
| 109 | Controls visibility of other users' dashboard pages and |
| 110 | completion suggestions to web users. |
| 111 | + |
| 112 | If `ALL`, all users are visible to all other users, even |
| 113 | anonymous users. |
| 114 | + |
| 115 | If `SAME_GROUP`, only users who are also members of a group the |
| 116 | current user is a member of are visible. |
| 117 | + |
| 118 | If `VISIBLE_GROUP`, only users who are members of at least one group |
| 119 | that is visible to the current user are visible. |
| 120 | + |
| 121 | If `NONE`, no users other than the current user are visible. |
| 122 | + |
| 123 | Default is `ALL`. |
| 124 | |
Ben Rohlfs | 99f16a1 | 2020-02-11 19:44:17 +0100 | [diff] [blame] | 125 | [[accounts.defaultDisplayName]]accounts.defaultDisplayName:: |
| 126 | + |
| 127 | If a user account does not have a display name set, which is the normal |
| 128 | case, then this configuration value chooses the strategy how to choose |
| 129 | the display name. Note that this strategy is not applied by the backend. |
| 130 | If the AccountInfo has the display name unset, then the client has to |
| 131 | apply this strategy. |
| 132 | + |
| 133 | If `FULL_NAME`, then the (full) name of the user is chosen from |
| 134 | link:rest-api-accounts.html#account-info[AccountInfo]. |
| 135 | + |
| 136 | If `FIRST_NAME`, then the first word (i.e. everything until first |
| 137 | whitespace character) of the (full) name of the user is chosen from |
| 138 | link:rest-api-accounts.html#account-info[AccountInfo]. |
| 139 | + |
| 140 | If `USERNAME`, then the username of the user is chosen from |
| 141 | link:rest-api-accounts.html#account-info[AccountInfo]. If that is not |
| 142 | set, then the (full) name will be used. |
| 143 | + |
| 144 | Default is `FULL_NAME`. |
| 145 | |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 146 | [[addreviewer]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 147 | === Section addreviewer |
Edwin Kempin | 49cb3e1 | 2011-06-29 14:35:14 +0200 | [diff] [blame] | 148 | |
| 149 | [[addreviewer.maxWithoutConfirmation]]addreviewer.maxWithoutConfirmation:: |
| 150 | + |
| 151 | The maximum number of reviewers a user can add at once by adding a |
| 152 | group as reviewer without being asked to confirm the operation. |
| 153 | + |
| 154 | If set to 0, the user will never be asked to confirm adding a group |
| 155 | as reviewer. |
| 156 | + |
| 157 | Default is 10. |
Edwin Kempin | 5e65d9b | 2011-07-08 07:35:48 +0200 | [diff] [blame] | 158 | + |
David Pursehouse | a1d633b | 2014-05-02 17:21:02 +0900 | [diff] [blame] | 159 | This setting only applies for adding reviewers in the Gerrit Web UI, |
Edwin Kempin | 5e65d9b | 2011-07-08 07:35:48 +0200 | [diff] [blame] | 160 | but is ignored when adding reviewers with the |
Edwin Kempin | 33e92d0 | 2011-07-11 22:00:57 +0200 | [diff] [blame] | 161 | link:cmd-set-reviewers.html[set-reviewers] command. |
Gustaf Lundh | 25e608f | 2018-04-16 10:54:53 +0200 | [diff] [blame] | 162 | + |
Sven Selberg | 2a0beab | 2018-04-20 14:49:20 +0200 | [diff] [blame] | 163 | This value supports link:#reloadConfig[configuration reloads]. |
Edwin Kempin | 49cb3e1 | 2011-06-29 14:35:14 +0200 | [diff] [blame] | 164 | |
| 165 | [[addreviewer.maxAllowed]]addreviewer.maxAllowed:: |
| 166 | + |
| 167 | The maximum number of reviewers a user can add at once by adding a |
| 168 | group as reviewer. |
| 169 | + |
| 170 | If set to 0, there is no limit for the number of reviewers that can |
| 171 | be added at once by adding a group as reviewer. |
| 172 | + |
| 173 | Default is 20. |
Gustaf Lundh | 25e608f | 2018-04-16 10:54:53 +0200 | [diff] [blame] | 174 | + |
Sven Selberg | 2a0beab | 2018-04-20 14:49:20 +0200 | [diff] [blame] | 175 | This value supports link:#reloadConfig[configuration reloads]. |
Edwin Kempin | 49cb3e1 | 2011-06-29 14:35:14 +0200 | [diff] [blame] | 176 | |
Patrick Hiesel | 87880b0 | 2016-05-03 18:15:08 +0200 | [diff] [blame] | 177 | [[addReviewer.baseWeight]]addReviewer.baseWeight:: |
| 178 | + |
| 179 | The weight that will be applied in the default reviewer ranking algorithm. |
| 180 | This can be increased or decreased to give more or less influence to plugins. |
| 181 | If set to zero, the base ranking will not have any effect. Reviewers will then |
| 182 | be ordered as ranked by the plugins (if there are any). |
| 183 | + |
| 184 | By default 1. |
| 185 | |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 186 | [[auth]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 187 | === Section auth |
Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 188 | |
| 189 | See also link:config-sso.html[SSO configuration]. |
| 190 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 191 | [[auth.type]]auth.type:: |
Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 192 | + |
Shawn O. Pearce | 2920ef3 | 2009-08-03 08:03:34 -0700 | [diff] [blame] | 193 | Type of user authentication employed by Gerrit. The supported |
| 194 | values are: |
Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 195 | + |
| 196 | * `OpenID` |
| 197 | + |
| 198 | The default setting. Gerrit uses any valid OpenID |
| 199 | provider chosen by the end-user. For more information see |
Marian Harbach | 3425337 | 2019-12-10 18:01:31 +0100 | [diff] [blame] | 200 | http://openid.net/[openid.net,role=external,window=_blank]. |
Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 201 | + |
James E. Blair | ca8bc3b | 2011-12-21 18:12:26 +0000 | [diff] [blame] | 202 | * `OpenID_SSO` |
| 203 | + |
| 204 | Supports OpenID from a single provider. There is no registration |
| 205 | link, and the "Sign In" link sends the user directly to the provider's |
| 206 | SSO entry point. |
| 207 | + |
Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 208 | * `HTTP` |
| 209 | + |
Shawn O. Pearce | 2920ef3 | 2009-08-03 08:03:34 -0700 | [diff] [blame] | 210 | Gerrit relies upon data presented in the HTTP request. This includes |
Edwin Kempin | f1acbb8 | 2011-09-15 12:49:42 +0200 | [diff] [blame] | 211 | HTTP basic authentication, or some types of commercial single-sign-on |
Shawn O. Pearce | 2920ef3 | 2009-08-03 08:03:34 -0700 | [diff] [blame] | 212 | solutions. With this setting enabled the authentication must |
| 213 | take place in the web server or servlet container, and not from |
| 214 | within Gerrit. |
| 215 | + |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 216 | * `HTTP_LDAP` |
| 217 | + |
| 218 | Exactly like `HTTP` (above), but additionally Gerrit pre-populates |
| 219 | a user's full name and email address based on information obtained |
| 220 | from the user's account object in LDAP. The user's group membership |
| 221 | 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] | 222 | member of available as groups in Gerrit. Hence the `_LDAP` suffix in |
| 223 | the name of this authentication type. Gerrit does NOT authenticate |
| 224 | the user via LDAP. |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 225 | + |
Sasa Zivkov | eabc897 | 2010-10-04 15:47:08 +0200 | [diff] [blame] | 226 | * `CLIENT_SSL_CERT_LDAP` |
| 227 | + |
| 228 | This authentication type is actually kind of SSO. Gerrit will configure |
David Pursehouse | 221d4f6 | 2012-06-08 17:38:08 +0900 | [diff] [blame] | 229 | 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] | 230 | authentication to work a Gerrit administrator has to import the root |
| 231 | certificate of the trust chain used to issue the client's certificate |
| 232 | into the <review-site>/etc/keystore. |
| 233 | After the authentication is done Gerrit will obtain basic user |
| 234 | registration (name and email) from LDAP, and some group memberships. |
David Pursehouse | ef92bec | 2017-08-25 18:45:02 +0900 | [diff] [blame] | 235 | Hence the `_LDAP` suffix in the name of this authentication type. |
| 236 | Gerrit does NOT authenticate the user via LDAP. |
Sasa Zivkov | eabc897 | 2010-10-04 15:47:08 +0200 | [diff] [blame] | 237 | This authentication type can only be used under hosted daemon mode, and |
| 238 | the httpd.listenUrl must use https:// as the protocol. |
Chulho Yang | b72ff8f | 2013-07-04 02:35:53 -0400 | [diff] [blame] | 239 | Optionally, certificate revocation list file can be used |
| 240 | at <review-site>/etc/crl.pem. For details, see httpd.sslCrl. |
Sasa Zivkov | eabc897 | 2010-10-04 15:47:08 +0200 | [diff] [blame] | 241 | + |
Shawn O. Pearce | f7e065e | 2009-09-26 20:01:10 -0700 | [diff] [blame] | 242 | * `LDAP` |
| 243 | + |
| 244 | Gerrit prompts the user to enter a username and a password, which |
| 245 | it then verifies by performing a simple bind against the configured |
| 246 | <<ldap.server,ldap.server>>. In this configuration the web server |
| 247 | is not involved in the user authentication process. |
| 248 | + |
Shawn O. Pearce | c892d34 | 2010-02-17 17:00:50 -0800 | [diff] [blame] | 249 | The actual username used in the LDAP simple bind request is the |
| 250 | account's full DN, which is discovered by first querying the |
| 251 | directory using either an anonymous request, or the configured |
Robin Rosenberg | a3baed0 | 2012-10-14 14:09:32 +0200 | [diff] [blame] | 252 | <<ldap.username,ldap.username>> identity. Gerrit can also use kerberos if |
| 253 | <<ldap.authentication,ldap.authentication>> is set to `GSSAPI`. |
Han-Wen Nienhuys | 84d830b | 2017-02-15 16:36:04 +0100 | [diff] [blame] | 254 | + |
| 255 | If link:#auth.gitBasicAuthPolicy[`auth.gitBasicAuthPolicy`] is set to `HTTP`, |
| 256 | the randomly generated HTTP password is used for authentication. On the other hand, |
| 257 | if link:#auth.gitBasicAuthPolicy[`auth.gitBasicAuthPolicy`] is set to `HTTP_LDAP`, |
| 258 | the password in the request is first checked against the HTTP password and, if |
| 259 | it does not match, it is then validated against the LDAP password. |
Nasser Grainawi | 8ea9fec | 2022-02-25 17:38:10 -0700 | [diff] [blame] | 260 | Service users that are link:cmd-create-account.html[internal-only] are |
| 261 | authenticated by their HTTP passwords. |
Shawn O. Pearce | c892d34 | 2010-02-17 17:00:50 -0800 | [diff] [blame] | 262 | |
| 263 | * `LDAP_BIND` |
| 264 | + |
| 265 | Gerrit prompts the user to enter a username and a password, which |
| 266 | it then verifies by performing a simple bind against the configured |
| 267 | <<ldap.server,ldap.server>>. In this configuration the web server |
| 268 | is not involved in the user authentication process. |
| 269 | + |
David Pursehouse | 42f4204 | 2013-08-01 14:02:25 +0900 | [diff] [blame] | 270 | Unlike `LDAP` above, the username used to perform the LDAP simple bind |
David Pursehouse | 1344f5b | 2013-08-09 17:35:47 +0900 | [diff] [blame] | 271 | request is the exact string supplied in the dialog by the user. |
Robin Rosenberg | 524a303 | 2012-10-14 14:24:36 +0200 | [diff] [blame] | 272 | 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] | 273 | account information. |
| 274 | + |
Michael Ochmann | e9e046a | 2015-10-20 15:34:29 +0200 | [diff] [blame] | 275 | * `OAUTH` |
David Ostrovsky | e9707d8 | 2015-02-22 01:14:02 +0100 | [diff] [blame] | 276 | + |
| 277 | OAuth is a protocol that lets external apps request authorization to private |
| 278 | details in a user's account without getting their password. This is |
| 279 | preferred over Basic Authentication because tokens can be limited to specific |
| 280 | types of data, and can be revoked by users at any time. |
| 281 | + |
| 282 | Site owners have to register their application before getting started. Note |
| 283 | that provider specific plugins must be used with this authentication scheme. |
| 284 | + |
Han-Wen Nienhuys | 84d830b | 2017-02-15 16:36:04 +0100 | [diff] [blame] | 285 | Git clients may send OAuth 2 access tokens instead of passwords in the Basic |
| 286 | authentication header. Note that provider specific plugins must be installed to |
| 287 | facilitate this authentication scheme. If multiple OAuth 2 provider plugins are |
| 288 | installed one of them must be selected as default with the |
| 289 | `auth.gitOAuthProvider` option. |
| 290 | + |
Shawn O. Pearce | 2920ef3 | 2009-08-03 08:03:34 -0700 | [diff] [blame] | 291 | * `DEVELOPMENT_BECOME_ANY_ACCOUNT` |
| 292 | + |
| 293 | *DO NOT USE*. Only for use in a development environment. |
| 294 | + |
| 295 | When this is the configured authentication method a hyperlink titled |
| 296 | `Become` appears in the top right corner of the page, taking the |
| 297 | user to a form where they can enter the username of any existing |
| 298 | user account, and immediately login as that account, without any |
David Ostrovsky | 7163dac | 2017-07-29 06:49:38 +0200 | [diff] [blame] | 299 | authentication taking place. |
Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 300 | |
| 301 | + |
| 302 | By default, OpenID. |
| 303 | |
Shawn O. Pearce | 533cafc | 2010-05-11 16:05:27 -0700 | [diff] [blame] | 304 | [[auth.allowedOpenID]]auth.allowedOpenID:: |
| 305 | + |
| 306 | List of permitted OpenID providers. A user may only authenticate |
| 307 | with an OpenID that matches this list. Only used if `auth.type` |
David Pursehouse | 42f4204 | 2013-08-01 14:02:25 +0900 | [diff] [blame] | 308 | is set to `OpenID` (the default). |
Shawn O. Pearce | 533cafc | 2010-05-11 16:05:27 -0700 | [diff] [blame] | 309 | + |
Magnus Bäck | e561183 | 2011-02-02 08:57:15 +0100 | [diff] [blame] | 310 | Patterns may be either a |
| 311 | link:http://download.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html[standard |
Marian Harbach | 3425337 | 2019-12-10 18:01:31 +0100 | [diff] [blame] | 312 | Java regular expression (java.util.regex),role=external,window=_blank] (start with `^` and |
Shawn O. Pearce | 533cafc | 2010-05-11 16:05:27 -0700 | [diff] [blame] | 313 | end with `$`) or be a simple prefix (any other string). |
| 314 | + |
| 315 | By default, the list contains two values, `http://` and `https://`, |
| 316 | allowing users to authenticate with any OpenID provider. |
| 317 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 318 | [[auth.trustedOpenID]]auth.trustedOpenID:: |
Shawn O. Pearce | d7c026d | 2009-08-05 20:11:22 -0700 | [diff] [blame] | 319 | + |
David Pursehouse | 221d4f6 | 2012-06-08 17:38:08 +0900 | [diff] [blame] | 320 | List of trusted OpenID providers. Only used if `auth.type` is |
David Pursehouse | 42f4204 | 2013-08-01 14:02:25 +0900 | [diff] [blame] | 321 | set to `OpenID` (the default). |
Shawn O. Pearce | d7c026d | 2009-08-05 20:11:22 -0700 | [diff] [blame] | 322 | + |
| 323 | In order for a user to take advantage of permissions beyond those |
| 324 | granted to the `Anonymous Users` and `Registered Users` groups, |
| 325 | the user account must only have OpenIDs which match at least one |
| 326 | pattern from this list. |
| 327 | + |
Magnus Bäck | e561183 | 2011-02-02 08:57:15 +0100 | [diff] [blame] | 328 | Patterns may be either a |
| 329 | link:http://download.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html[standard |
Marian Harbach | 3425337 | 2019-12-10 18:01:31 +0100 | [diff] [blame] | 330 | Java regular expression (java.util.regex),role=external,window=_blank] (start with `^` and |
Shawn O. Pearce | d7c026d | 2009-08-05 20:11:22 -0700 | [diff] [blame] | 331 | end with `$`) or be a simple prefix (any other string). |
| 332 | + |
| 333 | By default, the list contains two values, `http://` and `https://`, |
| 334 | allowing Gerrit to trust any OpenID it receives. |
| 335 | |
Mike Gouline | d2ab0cd | 2012-12-18 11:20:53 +1100 | [diff] [blame] | 336 | [[auth.openIdDomain]]auth.openIdDomain:: |
| 337 | + |
| 338 | List of allowed OpenID email address domains. Only used if |
David Pursehouse | 42f4204 | 2013-08-01 14:02:25 +0900 | [diff] [blame] | 339 | `auth.type` is set to `OPENID` or `OPENID_SSO`. |
Mike Gouline | d2ab0cd | 2012-12-18 11:20:53 +1100 | [diff] [blame] | 340 | + |
| 341 | Domain is case insensitive and must be in the same form as it |
| 342 | appears in the email address, for example, "example.com". |
| 343 | + |
| 344 | By default, any domain is accepted. |
| 345 | |
Shawn O. Pearce | 89030bc | 2010-04-24 17:25:29 -0700 | [diff] [blame] | 346 | [[auth.maxOpenIdSessionAge]]auth.maxOpenIdSessionAge:: |
| 347 | + |
| 348 | Time in seconds before an OpenID provider must force the user |
| 349 | to authenticate themselves again before authentication to this |
| 350 | Gerrit server. Currently this is only a polite request, and users |
| 351 | coming from providers that don't support the PAPE extension will |
| 352 | be accepted anyway. In the future it may be enforced, rejecting |
| 353 | users coming from providers that don't honor the max session age. |
| 354 | + |
| 355 | If set to 0, the provider will always force the user to authenticate |
| 356 | (e.g. supply their password). Values should use common unit suffixes |
| 357 | to express their setting: |
| 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 | + |
| 368 | Default is -1, permitting infinite time between authentications. |
| 369 | |
David Pursehouse | 5be35a3 | 2015-09-09 17:35:32 +0900 | [diff] [blame] | 370 | [[auth.registerEmailPrivateKey]]auth.registerEmailPrivateKey:: |
| 371 | + |
| 372 | Private key to use when generating an email verification token. |
| 373 | + |
| 374 | If not set, a random key is generated when running the |
| 375 | link:pgm-init.html[site initialization]. |
| 376 | |
Shawn O. Pearce | 34f38cf | 2011-06-16 19:18:54 -0700 | [diff] [blame] | 377 | [[auth.maxRegisterEmailTokenAge]]auth.maxRegisterEmailTokenAge:: |
| 378 | + |
| 379 | Time in seconds before an email verification token sent to a user in |
| 380 | order to validate their email address expires. |
| 381 | + |
| 382 | * s, sec, second, seconds |
| 383 | * m, min, minute, minutes |
| 384 | * h, hr, hour, hours |
| 385 | * d, day, days |
| 386 | * w, week, weeks (`1 week` is treated as `7 days`) |
| 387 | * mon, month, months (`1 month` is treated as `30 days`) |
| 388 | * y, year, years (`1 year` is treated as `365 days`) |
| 389 | |
| 390 | + |
Shawn O. Pearce | d6bd00b | 2012-01-20 12:40:51 -0800 | [diff] [blame] | 391 | Default is 12 hours. |
Shawn O. Pearce | 34f38cf | 2011-06-16 19:18:54 -0700 | [diff] [blame] | 392 | |
James E. Blair | ca8bc3b | 2011-12-21 18:12:26 +0000 | [diff] [blame] | 393 | [[auth.openIdSsoUrl]]auth.openIdSsoUrl:: |
| 394 | + |
David Pursehouse | 42f4204 | 2013-08-01 14:02:25 +0900 | [diff] [blame] | 395 | The SSO entry point URL. Only used if `auth.type` is set to |
| 396 | `OpenID_SSO`. |
James E. Blair | ca8bc3b | 2011-12-21 18:12:26 +0000 | [diff] [blame] | 397 | + |
| 398 | The "Sign In" link will send users directly to this URL. |
| 399 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 400 | [[auth.httpHeader]]auth.httpHeader:: |
Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 401 | + |
| 402 | 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] | 403 | authentication. Only used if `auth.type` is set to `HTTP`. |
Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 404 | |
Luca Milanesio | 384ed6c | 2013-07-30 09:10:07 +0100 | [diff] [blame] | 405 | [[auth.httpDisplaynameHeader]]auth.httpDisplaynameHeader:: |
| 406 | + |
| 407 | HTTP header to retrieve the user's display name from. Only used if `auth.type` |
| 408 | is set to `HTTP`. |
| 409 | + |
| 410 | If set, Gerrit trusts and enforces the user's full name using the HTTP header |
| 411 | and disables the ability to manually modify the user's full name |
| 412 | from the contact information page. |
| 413 | |
| 414 | [[auth.httpEmailHeader]]auth.httpEmailHeader:: |
| 415 | + |
| 416 | HTTP header to retrieve the user's e-mail from. Only used if `auth.type` |
| 417 | is set to `HTTP`. |
| 418 | + |
| 419 | If set, Gerrit trusts and enforces the user's e-mail using the HTTP header |
| 420 | and disables the ability to manually modify or register other e-mails |
| 421 | from the contact information page. |
| 422 | |
Luca Milanesio | 97d0735 | 2014-07-17 08:31:06 +0100 | [diff] [blame] | 423 | [[auth.httpExternalIdHeader]]auth.httpExternalIdHeader:: |
| 424 | + |
| 425 | HTTP header to retrieve the user's external identification token. |
| 426 | Only used if `auth.type` is set to `HTTP`. |
| 427 | + |
| 428 | If set, Gerrit adds the value contained in the HTTP header to the |
| 429 | user's identity. Typical use is with a federated identity token from |
| 430 | an external system (e.g. GitHub OAuth 2.0 authentication) where |
| 431 | the user's auth token exchanged during authentication handshake |
| 432 | needs to be used for authenticated communication to the external |
| 433 | system later on. |
| 434 | + |
| 435 | Example: `auth.httpExternalIdHeader: X-GitHub-OTP` |
| 436 | |
Luca Milanesio | 5185b04 | 2013-07-27 22:03:06 +0100 | [diff] [blame] | 437 | [[auth.loginUrl]]auth.loginUrl:: |
| 438 | + |
| 439 | 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] | 440 | login link in the upper right corner. Only used if `auth.type` is set |
| 441 | to `HTTP` or `HTTP_LDAP`. |
Luca Milanesio | 5185b04 | 2013-07-27 22:03:06 +0100 | [diff] [blame] | 442 | Organizations using an enterprise single-sign-on solution may want to |
| 443 | redirect the browser to the SSO product's sign-in page for completing the |
| 444 | login process and validate their credentials. |
| 445 | + |
David Pursehouse | 42f4204 | 2013-08-01 14:02:25 +0900 | [diff] [blame] | 446 | If set, Gerrit allows anonymous access until the end-user performs the login |
| 447 | and provides a trusted identity through the HTTP header. |
Luca Milanesio | 5185b04 | 2013-07-27 22:03:06 +0100 | [diff] [blame] | 448 | If not set, Gerrit requires the HTTP header with a trusted identity |
David Pursehouse | 42f4204 | 2013-08-01 14:02:25 +0900 | [diff] [blame] | 449 | and returns the error page 'LoginRedirect.html' if such a header is not |
| 450 | present. |
Luca Milanesio | 5185b04 | 2013-07-27 22:03:06 +0100 | [diff] [blame] | 451 | |
| 452 | [[auth.loginText]]auth.loginText:: |
| 453 | + |
David Pursehouse | 42f4204 | 2013-08-01 14:02:25 +0900 | [diff] [blame] | 454 | 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] | 455 | + |
David Pursehouse | 42f4204 | 2013-08-01 14:02:25 +0900 | [diff] [blame] | 456 | If not set, the "Sign In" text is used. |
Luca Milanesio | 5185b04 | 2013-07-27 22:03:06 +0100 | [diff] [blame] | 457 | |
Luca Milanesio | 111e0b7 | 2013-08-15 18:56:42 +0100 | [diff] [blame] | 458 | [[auth.registerPageUrl]]auth.registerPageUrl:: |
| 459 | + |
David Pursehouse | 268744b | 2013-08-17 15:32:11 +0900 | [diff] [blame] | 460 | URL of the registration page to use when a new user logs in to Gerrit for |
| 461 | the first time. Used only when `auth.type` is set to `HTTP`. |
Luca Milanesio | 111e0b7 | 2013-08-15 18:56:42 +0100 | [diff] [blame] | 462 | + |
| 463 | If not set, the standard Gerrit registration page `/#/register/` is displayed. |
| 464 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 465 | [[auth.logoutUrl]]auth.logoutUrl:: |
Shawn O. Pearce | 12b5d84 | 2009-08-15 15:11:10 -0700 | [diff] [blame] | 466 | + |
| 467 | URL to redirect a browser to after the end-user has clicked on the |
| 468 | "Sign Out" link in the upper right corner. Organizations using an |
| 469 | enterprise single-sign-on solution may want to redirect the browser |
| 470 | to the SSO product's sign-out page. |
| 471 | + |
| 472 | If not set, the redirect returns to the list of all open changes. |
| 473 | |
Shawn O. Pearce | c9d26b5 | 2009-12-16 08:05:27 -0800 | [diff] [blame] | 474 | [[auth.registerUrl]]auth.registerUrl:: |
| 475 | + |
| 476 | Target for the "Register" link in the upper right corner. Used only |
Edwin Kempin | 5409315 | 2015-05-08 10:50:35 +0200 | [diff] [blame] | 477 | when `auth.type` is `LDAP`, `LDAP_BIND` or `CUSTOM_EXTENSION`. |
Shawn O. Pearce | c9d26b5 | 2009-12-16 08:05:27 -0800 | [diff] [blame] | 478 | + |
| 479 | If not set, no "Register" link is displayed. |
| 480 | |
Chad Horohoe | 6589708 | 2012-11-10 10:26:25 -0800 | [diff] [blame] | 481 | [[auth.registerText]]auth.registerText:: |
| 482 | + |
| 483 | Text for the "Register" link in the upper right corner. Used only |
Edwin Kempin | 5409315 | 2015-05-08 10:50:35 +0200 | [diff] [blame] | 484 | when `auth.type` is `LDAP`, `LDAP_BIND` or `CUSTOM_EXTENSION`. |
Chad Horohoe | 6589708 | 2012-11-10 10:26:25 -0800 | [diff] [blame] | 485 | + |
| 486 | If not set, defaults to "Register". |
| 487 | |
David Pursehouse | 3d60449 | 2013-01-25 17:41:53 +0900 | [diff] [blame] | 488 | [[auth.editFullNameUrl]]auth.editFullNameUrl:: |
| 489 | + |
| 490 | 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] | 491 | full name. Used only when `auth.type` is `LDAP`, `LDAP_BIND` or |
| 492 | `CUSTOM_EXTENSION`. |
David Pursehouse | 3d60449 | 2013-01-25 17:41:53 +0900 | [diff] [blame] | 493 | |
| 494 | [[auth.httpPasswordUrl]]auth.httpPasswordUrl:: |
| 495 | + |
David Pursehouse | 42f4204 | 2013-08-01 14:02:25 +0900 | [diff] [blame] | 496 | Target for the "Obtain Password" link. Used only when `auth.type` is |
Edwin Kempin | 5409315 | 2015-05-08 10:50:35 +0200 | [diff] [blame] | 497 | `CUSTOM_EXTENSION`. |
Shawn Pearce | e0cafe4 | 2013-08-29 23:28:13 -0700 | [diff] [blame] | 498 | |
| 499 | [[auth.switchAccountUrl]]auth.switchAccountUrl:: |
David Pursehouse | 3d60449 | 2013-01-25 17:41:53 +0900 | [diff] [blame] | 500 | + |
Shawn Pearce | e0cafe4 | 2013-08-29 23:28:13 -0700 | [diff] [blame] | 501 | URL to switch user identities and login as a different account than |
| 502 | the currently active account. This is disabled by default except when |
| 503 | `auth.type` is `OPENID` and `DEVELOPMENT_BECOME_ANY_ACCOUNT`. If set |
| 504 | the "Switch Account" link is displayed next to "Sign Out". |
| 505 | + |
| 506 | When `auth.type` does not normally enable this URL administrators may |
Logan Hanks | 71d1ffd | 2017-03-16 14:12:23 -0700 | [diff] [blame] | 507 | set this to `login/`, allowing users to begin a new web session. This value |
Ben Rohlfs | da0a62b | 2021-04-26 17:02:19 +0200 | [diff] [blame] | 508 | is used as an href in the Gerrit web app, so absolute URLs like |
Logan Hanks | 71d1ffd | 2017-03-16 14:12:23 -0700 | [diff] [blame] | 509 | `https://someotherhost/login` work as well. |
| 510 | + |
Ben Rohlfs | da0a62b | 2021-04-26 17:02:19 +0200 | [diff] [blame] | 511 | If a ${path} parameter is included, then the Gerrit web app will substitute the |
Logan Hanks | 71d1ffd | 2017-03-16 14:12:23 -0700 | [diff] [blame] | 512 | currently viewed path in the link. Be aware that this path will include |
| 513 | 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] | 514 | |
Piotr Sikora | 7cec2f8 | 2011-02-26 12:57:30 +0000 | [diff] [blame] | 515 | [[auth.cookiePath]]auth.cookiePath:: |
| 516 | + |
| 517 | Sets "path" attribute of the authentication cookie. |
| 518 | + |
| 519 | If not set, HTTP request's path is used. |
| 520 | |
Sammy Gillespie | 26873c0 | 2016-02-11 14:39:43 +0000 | [diff] [blame] | 521 | [[auth.cookieDomain]]auth.cookieDomain:: |
| 522 | + |
| 523 | Sets "domain" attribute of the authentication cookie. |
| 524 | + |
| 525 | If not set, HTTP request's domain is used. |
| 526 | |
Piotr Sikora | 7cec2f8 | 2011-02-26 12:57:30 +0000 | [diff] [blame] | 527 | [[auth.cookieSecure]]auth.cookieSecure:: |
| 528 | + |
| 529 | Sets "secure" flag of the authentication cookie. If true, cookies |
| 530 | will be transmitted only over HTTPS protocol. |
| 531 | + |
| 532 | By default, false. |
| 533 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 534 | [[auth.emailFormat]]auth.emailFormat:: |
Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 535 | + |
| 536 | Optional format string to construct user email addresses out of |
David Pursehouse | 42f4204 | 2013-08-01 14:02:25 +0900 | [diff] [blame] | 537 | 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] | 538 | or `LDAP`. |
Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 539 | + |
Shawn O. Pearce | 44221bf | 2011-06-27 10:37:30 -0700 | [diff] [blame] | 540 | 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] | 541 | with the login name. E.g. "\{0\}+gerrit@example.com" with a user |
| 542 | login name of "foo" will produce "foo+gerrit@example.com" during |
| 543 | the first time user "foo" registers. |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 544 | + |
Shawn O. Pearce | f7e065e | 2009-09-26 20:01:10 -0700 | [diff] [blame] | 545 | If the site is using `HTTP_LDAP` or `LDAP`, using this option is |
| 546 | discouraged. Setting `ldap.accountEmailAddress` and importing the |
| 547 | email address from the LDAP directory is generally preferred. |
Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 548 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 549 | [[auth.contributorAgreements]]auth.contributorAgreements:: |
Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 550 | + |
| 551 | Controls whether or not the contributor agreement features are |
| 552 | enabled for the Gerrit site. If enabled a user must complete a |
| 553 | contributor agreement before they can upload changes. |
| 554 | + |
Marc Petit-Huguenin | bbb8549 | 2012-12-03 11:11:00 -0800 | [diff] [blame] | 555 | If enabled, the admin must also add one or more |
| 556 | link:config-cla.html[contributor-agreement sections] |
| 557 | in project.config and create agreement files under |
Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 558 | `'$site_path'/static`, so users can actually complete one or |
Grzegorz Kossakowski | 28e4e1b | 2009-09-23 11:33:34 -0700 | [diff] [blame] | 559 | more agreements. |
Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 560 | + |
| 561 | By default this is false (no agreements are used). |
Fredrik Luthander | a3cf354 | 2012-07-04 16:55:35 -0700 | [diff] [blame] | 562 | + |
| 563 | To enable the actual usage of contributor agreement the project |
| 564 | specific config option in the `project.config` must be set: |
Edwin Kempin | 7b64022 | 2022-12-08 16:24:10 +0100 | [diff] [blame] | 565 | link:config-project-config.html#receive.requireContributorAgreement[ |
| 566 | receive.requireContributorAgreement]. |
Shawn O. Pearce | 0d3ecff | 2009-06-01 08:34:17 -0700 | [diff] [blame] | 567 | |
Christian Halstrick | a3d88a5 | 2011-08-31 09:21:41 +0200 | [diff] [blame] | 568 | [[auth.trustContainerAuth]]auth.trustContainerAuth:: |
| 569 | + |
| 570 | If true then it is the responsibility of the container hosting |
| 571 | Gerrit to authenticate users. In this case Gerrit will blindly trust |
| 572 | the container. |
| 573 | + |
| 574 | 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] | 575 | then Gerrit will do the authentication (using Basic authentication). |
Christian Halstrick | a3d88a5 | 2011-08-31 09:21:41 +0200 | [diff] [blame] | 576 | + |
| 577 | By default this is set to false. |
| 578 | |
Luca Milanesio | 4205884 | 2012-01-05 21:25:38 +0000 | [diff] [blame] | 579 | |
Hector Oswaldo Caballero | 2a9ad1f | 2016-09-15 18:24:42 -0400 | [diff] [blame] | 580 | [[auth.gitBasicAuthPolicy]]auth.gitBasicAuthPolicy:: |
| 581 | + |
David Pursehouse | f7a1c2a | 2017-08-25 19:12:54 +0900 | [diff] [blame] | 582 | 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] | 583 | HTTP password, the LDAP or OAUTH password, or a combination of HTTP and LDAP |
| 584 | authentication, to authenticate Git over HTTP and REST API requests. |
| 585 | The supported values are: |
Hector Oswaldo Caballero | 2a9ad1f | 2016-09-15 18:24:42 -0400 | [diff] [blame] | 586 | + |
| 587 | *`HTTP` |
| 588 | + |
David Pursehouse | e292003 | 2017-08-25 19:12:21 +0900 | [diff] [blame] | 589 | 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] | 590 | + |
| 591 | *`LDAP` |
| 592 | + |
| 593 | Only the `LDAP` password is allowed when doing Git over HTTP and REST API |
| 594 | requests. |
| 595 | + |
Luca Milanesio | 51edcb7 | 2017-03-06 11:59:55 +0000 | [diff] [blame] | 596 | *`OAUTH` |
| 597 | + |
David Pursehouse | e292003 | 2017-08-25 19:12:21 +0900 | [diff] [blame] | 598 | 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] | 599 | requests. |
| 600 | + |
Hector Oswaldo Caballero | 2a9ad1f | 2016-09-15 18:24:42 -0400 | [diff] [blame] | 601 | *`HTTP_LDAP` |
| 602 | + |
| 603 | The password in the request is first checked against the HTTP password and, if |
| 604 | it does not match, it is then validated against the `LDAP` password. |
| 605 | + |
Luca Milanesio | 51edcb7 | 2017-03-06 11:59:55 +0000 | [diff] [blame] | 606 | By default this is set to `LDAP` when link:#auth.type[`auth.type`] is `LDAP` |
| 607 | and `OAUTH` when link:#auth.type[`auth.type`] is `OAUTH`. |
Hector Oswaldo Caballero | 2a9ad1f | 2016-09-15 18:24:42 -0400 | [diff] [blame] | 608 | Otherwise, the default value is `HTTP`. |
Luca Milanesio | 1a91871 | 2021-05-06 20:20:48 +0100 | [diff] [blame] | 609 | + |
| 610 | When gitBasicAuthPolicy is set to `LDAP` or `HTTP_LDAP` and the user |
| 611 | is authenticating with the LDAP username/password, the Git client config |
| 612 | needs to have `http.cookieFile` set to a local file, otherwise every |
| 613 | single call would trigger a full LDAP authentication and groups resolution |
| 614 | which could introduce a noticeable latency on the overall execution |
| 615 | and produce unwanted load to the LDAP server. |
Nasser Grainawi | c3b0534 | 2022-02-25 16:58:13 -0700 | [diff] [blame] | 616 | |
Michael Ochmann | e9e046a | 2015-10-20 15:34:29 +0200 | [diff] [blame] | 617 | [[auth.gitOAuthProvider]]auth.gitOAuthProvider:: |
| 618 | + |
| 619 | Selects the OAuth 2 provider to authenticate git over HTTP traffic with. |
| 620 | + |
| 621 | In general there is no way to determine from an access token alone, which |
| 622 | OAuth 2 provider to address to verify that token, and the BasicAuth |
| 623 | scheme does not support amending such details. If multiple OAuth provider |
| 624 | plugins in a system offer support for git over HTTP authentication site |
| 625 | administrators must configure, which one to use as default provider. |
| 626 | In case the provider cannot be determined from a request the access token |
| 627 | will be sent to the default provider for verification. |
| 628 | + |
| 629 | The value of this parameter must be the identifier of an OAuth 2 provider |
| 630 | in the form `plugin-name:provider-name`. Consult the respective plugin |
| 631 | documentation for details. |
| 632 | |
Edwin Kempin | 4b9e5e7 | 2011-09-22 15:06:14 +0200 | [diff] [blame] | 633 | [[auth.userNameToLowerCase]]auth.userNameToLowerCase:: |
| 634 | + |
| 635 | If set the username that is received to authenticate a git operation |
| 636 | is converted to lower case for looking up the user account in Gerrit. |
| 637 | + |
| 638 | By setting this parameter a case insensitive authentication for the |
| 639 | git operations can be achieved, if it is ensured that the usernames in |
| 640 | Gerrit (scheme `username`) are stored in lower case (e.g. if the |
| 641 | parameter link:#ldap.accountSshUserName[ldap.accountSshUserName] is |
| 642 | set to `${sAMAccountName.toLowerCase}`). It is important that for all |
| 643 | existing accounts this username is already in lower case. It is not |
| 644 | possible to convert the usernames of the existing accounts to lower |
| 645 | case because this would break the access to existing per-user |
Thomas Draebing | 8551040 | 2021-03-15 08:03:00 +0100 | [diff] [blame] | 646 | branches and Gerrit provides no tool to do such a conversion. Accounts |
| 647 | created using the REST API or the `create-account` SSH command will |
| 648 | be created with all lowercase characters, when this option is set. |
Edwin Kempin | e7ae45c | 2018-09-20 09:57:15 +0200 | [diff] [blame] | 649 | + |
| 650 | Setting this parameter to `true` will prevent all users from login that |
| 651 | have a non-lower-case username. |
Edwin Kempin | 4b9e5e7 | 2011-09-22 15:06:14 +0200 | [diff] [blame] | 652 | + |
| 653 | This parameter only affects git over http and git over SSH traffic. |
| 654 | + |
| 655 | By default this is set to false. |
| 656 | |
Thomas Draebing | 29595cd | 2021-03-24 15:23:35 +0100 | [diff] [blame] | 657 | [[auth.userNameCaseInsensitive]]auth.userNameCaseInsensitive:: |
| 658 | + |
| 659 | If set the username will be handled case insensitively but case preserving, |
| 660 | i.e. a user can login with `johndoe` or `JohnDoe` for the same account |
| 661 | created for `JohnDoe`. The form of the username used during account creation |
| 662 | will be used wherever the username is displayed. Sandbox branches created |
| 663 | for a user can also only be created for this original form. |
| 664 | + |
| 665 | Note, that this does not work for all existing accounts, if they were |
| 666 | not originally created with all lowercase, since the note keys of the |
| 667 | external IDs will not match the new scheme. For more details refer to |
| 668 | the link:config-accounts.html#external-ids[External ID documentation]. |
| 669 | + |
Thomas Draebing | 585197a | 2021-03-31 09:50:52 +0200 | [diff] [blame] | 670 | Gerrit provides the |
Marcin Czech | 62f989f | 2021-11-16 21:54:43 +0100 | [diff] [blame] | 671 | link:pgm-ChangeExternalIdCaseSensitivity.html[offline] |
| 672 | and the online link:externalid-case-insensitivity.html#online-migration[online] |
| 673 | tools to migrate existing accounts to match the new scheme. |
Thomas Draebing | 585197a | 2021-03-31 09:50:52 +0200 | [diff] [blame] | 674 | + |
Thomas Draebing | 29595cd | 2021-03-24 15:23:35 +0100 | [diff] [blame] | 675 | Naturally, if there were two accounts only different in capitalization, |
| 676 | e.g. `johndoe` and `JohnDoe`, the account `JohnDoe` will not be able |
Thomas Draebing | 585197a | 2021-03-31 09:50:52 +0200 | [diff] [blame] | 677 | to authenticate anymore after setting this option. If such duplicate |
| 678 | accounts exist the migration tool will fail, since the newly computed |
| 679 | note name would be identical and thus conflict. These duplicates thus |
| 680 | have to be deleted manually by deleting the respective external ID. |
Thomas Draebing | 29595cd | 2021-03-24 15:23:35 +0100 | [diff] [blame] | 681 | + |
Thomas Draebing | 350d8e3 | 2021-11-19 13:16:53 +0100 | [diff] [blame] | 682 | For newly initialized sites this option defaults to true. |
| 683 | + |
Thomas Draebing | 29595cd | 2021-03-24 15:23:35 +0100 | [diff] [blame] | 684 | Default is false. |
| 685 | |
Marcin Czech | 540a7a3 | 2021-10-29 16:07:39 +0200 | [diff] [blame] | 686 | [[auth.userNameCaseInsensitiveMigrationMode]]auth.userNameCaseInsensitiveMigrationMode:: |
| 687 | + |
| 688 | Setting migration mode to true allows to fallback to case sensitive |
| 689 | behaviour if the migrated external ID cannot be found. This allows to |
| 690 | trigger the migration while Gerrit process is running. |
| 691 | + |
David Pursehouse | 21bd07b | 2015-11-27 00:15:42 +0900 | [diff] [blame] | 692 | Default is false. |
| 693 | |
| 694 | [[auth.enableRunAs]]auth.enableRunAs:: |
| 695 | + |
| 696 | If true HTTP REST APIs will accept the `X-Gerrit-RunAs` HTTP request |
Owen Li | c24f724 | 2017-06-14 10:04:00 -0400 | [diff] [blame] | 697 | header from any users granted the link:access-control.html#capability_runAs[Run As] |
| 698 | capability. The header and capability permit the authenticated user |
| 699 | to impersonate another account. |
| 700 | + |
| 701 | If false the feature is disabled and cannot be re-enabled without |
| 702 | editing gerrit.config and restarting the server. |
| 703 | + |
| 704 | Default is true. |
| 705 | |
| 706 | [[auth.allowRegisterNewEmail]]auth.allowRegisterNewEmail:: |
Owen Li | e2877bb | 2017-07-14 09:11:20 -0400 | [diff] [blame] | 707 | + |
| 708 | Whether users are allowed to register new email addresses. |
| 709 | + |
| 710 | In addition for the HTTP authentication type |
| 711 | link:#auth.httpemailheader[auth.httpemailheader] must *not* be set to |
Owen Li | c24f724 | 2017-06-14 10:04:00 -0400 | [diff] [blame] | 712 | enable registration of new email addresses. |
| 713 | + |
Patrick Hiesel | 8d0770e | 2018-10-09 13:39:54 +0200 | [diff] [blame] | 714 | By default, true. |
| 715 | |
Edwin Kempin | 3e856b2 | 2020-11-04 14:45:21 +0100 | [diff] [blame] | 716 | [[auth.autoUpdateAccountActiveStatus]]auth.autoUpdateAccountActiveStatus:: |
| 717 | + |
| 718 | Whether to allow automatic synchronization of an account's inactive flag upon login. |
Nasser Grainawi | 8ea9fec | 2022-02-25 17:38:10 -0700 | [diff] [blame] | 719 | + |
Shawn Pearce | a931fe1 | 2013-06-11 12:29:17 -0700 | [diff] [blame] | 720 | If set to true, upon login, if the authentication back-end reports the account as active, |
Nasser Grainawi | 8ea9fec | 2022-02-25 17:38:10 -0700 | [diff] [blame] | 721 | the account's inactive flag in NoteDb will be updated to be active. |
| 722 | + |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 723 | If the authentication back-end reports the account as inactive, the account's flag will be |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 724 | updated to be inactive and the login attempt will be blocked. Users enabling this feature |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 725 | should ensure that their authentication back-end is supported. Currently, only |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 726 | strict 'LDAP' authentication is supported. |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 727 | + |
| 728 | In addition, if this parameter is not set, or false, the corresponding scheduled |
Shawn O. Pearce | 4b21228 | 2009-08-05 19:45:56 -0700 | [diff] [blame] | 729 | task to deactivate inactive Gerrit accounts will also be disabled. If this |
| 730 | parameter is set to true, users should also consider configuring the |
| 731 | link:#accountDeactivation[accountDeactivation] section appropriately. |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 732 | + |
David Pursehouse | a61ee50 | 2016-09-06 16:27:09 +0900 | [diff] [blame] | 733 | By default, false. |
Saša Živkov | e607d6c | 2016-02-24 10:46:46 +0000 | [diff] [blame] | 734 | |
Patrick Hiesel | 8d0770e | 2018-10-09 13:39:54 +0200 | [diff] [blame] | 735 | [[auth.skipFullRefEvaluationIfAllRefsAreVisible]]auth.skipFullRefEvaluationIfAllRefsAreVisible:: |
| 736 | + |
Edwin Kempin | 3e856b2 | 2020-11-04 14:45:21 +0100 | [diff] [blame] | 737 | Whether to skip the full ref visibility checks as a performance shortcut when a |
| 738 | user has READ permission for all refs. |
| 739 | + |
| 740 | The full ref filtering would filter out refs for pending edits, private changes |
| 741 | and auto merge commits. |
Patrick Hiesel | 8d0770e | 2018-10-09 13:39:54 +0200 | [diff] [blame] | 742 | + |
| 743 | By default, true. |
| 744 | |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 745 | [[cache]] |
| 746 | === Section cache |
| 747 | |
Luca Milanesio | 82ea730 | 2023-01-02 17:01:14 +0000 | [diff] [blame] | 748 | [[cache.threads]]cache.threads:: |
| 749 | + |
| 750 | Number of threads to use when running asynchronous cache tasks. |
| 751 | The threads executor is delegated to when sending removal notifications to listeners, |
| 752 | when asynchronous computations like refresh, refreshAfterWrite are performed, or when |
| 753 | performing periodic maintenance. |
| 754 | + |
| 755 | **NOTE**: Setting it to 0 disables the dedicated thread pool and indexing will be done in the |
| 756 | same thread as the operation. This may result in evictions taking longer because the |
| 757 | listeners are executed in the caller's thread. |
| 758 | + |
| 759 | By default, the JVM common ForkJoinPool is used. |
| 760 | |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 761 | [[cache.directory]]cache.directory:: |
| 762 | + |
| 763 | Path to a local directory where Gerrit can write cached entities for |
| 764 | future lookup. This local disk cache is used to retain potentially |
| 765 | expensive to compute information across restarts. If the location |
| 766 | does not exist, Gerrit will try to create it. |
| 767 | + |
Saša Živkov | e607d6c | 2016-02-24 10:46:46 +0000 | [diff] [blame] | 768 | Technically, cached entities are persisted as a set of H2 databases |
| 769 | inside this directory. |
| 770 | + |
Shawn O. Pearce | 4b21228 | 2009-08-05 19:45:56 -0700 | [diff] [blame] | 771 | If not absolute, the path is resolved relative to `$site_path`. |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 772 | + |
Shawn O. Pearce | 4b21228 | 2009-08-05 19:45:56 -0700 | [diff] [blame] | 773 | Default is unset, no disk cache. |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 774 | |
Thomas Draebing | e5dcc60 | 2020-04-20 15:40:54 +0200 | [diff] [blame] | 775 | [[cache.enableDiskStatMetrics]]cache.enableDiskStatMetrics:: |
| 776 | + |
| 777 | Whether to enable the computation of disk statistics of persistent caches. |
| 778 | This computation is expensive and requires a long time on larger installations. |
| 779 | + |
| 780 | By default, false. |
| 781 | |
Saša Živkov | f313457 | 2016-02-09 11:42:46 +0100 | [diff] [blame] | 782 | [[cache.h2CacheSize]]cache.h2CacheSize:: |
| 783 | + |
Björn Pedersen | 64af3ad | 2016-05-20 10:21:07 +0200 | [diff] [blame] | 784 | 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] | 785 | + |
Björn Pedersen | 64af3ad | 2016-05-20 10:21:07 +0200 | [diff] [blame] | 786 | 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] | 787 | H2 uses memory to cache its database content. The parameter `h2CacheSize` |
| 788 | 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] | 789 | caused by the H2 database using too much memory. |
| 790 | + |
Dave Borowitz | 3d1f85c | 2018-11-16 15:36:04 -0800 | [diff] [blame] | 791 | Technically the H2 cache size is configured using the CACHE_SIZE parameter in |
| 792 | the H2 JDBC connection URL, as described |
Marian Harbach | 3425337 | 2019-12-10 18:01:31 +0100 | [diff] [blame] | 793 | link:http://www.h2database.com/html/features.html#cache_settings[here,role=external,window=_blank] |
Saša Živkov | f313457 | 2016-02-09 11:42:46 +0100 | [diff] [blame] | 794 | + |
Björn Pedersen | 64af3ad | 2016-05-20 10:21:07 +0200 | [diff] [blame] | 795 | Default is unset, using up to half of the available memory. |
David Pursehouse | e6976dc | 2017-06-30 16:33:44 +0900 | [diff] [blame] | 796 | + |
Björn Pedersen | 64af3ad | 2016-05-20 10:21:07 +0200 | [diff] [blame] | 797 | 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] | 798 | + |
| 799 | Common unit suffixes of 'k', 'm', or 'g' are supported. |
| 800 | |
Björn Pedersen | 64af3ad | 2016-05-20 10:21:07 +0200 | [diff] [blame] | 801 | [[cache.h2AutoServer]]cache.h2AutoServer:: |
| 802 | + |
| 803 | If set to true, enable H2 autoserver mode for the H2-backed persistent cache |
| 804 | databases. |
| 805 | + |
Marian Harbach | 3425337 | 2019-12-10 18:01:31 +0100 | [diff] [blame] | 806 | See link:http://www.h2database.com/html/features.html#auto_mixed_mode[here,role=external,window=_blank] |
Björn Pedersen | 64af3ad | 2016-05-20 10:21:07 +0200 | [diff] [blame] | 807 | for detail. |
| 808 | + |
| 809 | Default is false. |
| 810 | |
Antonio Barone | 0925081 | 2020-11-13 18:06:00 +0100 | [diff] [blame] | 811 | [[cache.openFiles]]cache.openFiles:: |
| 812 | + |
| 813 | The number of file descriptors to add to the limit set by the Gerrit daemon. |
| 814 | + |
| 815 | Persistent caches are stored on the file system and as such participate in the |
| 816 | file descriptors utilization. The number of file descriptors can vary depending |
| 817 | on the cache configuration and the specific backend used. |
| 818 | + |
| 819 | The additional file descriptors required by the cache should be accounted for |
| 820 | via this setting, so that the Gerrit daemon can adjust the ulimit accordingly. |
| 821 | + |
| 822 | If you increase this to a larger setting you may need to also adjust |
| 823 | the ulimit on file descriptors for the host JVM, as Gerrit needs |
| 824 | additional file descriptors available for network sockets and other |
| 825 | repository data manipulation. |
| 826 | + |
| 827 | Default is 0. |
| 828 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 829 | [[cache.name.maxAge]]cache.<name>.maxAge:: |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 830 | + |
Prudhvi Akhil Alahari | b9417cf | 2023-09-27 14:17:40 +0530 | [diff] [blame] | 831 | Maximum age to keep an entry in the cache. |
Shawn O. Pearce | d9c403e | 2009-08-19 08:35:41 -0700 | [diff] [blame] | 832 | Values should use common unit suffixes to express their setting: |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 833 | + |
Shawn O. Pearce | d9c403e | 2009-08-19 08:35:41 -0700 | [diff] [blame] | 834 | * s, sec, second, seconds |
| 835 | * m, min, minute, minutes |
| 836 | * h, hr, hour, hours |
| 837 | * d, day, days |
| 838 | * w, week, weeks (`1 week` is treated as `7 days`) |
| 839 | * mon, month, months (`1 month` is treated as `30 days`) |
| 840 | * y, year, years (`1 year` is treated as `365 days`) |
| 841 | |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 842 | + |
Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 843 | -- |
Edwin Kempin | abcd504 | 2013-03-12 16:04:37 +0100 | [diff] [blame] | 844 | 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] | 845 | supplied, the maximum age is infinite and items are never purged |
| 846 | except when the cache is full. |
Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 847 | |
Shawn O. Pearce | 2e1cb2b | 2012-05-24 14:28:40 -0700 | [diff] [blame] | 848 | Default is `0`, meaning store forever with no expire, except: |
Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 849 | |
Shawn O. Pearce | 05687e9 | 2011-04-04 17:29:03 -0400 | [diff] [blame] | 850 | * `"adv_bases"`: default is `10 minutes` |
Shawn O. Pearce | d9c403e | 2009-08-19 08:35:41 -0700 | [diff] [blame] | 851 | * `"ldap_groups"`: default is `1 hour` |
Shawn O. Pearce | d9c403e | 2009-08-19 08:35:41 -0700 | [diff] [blame] | 852 | * `"web_sessions"`: default is `12 hours` |
Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 853 | -- |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 854 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 855 | [[cache.name.memoryLimit]]cache.<name>.memoryLimit:: |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 856 | + |
Shawn O. Pearce | 2e1cb2b | 2012-05-24 14:28:40 -0700 | [diff] [blame] | 857 | The total cost of entries to retain in memory. The cost computation |
| 858 | varies by the cache. For most caches where the in-memory size of each |
| 859 | entry is relatively the same, memoryLimit is currently defined to be |
| 860 | the number of entries held by the cache (each entry costs 1). |
| 861 | + |
Youssef Elghareeb | 1d1867d | 2021-10-27 13:11:38 +0200 | [diff] [blame] | 862 | For caches where the size of an entry can vary significantly between individual |
| 863 | entries (notably `"git_modified_files"`, `"modified_files"`, `"git_file_diff"`, |
| 864 | `"gerrit_file_diff"`, `"diff_intraline"`), memoryLimit is an approximation of |
| 865 | the total number of bytes stored by the cache. Larger entries that represent |
| 866 | bigger patch sets or longer source files will consume a bigger portion of the |
| 867 | memoryLimit. For these caches the memoryLimit should be set to roughly the |
| 868 | amount of RAM (in bytes) the administrator can dedicate to the cache. |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 869 | + |
Shawn O. Pearce | efaf979 | 2009-09-02 18:12:52 -0700 | [diff] [blame] | 870 | Default is 1024 for most caches, except: |
| 871 | + |
Shawn O. Pearce | 05687e9 | 2011-04-04 17:29:03 -0400 | [diff] [blame] | 872 | * `"adv_bases"`: default is `4096` |
Youssef Elghareeb | 1d1867d | 2021-10-27 13:11:38 +0200 | [diff] [blame] | 873 | * `"git_modified_files"`: default is `10m` (10 MiB of memory) |
| 874 | * `"modified_files"`: default is `10m` (10 MiB of memory) |
| 875 | * `"git_file_diff"`: default is `10m` (10 MiB of memory) |
| 876 | * `"gerrit_file_diff"`: default is `10m` (10 MiB of memory) |
Shawn O. Pearce | 2e1cb2b | 2012-05-24 14:28:40 -0700 | [diff] [blame] | 877 | * `"diff_intraline"`: default is `10m` (10 MiB of memory) |
Dave Borowitz | 7388e9e | 2016-09-23 13:20:29 +0200 | [diff] [blame] | 878 | * `"diff_summary"`: default is `10m` (10 MiB of memory) |
Dave Borowitz | 70dfbd6 | 2018-06-05 13:30:48 -0400 | [diff] [blame] | 879 | * `"external_ids_map"`: default is `2` and should not be changed |
Edwin Kempin | d967ec4 | 2017-11-13 15:14:41 +0100 | [diff] [blame] | 880 | * `"groups"`: default is unlimited |
| 881 | * `"groups_byname"`: default is unlimited |
| 882 | * `"groups_byuuid"`: default is unlimited |
Gal Paikin | f74ee38 | 2021-03-22 16:00:25 +0100 | [diff] [blame] | 883 | * `"groups_byuuid_persisted"`: default is `1g` (1 GiB of disk space) |
Shawn O. Pearce | 2e1cb2b | 2012-05-24 14:28:40 -0700 | [diff] [blame] | 884 | * `"plugin_resources"`: default is 2m (2 MiB of memory) |
| 885 | |
| 886 | + |
Luca Milanesio | 3bce568 | 2022-11-03 19:41:01 +0000 | [diff] [blame] | 887 | If set to 0 the cache is disabled; entries are loaded but not stored |
| 888 | in-memory. |
Youssef Elghareeb | e2f9d5b | 2023-07-04 18:13:03 +0200 | [diff] [blame] | 889 | |
Luca Milanesio | 3bce568 | 2022-11-03 19:41:01 +0000 | [diff] [blame] | 890 | + |
| 891 | **NOTE**: When the cache is disabled, there is no locking when accessing |
| 892 | the same key/value, and therefore multiple threads may |
| 893 | load the same value concurrently with a higher memory footprint. |
| 894 | To keep a minimum caching and avoid concurrent loading of the same |
| 895 | key/value, set `memoryLimit` to `1` and `maxAge` to `1`. |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 896 | |
Dave Borowitz | 08bac5ca | 2018-06-05 14:58:28 -0400 | [diff] [blame] | 897 | [[cache.name.expireFromMemoryAfterAccess]]cache.<name>.expireFromMemoryAfterAccess:: |
| 898 | + |
| 899 | Time after last access to automatically expire entries from an in-memory |
| 900 | cache. If 0 or not specified, entries are never expired in this manner. |
| 901 | Values may use unit suffixes as in link:#cache.name.maxAge[maxAge]. |
| 902 | + |
| 903 | This option only applies to in-memory caches; persistent cache values are |
| 904 | not expired in this manner, and are only pruned via |
| 905 | link:#cache.name.diskLimit[diskLimit]. |
| 906 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 907 | [[cache.name.diskLimit]]cache.<name>.diskLimit:: |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 908 | + |
Shawn O. Pearce | 2e1cb2b | 2012-05-24 14:28:40 -0700 | [diff] [blame] | 909 | Total size in bytes of the keys and values stored on disk. Caches that |
| 910 | have grown bigger than this size are scanned daily at 1 AM local |
| 911 | server time to trim the cache. Entries are removed in least recently |
| 912 | accessed order until the cache fits within this limit. Caches may |
| 913 | grow larger than this during the day, as the size check is only |
| 914 | performed once every 24 hours. |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 915 | + |
Saša Živkov | e789f2e | 2016-09-22 10:37:34 +0200 | [diff] [blame] | 916 | Default is 128 MiB per cache, except: |
| 917 | + |
Dave Borowitz | bab4586 | 2018-05-01 12:31:48 -0400 | [diff] [blame] | 918 | * `"change_notes"`: disk storage is disabled by default |
Dave Borowitz | 7388e9e | 2016-09-23 13:20:29 +0200 | [diff] [blame] | 919 | * `"diff_summary"`: default is `1g` (1 GiB of disk space) |
Dave Borowitz | b20d23a8 | 2018-08-21 13:43:10 -0700 | [diff] [blame] | 920 | * `"external_ids_map"`: disk storage is disabled by default |
Patrick Hiesel | c2c108c | 2020-07-23 09:54:22 +0200 | [diff] [blame] | 921 | * `"persisted_projects"`: default is `1g` (1 GiB of disk space) |
Saša Živkov | e789f2e | 2016-09-22 10:37:34 +0200 | [diff] [blame] | 922 | |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 923 | + |
Dave Borowitz | dab5155 | 2018-05-14 16:35:37 -0700 | [diff] [blame] | 924 | If 0 or negative, disk storage for the cache is disabled. |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 925 | |
Patrick Hiesel | d70f37f | 2020-04-16 14:12:31 +0200 | [diff] [blame] | 926 | [[cache.name.refreshAfterWrite]]cache.<name>.refreshAfterWrite:: |
| 927 | + |
| 928 | Duration after which we asynchronously refresh the cached value. |
| 929 | + |
| 930 | Values should use common unit suffixes to express their setting: |
| 931 | + |
| 932 | * ms, milliseconds |
| 933 | * s, sec, second, seconds |
| 934 | * m, min, minute, minutes |
| 935 | * h, hr, hour, hours |
| 936 | + |
| 937 | This applies only to these caches that support refreshing: |
| 938 | + |
| 939 | * `"projects"`: Caching project information in-memory. Defaults to 15 minutes. |
| 940 | |
| 941 | [[cache.refreshThreadPoolSize]]cache.refreshThreadPoolSize:: |
| 942 | + |
| 943 | Number of threads that are available to refresh cached values that became |
| 944 | out of date. This applies only to these caches that support refreshing: |
| 945 | + |
| 946 | * `"projects"`: Caching project information in-memory |
| 947 | + |
| 948 | Refreshes will only be scheduled on this executor if the values are |
| 949 | out of sync. |
| 950 | The check if they are is cheap and always happens on the thread that |
| 951 | inquires for a cached value. |
| 952 | + |
| 953 | Defaults to 2. |
| 954 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 955 | ==== [[cache_names]]Standard Caches |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 956 | |
Shawn O. Pearce | 4a45271 | 2009-05-28 20:12:33 -0700 | [diff] [blame] | 957 | cache `"accounts"`:: |
| 958 | + |
Shawn O. Pearce | 4dba988 | 2009-08-05 19:55:15 -0700 | [diff] [blame] | 959 | Cache entries contain important details of an active user, including |
Alice Kober-Sotzek | eab3320 | 2017-09-27 13:54:30 +0200 | [diff] [blame] | 960 | their display name, preferences, and known email addresses. Entry |
Dave Borowitz | ada289c | 2018-12-18 13:24:14 -0800 | [diff] [blame] | 961 | information is obtained from NoteDb data in the `All-Users` repo. |
Shawn O. Pearce | 4dba988 | 2009-08-05 19:55:15 -0700 | [diff] [blame] | 962 | |
| 963 | + |
Dave Borowitz | ada289c | 2018-12-18 13:24:14 -0800 | [diff] [blame] | 964 | 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] | 965 | |
Shawn O. Pearce | 05687e9 | 2011-04-04 17:29:03 -0400 | [diff] [blame] | 966 | cache `"adv_bases"`:: |
| 967 | + |
| 968 | Used only for push over smart HTTP when branch level access controls |
David Pursehouse | 9246356 | 2013-06-24 10:16:28 +0900 | [diff] [blame] | 969 | are enabled. The cache entry contains all commits that are available |
Shawn O. Pearce | 05687e9 | 2011-04-04 17:29:03 -0400 | [diff] [blame] | 970 | for the client to use as potential delta bases. Push over smart HTTP |
| 971 | requires two HTTP requests, and this cache tries to carry state from |
| 972 | the first request into the second to ensure it can complete. |
| 973 | |
Patrick Hiesel | 7575e88 | 2020-04-06 14:09:32 +0200 | [diff] [blame] | 974 | cache `"default_preferences"`:: |
| 975 | + |
| 976 | Caches the server's default general, edit and diff preferences. |
| 977 | + |
| 978 | Default value is 1 to hold only the most current version in-memory. |
| 979 | |
Patrick Hiesel | ace3dc9 | 2019-01-15 14:08:13 +0000 | [diff] [blame] | 980 | cache `"changes"`:: |
Gustaf Lundh | 47ce4e3 | 2012-05-21 11:18:42 +0200 | [diff] [blame] | 981 | + |
Gustaf Lundh | 3353c36 | 2013-04-24 17:25:39 +0200 | [diff] [blame] | 982 | The size of `memoryLimit` determines the number of projects for which |
| 983 | 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] | 984 | changes for up to 1024 projects can be held in the cache. |
Gustaf Lundh | 5349377 | 2012-11-18 18:41:15 -0800 | [diff] [blame] | 985 | + |
Patrick Hiesel | ace3dc9 | 2019-01-15 14:08:13 +0000 | [diff] [blame] | 986 | Default value is 0 (disabled). It is disabled by default due to the fact |
| 987 | that change updates are not communicated between Gerrit servers. Hence |
Matthias Sohn | d8182ba | 2019-12-09 14:50:23 +0100 | [diff] [blame] | 988 | this cache should be disabled in a cluster setup using multiple primary |
| 989 | or multiple replica nodes. |
Gustaf Lundh | 5349377 | 2012-11-18 18:41:15 -0800 | [diff] [blame] | 990 | + |
Nasser Grainawi | 8ea9fec | 2022-02-25 17:38:10 -0700 | [diff] [blame] | 991 | The cache should be flushed whenever NoteDb change metadata in a repository is |
| 992 | modified outside of Gerrit. |
Gustaf Lundh | 47ce4e3 | 2012-05-21 11:18:42 +0200 | [diff] [blame] | 993 | |
Martin Fick | 9bfeb0e | 2023-08-09 10:04:58 -0600 | [diff] [blame] | 994 | cache `"changes_by_project"`:: |
| 995 | + |
| 996 | Ideally, the memorylimit of this cache is large enough to cover all projects. |
| 997 | This should significantly speed up change ref advertisements and git pushes, |
| 998 | especially for projects with lots of changes, and particularly on replicas |
| 999 | where there is no index. |
| 1000 | |
Youssef Elghareeb | 1d1867d | 2021-10-27 13:11:38 +0200 | [diff] [blame] | 1001 | cache `"git_modified_files"`:: |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 1002 | + |
Youssef Elghareeb | 1d1867d | 2021-10-27 13:11:38 +0200 | [diff] [blame] | 1003 | Each item caches the list of git modified files between two git trees |
| 1004 | corresponding to two different commits. This cache does not read the actual |
| 1005 | file contents nor does it include the edits (modified regions) of the files. |
| 1006 | |
| 1007 | cache `"modified_files"`:: |
| 1008 | + |
| 1009 | Each item caches the list of modified files between two commits. This cache |
| 1010 | is similar to the `git_modified_files` cache but performs extra logic including |
| 1011 | filtering out files that are untouched by both commits because they were purely |
| 1012 | modified between the parent commits. |
| 1013 | |
| 1014 | cache `"git_file_diff"`:: |
| 1015 | + |
| 1016 | Each item caches the pure git diff between two git trees for a specific file |
| 1017 | path. The diff includes all the file attributes (old/new paths, change/patch |
| 1018 | types) as well as the list of edits corresponding to the modified regions in |
| 1019 | the file. |
| 1020 | |
| 1021 | cache `"gerrit_file_diff"`:: |
| 1022 | + |
| 1023 | Each item caches the diff between two git commits for a specific file path. |
| 1024 | This cache is similar to the `git_file_diff` cache but performs extra logic |
| 1025 | including identifying the edits that are due to rebase. The diff for the |
| 1026 | "commit message" and "merge list" can also be requested from this cache. |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 1027 | + |
Shawn O. Pearce | 2e1cb2b | 2012-05-24 14:28:40 -0700 | [diff] [blame] | 1028 | Entries in this cache are relatively large, so memoryLimit is an |
| 1029 | estimate in bytes of memory used. Administrators should try to target |
| 1030 | cache.diff.memoryLimit to fit all changes users will view in a 1 or 2 |
Youssef Elghareeb | 1d1867d | 2021-10-27 13:11:38 +0200 | [diff] [blame] | 1031 | day span. The same applies for other diff caches: `"git_modified_files"`, |
| 1032 | `"modified_files"` and `"git_file_diff"`. |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 1033 | |
Shawn O. Pearce | f0cfe53 | 2011-04-11 23:40:06 -0400 | [diff] [blame] | 1034 | cache `"diff_intraline"`:: |
| 1035 | + |
| 1036 | Each item caches the intraline difference of one file, when compared |
| 1037 | between two commits. Gerrit uses this cache to accelerate display of |
| 1038 | intraline differences when viewing a file. |
| 1039 | + |
Shawn O. Pearce | 2e1cb2b | 2012-05-24 14:28:40 -0700 | [diff] [blame] | 1040 | Entries in this cache are relatively large, so memoryLimit is an |
| 1041 | estimate in bytes of memory used. Administrators should try to target |
| 1042 | cache.diff.memoryLimit to fit all files users will view in a 1 or 2 |
| 1043 | day span. |
Shawn O. Pearce | f0cfe53 | 2011-04-11 23:40:06 -0400 | [diff] [blame] | 1044 | |
Dave Borowitz | 7388e9e | 2016-09-23 13:20:29 +0200 | [diff] [blame] | 1045 | cache `"diff_summary"`:: |
Saša Živkov | e789f2e | 2016-09-22 10:37:34 +0200 | [diff] [blame] | 1046 | + |
| 1047 | Each item caches list of file paths which are different between two |
| 1048 | commits. Gerrit uses this cache to accelerate computing of the list |
| 1049 | of paths of changed files. |
| 1050 | + |
| 1051 | Ideally, disk limit of this cache is large enough to cover all changes. |
| 1052 | This should significantly speed up change reindexing, especially |
| 1053 | full offline reindexing. |
| 1054 | |
Dave Borowitz | 6f7fa0a | 2018-06-05 13:30:48 -0400 | [diff] [blame] | 1055 | cache `"external_ids_map"`:: |
| 1056 | + |
| 1057 | 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] | 1058 | of link:config-accounts.html#external-ids[all current external IDs]. The |
| 1059 | cache may temporarily contain 2 entries, but the second one is promptly |
| 1060 | expired. |
Dave Borowitz | 6f7fa0a | 2018-06-05 13:30:48 -0400 | [diff] [blame] | 1061 | + |
Dave Borowitz | b20d23a8 | 2018-08-21 13:43:10 -0700 | [diff] [blame] | 1062 | It is not recommended to change the in-memory attributes of this cache |
| 1063 | away from the defaults. The cache may be persisted by setting |
| 1064 | `diskLimit`, which is only recommended if cold start performance is |
| 1065 | problematic. |
Dave Borowitz | 6f7fa0a | 2018-06-05 13:30:48 -0400 | [diff] [blame] | 1066 | |
Shawn O. Pearce | 2d65d29 | 2011-06-24 08:12:02 -0700 | [diff] [blame] | 1067 | cache `"git_tags"`:: |
| 1068 | + |
| 1069 | If branch or reference level READ access controls are used, this |
| 1070 | cache tracks which tags are reachable from the branch tips of a |
| 1071 | repository. Gerrit uses this information to determine the set |
| 1072 | of tags that a client may access, derived from which tags are |
| 1073 | part of the history of a visible branch. |
| 1074 | + |
| 1075 | The cache is persisted to disk across server restarts as it can |
| 1076 | be expensive to compute (60 or more seconds for a large history |
| 1077 | like the Linux kernel repository). |
| 1078 | |
Youssef Elghareeb | 3d54930 | 2020-07-15 17:08:28 +0200 | [diff] [blame] | 1079 | cache `"comment_context"`:: |
| 1080 | + |
| 1081 | Caches the context lines of comments, which are the lines of the source file |
| 1082 | highlighted by the user when the comment was written. |
| 1083 | |
Shawn O. Pearce | 4a45271 | 2009-05-28 20:12:33 -0700 | [diff] [blame] | 1084 | cache `"groups"`:: |
| 1085 | + |
Edwin Kempin | 3091e11 | 2017-11-13 15:23:58 +0100 | [diff] [blame] | 1086 | Caches the basic group information of internal groups by group ID, |
| 1087 | including the group owner, name, and description. |
| 1088 | + |
Edwin Kempin | d967ec4 | 2017-11-13 15:14:41 +0100 | [diff] [blame] | 1089 | For this cache it is important to configure a size that is larger than |
| 1090 | the number of internal Gerrit groups, otherwise general Gerrit |
| 1091 | performance may be poor. This is why by default this cache is |
| 1092 | unlimited. |
| 1093 | + |
Edwin Kempin | 3091e11 | 2017-11-13 15:23:58 +0100 | [diff] [blame] | 1094 | External group membership obtained from LDAP is cached under |
| 1095 | `"ldap_groups"`. |
| 1096 | |
| 1097 | cache `"groups_byname"`:: |
| 1098 | + |
| 1099 | Caches the basic group information of internal groups by group name, |
| 1100 | including the group owner, name, and description. |
| 1101 | + |
Edwin Kempin | d967ec4 | 2017-11-13 15:14:41 +0100 | [diff] [blame] | 1102 | For this cache it is important to configure a size that is larger than |
| 1103 | the number of internal Gerrit groups, otherwise general Gerrit |
| 1104 | performance may be poor. This is why by default this cache is |
| 1105 | unlimited. |
| 1106 | + |
Edwin Kempin | 3091e11 | 2017-11-13 15:23:58 +0100 | [diff] [blame] | 1107 | External group membership obtained from LDAP is cached under |
| 1108 | `"ldap_groups"`. |
| 1109 | |
| 1110 | cache `"groups_byuuid"`:: |
| 1111 | + |
| 1112 | Caches the basic group information of internal groups by group UUID, |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 1113 | including the group owner, name, and description. |
| 1114 | + |
Edwin Kempin | d967ec4 | 2017-11-13 15:14:41 +0100 | [diff] [blame] | 1115 | For this cache it is important to configure a size that is larger than |
| 1116 | the number of internal Gerrit groups, otherwise general Gerrit |
| 1117 | performance may be poor. This is why by default this cache is |
| 1118 | unlimited. |
| 1119 | + |
Alice Kober-Sotzek | eab3320 | 2017-09-27 13:54:30 +0200 | [diff] [blame] | 1120 | External group membership obtained from LDAP is cached under |
| 1121 | `"ldap_groups"`. |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 1122 | |
Gal Paikin | f74ee38 | 2021-03-22 16:00:25 +0100 | [diff] [blame] | 1123 | cache `"groups_byuuid_persisted"`:: |
| 1124 | + |
| 1125 | Caches the basic group information of internal groups by group UUID, |
| 1126 | including the group owner, name, and description. |
| 1127 | + |
| 1128 | This is the persisted version of `groups_byuuid` cache. The intention of this |
| 1129 | cache is to have an in-memory size of 0. |
| 1130 | + |
| 1131 | External group membership obtained from LDAP is cached under |
| 1132 | `"ldap_groups"`. |
| 1133 | |
Alice Kober-Sotzek | 864ed14 | 2017-10-12 14:24:36 +0200 | [diff] [blame] | 1134 | cache `"groups_bymember"`:: |
Matt Fischer | 620255a | 2011-03-22 14:28:23 -0500 | [diff] [blame] | 1135 | + |
Alice Kober-Sotzek | 864ed14 | 2017-10-12 14:24:36 +0200 | [diff] [blame] | 1136 | Caches the groups which contain a specific member (account). If direct |
| 1137 | updates are made to the `account_group_members` table, this cache should |
| 1138 | be flushed. |
| 1139 | |
Alice Kober-Sotzek | 3e1fe1b | 2017-10-12 14:44:17 +0200 | [diff] [blame] | 1140 | cache `"groups_bysubgroups"`:: |
| 1141 | + |
| 1142 | Caches the parent groups of a subgroup. If direct updates are made |
Matt Fischer | 620255a | 2011-03-22 14:28:23 -0500 | [diff] [blame] | 1143 | to the `account_group_includes` table, this cache should be flushed. |
| 1144 | |
Youssef Elghareeb | f08d4b3 | 2020-03-26 18:02:15 +0100 | [diff] [blame] | 1145 | cache `"groups_external"`:: |
| 1146 | + |
| 1147 | Caches all the external groups available to Gerrit. The cache holds a |
| 1148 | single entry which maps to the latest available of all external groups' |
| 1149 | UUIDs. This cache uses "groups_external_persisted" to load its value. |
| 1150 | |
| 1151 | cache `"groups_external_persisted"`:: |
| 1152 | + |
| 1153 | Caches all external groups available to Gerrit at some point in history. |
| 1154 | The cache key is representation of a specific groups state in NoteDb and |
| 1155 | the value is the list of all external groups. |
| 1156 | The cache is persisted to enhance performance. |
| 1157 | |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 1158 | cache `"ldap_groups"`:: |
| 1159 | + |
| 1160 | Caches the LDAP groups that a user belongs to, if LDAP has been |
| 1161 | configured on this server. This cache should be configured with a |
| 1162 | low maxAge setting, to ensure LDAP modifications are picked up in |
| 1163 | a timely fashion. |
Shawn O. Pearce | 4a45271 | 2009-05-28 20:12:33 -0700 | [diff] [blame] | 1164 | |
Gustaf Lundh | 0919a49 | 2012-10-19 15:29:23 +0200 | [diff] [blame] | 1165 | cache `"ldap_groups_byinclude"`:: |
| 1166 | + |
| 1167 | Caches the hierarchical structure of LDAP groups. |
| 1168 | |
Shawn O. Pearce | 6d26f4a | 2009-08-24 15:43:52 -0700 | [diff] [blame] | 1169 | cache `"ldap_usernames"`:: |
| 1170 | + |
| 1171 | Caches a mapping of LDAP username to Gerrit account identity. The |
| 1172 | cache automatically updates when a user first creates their account |
| 1173 | within Gerrit, so the cache expire time is largely irrelevant. |
| 1174 | |
Shawn O. Pearce | 0c1abdb | 2011-06-24 11:01:25 -0700 | [diff] [blame] | 1175 | cache `"permission_sort"`:: |
| 1176 | + |
David Pursehouse | 221d4f6 | 2012-06-08 17:38:08 +0900 | [diff] [blame] | 1177 | 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] | 1178 | reference. Sorting the sections can be expensive when regular |
| 1179 | expressions are used, so this cache remembers the ordering for |
| 1180 | each branch. |
| 1181 | |
Shawn O. Pearce | 2e1cb2b | 2012-05-24 14:28:40 -0700 | [diff] [blame] | 1182 | cache `"plugin_resources"`:: |
| 1183 | + |
| 1184 | Caches formatted plugin resources, such as plugin documentation that |
| 1185 | has been converted from Markdown to HTML. The memoryLimit refers to |
| 1186 | the bytes of memory dedicated to storing the documentation. |
| 1187 | |
Patrick Hiesel | c2c108c | 2020-07-23 09:54:22 +0200 | [diff] [blame] | 1188 | cache `"persisted_projects"`:: |
| 1189 | + |
| 1190 | Caches the project description records, from the `refs/meta/config` |
| 1191 | branch of each project. This is the persisted variant of the |
| 1192 | `projects` cache. The intention is for this cache to have an in-memory |
| 1193 | size of 0. |
| 1194 | |
Shawn O. Pearce | 4a45271 | 2009-05-28 20:12:33 -0700 | [diff] [blame] | 1195 | cache `"projects"`:: |
| 1196 | + |
Patrick Hiesel | c2c108c | 2020-07-23 09:54:22 +0200 | [diff] [blame] | 1197 | Caches the project description records, from the `refs/meta/config` |
| 1198 | branch of each project. If a project record is updated or deleted, this |
Shawn O. Pearce | 4a45271 | 2009-05-28 20:12:33 -0700 | [diff] [blame] | 1199 | cache should be flushed. Newly inserted projects do not require |
| 1200 | a cache flush, as they will be read upon first reference. |
| 1201 | |
Luca Milanesio | e1e392f | 2023-07-19 21:52:59 +0100 | [diff] [blame] | 1202 | NOTE: This cache should be disabled or set with a low refreshAfterWrite |
| 1203 | in a cluster setup using multiple primary or multiple replica nodes. |
| 1204 | |
Dave Borowitz | 08aa8bb | 2018-04-05 12:01:06 -0400 | [diff] [blame] | 1205 | cache `"prolog_rules"`:: |
| 1206 | + |
| 1207 | Caches parsed `rules.pl` contents for each project. This cache uses the same |
Prudhvi Akhil Alahari | 69bc016 | 2022-10-05 23:05:13 +0530 | [diff] [blame] | 1208 | size as the `projects` cache when `cache.prolog_rules.memoryLimit` is not set. |
Dave Borowitz | 08aa8bb | 2018-04-05 12:01:06 -0400 | [diff] [blame] | 1209 | |
Patrick Hiesel | a57c0d6 | 2019-02-19 09:09:22 +0100 | [diff] [blame] | 1210 | cache `"pure_revert"`:: |
| 1211 | + |
| 1212 | Result of checking if one change or commit is a pure/clean revert of |
| 1213 | another. |
| 1214 | |
Dmitrii Filippov | 4fe3b6e | 2021-10-19 10:21:09 +0200 | [diff] [blame] | 1215 | cache `"soy_sauce_compiled_templates"`:: |
| 1216 | + |
| 1217 | Caches compiled soy templates. Stores at most only one key-value pair with |
| 1218 | a constant key value and the value is a compiled SoySauce templates. The value |
| 1219 | is reloaded automatically every few seconds if there are reads from the cache. |
| 1220 | If cache is not used for 1 minute, the item is removed (i.e. emails can be send |
| 1221 | with templates which are max 1 minute old). |
| 1222 | |
Shawn O. Pearce | 51967cd | 2009-05-08 19:46:57 -0700 | [diff] [blame] | 1223 | cache `"sshkeys"`:: |
| 1224 | + |
| 1225 | Caches unpacked versions of user SSH keys, so the internal SSH daemon |
| 1226 | can match against them during authentication. The unit of storage |
| 1227 | is per-user, so 1024 items translates to 1024 unique user accounts. |
| 1228 | As each individual user account may configure multiple SSH keys, |
| 1229 | the total number of keys may be larger than the item count. |
| 1230 | |
Luca Milanesio | e1e392f | 2023-07-19 21:52:59 +0100 | [diff] [blame] | 1231 | NOTE: This cache should be disabled or set with a low refreshAfterWrite |
| 1232 | in a cluster setup using multiple primary or multiple replica nodes. |
| 1233 | |
Shawn O. Pearce | b09322b | 2009-08-15 17:49:00 -0700 | [diff] [blame] | 1234 | cache `"web_sessions"`:: |
| 1235 | + |
| 1236 | Tracks the live user sessions coming in over HTTP. Flushing this |
| 1237 | cache would cause all users to be signed out immediately, forcing |
Shawn O. Pearce | 727d80f | 2009-08-17 07:57:54 -0700 | [diff] [blame] | 1238 | them to sign-in again. To avoid breaking active users, this cache |
| 1239 | is not flushed automatically by `gerrit flush-caches --all`, but |
| 1240 | instead must be explicitly requested. |
| 1241 | + |
| 1242 | If no disk cache is configured (or `cache.web_sessions.diskLimit` |
| 1243 | is set to 0) a server restart will force all users to sign-out, |
| 1244 | and need to sign-in again after the restart, as the cache was |
| 1245 | unable to persist the session information. Enabling a disk cache |
| 1246 | is strongly recommended. |
| 1247 | + |
Shawn O. Pearce | 2e1cb2b | 2012-05-24 14:28:40 -0700 | [diff] [blame] | 1248 | Session storage is relatively inexpensive. The average entry in |
| 1249 | this cache is approximately 346 bytes. |
Luca Milanesio | 64bcd6c | 2023-08-27 22:12:56 +0100 | [diff] [blame] | 1250 | + |
| 1251 | The `maxAge` configuration is also used for as maximum lifetime |
| 1252 | of the HTTP servlet container session. |
Shawn O. Pearce | b09322b | 2009-08-15 17:49:00 -0700 | [diff] [blame] | 1253 | |
Shawn O. Pearce | 4016a93 | 2009-05-28 15:12:40 -0700 | [diff] [blame] | 1254 | See also link:cmd-flush-caches.html[gerrit flush-caches]. |
| 1255 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1256 | ==== [[cache_options]]Cache Options |
Shawn O. Pearce | 29de436 | 2010-03-03 17:51:26 -0800 | [diff] [blame] | 1257 | |
Youssef Elghareeb | 1d1867d | 2021-10-27 13:11:38 +0200 | [diff] [blame] | 1258 | [[cache.git_file_diff.timeout]]cache.git_file_diff.timeout:: |
Hugo Arès | 2bc8681 | 2015-03-09 15:20:28 -0400 | [diff] [blame] | 1259 | + |
Youssef Elghareeb | 1d1867d | 2021-10-27 13:11:38 +0200 | [diff] [blame] | 1260 | Maximum number of milliseconds to wait for git diff data before giving up and |
Hugo Arès | 2bc8681 | 2015-03-09 15:20:28 -0400 | [diff] [blame] | 1261 | falling back on a simpler diff algorithm that will not be able to break down |
| 1262 | modified regions into smaller ones. This is a work around for an infinite loop |
| 1263 | bug in the default difference algorithm implementation. |
| 1264 | + |
| 1265 | Values should use common unit suffixes to express their setting: |
| 1266 | + |
| 1267 | * ms, milliseconds |
| 1268 | * s, sec, second, seconds |
| 1269 | * m, min, minute, minutes |
| 1270 | * h, hr, hour, hours |
| 1271 | |
| 1272 | + |
Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 1273 | -- |
Hugo Arès | 2bc8681 | 2015-03-09 15:20:28 -0400 | [diff] [blame] | 1274 | If a unit suffix is not specified, `milliseconds` is assumed. |
Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 1275 | |
Hugo Arès | 2bc8681 | 2015-03-09 15:20:28 -0400 | [diff] [blame] | 1276 | Default is 5 seconds. |
Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 1277 | -- |
Hugo Arès | 2bc8681 | 2015-03-09 15:20:28 -0400 | [diff] [blame] | 1278 | |
Edwin Kempin | 42d2743 | 2013-11-24 17:06:24 +0100 | [diff] [blame] | 1279 | [[cache.diff_intraline.timeout]]cache.diff_intraline.timeout:: |
Shawn O. Pearce | 617aa39 | 2010-11-15 14:03:28 -0800 | [diff] [blame] | 1280 | + |
| 1281 | Maximum number of milliseconds to wait for intraline difference data |
| 1282 | before giving up and disabling it for a particular file pair. This is |
| 1283 | a work around for an infinite loop bug in the intraline difference |
David Pursehouse | e8c1fb9 | 2013-04-17 17:18:43 +0900 | [diff] [blame] | 1284 | implementation. |
| 1285 | + |
| 1286 | If computation takes longer than the timeout, the worker thread is |
| 1287 | terminated, an error message is shown, and no intraline difference is |
| 1288 | displayed for the file pair. |
Shawn O. Pearce | 617aa39 | 2010-11-15 14:03:28 -0800 | [diff] [blame] | 1289 | + |
| 1290 | Values should use common unit suffixes to express their setting: |
| 1291 | + |
| 1292 | * ms, milliseconds |
| 1293 | * s, sec, second, seconds |
| 1294 | * m, min, minute, minutes |
| 1295 | * h, hr, hour, hours |
| 1296 | |
| 1297 | + |
Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 1298 | -- |
Shawn O. Pearce | 617aa39 | 2010-11-15 14:03:28 -0800 | [diff] [blame] | 1299 | If a unit suffix is not specified, `milliseconds` is assumed. |
Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 1300 | |
Shawn O. Pearce | 617aa39 | 2010-11-15 14:03:28 -0800 | [diff] [blame] | 1301 | Default is 5 seconds. |
Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 1302 | -- |
Shawn O. Pearce | 617aa39 | 2010-11-15 14:03:28 -0800 | [diff] [blame] | 1303 | |
Edwin Kempin | 42d2743 | 2013-11-24 17:06:24 +0100 | [diff] [blame] | 1304 | [[cache.diff_intraline.enabled]]cache.diff_intraline.enabled:: |
Shawn O. Pearce | 29de436 | 2010-03-03 17:51:26 -0800 | [diff] [blame] | 1305 | + |
| 1306 | Boolean to enable or disable the computation of intraline differences |
Shawn O. Pearce | 307dd4e | 2010-11-15 12:12:20 -0800 | [diff] [blame] | 1307 | when populating a diff cache entry. This flag is provided primarily |
| 1308 | as a backdoor to disable the intraline difference feature if |
David Pursehouse | 9246356 | 2013-06-24 10:16:28 +0900 | [diff] [blame] | 1309 | necessary. To maintain backwards compatibility with prior versions, |
Shawn O. Pearce | 307dd4e | 2010-11-15 12:12:20 -0800 | [diff] [blame] | 1310 | this setting will fallback to `cache.diff.intraline` if not set in the |
| 1311 | configuration. |
Shawn O. Pearce | 29de436 | 2010-03-03 17:51:26 -0800 | [diff] [blame] | 1312 | + |
| 1313 | Default is true, enabled. |
| 1314 | |
Simon Lei | fc19ff1 | 2014-10-02 13:36:00 -0400 | [diff] [blame] | 1315 | [[cache.projects.loadOnStartup]]cache.projects.loadOnStartup:: |
| 1316 | + |
| 1317 | If the project cache should be loaded during server startup. |
| 1318 | + |
| 1319 | The cache is loaded concurrently. Admins should ensure that the cache |
| 1320 | size set under <<cache.name.memoryLimit,cache.projects.memoryLimit>> |
| 1321 | is not smaller than the number of repos. |
| 1322 | + |
| 1323 | Default is false, disabled. |
| 1324 | |
| 1325 | [[cache.projects.loadThreads]]cache.projects.loadThreads:: |
| 1326 | + |
| 1327 | Only relevant if <<cache.projects.loadOnStartup,cache.projects.loadOnStartup>> |
| 1328 | is true. |
| 1329 | + |
| 1330 | The number of threads to allocate for loading the cache at startup. These |
| 1331 | threads will die out after the cache is loaded. |
| 1332 | + |
| 1333 | Default is the number of CPUs. |
| 1334 | |
Prudhvi Akhil Alahari | b60b15e | 2022-10-04 00:41:09 +0530 | [diff] [blame] | 1335 | [[cache.project_list.interval]]cache.project_list.interval:: |
| 1336 | + |
| 1337 | The link:#schedule-configuration-interval[interval] for running |
| 1338 | the project_list cache warmer. |
| 1339 | |
| 1340 | By default, if `cache.project_list.maxAge` is set, `interval` will be set to |
| 1341 | half its value. If `cache.project_list.maxAge` is not set or `interval` is set |
| 1342 | to `-1`, it is disabled. |
| 1343 | |
| 1344 | [[cache.project_list.startTime]]cache.project_list.startTime:: |
| 1345 | + |
| 1346 | The link:#schedule-configuration-startTime[start time] for running |
| 1347 | the project_list cache warmer. |
| 1348 | |
| 1349 | Default is 00:00 if the project_list cache warmer is enabled. |
Shawn Pearce | 67a3330 | 2016-08-11 11:51:59 -0700 | [diff] [blame] | 1350 | |
| 1351 | [[capability]] |
| 1352 | === Section capability |
| 1353 | |
| 1354 | [[capability.administrateServer]]capability.administrateServer:: |
| 1355 | + |
| 1356 | Names of groups of users that are allowed to exercise the |
Edwin Kempin | 53d52ba | 2017-06-09 10:57:43 +0200 | [diff] [blame] | 1357 | `administrateServer` capability, in addition to those listed in |
Shawn Pearce | 67a3330 | 2016-08-11 11:51:59 -0700 | [diff] [blame] | 1358 | All-Projects. Configuring this option can be a useful fail-safe |
| 1359 | to recover a server in the event an administrator removed all |
Edwin Kempin | 53d52ba | 2017-06-09 10:57:43 +0200 | [diff] [blame] | 1360 | groups from the `administrateServer` capability, or to ensure that |
Shawn Pearce | 67a3330 | 2016-08-11 11:51:59 -0700 | [diff] [blame] | 1361 | specific groups always have administration capabilities. |
| 1362 | + |
| 1363 | ---- |
| 1364 | [capability] |
| 1365 | administrateServer = group Fail Safe Admins |
| 1366 | ---- |
| 1367 | + |
| 1368 | The configuration file uses group names, not UUIDs. If a group is |
| 1369 | renamed the gerrit.config file must be updated to reflect the new |
| 1370 | name. If a group cannot be found for the configured name a warning |
| 1371 | is logged and the server will continue normal startup. |
| 1372 | + |
| 1373 | If not specified (default), only the groups listed by All-Projects |
Edwin Kempin | 53d52ba | 2017-06-09 10:57:43 +0200 | [diff] [blame] | 1374 | may use the `administrateServer` capability. |
| 1375 | |
| 1376 | [[capability.makeFirstUserAdmin]]capability.makeFirstUserAdmin:: |
| 1377 | + |
| 1378 | Whether the first user that logs in to the Gerrit server should |
| 1379 | automatically be added to the administrator group and hence get the |
| 1380 | `administrateServer` capability assigned. This is useful to bootstrap |
Nasser Grainawi | 8ea9fec | 2022-02-25 17:38:10 -0700 | [diff] [blame] | 1381 | the link:config-accounts.html[account data]. |
Edwin Kempin | 53d52ba | 2017-06-09 10:57:43 +0200 | [diff] [blame] | 1382 | + |
| 1383 | Default is true. |
Shawn Pearce | 67a3330 | 2016-08-11 11:51:59 -0700 | [diff] [blame] | 1384 | |
| 1385 | |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 1386 | [[change]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1387 | === Section change |
Shawn Pearce | b9ebb66 | 2013-07-19 19:45:25 -0700 | [diff] [blame] | 1388 | |
Gabor Somossy | b72d4c6 | 2015-10-20 23:40:07 +0100 | [diff] [blame] | 1389 | [[change.allowBlame]]change.allowBlame:: |
| 1390 | + |
David Ostrovsky | 7163dac | 2017-07-29 06:49:38 +0200 | [diff] [blame] | 1391 | 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] | 1392 | + |
| 1393 | Default is true. |
| 1394 | |
Dave Borowitz | f5e6e04 | 2016-04-25 13:03:42 -0400 | [diff] [blame] | 1395 | [[change.cacheAutomerge]]change.cacheAutomerge:: |
| 1396 | + |
Youssef Elghareeb | 1d1867d | 2021-10-27 13:11:38 +0200 | [diff] [blame] | 1397 | When reviewing merge commits, the left-hand side shows the output of the result |
| 1398 | of JGit's automatic merge algorithm. This option controls whether this output is |
| 1399 | cached in the change repository, or if only the diff is cached in the persistent |
| 1400 | diff caches (`"git_modified_files"`, `modified_files`, `"git_file_diff"`, |
| 1401 | `"file_diff"`). |
Dave Borowitz | f5e6e04 | 2016-04-25 13:03:42 -0400 | [diff] [blame] | 1402 | + |
| 1403 | If true, automerge results are stored in the repository under |
| 1404 | `refs/cache-automerge/*`; the results of diffing the change against its |
Youssef Elghareeb | 1d1867d | 2021-10-27 13:11:38 +0200 | [diff] [blame] | 1405 | automerge base are stored in the diff caches. If false, no extra data is |
| 1406 | stored in the repository, only the diff caches. This can result in slight |
Dave Borowitz | f5e6e04 | 2016-04-25 13:03:42 -0400 | [diff] [blame] | 1407 | performance improvements by reducing the number of refs in the repo. |
| 1408 | + |
| 1409 | Default is true. |
| 1410 | |
Joerg Zieren | 7cac5d1 | 2020-01-02 10:18:14 +0100 | [diff] [blame] | 1411 | [[change.commentSizeLimit]]change.commentSizeLimit:: |
| 1412 | + |
| 1413 | Maximum allowed size in characters of a regular (non-robot) comment. Comments |
| 1414 | which exceed this size will be rejected. Size computation is approximate and may |
| 1415 | be off by roughly 1%. Common unit suffixes of 'k', 'm', or 'g' are supported. |
| 1416 | The value must be positive. |
| 1417 | + |
Joerg Zieren | faea7e1 | 2020-04-06 10:44:46 +0200 | [diff] [blame] | 1418 | The default limit is 16kiB. |
| 1419 | |
Ben Rohlfs | 04ac31f | 2023-08-01 10:35:01 +0000 | [diff] [blame] | 1420 | [[change.topicLimit]]change.topicLimit:: |
| 1421 | + |
| 1422 | Maximum allowed number of changes with the same topic. 0 or negative values |
| 1423 | mean "unlimited". |
| 1424 | + |
| 1425 | By default 5,000. |
| 1426 | |
Joerg Zieren | faea7e1 | 2020-04-06 10:44:46 +0200 | [diff] [blame] | 1427 | [[change.cumulativeCommentSizeLimit]]change.cumulativeCommentSizeLimit:: |
| 1428 | + |
| 1429 | Maximum allowed size in characters of all comments (including robot comments) |
| 1430 | and change messages. Size computation is approximate and may be off by roughly |
| 1431 | 1%. Common unit suffixes of 'k', 'm', or 'g' are supported. |
| 1432 | + |
| 1433 | The default limit is 3MiB. |
Joerg Zieren | 7cac5d1 | 2020-01-02 10:18:14 +0100 | [diff] [blame] | 1434 | |
Dave Borowitz | 1f85d3a | 2019-04-16 12:16:04 -0700 | [diff] [blame] | 1435 | [[change.disablePrivateChanges]]change.disablePrivateChanges:: |
Patrick Hiesel | db8df48 | 2019-01-24 10:11:23 +0100 | [diff] [blame] | 1436 | + |
Dave Borowitz | 1f85d3a | 2019-04-16 12:16:04 -0700 | [diff] [blame] | 1437 | If set to true, users are not allowed to create private changes. |
Patrick Hiesel | db8df48 | 2019-01-24 10:11:23 +0100 | [diff] [blame] | 1438 | + |
Dave Borowitz | 1f85d3a | 2019-04-16 12:16:04 -0700 | [diff] [blame] | 1439 | The default is false. |
| 1440 | |
Joerg Zieren | 7cac5d1 | 2020-01-02 10:18:14 +0100 | [diff] [blame] | 1441 | [[change.maxComments]]change.maxComments:: |
| 1442 | + |
| 1443 | Maximum number of comments (regular plus robot) allowed per change. Additional |
| 1444 | comments are rejected. |
| 1445 | + |
| 1446 | By default 5,000. |
| 1447 | |
Joerg Zieren | 1ebe687 | 2021-01-28 13:45:55 +0100 | [diff] [blame] | 1448 | [[change.maxFiles]]change.maxFiles:: |
| 1449 | + |
| 1450 | Maximum number of files allowed per change. Larger changes are rejected and must |
Ben Rohlfs | 69c194d | 2023-09-22 13:37:52 +0200 | [diff] [blame] | 1451 | be split up. For merge changes we are comparing against the auto-merge commit, |
| 1452 | so we allow large merges, if they merge cleanly. |
Joerg Zieren | 1ebe687 | 2021-01-28 13:45:55 +0100 | [diff] [blame] | 1453 | + |
| 1454 | By default 100,000. |
| 1455 | |
Edwin Kempin | a5d863e | 2023-08-09 06:47:04 +0000 | [diff] [blame] | 1456 | [[change.maxFileSizeDownload]]change.maxFileSizeDownload:: |
Ben Rohlfs | ee1283b | 2023-08-04 08:44:38 +0000 | [diff] [blame] | 1457 | + |
| 1458 | The link:rest-api-changes.html#get-content[GetContent] and |
| 1459 | link:rest-api-changes.html#get-safe-content[DownloadContent] REST APIs will |
| 1460 | refuse to load files larger than this limit (in bytes). 0 or negative values |
| 1461 | mean "unlimited". |
| 1462 | |
| 1463 | + |
| 1464 | By default 0 (unlimited). |
| 1465 | |
Joerg Zieren | 1ebe687 | 2021-01-28 13:45:55 +0100 | [diff] [blame] | 1466 | [[change.maxPatchSets]]change.maxPatchSets:: |
| 1467 | + |
| 1468 | Maximum number of patch sets allowed per change. If this is insufficient, |
| 1469 | recreate the change with a new Change-Id, then abandon the old change. |
| 1470 | + |
Prabhu Kondarangi | 31b4171 | 2022-09-28 12:29:44 +0530 | [diff] [blame] | 1471 | By default 1000. |
Joerg Zieren | 1ebe687 | 2021-01-28 13:45:55 +0100 | [diff] [blame] | 1472 | |
Dave Borowitz | ca614bc | 2019-04-15 15:29:15 -0700 | [diff] [blame] | 1473 | [[change.maxUpdates]]change.maxUpdates:: |
| 1474 | + |
| 1475 | Maximum number of updates to a change. Counts only updates to the main NoteDb |
| 1476 | meta ref; draft comments, robot comments, stars, etc. do not count towards the |
| 1477 | total. |
| 1478 | + |
| 1479 | Many NoteDb operations require walking the entire change meta ref and loading |
| 1480 | its contents into memory, so changes with arbitrarily many updates may cause |
| 1481 | high CPU usage, memory pressure, persistent cache bloat, and other problems. |
| 1482 | + |
Dave Borowitz | 18e7b55 | 2019-04-17 07:53:38 -0700 | [diff] [blame] | 1483 | The following operations are allowed even when a change is at the limit: |
Edwin Kempin | f2f815b | 2020-01-22 17:09:16 +0100 | [diff] [blame] | 1484 | |
Dave Borowitz | 18e7b55 | 2019-04-17 07:53:38 -0700 | [diff] [blame] | 1485 | * Abandon |
| 1486 | * Submit |
| 1487 | * Submit by push with `%submit` |
| 1488 | * Auto-close by pushing directly to the branch |
| 1489 | * Fix with link:rest-api-changes.html#fix-input[`expect_merged_as`] |
Edwin Kempin | f2f815b | 2020-01-22 17:09:16 +0100 | [diff] [blame] | 1490 | |
Dave Borowitz | ca614bc | 2019-04-15 15:29:15 -0700 | [diff] [blame] | 1491 | By default 1000. |
| 1492 | |
Patrick Hiesel | a4824db | 2019-12-20 10:55:26 +0100 | [diff] [blame] | 1493 | [[change.mergeabilityComputationBehavior]]change.mergeabilityComputationBehavior:: |
| 1494 | + |
| 1495 | This setting determines when Gerrit computes if a change is mergeable or not. |
| 1496 | This computation is expensive, especially when the repository is large or when |
| 1497 | there are many open changes. |
| 1498 | + |
| 1499 | This config can have the following states: |
| 1500 | + |
| 1501 | * `API_REF_UPDATED_AND_CHANGE_REINDEX`: Gerrit indexes `mergeability` enabling |
| 1502 | the `is:mergeable` predicate in change search and allowing fast retrieval of |
| 1503 | this bit in query responses. Gerrit will always serve `mergeable` in |
| 1504 | link:rest-api-changes.html#change-info[ChangeInfo] objects. |
| 1505 | Gerrit will reindex all open changes when the target ref advances (expensive). |
| 1506 | * `REF_UPDATED_AND_CHANGE_REINDEX`: Gerrit indexes `mergeability` enabling the |
| 1507 | `is:mergeable` predicate in change search and allowing fast retrieval of this |
| 1508 | bit in query responses. Gerrit will never serve `mergeable` in |
| 1509 | link:rest-api-changes.html#change-info[ChangeInfo] |
| 1510 | objects. This state can be a final state for instances that only want to |
| 1511 | optimize the read path, but not the write path for speed or serve as an |
| 1512 | intermediary step for instances that want to optimize both and need to migrate |
| 1513 | callers of their API. |
| 1514 | Gerrit will reindex all open changes when the target ref advances (expensive). |
| 1515 | * `NEVER`: Gerrit does not index `mergeable`, so `is:mergeable` is disabled as |
| 1516 | query operator. Gerrit does not serve `mergeable` in |
| 1517 | link:rest-api-changes.html#change-info[ChangeInfo]. |
| 1518 | |
Matthias Sohn | 1e2cd290 | 2021-03-23 14:31:21 +0100 | [diff] [blame] | 1519 | NOTE: Gerrit would only render conflict changes section on change |
| 1520 | screen if `API_REF_UPDATED_AND_CHANGE_REINDEX` value is set. |
| 1521 | |
David Ostrovsky | 8aaace1 | 2021-05-12 12:27:54 +0200 | [diff] [blame] | 1522 | Default is `NEVER`. |
Patrick Hiesel | a4824db | 2019-12-20 10:55:26 +0100 | [diff] [blame] | 1523 | |
Matthias Sohn | 1e2cd290 | 2021-03-23 14:31:21 +0100 | [diff] [blame] | 1524 | [[change.conflictsPredicateEnabled]]change.conflictsPredicateEnabled:: |
| 1525 | |
| 1526 | + |
| 1527 | This setting determines when Gerrit renders conflict changes section on change |
| 1528 | screen and also supports `conflicts` predicate. This computation is expensive, |
| 1529 | computing ConflictsPredicate has a runtime complexity of O(nˆ2) with n number |
| 1530 | of open changes on a branch. When set to false GUI will silently ignore the |
| 1531 | error message and leave the conflict changes section on change screen empty. |
| 1532 | See also implications on rendering of conflict changes section in configuration |
| 1533 | section:link:#change.mergeabilityComputationBehavior[change.mergeabilityComputationBehavior]. |
| 1534 | |
| 1535 | Default is true. |
| 1536 | |
Luca Milanesio | eb90312 | 2022-06-01 22:56:17 -0700 | [diff] [blame] | 1537 | [[change.maxSubmittableAtOnce]]change.maxSubmittableAtOnce:: |
| 1538 | + |
| 1539 | Maximum number of changes that can be chained together in the same repository |
| 1540 | to be submitted at once. |
| 1541 | + |
| 1542 | Default is 32767. |
| 1543 | |
Edwin Kempin | 67229a4 | 2019-10-08 09:13:34 +0200 | [diff] [blame] | 1544 | [[change.move]]change.move:: |
| 1545 | + |
| 1546 | Whether the link:rest-api-changes.html#move-change[Move Change] REST |
| 1547 | endpoint is enabled. |
| 1548 | + |
| 1549 | The move change functionality has some corner cases with undesired side |
| 1550 | effects. Hence administrators may decide to disable this functionality. |
| 1551 | In particular, if a change that has dependencies on other changes is |
| 1552 | moved to a new branch, and the moved change gets submitted to the new |
| 1553 | branch, the changes on which the change depends are silently merged |
| 1554 | into the new branch, although these changes have not been moved to that |
| 1555 | branch (see details in |
Edwin Kempin | 6d99fb6 | 2023-06-21 10:08:28 +0000 | [diff] [blame] | 1556 | link:https://issues.gerritcodereview.com/issues/40009784[issue 40009784]). |
Edwin Kempin | 67229a4 | 2019-10-08 09:13:34 +0200 | [diff] [blame] | 1557 | + |
| 1558 | By default true. |
| 1559 | |
Ben Rohlfs | c6f31d0 | 2023-03-15 12:48:41 +0100 | [diff] [blame] | 1560 | [[change.enableRobotComments]]change.enableRobotComments:: |
| 1561 | + |
| 1562 | Are robot comments enabled in the Gerrit UI? This setting allows phasing out |
| 1563 | robot comments. |
| 1564 | + |
| 1565 | By default true. |
| 1566 | |
Han-Wen Nienhuys | 37390f0 | 2023-08-24 12:40:45 +0200 | [diff] [blame] | 1567 | [[change.propagateSubmitRequirementErrors]]change.propagateSubmitRequirementErrors:: |
| 1568 | + |
| 1569 | If a SubmitRequirement evaluation for a given change results in an |
| 1570 | ERROR status, abort the REST response with an HTTP 500 error. |
| 1571 | + |
| 1572 | The ERROR status can occur if a SubmitRequirement uses a |
| 1573 | plugin-provided predicate (and the plugin is not available), due to |
| 1574 | bugs, or due to bypassing the validation that normally happens when |
| 1575 | updating `refs/meta/config`. |
| 1576 | + |
| 1577 | Enabling this flag makes gerrit unusuable under such conditions, so |
| 1578 | it is generally not recommended. However, this makes the |
| 1579 | application-specific ERROR status into a generic HTTP error, and can |
| 1580 | thus be acted on by automated deployment and monitoring infrastructure. |
| 1581 | |
Dave Borowitz | 1f85d3a | 2019-04-16 12:16:04 -0700 | [diff] [blame] | 1582 | [[change.robotCommentSizeLimit]]change.robotCommentSizeLimit:: |
| 1583 | + |
Joerg Zieren | 7cac5d1 | 2020-01-02 10:18:14 +0100 | [diff] [blame] | 1584 | Maximum allowed size in characters of a robot comment. Robot comments which |
| 1585 | exceed this size will be rejected on addition. Size computation is approximate |
| 1586 | and may be off by roughly 1%. Common unit suffixes of 'k', 'm', or 'g' are |
| 1587 | supported. Zero or negative values allow robot comments of unlimited size. |
Dave Borowitz | 1f85d3a | 2019-04-16 12:16:04 -0700 | [diff] [blame] | 1588 | + |
Joerg Zieren | faea7e1 | 2020-04-06 10:44:46 +0200 | [diff] [blame] | 1589 | The default limit is 1MiB. |
Patrick Hiesel | db8df48 | 2019-01-24 10:11:23 +0100 | [diff] [blame] | 1590 | |
Gal Paikin | 02d6ba6 | 2020-07-13 23:49:24 +0300 | [diff] [blame] | 1591 | [[change.sendNewPatchsetEmails]]change.sendNewPatchsetEmails:: |
| 1592 | + |
| 1593 | When false, emails will not be sent to owners, reviewers, and cc for |
| 1594 | creating a new patchset unless they are project watchers or have starred |
| 1595 | the change. |
| 1596 | + |
| 1597 | Default is true. |
| 1598 | |
Dave Borowitz | 1f85d3a | 2019-04-16 12:16:04 -0700 | [diff] [blame] | 1599 | [[change.strictLabels]]change.strictLabels:: |
| 1600 | + |
| 1601 | Reject invalid label votes: invalid labels or invalid values. This |
David Pursehouse | 33495ab | 2019-10-31 09:38:43 +0900 | [diff] [blame] | 1602 | configuration option is provided for backwards compatibility and may |
Dave Borowitz | 1f85d3a | 2019-04-16 12:16:04 -0700 | [diff] [blame] | 1603 | be removed in future gerrit versions. |
| 1604 | + |
| 1605 | Default is false. |
| 1606 | |
David Ostrovsky | 9933eb3 | 2014-05-20 16:08:20 +0200 | [diff] [blame] | 1607 | [[change.submitLabel]]change.submitLabel:: |
| 1608 | + |
| 1609 | Label name for the submit button. |
| 1610 | + |
| 1611 | Default is "Submit". |
| 1612 | |
Stefan Beller | 7c380d51 | 2015-08-21 10:55:21 -0700 | [diff] [blame] | 1613 | [[change.submitLabelWithParents]]change.submitLabelWithParents:: |
| 1614 | + |
| 1615 | Label name for the submit button if the change has parents which will |
| 1616 | be submitted together with this change. |
| 1617 | + |
| 1618 | Default is "Submit including parents". |
| 1619 | |
David Ostrovsky | 9933eb3 | 2014-05-20 16:08:20 +0200 | [diff] [blame] | 1620 | [[change.submitTooltip]]change.submitTooltip:: |
| 1621 | + |
| 1622 | Tooltip for the submit button. Variables available for replacement |
| 1623 | include `${patchSet}` for the current patch set number (1, 2, 3), |
| 1624 | `${branch}` for the branch name ("master") and `${commit}` for the |
| 1625 | abbreviated commit SHA-1 (`c9c0edb`). |
| 1626 | + |
| 1627 | Default is "Submit patch set ${patchSet} into ${branch}". |
| 1628 | |
Stefan Beller | 0e65554 | 2015-07-20 21:14:38 -0700 | [diff] [blame] | 1629 | [[change.submitTooltipAncestors]]change.submitTooltipAncestors:: |
| 1630 | + |
| 1631 | Tooltip for the submit button if there are ancestors which would |
| 1632 | also be submitted by submitting the change. Additionally to the variables |
| 1633 | as in link:#change.submitTooltip[change.submitTooltip], there is the |
| 1634 | variable `${submitSize}` indicating the number of changes which are |
| 1635 | submitted. |
| 1636 | + |
| 1637 | Default is "Submit all ${topicSize} changes of the same topic (${submitSize} |
| 1638 | changes including ancestors and other changes related by topic)". |
| 1639 | |
Stefan Beller | a038cf7 | 2015-01-13 16:25:10 -0800 | [diff] [blame] | 1640 | [[change.submitTopicLabel]]change.submitTopicLabel:: |
| 1641 | + |
| 1642 | If `change.submitWholeTopic` is set and a change has a topic, |
| 1643 | the label name for the submit button is given here instead of |
| 1644 | the configuration `change.submitLabel`. |
| 1645 | + |
| 1646 | Defaults to "Submit whole topic" |
| 1647 | |
| 1648 | [[change.submitTopicTooltip]]change.submitTopicTooltip:: |
| 1649 | + |
David Pursehouse | a61ee50 | 2016-09-06 16:27:09 +0900 | [diff] [blame] | 1650 | If `change.submitWholeTopic` is configured to true and a change has a |
Stefan Beller | a038cf7 | 2015-01-13 16:25:10 -0800 | [diff] [blame] | 1651 | topic, this configuration determines the tooltip for the submit button |
| 1652 | instead of `change.submitTooltip`. The variable `${topicSize}` is available |
Stefan Beller | 7c380d51 | 2015-08-21 10:55:21 -0700 | [diff] [blame] | 1653 | for the number of changes in the same topic to be submitted. The number of |
| 1654 | all changes to be submitted is in the variable `${submitSize}`. |
Stefan Beller | a038cf7 | 2015-01-13 16:25:10 -0800 | [diff] [blame] | 1655 | + |
Stefan Beller | 7c380d51 | 2015-08-21 10:55:21 -0700 | [diff] [blame] | 1656 | Defaults to "Submit all ${topicSize} changes of the same topic |
| 1657 | (${submitSize} changes including ancestors and other |
| 1658 | changes related by topic)". |
Stefan Beller | a038cf7 | 2015-01-13 16:25:10 -0800 | [diff] [blame] | 1659 | |
Dave Borowitz | 1f85d3a | 2019-04-16 12:16:04 -0700 | [diff] [blame] | 1660 | [[change.submitWholeTopic]]change.submitWholeTopic:: |
Richard Möhn | e4abe9a | 2014-11-13 20:05:13 +0100 | [diff] [blame] | 1661 | + |
Dave Borowitz | 1f85d3a | 2019-04-16 12:16:04 -0700 | [diff] [blame] | 1662 | Determines if the submit button submits the whole topic instead of |
| 1663 | just the current change. |
David Ostrovsky | a304aff | 2018-04-05 23:07:51 +0200 | [diff] [blame] | 1664 | + |
| 1665 | Default is false. |
| 1666 | |
Dave Borowitz | 1f85d3a | 2019-04-16 12:16:04 -0700 | [diff] [blame] | 1667 | [[change.updateDelay]]change.updateDelay:: |
Changcheng Xiao | 1609535 | 2017-12-18 10:03:08 +0100 | [diff] [blame] | 1668 | + |
Dave Borowitz | 1f85d3a | 2019-04-16 12:16:04 -0700 | [diff] [blame] | 1669 | How often in seconds the web interface should poll for updates to the |
| 1670 | currently open change. The poller relies on the client's browser |
| 1671 | cache to use If-Modified-Since and respect `304 Not Modified` HTTP |
| 1672 | responses. This allows for fast polls, often under 8 milliseconds. |
Changcheng Xiao | 1609535 | 2017-12-18 10:03:08 +0100 | [diff] [blame] | 1673 | + |
Dave Borowitz | 1f85d3a | 2019-04-16 12:16:04 -0700 | [diff] [blame] | 1674 | With a configured 30 second delay a server with 4900 active users will |
| 1675 | typically need to dedicate 1 CPU to the update check. 4900 users |
| 1676 | divided by an average delay of 30 seconds is 163 requests arriving per |
| 1677 | second. If requests are served at \~6 ms response time, 1 CPU is |
| 1678 | necessary to keep up with the update request traffic. On a smaller |
| 1679 | user base of 500 active users, the default 30 second delay is only 17 |
| 1680 | requests per second and requires ~10% CPU. |
| 1681 | + |
| 1682 | If 0 the update polling is disabled. |
| 1683 | + |
| 1684 | Default is 5 minutes. |
Changcheng Xiao | 1609535 | 2017-12-18 10:03:08 +0100 | [diff] [blame] | 1685 | |
Haamed Gheibi | 972b727 | 2023-08-17 09:22:29 -0700 | [diff] [blame] | 1686 | [[change.diff3ConflictView]]change.diff3ConflictView:: |
| 1687 | + |
| 1688 | Use the diff3 formatter for merge commits with conflicts. With diff3 when |
| 1689 | the conflicts are shown in the "Auto Merge" view, the base section from the |
| 1690 | common parents will be shown as well. |
| 1691 | This setting takes effect when generating the automerge, which happens on upload. |
| 1692 | Changing the setting leaves existing changes unaffected. |
| 1693 | + |
| 1694 | Default is false. |
| 1695 | |
Youssef Elghareeb | 01c8f56 | 2023-08-31 13:33:35 +0000 | [diff] [blame] | 1696 | [[change.maxFileSizeDiff]]change.maxFileSizeDiff:: |
| 1697 | + |
| 1698 | The threshold of file sizes in megabytes beyond which a |
| 1699 | link:rest-api-changes.html#get-diff[file diff] request will fail. |
| 1700 | + |
| 1701 | If not set or set to zero, no limits are applied on file sizes. |
| 1702 | |
Dariusz Luksza | a63c7a5 | 2023-10-23 13:07:58 +0100 | [diff] [blame] | 1703 | [[change.skipCurrentRulesEvaluationOnClosedChanges]] |
| 1704 | + |
| 1705 | If false, Gerrit will always take latest project configuration to |
| 1706 | compute submit labels. This means that, closed changes (either merged |
| 1707 | or abandoned) will be evaluated against the latest configuration which |
| 1708 | may produce different results. Especially for merged changes, they may |
| 1709 | look like they didn't meet the submit requirements. |
| 1710 | + |
| 1711 | When true, evaluation will be skipped and Gerrit will show the |
| 1712 | exact status of submit labels when change was submitted. Post-review |
| 1713 | votes will only be allowed on labels that were configured when change |
| 1714 | was closed. |
| 1715 | + |
| 1716 | Default it false. |
| 1717 | |
Edwin Kempin | e326a1d | 2015-06-03 10:27:39 +0200 | [diff] [blame] | 1718 | [[changeCleanup]] |
| 1719 | === Section changeCleanup |
| 1720 | |
| 1721 | This section allows to configure change cleanups and schedules them to |
| 1722 | run periodically. |
| 1723 | |
| 1724 | [[changeCleanup.abandonAfter]]changeCleanup.abandonAfter:: |
| 1725 | + |
| 1726 | Period of inactivity after which open changes should be abandoned |
| 1727 | automatically. |
| 1728 | + |
| 1729 | By default `0`, never abandon open changes. |
| 1730 | + |
| 1731 | [WARNING] Auto-Abandoning changes may confuse/annoy users. When |
| 1732 | enabling this, make sure to choose a reasonably large grace period and |
| 1733 | inform users in advance. |
| 1734 | + |
| 1735 | The following suffixes are supported to define the time unit: |
| 1736 | + |
| 1737 | * `d, day, days` |
| 1738 | * `w, week, weeks` (`1 week` is treated as `7 days`) |
| 1739 | * `mon, month, months` (`1 month` is treated as `30 days`) |
| 1740 | * `y, year, years` (`1 year` is treated as `365 days`) |
| 1741 | |
Edwin Kempin | 7080ef1 | 2015-06-10 15:03:09 +0200 | [diff] [blame] | 1742 | [[changeCleanup.abandonIfMergeable]]changeCleanup.abandonIfMergeable:: |
| 1743 | + |
David Pursehouse | f4bc256 | 2019-12-04 09:55:40 +0900 | [diff] [blame] | 1744 | Whether changes which are mergeable should be auto-abandoned. When set |
| 1745 | to `false`, `-is:mergeable` is appended to the query used to find |
| 1746 | the changes to auto-abandon. |
Edwin Kempin | 7080ef1 | 2015-06-10 15:03:09 +0200 | [diff] [blame] | 1747 | + |
David Pursehouse | f4bc256 | 2019-12-04 09:55:40 +0900 | [diff] [blame] | 1748 | By default `true`, meaning mergeable changes are auto-abandoned. |
| 1749 | + |
Patrick Hiesel | a4824db | 2019-12-20 10:55:26 +0100 | [diff] [blame] | 1750 | If |
| 1751 | link:#change.mergeabilityComputationBehavior[`change.mergeabilityComputationBehavior`] |
| 1752 | is set to `NEVER`, setting this option to `false` has no effect and it behaves |
| 1753 | as though it were set to `true`. |
Edwin Kempin | 7080ef1 | 2015-06-10 15:03:09 +0200 | [diff] [blame] | 1754 | |
Jacek Centkowski | 36d3521 | 2019-05-13 14:32:00 +0200 | [diff] [blame] | 1755 | [[changeCleanup.cleanupAccountPatchReview]]changeCleanup.cleanupAccountPatchReview:: |
| 1756 | + |
| 1757 | Whether accountPatchReview data should be also removed when change |
| 1758 | gets auto-abandoned. |
| 1759 | + |
| 1760 | By default `false`. |
| 1761 | |
Edwin Kempin | e326a1d | 2015-06-03 10:27:39 +0200 | [diff] [blame] | 1762 | [[changeCleanup.abandonMessage]]changeCleanup.abandonMessage:: |
| 1763 | + |
| 1764 | Change message that should be posted when a change is abandoned. |
| 1765 | + |
| 1766 | '${URL}' can be used as a placeholder for the Gerrit web URL. |
| 1767 | + |
| 1768 | By default "Auto-Abandoned due to inactivity, see |
| 1769 | ${URL}Documentation/user-change-cleanup.html#auto-abandon\n\n |
| 1770 | If this change is still wanted it should be restored.". |
| 1771 | |
| 1772 | [[changeCleanup.startTime]]changeCleanup.startTime:: |
| 1773 | + |
Edwin Kempin | d33d95a | 2018-02-16 11:44:04 +0100 | [diff] [blame] | 1774 | The link:#schedule-configuration-startTime[start time] for running |
| 1775 | change cleanups. |
Edwin Kempin | e326a1d | 2015-06-03 10:27:39 +0200 | [diff] [blame] | 1776 | |
| 1777 | [[changeCleanup.interval]]changeCleanup.interval:: |
| 1778 | + |
Edwin Kempin | d33d95a | 2018-02-16 11:44:04 +0100 | [diff] [blame] | 1779 | The link:#schedule-configuration-interval[interval] for running |
| 1780 | change cleanups. |
Edwin Kempin | e326a1d | 2015-06-03 10:27:39 +0200 | [diff] [blame] | 1781 | |
Edwin Kempin | d33d95a | 2018-02-16 11:44:04 +0100 | [diff] [blame] | 1782 | link:#schedule-configuration-examples[Schedule examples] can be found |
| 1783 | in the link:#schedule-configuration[Schedule Configuration] section. |
Edwin Kempin | e326a1d | 2015-06-03 10:27:39 +0200 | [diff] [blame] | 1784 | |
David Åkerman | 757840b | 2023-02-21 10:56:24 +0100 | [diff] [blame] | 1785 | [[attentionSet]] |
| 1786 | === Section attentionSet |
| 1787 | |
| 1788 | This section allows to configure readding of change owners and schedules them to |
| 1789 | run periodically. |
| 1790 | |
| 1791 | [[attentionSet.readdAfter]]attentionSet.readdAfter:: |
| 1792 | + |
| 1793 | Period of inactivity after which open no-WIP/private changes should have change owner |
| 1794 | added to attention-set automatically (if they are not already). |
| 1795 | + |
| 1796 | By default `0`, never readd change owner. |
| 1797 | + |
| 1798 | [WARNING] Auto-readding change owners may confuse/annoy users. When |
| 1799 | enabling this, make sure to choose a reasonably large grace period and |
| 1800 | inform users in advance. |
| 1801 | + |
| 1802 | The following suffixes are supported to define the time unit: |
| 1803 | + |
| 1804 | * `d, day, days` |
| 1805 | * `w, week, weeks` (`1 week` is treated as `7 days`) |
| 1806 | * `mon, month, months` (`1 month` is treated as `30 days`) |
| 1807 | * `y, year, years` (`1 year` is treated as `365 days`) |
| 1808 | |
| 1809 | [[attentionSet.readdMessage]]attentionSet.readdMessage:: |
| 1810 | + |
| 1811 | Attention-set message that should be shown as reason when an change owner is readded. |
| 1812 | + |
| 1813 | '${URL}' can be used as a placeholder for the Gerrit web URL. |
| 1814 | + |
| 1815 | By default "Owner readded to attention-set due to inactivity, see |
| 1816 | ${URL}Documentation/user-attention-set.html#auto-readd-owner\n\n |
| 1817 | If you do not want to be readded to the attention-set when the timer has counted down. |
| 1818 | Set this change as WIP or private.". |
| 1819 | |
| 1820 | [[attentionSet.startTime]]attentionSet.startTime:: |
| 1821 | + |
| 1822 | The link:#schedule-configuration-startTime[start time] for running |
| 1823 | readd owner to attention-set. |
| 1824 | |
| 1825 | [[attentionSet.interval]]attentionSet.interval:: |
| 1826 | + |
| 1827 | The link:#schedule-configuration-interval[interval] for running |
| 1828 | readd owner to attention-set. |
| 1829 | |
| 1830 | link:#schedule-configuration-examples[Schedule examples] can be found |
| 1831 | in the link:#schedule-configuration[Schedule Configuration] section. |
| 1832 | |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 1833 | [[commentlink]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1834 | === Section commentlink |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 1835 | |
Brad Larson | 991a31b | 2009-11-03 14:30:26 -0600 | [diff] [blame] | 1836 | Comment links are find/replace strings applied to change descriptions, |
Chris Harris | 63c7cdd | 2012-11-23 12:17:36 -0500 | [diff] [blame] | 1837 | patch comments, in-line code comments and approval category value descriptions |
| 1838 | to turn set strings into hyperlinks. One common use is for linking to |
| 1839 | bug-tracking systems. |
Brad Larson | 991a31b | 2009-11-03 14:30:26 -0600 | [diff] [blame] | 1840 | |
| 1841 | In the following example configuration the 'changeid' comment link |
Shawn O. Pearce | da866ae | 2009-12-16 15:46:03 -0800 | [diff] [blame] | 1842 | will match typical Gerrit Change-Id values and create a hyperlink |
| 1843 | to changes which reference it. The second configuration 'bugzilla' |
| 1844 | will hyperlink terms such as 'bug 42' to an external bug tracker, |
Kamil Musin | 734db9a | 2022-11-11 11:19:25 +0100 | [diff] [blame] | 1845 | supplying the argument record number '42' for display. |
Brad Larson | 991a31b | 2009-11-03 14:30:26 -0600 | [diff] [blame] | 1846 | |
Sven Selberg | 2a0beab | 2018-04-20 14:49:20 +0200 | [diff] [blame] | 1847 | commentlinks supports link:#reloadConfig[configuration reloads]. Though a |
Gustaf Lundh | ca7eb79 | 2018-04-16 10:56:03 +0200 | [diff] [blame] | 1848 | link:cmd-flush-caches.html[flush-caches] of "projects" is needed for the |
| 1849 | commentlinks to be immediately available in the UI. |
| 1850 | |
Shawn O. Pearce | da866ae | 2009-12-16 15:46:03 -0800 | [diff] [blame] | 1851 | ---- |
| 1852 | [commentlink "changeid"] |
| 1853 | match = (I[0-9a-f]{8,40}) |
Ben Rohlfs | 3f9924a | 2023-05-17 08:41:20 +0200 | [diff] [blame] | 1854 | link = "/q/$1" |
Brad Larson | 991a31b | 2009-11-03 14:30:26 -0600 | [diff] [blame] | 1855 | |
Shawn O. Pearce | da866ae | 2009-12-16 15:46:03 -0800 | [diff] [blame] | 1856 | [commentlink "bugzilla"] |
Kamil Musin | 9148ba6 | 2022-09-15 14:21:34 +0200 | [diff] [blame] | 1857 | match = "(^|\\s)(bug\\s+#?)(\\d+)($|\\s)" |
| 1858 | link = http://bugs.example.com/show_bug.cgi?id=$3 |
| 1859 | prefix = $1 |
| 1860 | suffix = $4 |
| 1861 | text = $2$3 |
Shawn O. Pearce | da866ae | 2009-12-16 15:46:03 -0800 | [diff] [blame] | 1862 | ---- |
| 1863 | |
Dave Borowitz | 13b3800 | 2013-04-08 12:03:29 -0700 | [diff] [blame] | 1864 | Comment links can also be specified in `project.config` and sections in |
Kamil Musin | 734db9a | 2022-11-11 11:19:25 +0100 | [diff] [blame] | 1865 | children override those in parents. |
Dave Borowitz | 13b3800 | 2013-04-08 12:03:29 -0700 | [diff] [blame] | 1866 | |
Shawn O. Pearce | da866ae | 2009-12-16 15:46:03 -0800 | [diff] [blame] | 1867 | [[commentlink.name.match]]commentlink.<name>.match:: |
Brad Larson | 991a31b | 2009-11-03 14:30:26 -0600 | [diff] [blame] | 1868 | + |
Shawn O. Pearce | da866ae | 2009-12-16 15:46:03 -0800 | [diff] [blame] | 1869 | A JavaScript regular expression to match positions to be replaced |
| 1870 | with a hyperlink. Subexpressions of the matched string can be |
| 1871 | stored using groups and accessed with `$'n'` syntax, where 'n' |
| 1872 | is the group number, starting from 1. |
Brad Larson | 991a31b | 2009-11-03 14:30:26 -0600 | [diff] [blame] | 1873 | + |
Shawn O. Pearce | c99630a | 2010-02-21 19:11:56 -0800 | [diff] [blame] | 1874 | The configuration file parser eats one level of backslashes, so the |
| 1875 | character class `\s` requires `\\s` in the configuration file. The |
| 1876 | parser also terminates the line at the first `#`, so a match |
| 1877 | expression containing # must be wrapped in double quotes. |
Shawn O. Pearce | da866ae | 2009-12-16 15:46:03 -0800 | [diff] [blame] | 1878 | + |
Shawn O. Pearce | 665beaa | 2010-02-21 22:41:03 -0800 | [diff] [blame] | 1879 | To match case insensitive strings, a character class with both the |
| 1880 | upper and lower case character for each position must be used. For |
| 1881 | example, to match the string `bug` in a case insensitive way the match |
| 1882 | pattern `[bB][uU][gG]` needs to be used. |
| 1883 | + |
David Ostrovsky | 7163dac | 2017-07-29 06:49:38 +0200 | [diff] [blame] | 1884 | The commentlink.name.match regular expressions are applied to the raw, |
| 1885 | unformatted and unescaped text form. Regex matching against HTML is not |
| 1886 | supported. Comment link patterns that are written in this style should |
| 1887 | be updated to match text formats. |
Matthew Webber | cd7d2bf | 2015-10-14 15:54:06 +0100 | [diff] [blame] | 1888 | + |
Shawn O. Pearce | da866ae | 2009-12-16 15:46:03 -0800 | [diff] [blame] | 1889 | A common pattern to match is `bug\\s+(\\d+)`. |
Kamil Musin | 9148ba6 | 2022-09-15 14:21:34 +0200 | [diff] [blame] | 1890 | + |
| 1891 | In order to better control the visual presentation of the link `prefix`, |
| 1892 | `suffix` and `text` is used. With the generated link html looking like: |
| 1893 | `prefix<a ...>text</a>suffix`. |
Brad Larson | 991a31b | 2009-11-03 14:30:26 -0600 | [diff] [blame] | 1894 | |
Shawn O. Pearce | da866ae | 2009-12-16 15:46:03 -0800 | [diff] [blame] | 1895 | [[commentlink.name.link]]commentlink.<name>.link:: |
Brad Larson | 991a31b | 2009-11-03 14:30:26 -0600 | [diff] [blame] | 1896 | + |
Shawn O. Pearce | da866ae | 2009-12-16 15:46:03 -0800 | [diff] [blame] | 1897 | The URL to direct the user to whenever the regular expression is |
| 1898 | matched. Groups in the match expression may be accessed as `$'n'`. |
Shawn O. Pearce | da866ae | 2009-12-16 15:46:03 -0800 | [diff] [blame] | 1899 | |
Kamil Musin | 9148ba6 | 2022-09-15 14:21:34 +0200 | [diff] [blame] | 1900 | [[commentlink.name.prefix]]commentlink.<name>.prefix:: |
| 1901 | + |
| 1902 | The text inserted before the link. Groups in the match expression may be |
| 1903 | accessed as `$'n'`. |
Kamil Musin | 9148ba6 | 2022-09-15 14:21:34 +0200 | [diff] [blame] | 1904 | |
| 1905 | [[commentlink.name.suffix]]commentlink.<name>.suffix:: |
| 1906 | + |
| 1907 | The text inserted after the link. Groups in the match expression may be |
| 1908 | accessed as `$'n'`. |
Kamil Musin | 9148ba6 | 2022-09-15 14:21:34 +0200 | [diff] [blame] | 1909 | |
| 1910 | [[commentlink.name.text]]commentlink.<name>.text:: |
| 1911 | + |
| 1912 | The text content of the link. Groups in the match expression may be |
| 1913 | accessed as `$'n'`. |
| 1914 | + |
Kamil Musin | 734db9a | 2022-11-11 11:19:25 +0100 | [diff] [blame] | 1915 | If not specified defaults to `$&` (the matched text). |
Brad Larson | 991a31b | 2009-11-03 14:30:26 -0600 | [diff] [blame] | 1916 | |
Dave Borowitz | 82d79c0 | 2013-04-08 15:45:12 -0700 | [diff] [blame] | 1917 | [[commentlink.name.enabled]]commentlink.<name>.enabled:: |
| 1918 | + |
| 1919 | Whether the comment link is enabled. A child project may override a |
| 1920 | section in a parent or the site-wide config that is disabled by |
| 1921 | specifying `enabled = true`. |
| 1922 | + |
David Pursehouse | 6f1af47 | 2013-12-11 19:23:33 +0900 | [diff] [blame] | 1923 | By default, true. |
| 1924 | + |
Dave Borowitz | 82d79c0 | 2013-04-08 15:45:12 -0700 | [diff] [blame] | 1925 | Note that the names and contents of disabled sections are visible even |
| 1926 | to anonymous users via the |
| 1927 | link:rest-api-projects.html#get-config[REST API]. |
| 1928 | |
Brad Larson | 991a31b | 2009-11-03 14:30:26 -0600 | [diff] [blame] | 1929 | |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 1930 | [[container]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1931 | === Section container |
Shawn O. Pearce | e24c71fb | 2009-12-07 20:32:40 -0800 | [diff] [blame] | 1932 | |
| 1933 | These settings are applied only if Gerrit is started as the container |
| 1934 | process through Gerrit's 'gerrit.sh' rc.d compatible wrapper script. |
| 1935 | |
| 1936 | [[container.heapLimit]]container.heapLimit:: |
| 1937 | + |
| 1938 | Maximum heap size of the Java process running Gerrit, in bytes. |
| 1939 | This property is translated into the '-Xmx' flag for the JVM. |
| 1940 | + |
| 1941 | Default is platform and JVM specific. |
| 1942 | + |
| 1943 | Common unit suffixes of 'k', 'm', or 'g' are supported. |
| 1944 | |
| 1945 | [[container.javaHome]]container.javaHome:: |
| 1946 | + |
| 1947 | Path of the JRE/JDK installation to run Gerrit with. If not set, the |
| 1948 | Gerrit startup script will attempt to search your system and guess |
| 1949 | a suitable JRE. Overrides the environment variable 'JAVA_HOME'. |
| 1950 | |
| 1951 | [[container.javaOptions]]container.javaOptions:: |
| 1952 | + |
David Pursehouse | a13052b | 2020-02-10 14:26:08 +0900 | [diff] [blame] | 1953 | Additional options to pass along to the Java runtime. May be specified |
| 1954 | multiple times to configure multiple values. If multiple values are |
| 1955 | configured, they are passed in order on the command line, separated by |
| 1956 | spaces. These options are appended onto 'JAVA_OPTIONS'. |
David Pursehouse | a70a60c | 2020-02-10 14:22:43 +0900 | [diff] [blame] | 1957 | + |
David Ostrovsky | c772bd8 | 2013-10-03 10:37:51 +0200 | [diff] [blame] | 1958 | For example, it is possible to overwrite Gerrit's default log4j |
| 1959 | configuration: |
David Pursehouse | a70a60c | 2020-02-10 14:22:43 +0900 | [diff] [blame] | 1960 | + |
David Ostrovsky | c772bd8 | 2013-10-03 10:37:51 +0200 | [diff] [blame] | 1961 | ---- |
| 1962 | javaOptions = -Dlog4j.configuration=file:///home/gerrit/site/etc/log4j.properties |
| 1963 | ---- |
Antoine Musso | 9ed4b4f | 2020-11-17 16:52:35 +0100 | [diff] [blame] | 1964 | + |
| 1965 | Gerrit built-in loggers are then ignored: error logger (`error_log` file), |
| 1966 | link:#httpd.requestLog[httpd.requestLog] and |
| 1967 | link:#sshd.requestLog[sshd.requestLog]. The |
| 1968 | link:#log.jsonLogging[log.jsonLogging] and |
| 1969 | link:#log.textLogging[log.textLogging] options are also ignored. |
David Ostrovsky | c772bd8 | 2013-10-03 10:37:51 +0200 | [diff] [blame] | 1970 | |
Hugo Arès | 6710f0a | 2014-11-04 10:28:42 -0500 | [diff] [blame] | 1971 | [[container.daemonOpt]]container.daemonOpt:: |
| 1972 | + |
| 1973 | Additional options to pass to the daemon (e.g. '--enable-httpd'). If |
| 1974 | multiple values are configured, they are passed in that order to the command |
| 1975 | line, separated by spaces. |
| 1976 | + |
| 1977 | Execute `java -jar gerrit.war daemon --help` to see all possible |
| 1978 | options. |
| 1979 | |
Han-Wen Nienhuys | a51f1c0 | 2019-10-14 18:56:01 +0200 | [diff] [blame] | 1980 | [[container.replica]]container.replica:: |
Fredrik Luthander | b8f7d6d | 2010-05-18 21:11:22 +0200 | [diff] [blame] | 1981 | + |
Han-Wen Nienhuys | 348a603 | 2019-09-24 19:44:57 +0200 | [diff] [blame] | 1982 | Used on Gerrit replica installations. If set to true the Gerrit JVM is |
| 1983 | called with the '--replica' switch, enabling replica mode. If no value is |
Matthias Sohn | d8182ba | 2019-12-09 14:50:23 +0100 | [diff] [blame] | 1984 | set (or any other value), Gerrit defaults to primary mode enabling write |
| 1985 | operations. |
Fredrik Luthander | b8f7d6d | 2010-05-18 21:11:22 +0200 | [diff] [blame] | 1986 | |
David Ostrovsky | 21fca75 | 2019-10-18 08:50:29 +0200 | [diff] [blame] | 1987 | [[container.slave]]container.slave:: |
Han-Wen Nienhuys | a51f1c0 | 2019-10-14 18:56:01 +0200 | [diff] [blame] | 1988 | + |
Christian Aistleitner | de8b072 | 2020-06-20 22:17:23 +0200 | [diff] [blame] | 1989 | Backward compatibility for link:#container.replica[`container.replica`] |
| 1990 | config setting. |
Han-Wen Nienhuys | a51f1c0 | 2019-10-14 18:56:01 +0200 | [diff] [blame] | 1991 | |
Khai Do | 6168beb | 2016-12-19 17:26:28 -0800 | [diff] [blame] | 1992 | [[container.startupTimeout]]container.startupTimeout:: |
| 1993 | + |
| 1994 | The maximum time (in seconds) to wait for a gerrit.sh start command |
| 1995 | to run a new Gerrit daemon successfully. If not set, defaults to |
| 1996 | 90 seconds. |
| 1997 | |
Daniele Sassoli | 92b74a5 | 2024-01-12 15:30:34 -0800 | [diff] [blame] | 1998 | [[container.shutdownTimeout]]container.shutdownTimeout:: |
| 1999 | + |
| 2000 | The maximum time (in seconds) to wait for a gerrit.sh stop command. |
| 2001 | This is added to the highest value between either 'sshd.gracefulStopTimeout' |
| 2002 | or 'httpd.gracefulStopTimeout'. If not set, defaults to |
| 2003 | 30 seconds |
| 2004 | |
Shawn O. Pearce | e24c71fb | 2009-12-07 20:32:40 -0800 | [diff] [blame] | 2005 | [[container.user]]container.user:: |
| 2006 | + |
| 2007 | Login name (or UID) of the operating system user the Gerrit JVM |
| 2008 | will execute as. If not set, defaults to the user who launched |
| 2009 | the 'gerrit.sh' wrapper script. |
| 2010 | |
| 2011 | [[container.war]]container.war:: |
| 2012 | + |
| 2013 | Path of the JAR file to start daemon execution with. This should |
| 2014 | be the path of the local 'gerrit.war' archive. Overrides the |
| 2015 | environment variable 'GERRIT_WAR'. |
| 2016 | + |
| 2017 | If not set, defaults to '$site_path/bin/gerrit.war', or to |
| 2018 | '$HOME/gerrit.war'. |
| 2019 | |
| 2020 | |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 2021 | [[core]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2022 | === Section core |
Shawn O. Pearce | 6854bdc | 2009-06-01 08:14:15 -0700 | [diff] [blame] | 2023 | |
Saša Živkov | d34dfe3 | 2017-11-20 11:14:35 +0100 | [diff] [blame] | 2024 | [NOTE] |
| 2025 | The link:#jgitConfig[etc/jgit.config] file supports configuration of all JGit |
| 2026 | options. |
| 2027 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 2028 | [[core.packedGitWindowSize]]core.packedGitWindowSize:: |
Shawn O. Pearce | 6854bdc | 2009-06-01 08:14:15 -0700 | [diff] [blame] | 2029 | + |
| 2030 | Number of bytes of a pack file to load into memory in a single |
| 2031 | read operation. This is the "page size" of the JGit buffer cache, |
| 2032 | used for all pack access operations. All disk IO occurs as single |
| 2033 | window reads. Setting this too large may cause the process to load |
| 2034 | more data than is required; setting this too small may increase |
| 2035 | the frequency of `read()` system calls. |
| 2036 | + |
| 2037 | Default on JGit is 8 KiB on all platforms. |
| 2038 | + |
| 2039 | Common unit suffixes of 'k', 'm', or 'g' are supported. |
| 2040 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 2041 | [[core.packedGitLimit]]core.packedGitLimit:: |
Shawn O. Pearce | 6854bdc | 2009-06-01 08:14:15 -0700 | [diff] [blame] | 2042 | + |
| 2043 | Maximum number of bytes to load and cache in memory from pack files. |
| 2044 | If JGit needs to access more than this many bytes it will unload less |
| 2045 | frequently used windows to reclaim memory space within the process. |
| 2046 | As this buffer must be shared with the rest of the JVM heap, it |
| 2047 | should be a fraction of the total memory available. |
| 2048 | + |
| 2049 | Default on JGit is 10 MiB on all platforms. |
| 2050 | + |
| 2051 | Common unit suffixes of 'k', 'm', or 'g' are supported. |
| 2052 | |
Matthias Sohn | 79bec41 | 2020-02-12 01:00:31 +0100 | [diff] [blame] | 2053 | [[core.packedGitUseStrongRefs]]core.packedGitUseStrongRefs:: |
| 2054 | + |
| 2055 | Set to `true` in order to use strong references to reference packfile |
| 2056 | pages cached in the WindowCache. Otherwise SoftReferences are used. |
| 2057 | If this option is set to `false`, the Java garbage collector will |
| 2058 | flush the WindowCache to free memory if the used heap comes close to |
| 2059 | the maximum heap size. This has the advantage that it can quickly |
| 2060 | reclaim memory which was used by the WindowCache but comes at the |
| 2061 | price that the previously cached pack file content needs to be again |
| 2062 | copied from the file system cache to the Gerrit process. |
| 2063 | Setting this option to `true` prevents flushing the WindowCache |
| 2064 | which provides more predictable performance. |
| 2065 | + |
| 2066 | Default is `false`. |
| 2067 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 2068 | [[core.deltaBaseCaseLimit]]core.deltaBaseCacheLimit:: |
Shawn O. Pearce | 6854bdc | 2009-06-01 08:14:15 -0700 | [diff] [blame] | 2069 | + |
| 2070 | Maximum number of bytes to reserve for caching base objects |
| 2071 | that multiple deltafied objects reference. By storing the entire |
| 2072 | decompressed base object in a cache Git is able to avoid unpacking |
| 2073 | and decompressing frequently used base objects multiple times. |
| 2074 | + |
| 2075 | Default on JGit is 10 MiB on all platforms. You probably do not |
| 2076 | need to adjust this value. |
| 2077 | + |
| 2078 | Common unit suffixes of 'k', 'm', or 'g' are supported. |
| 2079 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 2080 | [[core.packedGitOpenFiles]]core.packedGitOpenFiles:: |
Shawn O. Pearce | 6854bdc | 2009-06-01 08:14:15 -0700 | [diff] [blame] | 2081 | + |
| 2082 | Maximum number of pack files to have open at once. A pack file |
| 2083 | must be opened in order for any of its data to be available in |
| 2084 | a cached window. |
| 2085 | + |
| 2086 | If you increase this to a larger setting you may need to also adjust |
| 2087 | the ulimit on file descriptors for the host JVM, as Gerrit needs |
| 2088 | additional file descriptors available for network sockets and other |
| 2089 | repository data manipulation. |
| 2090 | + |
| 2091 | Default on JGit is 128 file descriptors on all platforms. |
| 2092 | |
Shawn O. Pearce | 329fe79 | 2010-09-03 15:44:23 -0700 | [diff] [blame] | 2093 | [[core.streamFileThreshold]]core.streamFileThreshold:: |
| 2094 | + |
| 2095 | Largest object size, in bytes, that JGit will allocate as a |
| 2096 | contiguous byte array. Any file revision larger than this threshold |
| 2097 | will have to be streamed, typically requiring the use of temporary |
David Pursehouse | 9246356 | 2013-06-24 10:16:28 +0900 | [diff] [blame] | 2098 | files under '$GIT_DIR/objects' to implement pseudo-random access |
Shawn O. Pearce | 329fe79 | 2010-09-03 15:44:23 -0700 | [diff] [blame] | 2099 | during delta decompression. |
| 2100 | + |
| 2101 | Servers with very high traffic should set this to be larger than |
| 2102 | the size of their common big files. For example a server managing |
| 2103 | the Android platform typically has to deal with ~10-12 MiB XML |
| 2104 | files, so `15 m` would be a reasonable setting in that environment. |
| 2105 | Setting this too high may cause the JVM to run out of heap space |
| 2106 | when handling very big binary files, such as device firmware or |
| 2107 | CD-ROM ISO images. |
| 2108 | + |
Luca Milanesio | b104a55 | 2019-11-18 17:28:56 -0800 | [diff] [blame] | 2109 | Defaults to 25% of the available JVM heap, limited to 2g. |
Shawn O. Pearce | 329fe79 | 2010-09-03 15:44:23 -0700 | [diff] [blame] | 2110 | + |
| 2111 | Common unit suffixes of 'k', 'm', or 'g' are supported. |
| 2112 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 2113 | [[core.packedGitMmap]]core.packedGitMmap:: |
Shawn O. Pearce | 6854bdc | 2009-06-01 08:14:15 -0700 | [diff] [blame] | 2114 | + |
| 2115 | When true, JGit will use `mmap()` rather than `malloc()+read()` |
| 2116 | to load data from pack files. The use of mmap can be problematic |
| 2117 | on some JVMs as the garbage collector must deduce that a memory |
| 2118 | mapped segment is no longer in use before a call to `munmap()` |
| 2119 | can be made by the JVM native code. |
| 2120 | + |
| 2121 | In server applications (such as Gerrit) that need to access many |
David Pursehouse | 9246356 | 2013-06-24 10:16:28 +0900 | [diff] [blame] | 2122 | pack files, setting this to true risks artificially running out |
Shawn O. Pearce | 6854bdc | 2009-06-01 08:14:15 -0700 | [diff] [blame] | 2123 | of virtual address space, as the garbage collector cannot reclaim |
| 2124 | unused mapped spaces fast enough. |
| 2125 | + |
| 2126 | Default on JGit is false. Although potentially slower, it yields |
| 2127 | much more predictable behavior. |
| 2128 | |
Sasa Zivkov | f69aeb1 | 2012-06-11 14:05:14 +0200 | [diff] [blame] | 2129 | [[core.asyncLoggingBufferSize]]core.asyncLoggingBufferSize:: |
| 2130 | + |
| 2131 | Size of the buffer to store logging events for asynchronous logging. |
| 2132 | Putting a larger value can protect threads from stalling when the |
| 2133 | AsyncAppender threads are not fast enough to consume the logging events |
David Pursehouse | 1ff91c0 | 2015-05-19 15:05:26 +0900 | [diff] [blame] | 2134 | 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] | 2135 | + |
| 2136 | Default is 64 entries. |
| 2137 | |
Dave Borowitz | 1bec65a | 2013-03-13 10:59:01 -0700 | [diff] [blame] | 2138 | [[core.useRecursiveMerge]]core.useRecursiveMerge:: |
| 2139 | + |
Edwin Kempin | 71831d2 | 2014-07-15 08:54:29 +0200 | [diff] [blame] | 2140 | Use JGit's recursive merger for three-way merges. This only affects |
Sebastian Schuberth | 774aac9 | 2015-04-16 13:21:04 +0200 | [diff] [blame] | 2141 | projects that allow content merges. |
Edwin Kempin | 71831d2 | 2014-07-15 08:54:29 +0200 | [diff] [blame] | 2142 | + |
| 2143 | As explained in this |
| 2144 | link:http://codicesoftware.blogspot.com/2011/09/merge-recursive-strategy.html[ |
Marian Harbach | 3425337 | 2019-12-10 18:01:31 +0100 | [diff] [blame] | 2145 | blog,role=external,window=_blank], the recursive merge produces better results if the two commits |
Edwin Kempin | 71831d2 | 2014-07-15 08:54:29 +0200 | [diff] [blame] | 2146 | that are merged have more than one common predecessor. |
Dave Borowitz | 1bec65a | 2013-03-13 10:59:01 -0700 | [diff] [blame] | 2147 | + |
Edwin Kempin | 7853c5b | 2014-07-15 08:57:17 +0200 | [diff] [blame] | 2148 | Default is true. |
Dave Borowitz | 1bec65a | 2013-03-13 10:59:01 -0700 | [diff] [blame] | 2149 | |
Hugo Arès | 4734437 | 2016-06-27 10:23:17 -0400 | [diff] [blame] | 2150 | [[core.repositoryCacheCleanupDelay]]core.repositoryCacheCleanupDelay:: |
| 2151 | + |
| 2152 | Delay between each periodic cleanup of expired repositories. |
| 2153 | + |
| 2154 | Values can be specified using standard time unit abbreviations (`ms`, `sec`, |
| 2155 | `min`, etc.). |
| 2156 | + |
| 2157 | Set it to 0 in order to switch off cache expiration. If cache expiration is |
| 2158 | switched off, the JVM can still evict cache entries when it is running low |
| 2159 | on available heap memory. |
| 2160 | + |
| 2161 | Set it to -1 to automatically derive cleanup delay from |
| 2162 | `core.repositoryCacheExpireAfter` (lowest value between 1/10 of |
| 2163 | `core.repositoryCacheExpireAfter` and 10 minutes). |
| 2164 | + |
| 2165 | Default is -1. |
| 2166 | |
| 2167 | [[core.repositoryCacheExpireAfter]]core.repositoryCacheExpireAfter:: |
| 2168 | + |
| 2169 | Time an unused repository should expire and be evicted from the repository |
| 2170 | cache. |
| 2171 | + |
| 2172 | Values can be specified using standard time unit abbreviations (`ms`, `sec`, |
| 2173 | `min`, etc.). |
| 2174 | + |
| 2175 | Default is 1 hour. |
| 2176 | |
Martin Fick | 5f5d979 | 2023-03-16 09:22:27 -0600 | [diff] [blame] | 2177 | [[core.usePerRequestRefCache]]core.usePerRequestRefCache:: |
| 2178 | + |
| 2179 | Use a per request (currently per request thread) ref cache. The ref |
| 2180 | cache uses JGit's SnapshottingRefDirectory to ensure that packed |
| 2181 | refs are checked and potentially read at least once per request |
| 2182 | (lazily) if needed. This helps reduce the overhead of checking if |
| 2183 | the packed-refs file is outdated. |
| 2184 | + |
| 2185 | Default is true. |
| 2186 | |
Youssef Elghareeb | 3fa8431 | 2022-01-14 15:25:05 +0100 | [diff] [blame] | 2187 | [[dashboard]] |
| 2188 | === Section dashboard |
| 2189 | |
| 2190 | [[dashboard.submitRequirementColumns]]dashboard.submitRequirementColumns:: |
| 2191 | + |
| 2192 | The list of submit requirement names that should be displayed as separate |
| 2193 | columns in the dashboard. |
| 2194 | |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 2195 | [[download]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2196 | === Section download |
monica.dionisio | 3f63044 | 2010-06-29 15:42:57 -0300 | [diff] [blame] | 2197 | |
| 2198 | ---- |
| 2199 | [download] |
Edwin Kempin | 08b03a2 | 2012-09-14 16:32:57 +0200 | [diff] [blame] | 2200 | command = checkout |
| 2201 | command = cherry_pick |
| 2202 | command = pull |
| 2203 | command = format_patch |
monica.dionisio | 3f63044 | 2010-06-29 15:42:57 -0300 | [diff] [blame] | 2204 | scheme = ssh |
| 2205 | scheme = http |
| 2206 | scheme = anon_http |
| 2207 | scheme = anon_git |
Mike Frysinger | de097a9 | 2021-04-29 10:55:15 -0400 | [diff] [blame] | 2208 | scheme = repo |
Thomas Draebing | ee30519 | 2023-03-08 16:40:11 +0100 | [diff] [blame] | 2209 | hide = ssh |
monica.dionisio | 3f63044 | 2010-06-29 15:42:57 -0300 | [diff] [blame] | 2210 | ---- |
| 2211 | |
| 2212 | The download section configures the allowed download methods. |
| 2213 | |
Edwin Kempin | 08b03a2 | 2012-09-14 16:32:57 +0200 | [diff] [blame] | 2214 | [[download.command]]download.command:: |
| 2215 | + |
| 2216 | Commands that should be offered to download changes. |
| 2217 | + |
| 2218 | Multiple commands are supported: |
| 2219 | + |
| 2220 | * `checkout` |
| 2221 | + |
| 2222 | Command to fetch and checkout the patch set. |
| 2223 | + |
| 2224 | * `cherry_pick` |
| 2225 | + |
| 2226 | Command to fetch the patch set and to cherry-pick it onto the current |
| 2227 | commit. |
| 2228 | + |
| 2229 | * `pull` |
| 2230 | + |
| 2231 | Command to pull the patch set. |
| 2232 | + |
| 2233 | * `format_patch` |
| 2234 | + |
| 2235 | Command to fetch the patch set and to feed it into the `format-patch` |
| 2236 | command. |
| 2237 | |
| 2238 | + |
| 2239 | If `download.command` is not specified, all download commands are |
| 2240 | offered. |
| 2241 | |
monica.dionisio | 3f63044 | 2010-06-29 15:42:57 -0300 | [diff] [blame] | 2242 | [[download.scheme]]download.scheme:: |
| 2243 | + |
| 2244 | Schemes that should be used to download changes. |
| 2245 | + |
| 2246 | Multiple schemes are supported: |
| 2247 | + |
| 2248 | * `http` |
| 2249 | + |
Shawn O. Pearce | 5c46a07 | 2010-08-23 08:33:32 -0700 | [diff] [blame] | 2250 | Authenticated HTTP download is allowed. |
monica.dionisio | 3f63044 | 2010-06-29 15:42:57 -0300 | [diff] [blame] | 2251 | + |
| 2252 | * `ssh` |
| 2253 | + |
Shawn O. Pearce | 5c46a07 | 2010-08-23 08:33:32 -0700 | [diff] [blame] | 2254 | Authenticated SSH download is allowed. |
monica.dionisio | 3f63044 | 2010-06-29 15:42:57 -0300 | [diff] [blame] | 2255 | + |
| 2256 | * `anon_http` |
| 2257 | + |
| 2258 | Anonymous HTTP download is allowed. |
| 2259 | + |
| 2260 | * `anon_git` |
| 2261 | + |
Shawn O. Pearce | 5c46a07 | 2010-08-23 08:33:32 -0700 | [diff] [blame] | 2262 | Anonymous Git download is allowed. This is not default, it is also |
| 2263 | necessary to set <<gerrit.canonicalGitUrl,gerrit.canonicalGitUrl>> |
| 2264 | variable. |
monica.dionisio | 3f63044 | 2010-06-29 15:42:57 -0300 | [diff] [blame] | 2265 | + |
Mike Frysinger | de097a9 | 2021-04-29 10:55:15 -0400 | [diff] [blame] | 2266 | * `repo` |
monica.dionisio | 3f63044 | 2010-06-29 15:42:57 -0300 | [diff] [blame] | 2267 | + |
Shawn O. Pearce | 5c46a07 | 2010-08-23 08:33:32 -0700 | [diff] [blame] | 2268 | Gerrit advertises patch set downloads with the `repo download` |
| 2269 | command, assuming that all projects managed by this instance are |
Mike Frysinger | de097a9 | 2021-04-29 10:55:15 -0400 | [diff] [blame] | 2270 | generally worked on with the |
Kenyon Ralph | ce209b6 | 2022-01-07 00:52:02 -0800 | [diff] [blame] | 2271 | https://gerrit.googlesource.com/git-repo[repo multi-repository tool]. |
Mike Frysinger | de097a9 | 2021-04-29 10:55:15 -0400 | [diff] [blame] | 2272 | This is not default, as not all instances will deploy repo. |
monica.dionisio | 3f63044 | 2010-06-29 15:42:57 -0300 | [diff] [blame] | 2273 | |
| 2274 | + |
Edwin Kempin | 08b03a2 | 2012-09-14 16:32:57 +0200 | [diff] [blame] | 2275 | If `download.scheme` is not specified, SSH, HTTP and Anonymous HTTP |
Shawn O. Pearce | 5c46a07 | 2010-08-23 08:33:32 -0700 | [diff] [blame] | 2276 | downloads are allowed. |
Shawn O. Pearce | fb5548e | 2009-11-11 07:39:21 -0800 | [diff] [blame] | 2277 | |
Thomas Draebing | ee30519 | 2023-03-08 16:40:11 +0100 | [diff] [blame] | 2278 | [[download.hide]]download.hide:: |
| 2279 | + |
| 2280 | Schemes that can be used to download changes, but will not be advertised |
| 2281 | in the UI. This can be any scheme that can be configured in <<download.scheme>>. |
| 2282 | + |
| 2283 | This is mostly useful in a deprecation scenario during a time where using |
| 2284 | a scheme is discouraged, but has to be supported until all clients have |
| 2285 | migrated to use a different scheme. |
| 2286 | + |
| 2287 | By default, no scheme will be hidden in the UI. |
| 2288 | |
Edwin Kempin | 322db67 | 2015-07-03 08:50:46 +0200 | [diff] [blame] | 2289 | [[download.checkForHiddenChangeRefs]]download.checkForHiddenChangeRefs:: |
| 2290 | + |
| 2291 | Whether the download commands should be adapted when the change refs |
| 2292 | are hidden. |
| 2293 | + |
| 2294 | Git has a configuration option to hide refs from the initial |
| 2295 | advertisement (`uploadpack.hideRefs`). This option can be used to hide |
| 2296 | the change refs from the client. As consequence fetching changes by |
| 2297 | change ref does not work anymore. However by setting |
| 2298 | `uploadpack.allowTipSha1InWant` to `true` fetching changes by commit ID |
| 2299 | is possible. If `download.checkForHiddenChangeRefs` is set to `true` |
| 2300 | the git download commands use the commit ID instead of the change ref |
| 2301 | when a project is configured like this. |
| 2302 | + |
| 2303 | Example git configuration on a project: |
| 2304 | + |
| 2305 | ---- |
| 2306 | [uploadpack] |
| 2307 | hideRefs = refs/changes/ |
| 2308 | hideRefs = refs/cache-automerge/ |
| 2309 | allowTipSha1InWant = true |
| 2310 | ---- |
| 2311 | + |
| 2312 | By default `false`. |
| 2313 | |
David Ostrovsky | fc9cdf0 | 2014-03-26 14:46:45 -0700 | [diff] [blame] | 2314 | [[download.archive]]download.archive:: |
| 2315 | + |
| 2316 | Specifies which archive formats, if any, should be offered on the change |
Francois Ferrand | 1e93388 | 2014-09-25 11:19:08 +0200 | [diff] [blame] | 2317 | screen and supported for `git-upload-archive` operation: |
David Ostrovsky | fc9cdf0 | 2014-03-26 14:46:45 -0700 | [diff] [blame] | 2318 | + |
| 2319 | ---- |
| 2320 | [download] |
| 2321 | archive = tar |
| 2322 | archive = tbz2 |
| 2323 | archive = tgz |
| 2324 | archive = txz |
Francois Ferrand | 1e93388 | 2014-09-25 11:19:08 +0200 | [diff] [blame] | 2325 | archive = zip |
David Ostrovsky | fc9cdf0 | 2014-03-26 14:46:45 -0700 | [diff] [blame] | 2326 | ---- |
| 2327 | |
Shawn Pearce | 6edde31 | 2014-03-26 22:00:26 -0700 | [diff] [blame] | 2328 | If `download.archive` is not specified defaults to all archive |
| 2329 | commands. Set to `off` or empty string to disable. |
David Ostrovsky | fc9cdf0 | 2014-03-26 14:46:45 -0700 | [diff] [blame] | 2330 | |
Francois Ferrand | 1e93388 | 2014-09-25 11:19:08 +0200 | [diff] [blame] | 2331 | Zip is not supported because it may be interpreted by a Java plugin as a |
| 2332 | valid JAR file, whose code would have access to cookies on the domain. |
| 2333 | For this reason `zip` format is always excluded from formats offered |
| 2334 | through the `Download` drop down or accessible in the REST API. |
| 2335 | |
Matthias Sohn | 0fb2c99 | 2014-06-03 01:42:59 +0200 | [diff] [blame] | 2336 | [[gc]] |
| 2337 | === Section gc |
| 2338 | |
| 2339 | This section allows to configure the git garbage collection and schedules it |
| 2340 | to run periodically. It will be triggered and executed sequentially for all |
| 2341 | projects. |
| 2342 | |
Christian Halstrick | e6c6832 | 2015-03-11 15:21:42 +0100 | [diff] [blame] | 2343 | [[gc.aggressive]]gc.aggressive:: |
| 2344 | + |
| 2345 | Determines if scheduled garbage collections and garbage collections triggered |
| 2346 | through Web-UI should run in aggressive mode or not. Aggressive garbage |
| 2347 | collections are more expensive but may lead to significantly smaller |
| 2348 | repositories. |
| 2349 | + |
| 2350 | Valid values are "true" and "false," default is "false". |
| 2351 | |
Matthias Sohn | 0fb2c99 | 2014-06-03 01:42:59 +0200 | [diff] [blame] | 2352 | [[gc.startTime]]gc.startTime:: |
| 2353 | + |
Edwin Kempin | d33d95a | 2018-02-16 11:44:04 +0100 | [diff] [blame] | 2354 | The link:#schedule-configuration-startTime[start time] for running the |
| 2355 | git garbage collection. |
Matthias Sohn | 0fb2c99 | 2014-06-03 01:42:59 +0200 | [diff] [blame] | 2356 | |
| 2357 | [[gc.interval]]gc.interval:: |
| 2358 | + |
Edwin Kempin | d33d95a | 2018-02-16 11:44:04 +0100 | [diff] [blame] | 2359 | The link:#schedule-configuration-interval[interval] for running the |
| 2360 | git garbage collection. |
Matthias Sohn | 0fb2c99 | 2014-06-03 01:42:59 +0200 | [diff] [blame] | 2361 | |
Edwin Kempin | d33d95a | 2018-02-16 11:44:04 +0100 | [diff] [blame] | 2362 | link:#schedule-configuration-examples[Schedule examples] can be found |
| 2363 | in the link:#schedule-configuration[Schedule Configuration] section. |
Matthias Sohn | 0fb2c99 | 2014-06-03 01:42:59 +0200 | [diff] [blame] | 2364 | |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 2365 | [[gerrit]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2366 | === Section gerrit |
Shawn O. Pearce | eb7f8ce | 2009-06-01 09:57:15 -0700 | [diff] [blame] | 2367 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 2368 | [[gerrit.basePath]]gerrit.basePath:: |
Shawn O. Pearce | 9743d0b | 2009-06-01 10:10:06 -0700 | [diff] [blame] | 2369 | + |
| 2370 | Local filesystem directory holding all Git repositories that |
| 2371 | Gerrit knows about and can process changes for. A project |
| 2372 | entity in Gerrit maps to a local Git repository by creating |
Edwin Kempin | cdb0e00 | 2011-09-08 14:23:30 +0200 | [diff] [blame] | 2373 | the path string `"${basePath}/${project_name}.git"`. |
Shawn O. Pearce | 9743d0b | 2009-06-01 10:10:06 -0700 | [diff] [blame] | 2374 | + |
| 2375 | If relative, the path is resolved relative to `'$site_path'`. |
| 2376 | |
Shawn O. Pearce | 897d921 | 2011-06-16 16:59:59 -0700 | [diff] [blame] | 2377 | [[gerrit.allProjects]]gerrit.allProjects:: |
| 2378 | + |
| 2379 | Name of the permissions-only project defining global server |
| 2380 | access controls and settings. These are inherited into every |
| 2381 | other project managed by the running server. The name is |
| 2382 | relative to `gerrit.basePath`. |
| 2383 | + |
Patrick Hiesel | 8622fa8b | 2022-01-27 14:09:55 +0100 | [diff] [blame] | 2384 | The link:#cache_names[persisted_projects cache] must be |
| 2385 | flushed after this setting is changed. |
| 2386 | + |
Shawn O. Pearce | 897d921 | 2011-06-16 16:59:59 -0700 | [diff] [blame] | 2387 | Defaults to `All-Projects` if not set. |
| 2388 | |
Marija Savtchouk | 714fbff | 2021-03-12 16:02:12 +0000 | [diff] [blame] | 2389 | [[gerrit.defaultBranch]]gerrit.defaultBranch:: |
| 2390 | + |
| 2391 | Name of the link:project-configuration.html#default-branch[default branch] |
| 2392 | to use on the project creation, if no other branches were specified in the input. |
| 2393 | + |
| 2394 | Defaults to `refs/heads/master` if not set. |
| 2395 | |
Edwin Kempin | 2bf5edd | 2014-03-25 22:21:23 +0100 | [diff] [blame] | 2396 | [[gerrit.allUsers]]gerrit.allUsers:: |
| 2397 | + |
| 2398 | Name of the project in which meta data of all users is stored. |
| 2399 | The name is relative to `gerrit.basePath`. |
| 2400 | + |
| 2401 | Defaults to `All-Users` if not set. |
| 2402 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 2403 | [[gerrit.canonicalWebUrl]]gerrit.canonicalWebUrl:: |
Shawn O. Pearce | eb7f8ce | 2009-06-01 09:57:15 -0700 | [diff] [blame] | 2404 | + |
| 2405 | The default URL for Gerrit to be accessed through. |
| 2406 | + |
Sebastian Schuberth | 6403713 | 2016-07-28 13:40:16 +0200 | [diff] [blame] | 2407 | Typically this would be set to something like "http://review.example.com/" |
| 2408 | 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] | 2409 | back to itself. |
| 2410 | + |
Kenyon Ralph | 9536ac9 | 2022-01-05 17:15:41 -0800 | [diff] [blame] | 2411 | Setting this is highly recommended, as it is necessary for the upload |
Shawn O. Pearce | eb7f8ce | 2009-06-01 09:57:15 -0700 | [diff] [blame] | 2412 | code invoked by "git push" or "repo upload" to output hyperlinks |
| 2413 | to the newly uploaded changes. |
| 2414 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 2415 | [[gerrit.canonicalGitUrl]]gerrit.canonicalGitUrl:: |
Shawn O. Pearce | eb7f8ce | 2009-06-01 09:57:15 -0700 | [diff] [blame] | 2416 | + |
| 2417 | Optional base URL for repositories available over the anonymous git |
| 2418 | protocol. For example, set this to `git://mirror.example.com/base/` |
| 2419 | to have Gerrit display patch set download URLs in the UI. Gerrit |
| 2420 | automatically appends the project name onto the end of the URL. |
| 2421 | + |
| 2422 | By default unset, as the git daemon must be configured externally |
| 2423 | by the system administrator, and might not even be running on the |
| 2424 | same host as Gerrit. |
| 2425 | |
Dave Borowitz | a5d3fec | 2015-07-09 14:24:02 -0700 | [diff] [blame] | 2426 | [[gerrit.docUrl]]gerrit.docUrl:: |
| 2427 | + |
| 2428 | Optional base URL for documentation, under which one can find |
| 2429 | "index.html", "rest-api.html", etc. Used as the base for the fixed set |
| 2430 | of links in the "Documentation" tab. A slash is implicitly appended. |
| 2431 | (For finer control over the top menu, consider writing a |
| 2432 | link:dev-plugins.html#top-menu-extensions[plugin].) |
| 2433 | + |
| 2434 | If unset or empty, the documentation tab will only be shown if |
| 2435 | `/Documentation/index.html` can be reached by the browser at app load |
| 2436 | time. |
| 2437 | |
Dave Borowitz | a17a984 | 2015-09-15 09:58:17 -0400 | [diff] [blame] | 2438 | [[gerrit.editGpgKeys]]gerrit.editGpgKeys:: |
| 2439 | + |
| 2440 | If enabled and server-side signed push validation is also |
| 2441 | link:#receive.enableSignedPush[enabled], enable the |
| 2442 | link:rest-api-accounts.html#list-gpg-keys[REST API endpoints] and web UI |
| 2443 | for editing GPG keys. If disabled, GPG keys can only be added by |
| 2444 | administrators with direct git access to All-Users. |
| 2445 | + |
| 2446 | Defaults to true. |
| 2447 | |
Dave Borowitz | 76ab1a1 | 2013-05-10 17:01:29 +0100 | [diff] [blame] | 2448 | [[gerrit.installCommitMsgHookCommand]]gerrit.installCommitMsgHookCommand:: |
| 2449 | + |
| 2450 | Optional command to install the `commit-msg` hook. Typically of the |
| 2451 | form: |
David Pursehouse | 05588e5 | 2015-01-07 14:25:11 +0900 | [diff] [blame] | 2452 | + |
Dave Borowitz | 76ab1a1 | 2013-05-10 17:01:29 +0100 | [diff] [blame] | 2453 | ---- |
| 2454 | fetch-cmd some://url/to/commit-msg .git/hooks/commit-msg ; chmod +x .git/hooks/commit-msg |
| 2455 | ---- |
| 2456 | + |
| 2457 | By default unset; falls back to using scp from the canonical SSH host, |
| 2458 | or curl from the canonical HTTP URL for the server. Only necessary if a |
| 2459 | proxy or other server/network configuration prevents clients from |
| 2460 | fetching from the default location. |
| 2461 | |
Shawn O. Pearce | 5d6de52 | 2011-10-07 18:00:16 -0700 | [diff] [blame] | 2462 | [[gerrit.gitHttpUrl]]gerrit.gitHttpUrl:: |
| 2463 | + |
| 2464 | Optional base URL for repositories available over the HTTP |
| 2465 | protocol. For example, set this to `http://mirror.example.com/base/` |
| 2466 | to have Gerrit display URLs from this server, rather than itself. |
| 2467 | + |
| 2468 | By default unset, as the HTTP daemon must be configured externally |
| 2469 | by the system administrator, and might not even be running on the |
| 2470 | same host as Gerrit. |
Nasser Grainawi | c3b0534 | 2022-02-25 16:58:13 -0700 | [diff] [blame] | 2471 | |
Luca Milanesio | 2c7ff59 | 2021-02-15 23:53:09 +0000 | [diff] [blame] | 2472 | [[gerrit.installBatchModule]]gerrit.installBatchModule:: |
| 2473 | + |
| 2474 | Repeatable list of class name of additional Guice modules to load as |
| 2475 | override to the batchInjector's modules during the init phases. |
| 2476 | Classes are resolved using the primary Gerrit class loader, hence the |
| 2477 | class needs to be either declared in Gerrit or an additional JAR |
| 2478 | located under the `/lib` directory. |
| 2479 | + |
| 2480 | By default unset. |
Nasser Grainawi | c3b0534 | 2022-02-25 16:58:13 -0700 | [diff] [blame] | 2481 | |
Luca Milanesio | b8ec7e2 | 2019-04-29 07:26:11 +0100 | [diff] [blame] | 2482 | [[gerrit.installDbModule]]gerrit.installDbModule:: |
| 2483 | + |
| 2484 | Repeatable list of class name of additional Guice modules to load at |
Luca Milanesio | 2c7ff59 | 2021-02-15 23:53:09 +0000 | [diff] [blame] | 2485 | Gerrit startup as part of the dbInjector. |
Luca Milanesio | b8ec7e2 | 2019-04-29 07:26:11 +0100 | [diff] [blame] | 2486 | Classes are resolved using the primary Gerrit class loader, hence the |
| 2487 | class needs to be either declared in Gerrit or an additional JAR |
| 2488 | located under the `/lib` directory. |
| 2489 | + |
| 2490 | By default unset. |
| 2491 | |
Luca Milanesio | c336ce9 | 2021-11-16 01:10:49 +0000 | [diff] [blame] | 2492 | [[gerrit.installIndexModule]]gerrit.installIndexModule:: |
| 2493 | + |
| 2494 | Class name of the Guice modules to load as alternate implementation |
| 2495 | for the Gerrit indexes backend. |
| 2496 | Classes are resolved using the primary Gerrit class loader, hence the |
| 2497 | class needs to be either declared in Gerrit or an additional JAR |
| 2498 | located under the `/lib` directory. |
| 2499 | + |
| 2500 | NOTE: The `gerrit.installIndexModule` has precedence over the |
| 2501 | `index.type`. |
| 2502 | + |
| 2503 | By default unset. |
| 2504 | + |
| 2505 | Example: |
| 2506 | ---- |
| 2507 | [gerrit] |
| 2508 | installIndexModule = com.google.gerrit.elasticsearch.ElasticIndexModule |
| 2509 | ---- |
Youssef Elghareeb | e2f9d5b | 2023-07-04 18:13:03 +0200 | [diff] [blame] | 2510 | |
Luca Milanesio | 62cc350 | 2016-11-15 10:22:38 -0800 | [diff] [blame] | 2511 | [[gerrit.installModule]]gerrit.installModule:: |
| 2512 | + |
| 2513 | Repeatable list of class name of additional Guice modules to load at |
Luca Milanesio | 2c7ff59 | 2021-02-15 23:53:09 +0000 | [diff] [blame] | 2514 | Gerrit startup as part of the sysInjector. |
Luca Milanesio | 62cc350 | 2016-11-15 10:22:38 -0800 | [diff] [blame] | 2515 | Classes are resolved using the primary Gerrit class loader, hence the |
| 2516 | class needs to be either declared in Gerrit or an additional JAR |
| 2517 | located under the `/lib` directory. |
| 2518 | + |
| 2519 | By default unset. |
| 2520 | + |
| 2521 | Example: |
| 2522 | ---- |
| 2523 | [gerrit] |
| 2524 | installModule = com.googlesource.gerrit.libmodule.MyModule |
| 2525 | installModule = com.example.abc.OurSpecialSauceModule |
Luca Milanesio | b8ec7e2 | 2019-04-29 07:26:11 +0100 | [diff] [blame] | 2526 | installDbModule = com.example.def.OurCustomProvider |
Luca Milanesio | 2c7ff59 | 2021-02-15 23:53:09 +0000 | [diff] [blame] | 2527 | installBatchModule = com.example.ghi.CustomBatchInitModule |
Luca Milanesio | 62cc350 | 2016-11-15 10:22:38 -0800 | [diff] [blame] | 2528 | ---- |
| 2529 | |
Luca Milanesio | 9225485 | 2019-02-14 01:33:14 +0000 | [diff] [blame] | 2530 | [[gerrit.listProjectsFromIndex]]gerrit.listProjectsFromIndex:: |
| 2531 | + |
| 2532 | Enable rendering of project list from the secondary index instead |
| 2533 | of purely relying on the in-memory cache. |
| 2534 | + |
| 2535 | By default false. |
| 2536 | + |
| 2537 | [NOTE] |
| 2538 | The in-memory cache (set to false) rendering provides an **unlimited list** as a result |
| 2539 | of the list project API, causing the full list of projects to be |
| 2540 | returned as a result of the link:rest-api-projects.html[/projects/] REST API |
| 2541 | or the link:cmd-ls-projects.html[gerrit ls-projects] SSH command. |
| 2542 | When the rendering from the secondary index (set to true), |
| 2543 | the **list is limited** by the global capability |
| 2544 | link:access-control.html#capability_queryLimit[queryLimit] |
| 2545 | which is defaulted to 500 entries. |
| 2546 | |
Sven Selberg | e63e92d | 2019-01-22 18:19:19 +0100 | [diff] [blame] | 2547 | [[gerrit.primaryWeblinkName]]gerrit.primaryWeblinkName:: |
| 2548 | + |
| 2549 | Name of the link:dev-plugins.html#links-to-external-tools[Weblink] that should |
| 2550 | be chosen in cases where only one Weblink can be used in the UI, for example in |
| 2551 | inline links. |
| 2552 | + |
| 2553 | By default unset, meaning that the UI is responsible for trying to identify |
| 2554 | a weblink to be used in these cases, most likely weblinks that links to code |
| 2555 | browsers with known integrations with Gerrit (like Gitiles and Gitweb). |
| 2556 | + |
| 2557 | Example: |
| 2558 | ---- |
| 2559 | [gerrit] |
| 2560 | primaryWeblinkName = gitiles |
| 2561 | ---- |
| 2562 | |
Shawn O. Pearce | b8bea1b | 2012-08-16 17:18:58 -0700 | [diff] [blame] | 2563 | [[gerrit.reportBugUrl]]gerrit.reportBugUrl:: |
| 2564 | + |
David Pursehouse | 214ab86 | 2014-12-01 11:48:26 +0900 | [diff] [blame] | 2565 | URL to direct users to when they need to report a bug. |
| 2566 | + |
| 2567 | By default unset, meaning no bug report URL will be displayed. Administrators |
| 2568 | 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] | 2569 | |
David Ostrovsky | 8e6acc9 | 2021-04-14 20:00:37 +0200 | [diff] [blame] | 2570 | [[gerrit.enablePeerIPInReflogRecord]]gerrit.enablePeerIPInReflogRecord:: |
| 2571 | |
| 2572 | Record actual peer IP address in ref log entry for identified user. |
| 2573 | |
David Ostrovsky | 9f200d2 | 2021-04-17 14:06:12 +0200 | [diff] [blame] | 2574 | Defaults to false. |
David Ostrovsky | 8e6acc9 | 2021-04-14 20:00:37 +0200 | [diff] [blame] | 2575 | |
David Pursehouse | 962e118 | 2014-12-03 17:17:52 +0900 | [diff] [blame] | 2576 | [[gerrit.secureStoreClass]]gerrit.secureStoreClass:: |
| 2577 | + |
| 2578 | Use the secure store implementation from a specified class. |
| 2579 | + |
| 2580 | If specified, must be the fully qualified class name of a class that implements |
| 2581 | the `com.google.gerrit.server.securestore.SecureStore` interface, and the jar |
| 2582 | file containing the class must be placed in the `$site_path/lib` folder. |
| 2583 | + |
| 2584 | If not specified, the default no-op implementation is used. |
| 2585 | |
Dariusz Luksza | 7a046da | 2014-04-03 17:05:47 +0200 | [diff] [blame] | 2586 | [[gerrit.canLoadInIFrame]]gerrit.canLoadInIFrame:: |
| 2587 | + |
| 2588 | For security reasons Gerrit will always jump out of iframe. |
| 2589 | Setting this option to true will prevent this behavior. |
| 2590 | + |
| 2591 | By default false. |
| 2592 | |
Marcin Czech | 559ea2b | 2020-06-15 17:36:18 +0200 | [diff] [blame] | 2593 | [[gerrit.xframeOption]]gerrit.xframeOption:: |
| 2594 | + |
| 2595 | Add link:https://tools.ietf.org/html/rfc7034[`X-Frame-Options`] header to all HTTP |
| 2596 | responses. The `X-Frame-Options` HTTP response header can be used to indicate |
| 2597 | whether or not a browser should be allowed to render a page in a |
| 2598 | `<frame>`, `<iframe>`, `<embed>` or `<object>`. |
| 2599 | + |
| 2600 | Available values: |
| 2601 | + |
| 2602 | 1. ALLOW - The page can be displayed in a frame. |
| 2603 | 2. SAMEORIGIN - The page can only be displayed in a frame on the same origin as the page itself. |
| 2604 | + |
| 2605 | If link:#gerrit.canLoadInIFrame is set to false this option is ignored and the |
| 2606 | `X-Frame-Options` header is always set to `DENY`. |
| 2607 | Setting this option to `ALLOW` will cause the `X-Frame-Options` header to be omitted |
| 2608 | the the page can be displayed in a frame. |
| 2609 | + |
| 2610 | By default SAMEORIGIN. |
| 2611 | |
Wyatt Allen | 414659c | 2017-03-15 09:55:31 -0700 | [diff] [blame] | 2612 | [[gerrit.cdnPath]]gerrit.cdnPath:: |
| 2613 | + |
Ben Rohlfs | da0a62b | 2021-04-26 17:02:19 +0200 | [diff] [blame] | 2614 | Path prefix for Gerrit's static resources if using a CDN. |
Wyatt Allen | 414659c | 2017-03-15 09:55:31 -0700 | [diff] [blame] | 2615 | |
Viktar Donich | 65ae748 | 2017-10-20 14:13:31 -0700 | [diff] [blame] | 2616 | [[gerrit.faviconPath]]gerrit.faviconPath:: |
| 2617 | + |
Ben Rohlfs | da0a62b | 2021-04-26 17:02:19 +0200 | [diff] [blame] | 2618 | Path for Gerrit's favicon after link:#gerrit.canonicalWebUrl[default URL], |
Viktar Donich | 65ae748 | 2017-10-20 14:13:31 -0700 | [diff] [blame] | 2619 | including icon name and extension (.ico should be used). |
| 2620 | |
Fabio Ponciroli | 829be0d | 2020-05-06 13:59:20 +0200 | [diff] [blame] | 2621 | [[gerrit.instanceId]]gerrit.instanceId:: |
| 2622 | + |
| 2623 | Optional identifier for this Gerrit instance. |
| 2624 | Used to identify a specific instance within a group of Gerrit instances with the |
| 2625 | same `serverId` (i.e.: a Gerrit cluster). |
| 2626 | Unlike `instanceName` this value is not available in the email templates. |
Maxime Guerreiro | 8d129d4 | 2018-03-21 18:59:27 +0100 | [diff] [blame] | 2627 | |
Thomas Draebing | 40eb567 | 2023-08-18 12:33:16 +0200 | [diff] [blame] | 2628 | The instance ID can also be configured by setting the Java system property |
| 2629 | `gerrit.instanceId` on startup. This will override the configuration in the |
| 2630 | gerrit.config. |
| 2631 | |
Maxime Guerreiro | 8d129d4 | 2018-03-21 18:59:27 +0100 | [diff] [blame] | 2632 | [[gerrit.instanceName]]gerrit.instanceName:: |
| 2633 | + |
| 2634 | Short identifier for this Gerrit instance. |
| 2635 | A good name should be short but precise enough so that users can identify the instance among others. |
| 2636 | + |
| 2637 | Defaults to the full hostname of the Gerrit server. |
| 2638 | |
Luca Milanesio | 1a3d84f | 2020-05-04 17:14:12 +0100 | [diff] [blame] | 2639 | [[gerrit.experimentalRollingUpgrade]]gerrit.experimentalRollingUpgrade:: |
| 2640 | + |
| 2641 | Enable Gerrit rolling upgrade to the next version. |
Luca Milanesio | ba8dfad | 2020-11-27 12:59:07 +0000 | [diff] [blame] | 2642 | For example if Gerrit v3.2 is version N (All-Projects:refs/meta/version=183) |
| 2643 | then its next version N+1 is v3.3 (All-Projects:refs/meta/version=184). |
Luca Milanesio | 1a3d84f | 2020-05-04 17:14:12 +0100 | [diff] [blame] | 2644 | Allow Gerrit to start even if the underlying schema version has been bumped to |
| 2645 | the next Gerrit version. |
| 2646 | + |
| 2647 | Set to true if Gerrit is installed in |
| 2648 | [high-availability configuration](https://gerrit.googlesource.com/plugins/high-availability/+/refs/heads/master/README.md) |
| 2649 | during the rolling upgrade to the next version. |
| 2650 | + |
| 2651 | By default false. |
| 2652 | + |
| 2653 | The rolling upgrade process, at high level, assumes that Gerrit is installed |
| 2654 | on two or more nodes sharing the repositories over NFS. The upgrade is composed |
| 2655 | of the following steps: |
| 2656 | + |
| 2657 | 1. Set gerrit.experimentalRollingUpgrade to true on all Gerrit masters |
| 2658 | 2. Set the first master unhealthy |
| 2659 | 3. Shutdown the first master and [upgrade](install.html#init) to the next version |
Luca Milanesio | ba8dfad | 2020-11-27 12:59:07 +0000 | [diff] [blame] | 2660 | 4. Startup the first master, wait for the online reindex to complete (where applicable) |
Luca Milanesio | 1a3d84f | 2020-05-04 17:14:12 +0100 | [diff] [blame] | 2661 | 5. Verify the the first master upgrade is successful and online reindex is complete |
| 2662 | 6. Set the first master healthy |
| 2663 | 7. Repeat steps 2. to 6. for all the other Gerrit nodes |
| 2664 | + |
| 2665 | [WARNING] |
| 2666 | Rolling upgrade may or may not be possible depending on the changes introduced |
| 2667 | by the target version of the upgrade. Refer to the release notes and check whether |
| 2668 | the rolling upgrade is possible or not and the associated constraints. |
Maxime Guerreiro | 8d129d4 | 2018-03-21 18:59:27 +0100 | [diff] [blame] | 2669 | |
Luca Milanesio | 37258db | 2022-06-27 14:40:08 +0100 | [diff] [blame] | 2670 | [[gerrit.importedServerId]]gerrit.importedServerId:: |
| 2671 | + |
| 2672 | ServerId of the repositories imported from other Gerrit servers. Changes coming |
Fabio Ponciroli | a0eae5d | 2023-06-16 10:48:38 +0200 | [diff] [blame] | 2673 | associated with the imported serverIds are indexed and displayed in the UI |
Luca Milanesio | 0eebefd | 2023-06-20 21:38:29 +0100 | [diff] [blame] | 2674 | but they are not searchable by `changeNumber` therefore the |
| 2675 | `index.cacheQueryResultsByChangeNum` must also be set to false. |
| 2676 | Imported changes are still discoverable in any other ways, for example: |
Fabio Ponciroli | a0eae5d | 2023-06-16 10:48:38 +0200 | [diff] [blame] | 2677 | |
| 2678 | project:someproject branch:main changeId:I78a7add1fe2597cad788c833d8f771f09b54cf33 |
Luca Milanesio | 37258db | 2022-06-27 14:40:08 +0100 | [diff] [blame] | 2679 | + |
| 2680 | Specify multiple `gerrit.importedServerId` for allowing the import from multiple |
Luca Milanesio | c6737c9 | 2022-06-28 00:07:06 +0100 | [diff] [blame] | 2681 | Gerrit servers with different serverIds. |
| 2682 | + |
| 2683 | [NOTE] |
| 2684 | The account-ids referenced in the imported changes are used for looking up the |
| 2685 | associated account-id locally, using the `imported:` external-id. |
| 2686 | Example: the account-id 1000 from the imported server-id 59a4964e-6376-4ed9-beef |
| 2687 | will be looked up in the local accounts using the `imported:1000@59a4964e-6376-4ed9-beef` |
| 2688 | external-id. |
Luca Milanesio | 37258db | 2022-06-27 14:40:08 +0100 | [diff] [blame] | 2689 | + |
| 2690 | If this value is not set, all changes imported from other Gerrit servers will be |
| 2691 | ignored. |
| 2692 | + |
| 2693 | By default empty. |
| 2694 | |
Sven Selberg | 327c2e4 | 2018-04-10 11:42:19 +0200 | [diff] [blame] | 2695 | [[gerrit.serverId]]gerrit.serverId:: |
| 2696 | + |
| 2697 | Used by NoteDb to, amongst other things, identify author identities from |
| 2698 | per-server specific account IDs. |
| 2699 | + |
| 2700 | If this value is not set on startup it is automatically set to a random UUID. |
| 2701 | + |
| 2702 | [NOTE] |
| 2703 | If this value doesn't match the serverId used when creating an already existing |
| 2704 | NoteDb, Gerrit will not be able to use that instance of NoteDb. The serverId |
| 2705 | used to create the NoteDb will show in the resulting exception message in case |
| 2706 | the value differs. |
| 2707 | |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 2708 | [[gitweb]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2709 | === Section gitweb |
Shawn O. Pearce | d7ba11f | 2009-06-01 09:35:41 -0700 | [diff] [blame] | 2710 | |
Shawn O. Pearce | 618dae2 | 2010-03-12 19:07:43 -0800 | [diff] [blame] | 2711 | Gerrit can forward requests to either an internally managed gitweb |
| 2712 | (which allows Gerrit to enforce some access controls), or to an |
| 2713 | externally managed gitweb (where the web server manages access). |
Shawn O. Pearce | d7ba11f | 2009-06-01 09:35:41 -0700 | [diff] [blame] | 2714 | See also link:config-gitweb.html[Gitweb Integration]. |
| 2715 | |
Shawn O. Pearce | 618dae2 | 2010-03-12 19:07:43 -0800 | [diff] [blame] | 2716 | [[gitweb.cgi]]gitweb.cgi:: |
| 2717 | + |
| 2718 | Path to the locally installed `gitweb.cgi` executable. This CGI will |
| 2719 | be called by Gerrit Code Review when the URL `/gitweb` is accessed. |
| 2720 | Project level access controls are enforced prior to calling the CGI. |
| 2721 | + |
David Pursehouse | a89dc98 | 2016-09-15 09:35:44 +0200 | [diff] [blame] | 2722 | 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] | 2723 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 2724 | [[gitweb.url]]gitweb.url:: |
Shawn O. Pearce | d7ba11f | 2009-06-01 09:35:41 -0700 | [diff] [blame] | 2725 | + |
| 2726 | Optional URL of an affiliated gitweb service. Defines the |
| 2727 | web location where a `gitweb.cgi` is installed to browse |
David Pursehouse | a89dc98 | 2016-09-15 09:35:44 +0200 | [diff] [blame] | 2728 | `gerrit.basePath` and the repositories it contains. |
Shawn O. Pearce | d7ba11f | 2009-06-01 09:35:41 -0700 | [diff] [blame] | 2729 | + |
| 2730 | Gerrit appends any necessary query arguments onto the end of this URL. |
David Pursehouse | a89dc98 | 2016-09-15 09:35:44 +0200 | [diff] [blame] | 2731 | For example, `?p=$project.git;h=$commit`. |
Shawn O. Pearce | d7ba11f | 2009-06-01 09:35:41 -0700 | [diff] [blame] | 2732 | |
Shane Mc Cormack | 27868a4 | 2009-12-28 04:49:39 +0000 | [diff] [blame] | 2733 | [[gitweb.type]]gitweb.type:: |
| 2734 | + |
| 2735 | Optional type of affiliated gitweb service. This allows using |
David Pursehouse | a66f7ff | 2016-09-05 21:11:10 +0900 | [diff] [blame] | 2736 | alternatives to gitweb, such as cgit. |
Shane Mc Cormack | 27868a4 | 2009-12-28 04:49:39 +0000 | [diff] [blame] | 2737 | + |
Shawn O. Pearce | 2b11da0 | 2011-09-06 16:18:12 -0700 | [diff] [blame] | 2738 | Valid values are `gitweb`, `cgit`, `disabled` or `custom`. |
David Pursehouse | a66f7ff | 2016-09-05 21:11:10 +0900 | [diff] [blame] | 2739 | + |
| 2740 | If not set, or set to `disabled`, there is no gitweb hyperlinking |
| 2741 | support. |
Shane Mc Cormack | 27868a4 | 2009-12-28 04:49:39 +0000 | [diff] [blame] | 2742 | |
Edwin Kempin | d86909c | 2012-03-26 10:36:29 +0200 | [diff] [blame] | 2743 | [[gitweb.revision]]gitweb.revision:: |
Shane Mc Cormack | 27868a4 | 2009-12-28 04:49:39 +0000 | [diff] [blame] | 2744 | + |
| 2745 | Optional pattern to use for constructing the gitweb URL when pointing |
David Pursehouse | a89dc98 | 2016-09-15 09:35:44 +0200 | [diff] [blame] | 2746 | at a specific commit when `gitweb.type` is set to `custom`. |
Shane Mc Cormack | 27868a4 | 2009-12-28 04:49:39 +0000 | [diff] [blame] | 2747 | + |
Edwin Kempin | cdb0e00 | 2011-09-08 14:23:30 +0200 | [diff] [blame] | 2748 | Valid replacements are `${project}` for the project name in Gerrit |
Han-Wen Nienhuys | 37a1cab | 2021-04-01 12:46:00 +0200 | [diff] [blame] | 2749 | and `${commit}` for the SHA-1 hash for the commit. |
Shane Mc Cormack | 27868a4 | 2009-12-28 04:49:39 +0000 | [diff] [blame] | 2750 | |
Edwin Kempin | d86909c | 2012-03-26 10:36:29 +0200 | [diff] [blame] | 2751 | [[gitweb.project]]gitweb.project:: |
Shane Mc Cormack | 27868a4 | 2009-12-28 04:49:39 +0000 | [diff] [blame] | 2752 | + |
| 2753 | Optional pattern to use for constructing the gitweb URL when pointing |
David Pursehouse | a89dc98 | 2016-09-15 09:35:44 +0200 | [diff] [blame] | 2754 | at a specific project when `gitweb.type` is set to `custom`. |
Shane Mc Cormack | 27868a4 | 2009-12-28 04:49:39 +0000 | [diff] [blame] | 2755 | + |
Edwin Kempin | cdb0e00 | 2011-09-08 14:23:30 +0200 | [diff] [blame] | 2756 | Valid replacements are `${project}` for the project name in Gerrit. |
Shane Mc Cormack | 27868a4 | 2009-12-28 04:49:39 +0000 | [diff] [blame] | 2757 | |
Edwin Kempin | d86909c | 2012-03-26 10:36:29 +0200 | [diff] [blame] | 2758 | [[gitweb.branch]]gitweb.branch:: |
Shane Mc Cormack | 27868a4 | 2009-12-28 04:49:39 +0000 | [diff] [blame] | 2759 | + |
| 2760 | Optional pattern to use for constructing the gitweb URL when pointing |
David Pursehouse | a89dc98 | 2016-09-15 09:35:44 +0200 | [diff] [blame] | 2761 | at a specific branch when `gitweb.type` is set to `custom`. |
Shane Mc Cormack | 27868a4 | 2009-12-28 04:49:39 +0000 | [diff] [blame] | 2762 | + |
Edwin Kempin | cdb0e00 | 2011-09-08 14:23:30 +0200 | [diff] [blame] | 2763 | Valid replacements are `${project}` for the project name in Gerrit |
| 2764 | and `${branch}` for the name of the branch. |
Shane Mc Cormack | 27868a4 | 2009-12-28 04:49:39 +0000 | [diff] [blame] | 2765 | |
Paladox none | 5759f2c | 2017-10-27 18:13:54 +0000 | [diff] [blame] | 2766 | [[gitweb.tag]]gitweb.tag:: |
| 2767 | + |
| 2768 | Optional pattern to use for constructing the gitweb URL when pointing |
| 2769 | at a specific tag when `gitweb.type` is set to `custom`. |
| 2770 | + |
| 2771 | Valid replacements are `${project}` for the project name in Gerrit |
| 2772 | and `${tag}` for the name of the tag. |
| 2773 | |
Colby Ranger | 79d4ebe | 2013-12-16 14:19:18 -0800 | [diff] [blame] | 2774 | [[gitweb.roottree]]gitweb.roottree:: |
| 2775 | + |
| 2776 | Optional pattern to use for constructing the gitweb URL when pointing |
David Pursehouse | a89dc98 | 2016-09-15 09:35:44 +0200 | [diff] [blame] | 2777 | at the contents of the root tree in a specific commit when `gitweb.type` |
| 2778 | is set to `custom`. |
Colby Ranger | 79d4ebe | 2013-12-16 14:19:18 -0800 | [diff] [blame] | 2779 | + |
| 2780 | Valid replacements are `${project}` for the project name in Gerrit |
Han-Wen Nienhuys | 37a1cab | 2021-04-01 12:46:00 +0200 | [diff] [blame] | 2781 | and `${commit}` for the SHA-1 hash for the commit. |
Colby Ranger | 79d4ebe | 2013-12-16 14:19:18 -0800 | [diff] [blame] | 2782 | |
| 2783 | [[gitweb.file]]gitweb.file:: |
| 2784 | + |
| 2785 | Optional pattern to use for constructing the gitweb URL when pointing |
David Pursehouse | a89dc98 | 2016-09-15 09:35:44 +0200 | [diff] [blame] | 2786 | at the contents of a file in a specific commit when `gitweb.type` is |
| 2787 | set to `custom`. |
Colby Ranger | 79d4ebe | 2013-12-16 14:19:18 -0800 | [diff] [blame] | 2788 | + |
| 2789 | Valid replacements are `${project}` for the project name in Gerrit, |
Clark Boylan | 77f5a06 | 2022-02-14 10:55:30 -0800 | [diff] [blame] | 2790 | `${file}` for the file name, `${hash}` for the SHA-1 hash for the commit, |
| 2791 | and `${commit}` for the change ref or SHA-1 of the commit if no base |
| 2792 | patch set. |
Colby Ranger | 79d4ebe | 2013-12-16 14:19:18 -0800 | [diff] [blame] | 2793 | |
Edwin Kempin | 6401156 | 2012-03-26 10:50:12 +0200 | [diff] [blame] | 2794 | [[gitweb.filehistory]]gitweb.filehistory:: |
| 2795 | + |
| 2796 | Optional pattern to use for constructing the gitweb URL when pointing |
David Pursehouse | a89dc98 | 2016-09-15 09:35:44 +0200 | [diff] [blame] | 2797 | at the history of a file in a specific branch when when `gitweb.type` |
| 2798 | is set to `custom`. |
Edwin Kempin | 6401156 | 2012-03-26 10:50:12 +0200 | [diff] [blame] | 2799 | + |
| 2800 | Valid replacements are `${project}` for the project name in Gerrit, |
| 2801 | `${file}` for the file name and `${branch}` for the name of the |
| 2802 | branch. |
| 2803 | |
Gustaf Lundh | a07d2e7 | 2011-10-27 15:26:35 -0700 | [diff] [blame] | 2804 | [[gitweb.linkname]]gitweb.linkname:: |
| 2805 | + |
| 2806 | Optional setting for modifying the link name presented to the user |
| 2807 | in the Gerrit web-UI. |
| 2808 | + |
David Pursehouse | a89dc98 | 2016-09-15 09:35:44 +0200 | [diff] [blame] | 2809 | The default linkname for custom type is `gitweb`. |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 2810 | |
Adrian Goerler | f200707 | 2011-11-10 08:39:55 +0100 | [diff] [blame] | 2811 | [[gitweb.pathSeparator]]gitweb.pathSeparator:: |
| 2812 | + |
| 2813 | Optional character to substitute the standard path separator (slash) in |
| 2814 | project names and branch names. |
| 2815 | + |
| 2816 | By default, Gerrit will use hexadecimal encoding for slashes in project and |
| 2817 | branch names. Some web servers, such as Tomcat, reject this hexadecimal |
| 2818 | encoding in the URL. |
| 2819 | + |
Marian Harbach | 3425337 | 2019-12-10 18:01:31 +0100 | [diff] [blame] | 2820 | Some alternative gitweb services, such as link:http://gitblit.com[Gitblit,role=external,window=_blank], |
Adrian Goerler | f200707 | 2011-11-10 08:39:55 +0100 | [diff] [blame] | 2821 | allow using an alternative path separator character. In Gitblit, this can be |
Marian Harbach | 3425337 | 2019-12-10 18:01:31 +0100 | [diff] [blame] | 2822 | configured through the property link:http://gitblit.com/properties.html[web.forwardSlashCharacter,role=external,window=_blank]. |
Adrian Goerler | f200707 | 2011-11-10 08:39:55 +0100 | [diff] [blame] | 2823 | In Gerrit, the alternative path separator can be configured correspondingly |
David Pursehouse | a89dc98 | 2016-09-15 09:35:44 +0200 | [diff] [blame] | 2824 | using the property `gitweb.pathSeparator`. |
Adrian Goerler | f200707 | 2011-11-10 08:39:55 +0100 | [diff] [blame] | 2825 | + |
David Pursehouse | a89dc98 | 2016-09-15 09:35:44 +0200 | [diff] [blame] | 2826 | Valid values are the characters `*`, `(` and `)`. |
Adrian Goerler | f200707 | 2011-11-10 08:39:55 +0100 | [diff] [blame] | 2827 | |
David Pursehouse | 5d592e8 | 2016-06-09 05:12:26 +0000 | [diff] [blame] | 2828 | [[gitweb.urlEncode]]gitweb.urlEncode:: |
Luca Milanesio | 2531203 | 2013-10-11 11:34:39 +0100 | [diff] [blame] | 2829 | + |
| 2830 | Whether or not Gerrit should encode the generated viewer URL. |
| 2831 | + |
| 2832 | Gerrit composes the viewer URL using information about the project, branch, file |
| 2833 | 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] | 2834 | 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] | 2835 | for being correctly parsed. |
| 2836 | 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] | 2837 | based viewer). |
Luca Milanesio | 2531203 | 2013-10-11 11:34:39 +0100 | [diff] [blame] | 2838 | + |
David Pursehouse | a89dc98 | 2016-09-15 09:35:44 +0200 | [diff] [blame] | 2839 | Valid values are `true` and `false`. The default is `true`. |
Luca Milanesio | 2531203 | 2013-10-11 11:34:39 +0100 | [diff] [blame] | 2840 | |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 2841 | [[groups]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2842 | === Section groups |
Edwin Kempin | 4bbff70 | 2013-01-11 09:59:53 +0100 | [diff] [blame] | 2843 | |
Dmitrii Filippov | 4e16eb9 | 2023-11-02 17:42:29 +0100 | [diff] [blame] | 2844 | [[groups.auditLog.ignoreRecordsFromUnidentifiedUsers]]groups.auditLog.ignoreRecordsFromUnidentifiedUsers:: |
| 2845 | + |
| 2846 | Controls whether AuditLogReader should ignore commits created by unidentified users. |
| 2847 | If true, then AuditLogReader ignores commits in the refs/groups/* made by unidentified users (i.e. |
| 2848 | when the author of a commit can't be parsed as account id). |
| 2849 | + |
| 2850 | The current version of Gerrit writes identified users as authors for new refs/groups/* commits. |
| 2851 | However, some old versions used a server identity as the author (e.g. "Gerrit Code Review |
| 2852 | <server@googlesource.com>") for such commits. Such string can't be converted to account id but |
| 2853 | usually the commit shouldn't be ignored. |
| 2854 | + |
| 2855 | By default, false. |
| 2856 | + |
| 2857 | Setting it to true may lead to some unexpected results in audit log and must be set carefully. |
| 2858 | |
Patrick Hiesel | a024242 | 2020-11-30 16:54:21 +0100 | [diff] [blame] | 2859 | [[groups.includeExternalUsersInRegisteredUsersGroup]]groups.includeExternalUsersInRegisteredUsersGroup:: |
| 2860 | + |
| 2861 | Controls whether external users (these are users we have sufficient |
| 2862 | knowledge about but who don't yet have a Gerrit account) are considered |
| 2863 | to be members of the `REGISTERED_USERS` group. |
| 2864 | + |
| 2865 | This setting only makes sense if you run custom code (e.g. from a plugin |
| 2866 | or a custom authentication backend). By default, Gerrit core always requires |
| 2867 | users to register and doesn't use external users. |
| 2868 | + |
| 2869 | By default, true. |
| 2870 | |
Edwin Kempin | 4bbff70 | 2013-01-11 09:59:53 +0100 | [diff] [blame] | 2871 | [[groups.newGroupsVisibleToAll]]groups.newGroupsVisibleToAll:: |
| 2872 | + |
| 2873 | Controls whether newly created groups should be by default visible to |
| 2874 | all registered users. |
| 2875 | + |
| 2876 | By default, false. |
| 2877 | |
Edwin Kempin | f3eddd5 | 2017-01-20 14:05:47 +0100 | [diff] [blame] | 2878 | [[groups.uuid.name]]groups.<uuid>.name:: |
| 2879 | + |
| 2880 | Display name for group with the given UUID. |
| 2881 | + |
| 2882 | This option is only supported for system groups (scheme 'global'). |
| 2883 | + |
| 2884 | E.g. this parameter can be used to configure another name for the |
| 2885 | `Anonymous Users` group: |
| 2886 | + |
| 2887 | ---- |
| 2888 | [groups "global:Anonymous-Users"] |
| 2889 | name = All Users |
| 2890 | ---- |
| 2891 | + |
| 2892 | When setting this parameter it should be verified that there is no |
| 2893 | existing group with the same name (case-insensitive). Configuring an |
| 2894 | ambiguous name makes Gerrit fail on startup. Once set Gerrit ensures |
| 2895 | that it is not possible to create a group with this name. Gerrit also |
| 2896 | keeps the default name reserved so that it cannot be used for new |
| 2897 | groups either. This means there is no danger of ambiguous group names |
| 2898 | when this parameter is removed and the system group uses the default |
| 2899 | name again. |
| 2900 | |
Edwin Kempin | c94df96 | 2022-11-03 08:56:21 +0100 | [diff] [blame] | 2901 | [[groups.relevantGroup]]groups.relevantGroup:: |
| 2902 | + |
| 2903 | UUID of an external group that should always be considered as relevant |
| 2904 | when checking whether an account is visible. |
| 2905 | + |
| 2906 | This setting is only relevant for external group backends and only if |
| 2907 | the link:#accounts.visibility[account visibility] is set to |
| 2908 | `SAME_GROUP` or `VISIBLE_GROUP`. |
| 2909 | + |
| 2910 | If the link:#accounts.visibility[account visibility] is set to |
| 2911 | `SAME_GROUP` or `VISIBLE_GROUP` users should see all accounts that are |
| 2912 | a member of a group that contains themselves or that is visible to |
| 2913 | them. Checking this would require getting all groups of the current |
| 2914 | user and all groups of the accounts for which the visibility is being |
| 2915 | checked, but since getting all groups that a user is a member of is |
| 2916 | expensive for external group backends Gerrit doesn't query these groups |
| 2917 | but instead guesses the relevant groups. Guessing relevant groups |
| 2918 | limits the inspected groups to all groups that are mentioned in the |
| 2919 | ACLs of the projects that are currently cached (i.e. all groups that |
| 2920 | are listed in the link:config-project-config.html#file-groups[groups] |
| 2921 | files of the cached projects). This is not very reliable since it |
| 2922 | depends on which groups are mentioned in the ACLs and which projects |
| 2923 | are currently cached. To make this more reliable this configuration |
| 2924 | parameter allows to configure external groups that should always be |
| 2925 | considered as relevant. |
| 2926 | + |
| 2927 | As said this setting is only relevant for external group backends. In |
| 2928 | Gerrit core this is only the LDAP backend, but it may apply to further |
| 2929 | group backends that are added by plugins. |
| 2930 | + |
| 2931 | This parameter may be added multiple times to specify multiple relevant |
| 2932 | groups. |
| 2933 | |
Prakash Aswal | a6d49fb | 2020-02-27 15:09:30 +0530 | [diff] [blame] | 2934 | [[has-operand-alias]] |
| 2935 | === Section has operand alias |
| 2936 | |
| 2937 | 'has' operand aliasing allows global aliases to be defined for query |
| 2938 | 'has' operands. Currently only change queries are supported. The alias |
| 2939 | name is the git config key name, and the 'has' operand being aliased |
| 2940 | is the git config value. |
| 2941 | |
| 2942 | For example: |
| 2943 | |
| 2944 | ---- |
| 2945 | [has-operand-alias "change"] |
| 2946 | oldtopic = topic |
| 2947 | ---- |
| 2948 | |
| 2949 | This section is particularly useful to alias 'has' operands (which may |
| 2950 | be long and clunky as they include a plugin name in them) to shorter |
| 2951 | operands without the plugin name. Admins should take care to choose |
| 2952 | shorter operands that are unique and unlikely to conflict in the future. |
| 2953 | |
| 2954 | Aliases are resolved dynamically at invocation time to the currently |
| 2955 | loaded version of plugins. If a referenced plugin is not loaded, or |
| 2956 | does not define the command, "unsupported operand" is returned to the |
| 2957 | user. |
| 2958 | |
| 2959 | Aliases will override existing 'has' operands. In case of multiple |
| 2960 | aliases with same name, the last one defined will be used. |
| 2961 | |
| 2962 | When the target of an alias does not exist, the 'has' operand with the |
| 2963 | name of the alias will be used (if present). This enables an admin to |
| 2964 | configure the system to override a core 'has' operand with an operand |
| 2965 | provided by a plugin when present and otherwise fall back to the 'has' |
| 2966 | operand provided by core. |
| 2967 | |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 2968 | [[http]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2969 | === Section http |
Shawn O. Pearce | 309d8d3 | 2009-11-17 16:03:16 -0800 | [diff] [blame] | 2970 | |
| 2971 | [[http.proxy]]http.proxy:: |
Shawn O. Pearce | 9d342a4 | 2009-12-16 15:49:05 -0800 | [diff] [blame] | 2972 | + |
| 2973 | URL of the proxy server when making outgoing HTTP |
| 2974 | connections for OpenID login transactions. Syntax |
| 2975 | should be `http://`'hostname'`:`'port'. |
Shawn O. Pearce | 309d8d3 | 2009-11-17 16:03:16 -0800 | [diff] [blame] | 2976 | |
| 2977 | [[http.proxyUsername]]http.proxyUsername:: |
Shawn O. Pearce | 9d342a4 | 2009-12-16 15:49:05 -0800 | [diff] [blame] | 2978 | + |
| 2979 | Optional username to authenticate to the HTTP proxy with. |
Robin Rosenberg | 524a303 | 2012-10-14 14:24:36 +0200 | [diff] [blame] | 2980 | This property is honored only if the username does not |
Shawn O. Pearce | 9d342a4 | 2009-12-16 15:49:05 -0800 | [diff] [blame] | 2981 | appear in the http.proxy property above. |
Shawn O. Pearce | 309d8d3 | 2009-11-17 16:03:16 -0800 | [diff] [blame] | 2982 | |
| 2983 | [[http.proxyPassword]]http.proxyPassword:: |
Shawn O. Pearce | 9d342a4 | 2009-12-16 15:49:05 -0800 | [diff] [blame] | 2984 | + |
| 2985 | Optional password to authenticate to the HTTP proxy with. |
Robin Rosenberg | 524a303 | 2012-10-14 14:24:36 +0200 | [diff] [blame] | 2986 | This property is honored only if the password does not |
Shawn O. Pearce | 9d342a4 | 2009-12-16 15:49:05 -0800 | [diff] [blame] | 2987 | appear in the http.proxy property above. |
Shawn O. Pearce | 309d8d3 | 2009-11-17 16:03:16 -0800 | [diff] [blame] | 2988 | |
Hugo Arès | 88e33ac | 2014-03-03 13:52:45 -0500 | [diff] [blame] | 2989 | [[http.addUserAsRequestAttribute]]http.addUserAsRequestAttribute:: |
| 2990 | + |
| 2991 | If true, 'User' attribute will be added to the request attributes so it |
| 2992 | can be accessed outside the request scope (will be set to username or id |
| 2993 | if username not configured). |
| 2994 | + |
| 2995 | This attribute can be used by the servlet container to log user in the |
| 2996 | http access log. |
| 2997 | + |
| 2998 | When running the embedded servlet container, this attribute is used to |
| 2999 | print user in the httpd_log. |
| 3000 | + |
| 3001 | * `%{User}r` |
| 3002 | + |
| 3003 | Pattern to print user in Tomcat AccessLog. |
| 3004 | |
| 3005 | + |
| 3006 | Default value is true. |
Shawn O. Pearce | 309d8d3 | 2009-11-17 16:03:16 -0800 | [diff] [blame] | 3007 | |
Gustaf Lundh | e45c333 | 2018-05-02 10:52:11 +0200 | [diff] [blame] | 3008 | [[http.addUserAsResponseHeader]]http.addUserAsResponseHeader:: |
| 3009 | + |
| 3010 | If true, the header 'User' will be added to the list of response headers so it |
| 3011 | can be accessed from a reverse proxy for logging purposes. |
| 3012 | |
| 3013 | + |
| 3014 | Default value is false. |
| 3015 | |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 3016 | [[httpd]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3017 | === Section httpd |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 3018 | |
| 3019 | The httpd section configures the embedded servlet container. |
| 3020 | |
| 3021 | [[httpd.listenUrl]]httpd.listenUrl:: |
| 3022 | + |
Gert van Dijk | 70e2661 | 2019-09-29 16:20:25 +0200 | [diff] [blame] | 3023 | Configuration for the listening sockets of the internal HTTP daemon. |
| 3024 | Each entry of `listenUrl` combines the following options for a |
| 3025 | listening socket: protocol, network address, port and context path. |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 3026 | + |
Gert van Dijk | 70e2661 | 2019-09-29 16:20:25 +0200 | [diff] [blame] | 3027 | _Protocol_ can be either `http://`, `https://`, `proxy-http://` or |
| 3028 | `proxy-https://`. The latter two are special forms of `http://` with |
| 3029 | awareness of a reverse proxy (see below). _Network address_ selects |
| 3030 | the interface and/or scope of the listening socket. For notes |
| 3031 | examples, see below. _Port_ is the TCP port number and is optional |
| 3032 | (default value depends on the protocol). _Context path_ is the |
| 3033 | optional "base URI" for the Gerrit Code Review as application to |
| 3034 | serve on. |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 3035 | + |
Gert van Dijk | 70e2661 | 2019-09-29 16:20:25 +0200 | [diff] [blame] | 3036 | **Protocol** schemes: |
| 3037 | + |
| 3038 | * `http://` |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 3039 | + |
| 3040 | Plain-text HTTP protocol. If port is not supplied, defaults to 80, |
| 3041 | the standard HTTP port. |
| 3042 | + |
Gert van Dijk | 70e2661 | 2019-09-29 16:20:25 +0200 | [diff] [blame] | 3043 | * `https://` |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 3044 | + |
| 3045 | SSL encrypted HTTP protocol. If port is not supplied, defaults to |
| 3046 | 443, the standard HTTPS port. |
| 3047 | + |
Gert van Dijk | 70e2661 | 2019-09-29 16:20:25 +0200 | [diff] [blame] | 3048 | For configuration of the certificate and private key, see |
| 3049 | <<httpd.sslKeyStore,httpd.sslKeyStore>>. |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 3050 | + |
Gert van Dijk | 70e2661 | 2019-09-29 16:20:25 +0200 | [diff] [blame] | 3051 | [NOTE] |
| 3052 | SSL/TLS configuration capabilities of Gerrit internal HTTP daemon |
| 3053 | are very limited. Externally facing production sites are strongly |
| 3054 | encouraged to use a reverse proxy configuration to handle SSL/TLS |
| 3055 | and use a `proxy-https://` scheme here (below) for security and |
| 3056 | performance reasons. |
| 3057 | + |
| 3058 | * `proxy-http://` |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 3059 | + |
| 3060 | Plain-text HTTP relayed from a reverse proxy. If port is not |
| 3061 | supplied, defaults to 8080. |
| 3062 | + |
Gert van Dijk | 70e2661 | 2019-09-29 16:20:25 +0200 | [diff] [blame] | 3063 | Like `http://`, but additional header parsing features are |
| 3064 | enabled to honor `X-Forwarded-For`, `X-Forwarded-Host` and |
| 3065 | `X-Forwarded-Server`. These headers are typically set by Apache's |
Marian Harbach | 3425337 | 2019-12-10 18:01:31 +0100 | [diff] [blame] | 3066 | link:https://httpd.apache.org/docs/2.4/mod/mod_proxy.html#x-headers[mod_proxy,role=external,window=_blank]. |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 3067 | + |
Gert van Dijk | 70e2661 | 2019-09-29 16:20:25 +0200 | [diff] [blame] | 3068 | [NOTE] |
| 3069 | -- |
| 3070 | For secruity reasons, make sure to only allow connections from a |
| 3071 | trusted reverse proxy in your network, as clients could otherwise |
| 3072 | easily spoof these headers and thus spoof their originating IP |
| 3073 | address effectively. If the reverse proxy is running on the same |
| 3074 | machine as Gerrit daemon, the use of a _loopback_ network address |
| 3075 | to bind to (see below) is strongly recommended to mitigate this. |
| 3076 | |
| 3077 | If not using Apache's mod_proxy, validate that your reverse proxy |
| 3078 | sets these headers on all requests. If not, either configure it to |
| 3079 | sanitize them from the origin, or use the `http://` scheme instead. |
| 3080 | -- |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 3081 | + |
Gert van Dijk | 70e2661 | 2019-09-29 16:20:25 +0200 | [diff] [blame] | 3082 | * `proxy-https://` |
| 3083 | + |
| 3084 | Plain-text HTTP relayed from a reverse proxy that has already |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 3085 | handled the SSL encryption/decryption. If port is not supplied, |
| 3086 | defaults to 8080. |
| 3087 | + |
Gert van Dijk | 70e2661 | 2019-09-29 16:20:25 +0200 | [diff] [blame] | 3088 | Behaves exactly like `proxy-http://`, but also sets the scheme to |
| 3089 | assume `https://` is the proper URL back to the server. |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 3090 | |
| 3091 | + |
Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 3092 | -- |
Gert van Dijk | 70e2661 | 2019-09-29 16:20:25 +0200 | [diff] [blame] | 3093 | **Network address** forms: |
| 3094 | |
| 3095 | * Loopback (localhost): `127.0.0.1` (IPv4) or `[::1]` (IPv6). |
| 3096 | * All (unspecified): `0.0.0.0` (IPv4), `[::]` (IPv6) or `*` |
| 3097 | (IPv4 and IPv6) |
| 3098 | * Interface IP address, e.g. `1.2.3.4` (IPv4) or |
| 3099 | `[2001:db8::a00:20ff:fea7:ccea]` (IPv6) |
| 3100 | * Hostname, resolved at startup time to an address. |
| 3101 | |
| 3102 | **Context path** is the local part of the URL to be used to access |
| 3103 | Gerrit on ('base URL'). E.g. `/gerrit/` to serve Gerrit on that URI |
| 3104 | as base. If set, consider to align this with the |
| 3105 | <<gerrit.canonicalWebUrl,gerrit.canonicalWebUrl>> setting. Correct |
| 3106 | settings may depend on the reverse proxy configuration as well. By |
| 3107 | default, this is `/` so that Gerrit serves requests on the root. |
| 3108 | |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 3109 | If multiple values are supplied, the daemon will listen on all |
| 3110 | of them. |
Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 3111 | |
Gert van Dijk | 70e2661 | 2019-09-29 16:20:25 +0200 | [diff] [blame] | 3112 | Examples: |
| 3113 | |
| 3114 | ---- |
| 3115 | [httpd] |
| 3116 | listenUrl = proxy-https://127.0.0.1:9999/gerrit/ |
| 3117 | [gerrit] |
| 3118 | # Reverse proxy is configured to serve with SSL/TLS on |
| 3119 | # example.com and to relay requests on /gerrit/ onto |
| 3120 | # http://127.0.0.1:9999/gerrit/ |
| 3121 | canonicalWebUrl = https://example.com/gerrit/ |
| 3122 | ---- |
| 3123 | |
| 3124 | ---- |
| 3125 | [httpd] |
| 3126 | # Listen on specific external interface with plaintext |
| 3127 | # HTTP on IPv6. |
| 3128 | listenUrl = http://[2001:db8::a00:20ff:fea7:ccea] |
| 3129 | |
| 3130 | # Also listen on specific internal interface for use with |
| 3131 | # reverse proxy run on another host. |
| 3132 | listenUrl = proxy-https://192.168.100.123 |
| 3133 | ---- |
| 3134 | |
| 3135 | See also the page on link:config-reverseproxy.html[reverse proxy] |
| 3136 | configuration. |
| 3137 | |
| 3138 | By default, `\http://*:8080`. |
Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 3139 | -- |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 3140 | |
| 3141 | [[httpd.reuseAddress]]httpd.reuseAddress:: |
| 3142 | + |
| 3143 | If true, permits the daemon to bind to the port even if the port |
| 3144 | is already in use. If false, the daemon ensures the port is not |
| 3145 | in use before starting. Busy sites may need to set this to true |
| 3146 | to permit fast restarts. |
| 3147 | + |
| 3148 | By default, true. |
| 3149 | |
Luca Milanesio | 4e2bb45 | 2018-03-21 09:07:24 +0000 | [diff] [blame] | 3150 | [[httpd.gracefulStopTimeout]]httpd.gracefulStopTimeout:: |
| 3151 | + |
| 3152 | Set a graceful stop time. If set, the daemon ensures that all incoming |
| 3153 | calls are preserved for a maximum period of time, before starting |
| 3154 | the graceful shutdown process. Sites behind a workload balancer such as |
| 3155 | HAProxy would need this to be set for avoiding serving errors during |
| 3156 | rolling restarts. |
| 3157 | + |
| 3158 | Values should use common unit suffixes to express their setting: |
| 3159 | + |
| 3160 | * s, sec, second, seconds |
| 3161 | * m, min, minute, minutes |
| 3162 | + |
| 3163 | By default, 0 seconds (immediate shutdown). |
| 3164 | |
Thomas Meyer | aa93fdf | 2016-10-23 10:53:48 +0200 | [diff] [blame] | 3165 | [[httpd.inheritChannel]]httpd.inheritChannel:: |
| 3166 | + |
| 3167 | If true, permits the daemon to inherit its server socket channel |
| 3168 | from fd0/1(stdin/stdout). When set to true, the server can be socket |
| 3169 | activated via systemd or xinetd. |
| 3170 | + |
| 3171 | By default, false. |
| 3172 | |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 3173 | [[httpd.requestHeaderSize]]httpd.requestHeaderSize:: |
| 3174 | + |
| 3175 | Size, in bytes, of the buffer used to parse the HTTP headers of an |
| 3176 | incoming HTTP request. The entire request headers, including any |
| 3177 | cookies sent by the browser, must fit within this buffer, otherwise |
| 3178 | the server aborts with the response '413 Request Entity Too Large'. |
| 3179 | + |
| 3180 | One buffer of this size is allocated per active connection. |
| 3181 | Allocating a buffer that is too large wastes memory that cannot be |
| 3182 | reclaimed, allocating a buffer that is too small may cause unexpected |
| 3183 | errors caused by very long Referer URLs or large cookie values. |
| 3184 | + |
| 3185 | By default, 16384 (16 K), which is sufficient for most OpenID and |
| 3186 | other web-based single-sign-on integrations. |
| 3187 | |
Chulho Yang | b72ff8f | 2013-07-04 02:35:53 -0400 | [diff] [blame] | 3188 | [[httpd.sslCrl]]httpd.sslCrl:: |
| 3189 | + |
| 3190 | Path of the certificate revocation list file in PEM format. This |
| 3191 | crl file is optional, and available for CLIENT_SSL_CERT_LDAP |
| 3192 | authentication. |
| 3193 | + |
| 3194 | To create and view a crl using openssl: |
| 3195 | + |
| 3196 | ---- |
| 3197 | openssl ca -gencrl -out crl.pem |
| 3198 | openssl crl -in crl.pem -text |
| 3199 | ---- |
| 3200 | + |
| 3201 | If not absolute, the path is resolved relative to `$site_path`. |
| 3202 | + |
| 3203 | By default, `$site_path/etc/crl.pem`. |
| 3204 | |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 3205 | [[httpd.sslKeyStore]]httpd.sslKeyStore:: |
| 3206 | + |
| 3207 | Path of the Java keystore containing the server's SSL certificate |
| 3208 | and private key. This keystore is required for `https://` in URL. |
| 3209 | + |
| 3210 | To create a self-signed certificate for simple internal usage: |
| 3211 | + |
Shawn O. Pearce | 9d342a4 | 2009-12-16 15:49:05 -0800 | [diff] [blame] | 3212 | ---- |
| 3213 | keytool -keystore keystore -alias jetty -genkey -keyalg RSA |
| 3214 | chmod 600 keystore |
| 3215 | ---- |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 3216 | + |
| 3217 | If not absolute, the path is resolved relative to `$site_path`. |
| 3218 | + |
Shawn O. Pearce | c5fed82 | 2009-11-17 16:10:10 -0800 | [diff] [blame] | 3219 | By default, `$site_path/etc/keystore`. |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 3220 | |
| 3221 | [[httpd.sslKeyPassword]]httpd.sslKeyPassword:: |
| 3222 | + |
| 3223 | Password used to decrypt the private portion of the sslKeyStore. |
David Pursehouse | 221d4f6 | 2012-06-08 17:38:08 +0900 | [diff] [blame] | 3224 | Java keystores require a password, even if the administrator |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 3225 | doesn't want to enable one. |
| 3226 | + |
| 3227 | If set to the empty string the embedded server will prompt for the |
| 3228 | password during startup. |
| 3229 | + |
| 3230 | By default, `gerrit`. |
| 3231 | |
Shawn O. Pearce | 1766f50 | 2010-01-15 10:49:46 -0800 | [diff] [blame] | 3232 | [[httpd.requestLog]]httpd.requestLog:: |
| 3233 | + |
| 3234 | Enable (or disable) the `'$site_path'/logs/httpd_log` request log. |
| 3235 | If enabled, an NCSA combined log format request log file is written |
Matthias Sohn | 450bc20 | 2020-08-20 14:40:32 +0200 | [diff] [blame] | 3236 | out by the internal HTTP daemon. The httpd log format is documented |
| 3237 | link:logs.html#_httpd_log[here]. |
Shawn O. Pearce | 1766f50 | 2010-01-15 10:49:46 -0800 | [diff] [blame] | 3238 | + |
David Ostrovsky | 8e4a990 | 2013-11-19 23:57:48 +0100 | [diff] [blame] | 3239 | `log4j.appender` with the name `httpd_log` can be configured to overwrite |
| 3240 | programmatic configuration. |
| 3241 | + |
Shawn O. Pearce | 1766f50 | 2010-01-15 10:49:46 -0800 | [diff] [blame] | 3242 | By default, true if httpd.listenUrl uses http:// or https://, |
| 3243 | and false if httpd.listenUrl uses proxy-http:// or proxy-https://. |
| 3244 | |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 3245 | [[httpd.acceptorThreads]]httpd.acceptorThreads:: |
| 3246 | + |
| 3247 | Number of worker threads dedicated to accepting new incoming TCP |
David Pursehouse | 221d4f6 | 2012-06-08 17:38:08 +0900 | [diff] [blame] | 3248 | connections and allocating them connection-specific resources. |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 3249 | + |
| 3250 | By default, 2, which should be suitable for most high-traffic sites. |
| 3251 | |
| 3252 | [[httpd.minThreads]]httpd.minThreads:: |
| 3253 | + |
| 3254 | Minimum number of spare threads to keep in the worker thread pool. |
| 3255 | This number must be at least 1 larger than httpd.acceptorThreads |
David Pursehouse | 9246356 | 2013-06-24 10:16:28 +0900 | [diff] [blame] | 3256 | multiplied by the number of httpd.listenUrls configured. |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 3257 | + |
| 3258 | By default, 5, suitable for most lower-volume traffic sites. |
| 3259 | |
| 3260 | [[httpd.maxThreads]]httpd.maxThreads:: |
| 3261 | + |
| 3262 | Maximum number of threads to permit in the worker thread pool. |
| 3263 | + |
| 3264 | By default 25, suitable for most lower-volume traffic sites. |
Saša Živkov | 3d4ed9f | 2017-10-13 15:30:29 +0200 | [diff] [blame] | 3265 | + |
| 3266 | [NOTE] |
| 3267 | Unless SSH daemon is disabled, see <<sshd.listenAddress, sshd.listenAddress>>, |
| 3268 | the max number of concurrent Git requests over HTTP and SSH together is |
| 3269 | defined by the <<sshd.threads, sshd.threads>> and |
| 3270 | <<sshd.batchThreads, sshd.batchThreads>>. |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 3271 | |
| 3272 | [[httpd.maxQueued]]httpd.maxQueued:: |
| 3273 | + |
| 3274 | Maximum number of client connections which can enter the worker |
| 3275 | thread pool waiting for a worker thread to become available. |
David Ostrovsky | 14fe8bc | 2014-03-26 06:03:44 -0700 | [diff] [blame] | 3276 | 0 sets the queue size to the Integer.MAX_VALUE. |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 3277 | + |
Luca Milanesio | 0ae62fe | 2015-09-04 07:56:00 -0700 | [diff] [blame] | 3278 | By default 200. |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 3279 | |
Shawn O. Pearce | e5452b7 | 2010-01-15 14:32:50 -0800 | [diff] [blame] | 3280 | [[httpd.maxWait]]httpd.maxWait:: |
| 3281 | + |
David Pursehouse | 221d4f6 | 2012-06-08 17:38:08 +0900 | [diff] [blame] | 3282 | Maximum amount of time a client will wait for an available |
Shawn O. Pearce | e5452b7 | 2010-01-15 14:32:50 -0800 | [diff] [blame] | 3283 | thread to handle a project clone, fetch or push request over the |
| 3284 | smart HTTP transport. |
| 3285 | + |
| 3286 | Values should use common unit suffixes to express their setting: |
| 3287 | + |
| 3288 | * s, sec, second, seconds |
| 3289 | * m, min, minute, minutes |
| 3290 | * h, hr, hour, hours |
| 3291 | * d, day, days |
| 3292 | * w, week, weeks (`1 week` is treated as `7 days`) |
| 3293 | * mon, month, months (`1 month` is treated as `30 days`) |
| 3294 | * y, year, years (`1 year` is treated as `365 days`) |
| 3295 | |
| 3296 | + |
Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 3297 | -- |
Shawn O. Pearce | e5452b7 | 2010-01-15 14:32:50 -0800 | [diff] [blame] | 3298 | If a unit suffix is not specified, `minutes` is assumed. If 0 |
| 3299 | is supplied, the maximum age is infinite and connections will not |
| 3300 | abort until the client disconnects. |
Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 3301 | |
Shawn O. Pearce | e5452b7 | 2010-01-15 14:32:50 -0800 | [diff] [blame] | 3302 | By default, 5 minutes. |
Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 3303 | -- |
Shawn O. Pearce | e5452b7 | 2010-01-15 14:32:50 -0800 | [diff] [blame] | 3304 | |
Luca Milanesio | ce7b745 | 2013-06-18 11:40:49 +0100 | [diff] [blame] | 3305 | [[httpd.filterClass]]httpd.filterClass:: |
| 3306 | + |
| 3307 | Class that implements the javax.servlet.Filter interface |
| 3308 | for filtering any HTTP related traffic going through the Gerrit |
| 3309 | HTTP protocol. |
| 3310 | Class is loaded and configured in the Gerrit Jetty container |
| 3311 | and run in front of all Gerrit URL handlers, allowing the filter |
| 3312 | to inspect, modify, allow or reject each request. |
| 3313 | It needs to be provided as JAR library |
| 3314 | under $GERRIT_SITE/lib as it is resolved using the default Gerrit class |
| 3315 | loader and cannot be dynamically loaded by a plugin. |
| 3316 | + |
| 3317 | Failing to load the Filter class would result in a Gerrit start-up |
| 3318 | failure, as this class is supposed to provide mandatory filtering |
| 3319 | in front of Gerrit HTTP protocol. |
| 3320 | + |
David Pursehouse | 42f4204 | 2013-08-01 14:02:25 +0900 | [diff] [blame] | 3321 | Typical usage is in conjunction with the `auth.type=HTTP` as replacement |
Luca Milanesio | ce7b745 | 2013-06-18 11:40:49 +0100 | [diff] [blame] | 3322 | of an Apache HTTP proxy layer as security enforcement on top of Gerrit |
| 3323 | by returning a trusted username as HTTP Header. |
| 3324 | + |
Luca Milanesio | dcb4bd5 | 2017-05-03 22:20:51 +0100 | [diff] [blame] | 3325 | Allow multiple values to install multiple servlet filters. |
| 3326 | + |
Luca Milanesio | ce7b745 | 2013-06-18 11:40:49 +0100 | [diff] [blame] | 3327 | Example of using a security library secure.jar under $GERRIT_SITE/lib |
Luca Milanesio | dcb4bd5 | 2017-05-03 22:20:51 +0100 | [diff] [blame] | 3328 | that provides a org.anyorg.MySecureHeaderFilter Servlet Filter that enforces |
| 3329 | a trusted username in the `TRUSTED_USER` HTTP Header and |
| 3330 | org.anyorg.MySecureIPFilter that performs source IP security filtering: |
Dyrone Teng | 14fc083 | 2019-09-27 16:59:02 +0800 | [diff] [blame] | 3331 | + |
Luca Milanesio | ce7b745 | 2013-06-18 11:40:49 +0100 | [diff] [blame] | 3332 | ---- |
| 3333 | [auth] |
| 3334 | type = HTTP |
| 3335 | httpHeader = TRUSTED_USER |
| 3336 | |
Dariusz Luksza | aac0113 | 2015-02-11 12:13:07 +0100 | [diff] [blame] | 3337 | [httpd] |
Luca Milanesio | dcb4bd5 | 2017-05-03 22:20:51 +0100 | [diff] [blame] | 3338 | filterClass = org.anyorg.MySecureHeaderFilter |
| 3339 | filterClass = org.anyorg.MySecureIPFilter |
Luca Milanesio | ce7b745 | 2013-06-18 11:40:49 +0100 | [diff] [blame] | 3340 | ---- |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 3341 | |
Teng Long | c192ca9 | 2019-09-23 11:22:03 +0800 | [diff] [blame] | 3342 | [[filterClass.className.initParam]]filterClass.<className>.initParam:: |
| 3343 | + |
| 3344 | Gerrit supports customized pluggable HTTP filters as `filterClass`. This |
| 3345 | option allows to pass extra initialization parameters to the filter. It |
| 3346 | allows for multiple key/value pairs to be passed in this pattern: |
| 3347 | + |
| 3348 | ---- |
| 3349 | initParam = <key>=<value> |
| 3350 | ---- |
| 3351 | For a comprehensive example: |
| 3352 | + |
| 3353 | ---- |
| 3354 | [httpd] |
| 3355 | filterClass = org.anyorg.AFilter |
| 3356 | filterClass = org.anyorg.BFilter |
| 3357 | [filterClass "org.anyorg.AFilter"] |
| 3358 | key1 = value1 |
| 3359 | key2 = value2 |
| 3360 | [filterClass "org.anyorg.BFilter"] |
| 3361 | key3 = value3 |
| 3362 | ---- |
| 3363 | |
Luca Milanesio | dca95d5 | 2017-05-09 21:22:21 +0100 | [diff] [blame] | 3364 | [[httpd.idleTimeout]]httpd.idleTimeout:: |
| 3365 | + |
| 3366 | Maximum idle time for a connection, which roughly translates to the |
| 3367 | TCP socket `SO_TIMEOUT`. |
| 3368 | + |
Luca Milanesio | dca95d5 | 2017-05-09 21:22:21 +0100 | [diff] [blame] | 3369 | This value is interpreted as the maximum time between some progress |
| 3370 | being made on the connection. So if a single byte is read or written, |
| 3371 | then the timeout is reset. |
| 3372 | + |
David Pursehouse | 9f0e5bc | 2017-06-30 16:16:53 +0900 | [diff] [blame] | 3373 | The max idle time is applied: |
| 3374 | + |
| 3375 | * When waiting for a new message to be received on a connection |
| 3376 | * When waiting for a new message to be sent on a connection |
| 3377 | |
| 3378 | + |
Luca Milanesio | dca95d5 | 2017-05-09 21:22:21 +0100 | [diff] [blame] | 3379 | By default, 30 seconds. |
| 3380 | |
Juan Hernandez | ec51256 | 2013-08-06 16:30:50 +0200 | [diff] [blame] | 3381 | [[httpd.robotsFile]]httpd.robotsFile:: |
| 3382 | + |
| 3383 | Location of an external robots.txt file to be used instead of the one |
| 3384 | bundled with the .war of the application. |
| 3385 | + |
| 3386 | If not absolute, the path is resolved relative to `$site_path`. |
| 3387 | + |
| 3388 | If the file doesn't exist or can't be read the default robots.txt file |
| 3389 | bundled with the .war will be used instead. |
| 3390 | |
Dariusz Luksza | 011cfed | 2014-04-03 10:23:35 +0200 | [diff] [blame] | 3391 | [[httpd.registerMBeans]]httpd.registerMBeans:: |
| 3392 | + |
| 3393 | Enable (or disable) registration of Jetty MBeans for Java JMX. |
| 3394 | + |
| 3395 | By default, false. |
| 3396 | |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 3397 | [[index]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3398 | === Section index |
David Pursehouse | 6d45843 | 2013-08-23 16:17:18 +0900 | [diff] [blame] | 3399 | |
| 3400 | The index section configures the secondary index. |
| 3401 | |
David Pursehouse | 3fc5ee3 | 2014-03-17 18:35:32 +0900 | [diff] [blame] | 3402 | Note that after enabling the secondary index, the index must be built |
| 3403 | using the link:pgm-reindex.html[reindex program] before restarting the |
| 3404 | Gerrit server. |
| 3405 | |
David Pursehouse | 6d45843 | 2013-08-23 16:17:18 +0900 | [diff] [blame] | 3406 | [[index.type]]index.type:: |
| 3407 | + |
Luca Milanesio | c336ce9 | 2021-11-16 01:10:49 +0000 | [diff] [blame] | 3408 | *(DEPRECATED)* The only supported value is `LUCENE`, which is the default, |
| 3409 | that means a link:http://lucene.apache.org/[Lucene] |
| 3410 | index is used. |
David Pursehouse | 6d45843 | 2013-08-23 16:17:18 +0900 | [diff] [blame] | 3411 | + |
Luca Milanesio | c336ce9 | 2021-11-16 01:10:49 +0000 | [diff] [blame] | 3412 | For using other indexing backends (e.g. ElasticSearch), refer to |
| 3413 | `gerrit.installIndexModule` setting. |
David Pursehouse | 6d45843 | 2013-08-23 16:17:18 +0900 | [diff] [blame] | 3414 | + |
David Pursehouse | 904db30 | 2014-03-17 18:55:38 +0900 | [diff] [blame] | 3415 | [[index.threads]]index.threads:: |
| 3416 | + |
Hugo Arès | fab0670 | 2016-06-10 12:49:52 -0400 | [diff] [blame] | 3417 | Number of threads to use for indexing in normal interactive operations. Setting |
| 3418 | it to 0 disables the dedicated thread pool and indexing will be done in the same |
| 3419 | thread as the operation. |
David Pursehouse | 904db30 | 2014-03-17 18:55:38 +0900 | [diff] [blame] | 3420 | + |
Patrick Hiesel | bdbee9c | 2018-07-04 10:54:26 +0200 | [diff] [blame] | 3421 | If not set or set to a zero, defaults to the number of logical CPUs as returned |
| 3422 | 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] | 3423 | |
Dave Borowitz | 787af5f | 2014-10-22 16:26:00 -0700 | [diff] [blame] | 3424 | [[index.batchThreads]]index.batchThreads:: |
| 3425 | + |
| 3426 | Number of threads to use for indexing in background operations, such as |
Adithya Chakilam | 963727c | 2021-11-04 10:15:43 -0700 | [diff] [blame] | 3427 | online schema upgrades, and also the default for offline reindexing. |
Dave Borowitz | 787af5f | 2014-10-22 16:26:00 -0700 | [diff] [blame] | 3428 | + |
Patrick Hiesel | bdbee9c | 2018-07-04 10:54:26 +0200 | [diff] [blame] | 3429 | If not set or set to a zero, defaults to the number of logical CPUs as returned |
| 3430 | 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] | 3431 | |
Luca Milanesio | 8ee12d5 | 2022-10-27 23:14:13 +0100 | [diff] [blame] | 3432 | [[index.cacheQueryResultsByChangeNum]]index.cacheQueryResultsByChangeNum:: |
| 3433 | + |
| 3434 | Allow to cache and reuse the change JSON elements by their Change number. |
| 3435 | This improves the performance of queries that are returning Changes duplicates. |
| 3436 | It needs to be turned off when having Changes imported from other servers |
| 3437 | because of the potential conflicts of change numbers. |
| 3438 | + |
| 3439 | Defaults to true. |
| 3440 | |
Dave Borowitz | d80b934 | 2015-03-25 10:32:21 -0700 | [diff] [blame] | 3441 | [[index.onlineUpgrade]]index.onlineUpgrade:: |
| 3442 | + |
| 3443 | Whether to upgrade to new index schema versions while the server is |
| 3444 | running. This is recommended as it prevents additional downtime during |
| 3445 | Gerrit version upgrades (avoiding the need for an offline reindex step |
| 3446 | using Reindex), but can add additional server load during the upgrade. |
| 3447 | + |
| 3448 | If set to false, there is no way to upgrade the index schema to take |
| 3449 | advantage of new search features without restarting the server. |
| 3450 | + |
| 3451 | Defaults to true. |
| 3452 | |
Thomas Draebing | fafafb9 | 2023-01-04 14:44:15 +0100 | [diff] [blame] | 3453 | [[index.excludeProjectFromChangeReindex]]index.excludeProjectFromChangeReindex:: |
| 3454 | + |
| 3455 | A list of projects that will be excluded from reindexing. This can be used |
| 3456 | to exclude projects which are expensive to reindex to prioritize the other |
| 3457 | projects. |
| 3458 | + |
| 3459 | Excluded projects can later be reindexed by for example using the |
| 3460 | link:cmd-index-changes-in-project.html[index changes in project command]. |
| 3461 | |
Kaushik Lingarkar | 7fdf414 | 2022-08-17 13:57:27 -0700 | [diff] [blame] | 3462 | [[index.paginationType]]index.paginationType:: |
| 3463 | + |
| 3464 | The pagination type to use when index queries are repeated to |
| 3465 | obtain the next set of results. Supported values are: |
| 3466 | + |
| 3467 | * `OFFSET` |
| 3468 | + |
| 3469 | Index queries are repeated with a non-zero offset to obtain the |
| 3470 | next set of results. |
Diego Zambelli Sessona | a0da723 | 2023-07-10 14:22:29 +0100 | [diff] [blame] | 3471 | _Note: Results may be inaccurate if the data-set is changing during the query |
| 3472 | execution._ |
Kaushik Lingarkar | 7fdf414 | 2022-08-17 13:57:27 -0700 | [diff] [blame] | 3473 | + |
| 3474 | * `SEARCH_AFTER` |
| 3475 | + |
Kaushik Lingarkar | 75096ad | 2022-09-13 10:16:15 -0700 | [diff] [blame] | 3476 | Index queries are repeated using a search-after object. Index |
| 3477 | backends can provide their custom implementations for search-after. |
| 3478 | Note that, `SEARCH_AFTER` does not impact using offsets in Gerrit |
| 3479 | query APIs. |
Diego Zambelli Sessona | a0da723 | 2023-07-10 14:22:29 +0100 | [diff] [blame] | 3480 | _Note: Depending on the index backend and its settings, results may be |
| 3481 | inaccurate if the data-set is changing during the query execution._ |
| 3482 | + |
| 3483 | * `NONE` |
| 3484 | + |
| 3485 | Index queries are executed returning all results, without internal |
| 3486 | pagination. |
| 3487 | _Note: Since the entire set of indexing results is kept in memory |
| 3488 | during the API execution, this option may lead to higher memory utilisation |
| 3489 | and overall reduced performance. |
| 3490 | Bear in mind that some indexing backends may not support unbounded queries; |
| 3491 | therefore, the NONE option is unavailable._ |
Kaushik Lingarkar | 7fdf414 | 2022-08-17 13:57:27 -0700 | [diff] [blame] | 3492 | + |
| 3493 | Defaults to `OFFSET`. |
| 3494 | |
Ben Rohlfs | 618b7cc | 2023-07-28 12:22:19 +0000 | [diff] [blame] | 3495 | [[index.defaultLimit]]index.defaultLimit:: |
| 3496 | + |
| 3497 | Default limit, if the user does not provide a limit. If this is not set or set |
| 3498 | to 0, then index queries are executed with the maximum permitted limit for the |
| 3499 | user, which may be really high and cause too much load on the index. Thus |
| 3500 | setting this default limit to something smaller like 100 allows you to control |
| 3501 | the load, while not taking away any permission from the user. If the user |
| 3502 | provides a limit themselves, then `defaultLimit` is ignored. |
| 3503 | |
Dave Borowitz | b82fbcb | 2015-04-22 16:43:54 -0700 | [diff] [blame] | 3504 | [[index.maxLimit]]index.maxLimit:: |
| 3505 | + |
| 3506 | Maximum limit to allow for search queries. Requesting results above this |
| 3507 | limit will truncate the list (but will still set `_more_changes` on |
| 3508 | result lists). Set to 0 for no limit. |
| 3509 | + |
David Pursehouse | 52c2b4a | 2018-04-10 23:38:57 +0900 | [diff] [blame] | 3510 | When `index.type` is set to `LUCENE`, defaults to no limit. |
Dave Borowitz | b82fbcb | 2015-04-22 16:43:54 -0700 | [diff] [blame] | 3511 | |
Dave Borowitz | f56d365 | 2015-04-22 17:35:34 -0700 | [diff] [blame] | 3512 | [[index.maxPages]]index.maxPages:: |
| 3513 | + |
| 3514 | Maximum number of pages of search results to allow, as index |
| 3515 | implementations may have to scan through large numbers of skipped |
| 3516 | results when searching with an offset. Requesting results starting past |
| 3517 | this threshold times the requested limit will result in an error. Set to |
| 3518 | 0 for no limit. |
| 3519 | + |
| 3520 | Defaults to no limit. |
| 3521 | |
Kaushik Lingarkar | f84e518 | 2022-08-12 13:27:37 -0700 | [diff] [blame] | 3522 | [[index.pageSizeMultiplier]]index.pageSizeMultiplier:: |
| 3523 | + |
| 3524 | When index queries are repeated to obtain more results, this multiplier |
| 3525 | will be used to determine the limit for the next query. Using a page |
| 3526 | multiplier allows queries to start off small and thus provide good |
| 3527 | latency for queries which may end up only having very few results, and |
| 3528 | then scaling up to have better throughput to handle queries with larger |
| 3529 | result sets without incurring the overhead of making as many queries as |
| 3530 | would be required with a smaller limit. This strategy of using a multiplier |
| 3531 | attempts to create a balance between latency and throughput by dynamically |
| 3532 | adjusting the query size to the number of results being returned by each |
| 3533 | query in the pagination. |
| 3534 | + |
| 3535 | The larger the multiplier, the better the throughput on large queries, and |
| 3536 | it also improves latency on large queries by scaling up quickly. However, a |
| 3537 | larger multiplier can hurt latencies a bit by making the "last" query in a |
| 3538 | series longer than needed. The impact of this depends on how much the backend |
| 3539 | latency goes up when specifying a large limit and few results are returned. |
| 3540 | Setting link:#index.maxPageSize[index.maxPageSize] that isn't too large, can |
| 3541 | likely help reduce the impacts of this. |
| 3542 | + |
Kaushik Lingarkar | f84e518 | 2022-08-12 13:27:37 -0700 | [diff] [blame] | 3543 | For example, if the limit of the previous query was 500 and pageSizeMultiplier |
| 3544 | is configured to 5, the next query will have a limit of 2500. |
| 3545 | + |
Diego Zambelli Sessona | a0da723 | 2023-07-10 14:22:29 +0100 | [diff] [blame] | 3546 | _Note: ignored when paginationType is `NONE`_ |
| 3547 | + |
Kaushik Lingarkar | f84e518 | 2022-08-12 13:27:37 -0700 | [diff] [blame] | 3548 | Defaults to 1 which effectively turns this feature off. |
| 3549 | |
| 3550 | [[index.maxPageSize]]index.maxPageSize:: |
| 3551 | + |
| 3552 | Maximum size to allow when index queries are repeated to obtain more results. Note |
| 3553 | that, link:#index.maxLimit[index.maxLimit] will be used to limit page size if it |
| 3554 | is configured to a value lower than maxPageSize. |
| 3555 | + |
| 3556 | For example, if the limit of previous query was 500, pageSizeMultiplier is |
| 3557 | configured to 5 and maxPageSize to 2000, the next query will have a limit of |
| 3558 | 2000 (instead of 2500). |
| 3559 | + |
Diego Zambelli Sessona | a0da723 | 2023-07-10 14:22:29 +0100 | [diff] [blame] | 3560 | _Note: ignored when paginationType is `NONE`_ |
| 3561 | + |
Kaushik Lingarkar | f84e518 | 2022-08-12 13:27:37 -0700 | [diff] [blame] | 3562 | Defaults to no limit. |
| 3563 | |
Dave Borowitz | d034ca8 | 2015-10-15 11:20:30 -0400 | [diff] [blame] | 3564 | [[index.maxTerms]]index.maxTerms:: |
| 3565 | + |
| 3566 | Maximum number of leaf terms to allow in a query. Too-large queries may |
| 3567 | perform poorly, so setting this option causes query parsing to fail fast |
Dave Borowitz | ada289c | 2018-12-18 13:24:14 -0800 | [diff] [blame] | 3568 | before attempting to send them to the secondary index. |
Dave Borowitz | d034ca8 | 2015-10-15 11:20:30 -0400 | [diff] [blame] | 3569 | + |
Marco Miller | 6da2282 | 2016-01-29 12:31:38 -0500 | [diff] [blame] | 3570 | When the index type is `LUCENE`, also sets the maximum number of clauses |
| 3571 | permitted per BooleanQuery. This is so that all enforced query limits |
| 3572 | are the same. |
| 3573 | + |
| 3574 | Defaults to 1024. |
Dave Borowitz | d034ca8 | 2015-10-15 11:20:30 -0400 | [diff] [blame] | 3575 | |
Dave Borowitz | 3747f0f | 2017-06-23 14:29:31 -0400 | [diff] [blame] | 3576 | [[index.autoReindexIfStale]]index.autoReindexIfStale:: |
| 3577 | + |
| 3578 | Whether to automatically check if a document became stale in the index |
| 3579 | immediately after indexing it. If false, there is a race condition during two |
| 3580 | simultaneous writes that may cause one of the writes to not be reflected in the |
| 3581 | index. The check to avoid this does consume some resources. |
| 3582 | + |
Dave Borowitz | b7da076 | 2018-03-19 09:08:45 -0400 | [diff] [blame] | 3583 | Defaults to false. |
Dave Borowitz | 3747f0f | 2017-06-23 14:29:31 -0400 | [diff] [blame] | 3584 | |
Marija Savtchouk | 55b1555 | 2023-08-28 14:01:05 +0000 | [diff] [blame] | 3585 | [[index.indexChangesAsync]]index.indexChangesAsync:: |
| 3586 | + |
| 3587 | On BatchUpdate, do not await indexing completion before returning the request |
| 3588 | to the user (WEB_BROWSER requests only). |
| 3589 | This has an advantage of faster UI (because indexing latency does not contribute |
| 3590 | to the write request latency) and disadvantage that the indexing result might not be |
| 3591 | immediately available after the write request. |
| 3592 | + |
| 3593 | Defaults to false. |
| 3594 | |
Edwin Kempin | 0f0de86 | 2018-02-08 16:24:11 +0100 | [diff] [blame] | 3595 | [[index.scheduledIndexer]] |
| 3596 | ==== Subsection index.scheduledIndexer |
| 3597 | |
| 3598 | This section configures periodic indexing. Periodic indexing is |
Han-Wen Nienhuys | 348a603 | 2019-09-24 19:44:57 +0200 | [diff] [blame] | 3599 | intended to run only on replicas and only updates the group index. |
| 3600 | Replication to replicas happens on Git level so that Gerrit is not aware |
| 3601 | of incoming replication events. But replicas need an updated group index |
Edwin Kempin | 0f0de86 | 2018-02-08 16:24:11 +0100 | [diff] [blame] | 3602 | 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] | 3603 | index in replicas up-to-date the Gerrit replica periodically scans the |
Edwin Kempin | 0f0de86 | 2018-02-08 16:24:11 +0100 | [diff] [blame] | 3604 | group refs in the All-Users repository to reindex groups if they are |
| 3605 | stale. |
| 3606 | |
| 3607 | The scheduled reindexer is not able to detect group deletions that |
Han-Wen Nienhuys | 348a603 | 2019-09-24 19:44:57 +0200 | [diff] [blame] | 3608 | happened while the replica was offline, but since group deletions are not |
Edwin Kempin | 0f0de86 | 2018-02-08 16:24:11 +0100 | [diff] [blame] | 3609 | supported this should never happen. If nevertheless groups refs were |
Han-Wen Nienhuys | 348a603 | 2019-09-24 19:44:57 +0200 | [diff] [blame] | 3610 | 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] | 3611 | reindex] must be performed. |
| 3612 | |
Han-Wen Nienhuys | 348a603 | 2019-09-24 19:44:57 +0200 | [diff] [blame] | 3613 | 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] | 3614 | ignored. |
| 3615 | |
Edwin Kempin | a32d443 | 2018-02-16 17:18:31 +0100 | [diff] [blame] | 3616 | [[index.scheduledIndexer.runOnStartup]]index.scheduledIndexer.runOnStartup:: |
| 3617 | + |
| 3618 | Whether the scheduled indexer should run once immediately on startup. |
Han-Wen Nienhuys | 348a603 | 2019-09-24 19:44:57 +0200 | [diff] [blame] | 3619 | If set to `true` the replica startup is blocked until all stale groups |
| 3620 | were reindexed. Enabling this allows to prevent that replicas that were |
Edwin Kempin | a32d443 | 2018-02-16 17:18:31 +0100 | [diff] [blame] | 3621 | offline for a longer period of time run with outdated group information |
| 3622 | until the first scheduled indexing is done. |
| 3623 | + |
| 3624 | Defaults to `true`. |
| 3625 | |
Edwin Kempin | 0f0de86 | 2018-02-08 16:24:11 +0100 | [diff] [blame] | 3626 | [[index.scheduledIndexer.enabled]]index.scheduledIndexer.enabled:: |
| 3627 | + |
| 3628 | Whether the scheduled indexer is enabled. If the scheduled indexer is |
| 3629 | disabled you must implement other means to keep the group index for the |
Luca Milanesio | 0b6d3d8 | 2021-11-13 19:48:47 -0800 | [diff] [blame] | 3630 | replica up-to-date. |
Edwin Kempin | 0f0de86 | 2018-02-08 16:24:11 +0100 | [diff] [blame] | 3631 | + |
| 3632 | Defaults to `true`. |
| 3633 | |
| 3634 | [[index.scheduledIndexer.startTime]]index.scheduledIndexer.startTime:: |
| 3635 | + |
| 3636 | The link:#schedule-configuration-startTime[start time] for running |
| 3637 | the scheduled indexer. |
| 3638 | + |
| 3639 | Defaults to `00:00`. |
| 3640 | |
| 3641 | [[index.scheduledIndexer.interval]]index.scheduledIndexer.interval:: |
| 3642 | + |
| 3643 | The link:#schedule-configuration-interval[interval] for running |
| 3644 | the scheduled indexer. |
| 3645 | + |
| 3646 | Defaults to `5m`. |
| 3647 | |
| 3648 | link:#schedule-configuration-examples[Schedule examples] can be found |
| 3649 | in the link:#schedule-configuration[Schedule Configuration] section. |
| 3650 | |
David Pursehouse | 902b3ee | 2014-07-09 16:17:49 +0900 | [diff] [blame] | 3651 | ==== Lucene configuration |
| 3652 | |
| 3653 | Open and closed changes are indexed in separate indexes named |
| 3654 | 'open' and 'closed' respectively. |
| 3655 | |
| 3656 | The following settings are only used when the index type is `LUCENE`. |
David Pursehouse | ac88c36 | 2014-02-06 12:01:34 +0900 | [diff] [blame] | 3657 | |
David Pursehouse | 00c8214 | 2014-01-22 17:41:09 +0900 | [diff] [blame] | 3658 | [[index.name.ramBufferSize]]index.name.ramBufferSize:: |
| 3659 | + |
David Pursehouse | 00c8214 | 2014-01-22 17:41:09 +0900 | [diff] [blame] | 3660 | Determines the amount of RAM that may be used for buffering added documents |
| 3661 | and deletions before they are flushed to the index. See the |
| 3662 | link:http://lucene.apache.org/core/4_6_0/core/org/apache/lucene/index/LiveIndexWriterConfig.html#setRAMBufferSizeMB(double)[ |
Marian Harbach | 3425337 | 2019-12-10 18:01:31 +0100 | [diff] [blame] | 3663 | Lucene documentation,role=external,window=_blank] for further details. |
David Pursehouse | 00c8214 | 2014-01-22 17:41:09 +0900 | [diff] [blame] | 3664 | + |
| 3665 | Defaults to 16M. |
| 3666 | |
| 3667 | [[index.name.maxBufferedDocs]]index.name.maxBufferedDocs:: |
| 3668 | + |
David Pursehouse | 00c8214 | 2014-01-22 17:41:09 +0900 | [diff] [blame] | 3669 | Determines the minimal number of documents required before the buffered |
| 3670 | in-memory documents are flushed to the index. Large values generally |
| 3671 | give faster indexing. See the |
| 3672 | link:http://lucene.apache.org/core/4_6_0/core/org/apache/lucene/index/LiveIndexWriterConfig.html#setMaxBufferedDocs(int)[ |
Marian Harbach | 3425337 | 2019-12-10 18:01:31 +0100 | [diff] [blame] | 3673 | Lucene documentation,role=external,window=_blank] for further details. |
David Pursehouse | 00c8214 | 2014-01-22 17:41:09 +0900 | [diff] [blame] | 3674 | + |
| 3675 | Defaults to -1, meaning no maximum is set and the writer will flush |
| 3676 | according to RAM usage. |
| 3677 | |
Dave Borowitz | d08b045 | 2014-02-13 11:56:03 -0800 | [diff] [blame] | 3678 | [[index.name.commitWithin]]index.name.commitWithin:: |
| 3679 | + |
Dave Borowitz | d08b045 | 2014-02-13 11:56:03 -0800 | [diff] [blame] | 3680 | Determines the period at which changes are automatically committed to |
| 3681 | stable store on disk. This is a costly operation and may block |
| 3682 | additional index writes, so lower with caution. |
| 3683 | + |
Bruce Zu | af058e6 | 2014-03-21 10:03:05 +0800 | [diff] [blame] | 3684 | If zero, changes are committed after every write. This is very costly |
| 3685 | but may be useful if offline reindexing is infeasible, or for development |
| 3686 | servers. |
Dave Borowitz | d08b045 | 2014-02-13 11:56:03 -0800 | [diff] [blame] | 3687 | + |
Bruce Zu | af058e6 | 2014-03-21 10:03:05 +0800 | [diff] [blame] | 3688 | Values can be specified using standard time unit abbreviations (`ms`, `sec`, |
| 3689 | `min`, etc.). |
David Pursehouse | 9354c1a | 2014-03-22 12:23:43 -0700 | [diff] [blame] | 3690 | + |
Bruce Zu | af058e6 | 2014-03-21 10:03:05 +0800 | [diff] [blame] | 3691 | If negative, `commitWithin` is disabled. Changes are flushed to disk when |
| 3692 | the in-memory buffer fills, but only committed and guaranteed to be synced |
| 3693 | to disk when the process finishes. |
David Pursehouse | 902b3ee | 2014-07-09 16:17:49 +0900 | [diff] [blame] | 3694 | + |
Dave Borowitz | d08b045 | 2014-02-13 11:56:03 -0800 | [diff] [blame] | 3695 | Defaults to 300000 ms (5 minutes). |
| 3696 | |
Trevor Getty | 8fb5db5 | 2019-08-26 14:33:19 +0200 | [diff] [blame] | 3697 | |
| 3698 | [[index.name.maxMergeCount]]index.name.maxMergeCount:: |
| 3699 | + |
| 3700 | Determines the max number of simultaneous merges that are allowed. If a merge |
| 3701 | is necessary yet we already have this many threads running, the incoming thread |
| 3702 | (that is calling add/updateDocument) will block until a merge thread has |
| 3703 | completed. Note that Lucene will only run the smallest maxThreadCount merges |
| 3704 | at a time. See the |
| 3705 | link:https://lucene.apache.org/core/5_5_0/core/org/apache/lucene/index/ConcurrentMergeScheduler.html#setDefaultMaxMergesAndThreads(boolean)[ |
Marian Harbach | 3425337 | 2019-12-10 18:01:31 +0100 | [diff] [blame] | 3706 | Lucene documentation,role=external,window=_blank] for further details. |
Trevor Getty | 8fb5db5 | 2019-08-26 14:33:19 +0200 | [diff] [blame] | 3707 | + |
| 3708 | Defaults to -1 for (auto detection). |
| 3709 | |
| 3710 | |
| 3711 | [[index.name.maxThreadCount]]index.name.maxThreadCount:: |
| 3712 | + |
| 3713 | Determines the max number of simultaneous Lucene merge threads that should be running at |
| 3714 | once. This must be less than or equal to maxMergeCount. See the |
| 3715 | link:https://lucene.apache.org/core/5_5_0/core/org/apache/lucene/index/ConcurrentMergeScheduler.html#setDefaultMaxMergesAndThreads(boolean)[ |
Marian Harbach | 3425337 | 2019-12-10 18:01:31 +0100 | [diff] [blame] | 3716 | Lucene documentation,role=external,window=_blank] for further details. |
Trevor Getty | 8fb5db5 | 2019-08-26 14:33:19 +0200 | [diff] [blame] | 3717 | + |
| 3718 | For further details on Lucene index configuration (auto detection) which |
| 3719 | affects maxThreadCount and maxMergeCount settings. |
| 3720 | See the |
| 3721 | link:https://lucene.apache.org/core/5_5_0/core/org/apache/lucene/index/ConcurrentMergeScheduler.html#AUTO_DETECT_MERGES_AND_THREADS[ |
Marian Harbach | 3425337 | 2019-12-10 18:01:31 +0100 | [diff] [blame] | 3722 | Lucene documentation,role=external,window=_blank] |
Trevor Getty | 8fb5db5 | 2019-08-26 14:33:19 +0200 | [diff] [blame] | 3723 | + |
| 3724 | Defaults to -1 for (auto detection). |
| 3725 | |
| 3726 | [[index.name.enableAutoIOThrottle]]index.name.enableAutoIOThrottle:: |
| 3727 | + |
| 3728 | Allows the control of whether automatic IO throttling is enabled and used by |
| 3729 | default in the lucene merge queue. Automatic dynamic IO throttling, which when |
| 3730 | on is used to adaptively rate limit writes bytes/sec to the minimal rate necessary |
| 3731 | so merges do not fall behind. See the |
| 3732 | link:https://lucene.apache.org/core/5_5_0/core/org/apache/lucene/index/ConcurrentMergeScheduler.html#enableAutoIOThrottle()[ |
Marian Harbach | 3425337 | 2019-12-10 18:01:31 +0100 | [diff] [blame] | 3733 | Lucene documentation,role=external,window=_blank] for further details. |
Trevor Getty | 8fb5db5 | 2019-08-26 14:33:19 +0200 | [diff] [blame] | 3734 | + |
| 3735 | Defaults to true (throttling enabled). |
| 3736 | |
Adithya Chakilam | 2fd651a | 2021-10-20 14:04:49 -0500 | [diff] [blame] | 3737 | During offline reindexing, setting ramBufferSize greater than the size |
| 3738 | of index (size of specific index folder under <site_dir>/index) and |
| 3739 | maxBufferedDocs as -1 avoids unnecessary flushes and triggers only a |
| 3740 | single flush at the end of the process. |
| 3741 | |
David Pursehouse | 902b3ee | 2014-07-09 16:17:49 +0900 | [diff] [blame] | 3742 | Sample Lucene index configuration: |
David Pursehouse | 00c8214 | 2014-01-22 17:41:09 +0900 | [diff] [blame] | 3743 | ---- |
| 3744 | [index] |
| 3745 | type = LUCENE |
| 3746 | |
| 3747 | [index "changes_open"] |
| 3748 | ramBufferSize = 60 m |
| 3749 | maxBufferedDocs = 3000 |
Trevor Getty | 8fb5db5 | 2019-08-26 14:33:19 +0200 | [diff] [blame] | 3750 | maxThreadCount = 5 |
| 3751 | maxMergeCount = 50 |
| 3752 | |
David Pursehouse | 00c8214 | 2014-01-22 17:41:09 +0900 | [diff] [blame] | 3753 | |
| 3754 | [index "changes_closed"] |
| 3755 | ramBufferSize = 20 m |
| 3756 | maxBufferedDocs = 500 |
Trevor Getty | 8fb5db5 | 2019-08-26 14:33:19 +0200 | [diff] [blame] | 3757 | maxThreadCount = 10 |
| 3758 | maxMergeCount = 100 |
| 3759 | enableIOThrottle = false |
| 3760 | |
David Pursehouse | 00c8214 | 2014-01-22 17:41:09 +0900 | [diff] [blame] | 3761 | ---- |
| 3762 | |
Patrick Hiesel | da69247 | 2019-10-07 16:03:23 +0200 | [diff] [blame] | 3763 | [[event]] |
| 3764 | === Section event |
| 3765 | |
| 3766 | [[event.payload.listChangeOptions]]events.payload.listChangeOptions:: |
| 3767 | + |
| 3768 | List of options that Gerrit applies when rendering the payload of an |
| 3769 | internal event. This is the same set of options that are documented |
| 3770 | link:rest-api-changes.html#query-options[here]. |
| 3771 | + |
| 3772 | Depending on the setup, these events might get serialized using stream |
| 3773 | events. |
| 3774 | + |
| 3775 | This can be set to the set of minimal options that consumers of Gerrit's |
Patrick Hiesel | a4824db | 2019-12-20 10:55:26 +0100 | [diff] [blame] | 3776 | events need. A minimal set would be (`SKIP_DIFFSTAT`). |
Patrick Hiesel | da69247 | 2019-10-07 16:03:23 +0200 | [diff] [blame] | 3777 | + |
| 3778 | Every option that gets added here will have a performance impact. The |
| 3779 | general recommendation is therefore to set this to a minimal set of |
| 3780 | required options. |
| 3781 | + |
| 3782 | Defaults to all available options minus `CHANGE_ACTIONS`, |
| 3783 | `CURRENT_ACTIONS` and `CHECK`. This is a rich default to make sure the |
| 3784 | config is backwards compatible with what the default was before the config |
| 3785 | was added. |
| 3786 | |
David Ostrovsky | 0e4db92 | 2021-02-13 10:06:43 +0100 | [diff] [blame] | 3787 | [[event.comment-added.publishPatchSetLevelComment]]event.comment-added.publishPatchSetLevelComment:: |
David Ostrovsky | d14db1f | 2020-12-09 19:59:55 +0100 | [diff] [blame] | 3788 | + |
| 3789 | Add patch set level comment as event comment. Without this option, patch set |
| 3790 | level comment will not be included in the event comment attribute. Given that |
| 3791 | currently patch set level, file and robot comments are not exposed in the |
| 3792 | `comment-added` event type, those comments will be lost. One particular use |
| 3793 | case is to re-trigger CI build from the change screen by adding a comment with |
| 3794 | specific content, e.g.: `recheck`. Jenkins Gerrit Trigger plugin and Zuul CI |
| 3795 | depend on this feature to trigger change verification. |
| 3796 | + |
| 3797 | By default, true. |
| 3798 | |
Marcin Czech | e8a7355 | 2023-06-06 15:14:17 +0200 | [diff] [blame] | 3799 | [[event.stream-events.enableRefUpdatedEvents]]event.stream-events.enableRefUpdatedEvents:: |
| 3800 | + |
| 3801 | Enable streaming of `ref-updated` event which represents a single ref update operation. |
| 3802 | Batch ref updates are represented as a series of `ref-updated` events. |
| 3803 | This allows event listeners to react on a ref update. |
| 3804 | Please consider switching to `batch-ref-updated` event which provides better control on grouping and |
| 3805 | preserving order of the ref updates. |
| 3806 | + |
| 3807 | By default, true. |
| 3808 | |
| 3809 | [[event.stream-events.enableBatchRefUpdatedEvents]]event.stream-events.enableBatchRefUpdatedEvents:: |
| 3810 | + |
| 3811 | Enable streaming of `batch-ref-updated` event which represents group of |
| 3812 | refs updated during a single batch ref update operation. |
| 3813 | Single ref updates are also streamed as a `batch-ref-updated` events with a single ref specified. |
| 3814 | This allows event listeners to react on all ref updated events and disable individual `ref-updated` |
| 3815 | events by setting <<event.stream-events.enableRefUpdatedEvents, event.stream-events.enableRefUpdatedEvents>> to false. |
| 3816 | + |
| 3817 | By default, false. |
| 3818 | |
Fabio Ponciroli | 5d5c159 | 2023-09-08 11:46:03 +0200 | [diff] [blame] | 3819 | [[event.stream-events.enableDraftCommentEvents]]event.stream-events.enableDraftCommentEvents:: |
| 3820 | + |
| 3821 | Enable streaming of `ref-updated` events for `refs/draft-comments` refs. |
| 3822 | Enable this flag in case listeners in your system are supposed to react on draft operations. |
| 3823 | + |
| 3824 | NOTE: Due to the nature of drafts, the amount of `ref-updated` events created on draft operations could be high. |
| 3825 | The extra amount of events depends on the usage pattern of the installation. It is worth evaluating |
| 3826 | the amount of extra events produced before enabling this flag by counting the calls to the draft APIs. |
| 3827 | + |
| 3828 | By default, false. |
| 3829 | |
Patrick Hiesel | be98d8c | 2020-12-07 14:59:55 +0100 | [diff] [blame] | 3830 | [[experiments]] |
| 3831 | === Section experiments |
| 3832 | |
Marija Savtchouk | b062da3 | 2021-02-05 09:35:04 +0000 | [diff] [blame] | 3833 | This section covers experimental new features. Gerrit uses experiments |
| 3834 | to research new behavior in frontend and core backend. Once the research is done, the experimental |
| 3835 | feature either stays and the experimentation flag gets removed, or the feature as a whole |
Patrick Hiesel | be98d8c | 2020-12-07 14:59:55 +0100 | [diff] [blame] | 3836 | gets removed |
| 3837 | |
| 3838 | [[experiments.enabled]]experiments.enabled:: |
| 3839 | + |
| 3840 | List of experiments that are currently enabled. The release notes contain currently |
| 3841 | available experiments. |
| 3842 | + |
| 3843 | We will not remove experiments in stable patch releases. They are likely to be |
| 3844 | removed in the next stable version. |
| 3845 | |
| 3846 | ---- |
| 3847 | [experiments] |
| 3848 | enabled = ExperimentKey |
| 3849 | ---- |
Patrick Hiesel | da69247 | 2019-10-07 16:03:23 +0200 | [diff] [blame] | 3850 | |
Patrick Hiesel | 17142dc | 2020-12-07 15:17:24 +0100 | [diff] [blame] | 3851 | [[experiments.disabled]]experiments.disabled:: |
| 3852 | + |
| 3853 | List of experiments that are currently disabled. The release notes contain currently |
| 3854 | available experiments. This list disables experiments with the given key that are |
| 3855 | either enabled by default or explicitly in the config. |
| 3856 | |
| 3857 | ---- |
| 3858 | [experiments] |
| 3859 | disabled = ExperimentKey |
| 3860 | ---- |
Shawn O. Pearce | 9d342a4 | 2009-12-16 15:49:05 -0800 | [diff] [blame] | 3861 | |
| 3862 | [[ldap]] |
| 3863 | === Section ldap |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 3864 | |
Luca Milanesio | a05d42b | 2018-12-19 01:13:06 +0000 | [diff] [blame] | 3865 | LDAP integration is only enabled if `auth.type` is set to |
| 3866 | `HTTP_LDAP`, `LDAP` or `CLIENT_SSL_CERT_LDAP`. See above for a |
| 3867 | detailed description of the `auth.type` settings and their |
| 3868 | implications. |
| 3869 | |
| 3870 | An example LDAP configuration follows, and then discussion of |
| 3871 | the parameters introduced here. Suitable defaults for most |
| 3872 | parameters are automatically guessed based on the type of server |
| 3873 | detected during startup. The guessed defaults support |
Marian Harbach | 3425337 | 2019-12-10 18:01:31 +0100 | [diff] [blame] | 3874 | link:http://www.ietf.org/rfc/rfc2307.txt[RFC 2307,role=external,window=_blank], Active |
| 3875 | Directory and link:https://www.freeipa.org[FreeIPA,role=external,window=_blank]. |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 3876 | |
| 3877 | ---- |
| 3878 | [ldap] |
| 3879 | server = ldap://ldap.example.com |
| 3880 | |
| 3881 | accountBase = ou=people,dc=example,dc=com |
| 3882 | accountPattern = (&(objectClass=person)(uid=${username})) |
| 3883 | accountFullName = displayName |
| 3884 | accountEmailAddress = mail |
| 3885 | |
| 3886 | groupBase = ou=groups,dc=example,dc=com |
| 3887 | groupMemberPattern = (&(objectClass=group)(member=${dn})) |
| 3888 | ---- |
| 3889 | |
Luca Milanesio | a05d42b | 2018-12-19 01:13:06 +0000 | [diff] [blame] | 3890 | [[ldap.guessRelevantGroups]]ldap.guessRelevantGroups:: |
| 3891 | + |
| 3892 | Filter the groups found in LDAP by guessing the ones relevant to |
| 3893 | Gerrit and removing the others from list completions and ACL evaluations. |
| 3894 | The guess is based on two elements: the projects most recently |
| 3895 | accessed in the cache and the list of LDAP groups included in their ACLs. |
| 3896 | + |
| 3897 | Please note that projects rarely used and thus not cached may be |
| 3898 | temporarily inaccessible by users even with LDAP membership and grants |
| 3899 | referenced in the ACLs. |
| 3900 | + |
| 3901 | By default, true. |
| 3902 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 3903 | [[ldap.server]]ldap.server:: |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 3904 | + |
| 3905 | URL of the organization's LDAP server to query for user information |
| 3906 | and group membership from. Must be of the form `ldap://host` or |
| 3907 | `ldaps://host` to bind with either a plaintext or SSL connection. |
Shawn O. Pearce | f7e065e | 2009-09-26 20:01:10 -0700 | [diff] [blame] | 3908 | + |
David Pursehouse | 42f4204 | 2013-08-01 14:02:25 +0900 | [diff] [blame] | 3909 | If `auth.type` is `LDAP` this setting should use `ldaps://` to |
Shawn O. Pearce | f7e065e | 2009-09-26 20:01:10 -0700 | [diff] [blame] | 3910 | ensure the end user's plaintext password is transmitted only over |
| 3911 | an encrypted connection. |
Matthias Sohn | 1e2ec07 | 2020-10-16 13:57:11 +0200 | [diff] [blame] | 3912 | + |
| 3913 | If you want to configure multiple ldap servers you can try to put |
| 3914 | multiple ldap urls separated by a space: |
| 3915 | `server = ldaps://ldap1 ldaps://ldap2` |
Edwin Kempin | 6d99fb6 | 2023-06-21 10:08:28 +0000 | [diff] [blame] | 3916 | See https://issues.gerritcodereview.com/issues/40010644[issue 40010644]. |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 3917 | |
Alon Bar-Lev | 8ae444d | 2017-05-08 20:11:09 +0300 | [diff] [blame] | 3918 | [[ldap.startTls]]ldap.startTls:: |
| 3919 | + |
| 3920 | If true, Gerrit will perform StartTLS extended operation. |
| 3921 | + |
| 3922 | By default, false, StartTLS will not be enabled. |
| 3923 | |
Alon Bar-Lev | e39c35c | 2019-06-10 12:59:55 +0300 | [diff] [blame] | 3924 | [[ldap.supportAnonymous]]ldap.supportAnonymous:: |
| 3925 | + |
| 3926 | If false, Gerrit will provide credentials only at connection open, this is |
| 3927 | required for some `LDAP` implementations that do not allow anonymous bind |
| 3928 | for StartTLS or for reauthentication. |
| 3929 | + |
| 3930 | By default, true. |
| 3931 | |
Shawn O. Pearce | 02c2e80 | 2009-10-29 14:46:03 -0700 | [diff] [blame] | 3932 | [[ldap.sslVerify]]ldap.sslVerify:: |
| 3933 | + |
Alon Bar-Lev | 8ae444d | 2017-05-08 20:11:09 +0300 | [diff] [blame] | 3934 | If false and ldap.server is an `ldaps://` style URL or `ldap.startTls` |
| 3935 | is true, Gerrit will not verify the server certificate when it connects |
| 3936 | to perform a query. |
Shawn O. Pearce | 02c2e80 | 2009-10-29 14:46:03 -0700 | [diff] [blame] | 3937 | + |
| 3938 | By default, true, requiring the certificate to be verified. |
| 3939 | |
Olga Grinberg | cf1b06a | 2015-02-03 15:54:48 -0500 | [diff] [blame] | 3940 | [[ldap.groupsVisibleToAll]]ldap.groupsVisibleToAll:: |
| 3941 | + |
| 3942 | If true, LDAP groups are visible to all registered users. |
| 3943 | + |
| 3944 | By default, false, LDAP groups are visible only to administrators and |
| 3945 | group members. |
| 3946 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 3947 | [[ldap.username]]ldap.username:: |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 3948 | + |
| 3949 | _(Optional)_ Username to bind to the LDAP server with. If not set, |
| 3950 | an anonymous connection to the LDAP server is attempted. |
| 3951 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 3952 | [[ldap.password]]ldap.password:: |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 3953 | + |
| 3954 | _(Optional)_ Password for the user identified by `ldap.username`. |
| 3955 | If not set, an anonymous (or passwordless) connection to the LDAP |
| 3956 | server is attempted. |
| 3957 | |
Ben Wu | 0410a15 | 2010-06-04 16:17:24 +0800 | [diff] [blame] | 3958 | [[ldap.referral]]ldap.referral:: |
| 3959 | + |
| 3960 | _(Optional)_ How an LDAP referral should be handled if it is |
| 3961 | encountered during directory traversal. Set to `follow` to |
James Y Knight | 1244ed0 | 2011-01-04 02:40:32 -0500 | [diff] [blame] | 3962 | automatically follow any referrals, or `ignore` to ignore the |
| 3963 | referrals. |
Ben Wu | 0410a15 | 2010-06-04 16:17:24 +0800 | [diff] [blame] | 3964 | + |
| 3965 | By default, `ignore`. |
| 3966 | |
Sasa Zivkov | 100bd4b | 2011-11-07 14:58:46 +0100 | [diff] [blame] | 3967 | [[ldap.readTimeout]]ldap.readTimeout:: |
| 3968 | + |
| 3969 | _(Optional)_ The read timeout for an LDAP operation. The value is |
| 3970 | in the usual time-unit format like "1 s", "100 ms", etc... |
| 3971 | 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] | 3972 | threads in case the LDAP server becomes slow. |
Sasa Zivkov | 100bd4b | 2011-11-07 14:58:46 +0100 | [diff] [blame] | 3973 | + |
| 3974 | By default there is no timeout and Gerrit will wait for the LDAP |
| 3975 | server to respond until the TCP connection times out. |
| 3976 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 3977 | [[ldap.accountBase]]ldap.accountBase:: |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 3978 | + |
| 3979 | Root of the tree containing all user accounts. This is typically |
| 3980 | of the form `ou=people,dc=example,dc=com`. |
David Pursehouse | 82d5563 | 2015-12-14 10:31:27 +0000 | [diff] [blame] | 3981 | + |
| 3982 | This setting may be added multiple times to specify more than |
| 3983 | one root. |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 3984 | |
Shawn O. Pearce | 304ccdb | 2009-08-25 12:25:27 -0700 | [diff] [blame] | 3985 | [[ldap.accountScope]]ldap.accountScope:: |
| 3986 | + |
| 3987 | Scope of the search performed for accounts. Must be one of: |
| 3988 | + |
| 3989 | * `one`: Search only one level below accountBase, but not recursive |
| 3990 | * `sub` or `subtree`: Search recursively below accountBase |
| 3991 | * `base` or `object`: Search exactly accountBase; probably not desired |
| 3992 | |
| 3993 | + |
| 3994 | Default is `subtree` as many directories have several levels. |
| 3995 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 3996 | [[ldap.accountPattern]]ldap.accountPattern:: |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 3997 | + |
| 3998 | Query pattern to use when searching for a user account. This may be |
| 3999 | any valid LDAP query expression, including the standard `(&...)` and |
David Pursehouse | 42f4204 | 2013-08-01 14:02:25 +0900 | [diff] [blame] | 4000 | `(|...)` operators. If `auth.type` is `HTTP_LDAP` then the variable |
Edwin Kempin | cdb0e00 | 2011-09-08 14:23:30 +0200 | [diff] [blame] | 4001 | `${username}` is replaced with a parameter set to the username |
David Pursehouse | 42f4204 | 2013-08-01 14:02:25 +0900 | [diff] [blame] | 4002 | 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] | 4003 | the variable `${username}` is replaced by the string entered by |
Shawn O. Pearce | f7e065e | 2009-09-26 20:01:10 -0700 | [diff] [blame] | 4004 | the end user. |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 4005 | + |
| 4006 | This pattern is used to search the objects contained directly under |
| 4007 | the `ldap.accountBase` tree. A typical setting for this parameter |
Edwin Kempin | cdb0e00 | 2011-09-08 14:23:30 +0200 | [diff] [blame] | 4008 | is `(uid=${username})` or `(cn=${username})`, but the proper |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 4009 | setting depends on the LDAP schema used by the directory server. |
| 4010 | + |
Michal Pasierb | 3e26274 | 2017-01-23 12:50:48 +0100 | [diff] [blame] | 4011 | Default is `(uid=${username})` for FreeIPA and RFC 2307 servers, |
Shawn O. Pearce | 02c2e80 | 2009-10-29 14:46:03 -0700 | [diff] [blame] | 4012 | and `(&(objectClass=user)(sAMAccountName=${username}))` |
| 4013 | for Active Directory. |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 4014 | |
Shawn O. Pearce | 37dc1f8 | 2009-08-19 09:49:07 -0700 | [diff] [blame] | 4015 | [[ldap.accountFullName]]ldap.accountFullName:: |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 4016 | + |
| 4017 | _(Optional)_ Name of an attribute on the user account object which |
| 4018 | contains the initial value for the user's full name field in Gerrit. |
| 4019 | Typically this is the `displayName` property in LDAP, but could |
| 4020 | also be `legalName` or `cn`. |
| 4021 | + |
David Pursehouse | 221d4f6 | 2012-06-08 17:38:08 +0900 | [diff] [blame] | 4022 | Attribute values may be concatenated with literal strings. For |
| 4023 | example to join given name and surname together, use the pattern |
Edwin Kempin | cdb0e00 | 2011-09-08 14:23:30 +0200 | [diff] [blame] | 4024 | `${givenName} ${SN}`. |
Shawn O. Pearce | b86ae00 | 2009-09-26 16:54:05 -0700 | [diff] [blame] | 4025 | + |
Michal Pasierb | 3e26274 | 2017-01-23 12:50:48 +0100 | [diff] [blame] | 4026 | Default is `displayName` for FreeIPA and RFC 2307 servers, |
Shawn O. Pearce | 02c2e80 | 2009-10-29 14:46:03 -0700 | [diff] [blame] | 4027 | and `${givenName} ${sn}` for Active Directory. |
James Muir | ce09ebd | 2023-08-14 22:30:14 -0400 | [diff] [blame] | 4028 | + |
| 4029 | A non-empty or default value prevents users from modifying their full |
| 4030 | name field. To allow edits to the full name field, set to the empty |
| 4031 | string. |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 4032 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 4033 | [[ldap.accountEmailAddress]]ldap.accountEmailAddress:: |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 4034 | + |
| 4035 | _(Optional)_ Name of an attribute on the user account object which |
| 4036 | contains the user's Internet email address, as defined by this |
| 4037 | LDAP server. |
| 4038 | + |
Shawn O. Pearce | b86ae00 | 2009-09-26 16:54:05 -0700 | [diff] [blame] | 4039 | Attribute values may be concatenated with literal strings, |
| 4040 | for example to set the email address to the lowercase form |
| 4041 | of sAMAccountName followed by a constant domain name, use |
Edwin Kempin | cdb0e00 | 2011-09-08 14:23:30 +0200 | [diff] [blame] | 4042 | `${sAMAccountName.toLowerCase}@example.com`. |
Shawn O. Pearce | b86ae00 | 2009-09-26 16:54:05 -0700 | [diff] [blame] | 4043 | + |
Shawn O. Pearce | 3ca1dcf | 2009-08-20 08:56:23 -0700 | [diff] [blame] | 4044 | If set, the preferred email address will be prefilled from LDAP, |
David Pursehouse | 221d4f6 | 2012-06-08 17:38:08 +0900 | [diff] [blame] | 4045 | but users may still be able to register additional email addresses, |
Shawn O. Pearce | 3ca1dcf | 2009-08-20 08:56:23 -0700 | [diff] [blame] | 4046 | and select a different preferred email address. |
| 4047 | + |
Shawn O. Pearce | 02c2e80 | 2009-10-29 14:46:03 -0700 | [diff] [blame] | 4048 | Default is `mail`. |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 4049 | |
Shawn O. Pearce | 59e0922 | 2009-08-19 09:04:49 -0700 | [diff] [blame] | 4050 | [[ldap.accountSshUserName]]ldap.accountSshUserName:: |
| 4051 | + |
| 4052 | _(Optional)_ Name of an attribute on the user account object which |
| 4053 | contains the initial value for the user's SSH username field in |
| 4054 | Gerrit. Typically this is the `uid` property in LDAP, but could |
| 4055 | also be `cn`. Administrators should prefer to match the attribute |
| 4056 | corresponding to the user's workstation username, as this is what |
| 4057 | SSH clients will default to. |
| 4058 | + |
Shawn O. Pearce | b86ae00 | 2009-09-26 16:54:05 -0700 | [diff] [blame] | 4059 | Attribute values may also be forced to lowercase, or to uppercase in |
Edwin Kempin | cdb0e00 | 2011-09-08 14:23:30 +0200 | [diff] [blame] | 4060 | an expression. For example, `${sAMAccountName.toLowerCase}` will |
Shawn O. Pearce | b86ae00 | 2009-09-26 16:54:05 -0700 | [diff] [blame] | 4061 | force the value of sAMAccountName, if defined, to be all lowercase. |
| 4062 | The suffix `.toUpperCase` can be used for the other direction. |
| 4063 | The suffix `.localPart` can be used to split attribute values of |
| 4064 | 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] | 4065 | example `${userPrincipalName.localPart}` would provide only 'user'. |
Shawn O. Pearce | b86ae00 | 2009-09-26 16:54:05 -0700 | [diff] [blame] | 4066 | + |
Shawn O. Pearce | 3ca1dcf | 2009-08-20 08:56:23 -0700 | [diff] [blame] | 4067 | 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] | 4068 | Gerrit will populate it only from the LDAP data. Note that once the |
| 4069 | username has been set it cannot be changed, therefore it is |
| 4070 | recommended not to make changes to this setting that would cause the |
| 4071 | value to differ, as this will prevent users from logging in. |
Shawn O. Pearce | 3ca1dcf | 2009-08-20 08:56:23 -0700 | [diff] [blame] | 4072 | + |
Michal Pasierb | 3e26274 | 2017-01-23 12:50:48 +0100 | [diff] [blame] | 4073 | Default is `uid` for FreeIPA and RFC 2307 servers, |
Shawn O. Pearce | 02c2e80 | 2009-10-29 14:46:03 -0700 | [diff] [blame] | 4074 | and `${sAMAccountName.toLowerCase}` for Active Directory. |
Shawn O. Pearce | 59e0922 | 2009-08-19 09:04:49 -0700 | [diff] [blame] | 4075 | |
Shawn O. Pearce | 7d25f78 | 2009-10-30 08:01:03 -0700 | [diff] [blame] | 4076 | [[ldap.accountMemberField]]ldap.accountMemberField:: |
Anthony | 93de7db | 2009-10-03 10:01:50 -0400 | [diff] [blame] | 4077 | + |
| 4078 | _(Optional)_ Name of an attribute on the user account object which |
Shawn O. Pearce | 7d25f78 | 2009-10-30 08:01:03 -0700 | [diff] [blame] | 4079 | contains the groups the user is part of. Typically used for Active |
Michal Pasierb | 3e26274 | 2017-01-23 12:50:48 +0100 | [diff] [blame] | 4080 | Directory and FreeIPA servers. |
Anthony | 93de7db | 2009-10-03 10:01:50 -0400 | [diff] [blame] | 4081 | + |
Shawn O. Pearce | 02c2e80 | 2009-10-29 14:46:03 -0700 | [diff] [blame] | 4082 | Default is unset for RFC 2307 servers (disabled) |
Michal Pasierb | 3e26274 | 2017-01-23 12:50:48 +0100 | [diff] [blame] | 4083 | and `memberOf` for Active Directory and FreeIPA. |
| 4084 | |
| 4085 | [[ldap.accountMemberExpandGroups]]ldap.accountMemberExpandGroups:: |
| 4086 | + |
| 4087 | _(Optional)_ Whether to expand nested groups recursively. This |
| 4088 | setting is used only if `ldap.accountMemberField` is set. |
| 4089 | + |
| 4090 | Default is unset for FreeIPA and `true` for RFC 2307 servers |
| 4091 | and Active Directory. |
Anthony | 93de7db | 2009-10-03 10:01:50 -0400 | [diff] [blame] | 4092 | |
Saša Živkov | c81291f | 2015-02-04 17:19:20 +0100 | [diff] [blame] | 4093 | [[ldap.fetchMemberOfEagerly]]ldap.fetchMemberOfEagerly:: |
| 4094 | + |
| 4095 | _(Optional)_ Whether to fetch the `memberOf` account attribute on |
| 4096 | login. Setups which use LDAP for user authentication but don't make |
| 4097 | use of the LDAP groups may benefit from setting this option to `false` |
| 4098 | as this will result in a much faster LDAP login. |
| 4099 | + |
| 4100 | Default is unset for RFC 2307 servers (disabled) and `true` for |
Michal Pasierb | 3e26274 | 2017-01-23 12:50:48 +0100 | [diff] [blame] | 4101 | Active Directory and FreeIPA. |
Saša Živkov | c81291f | 2015-02-04 17:19:20 +0100 | [diff] [blame] | 4102 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 4103 | [[ldap.groupBase]]ldap.groupBase:: |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 4104 | + |
| 4105 | Root of the tree containing all group objects. This is typically |
| 4106 | of the form `ou=groups,dc=example,dc=com`. |
David Pursehouse | 82d5563 | 2015-12-14 10:31:27 +0000 | [diff] [blame] | 4107 | + |
| 4108 | This setting may be added multiple times to specify more than |
| 4109 | one root. |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 4110 | |
Shawn O. Pearce | 304ccdb | 2009-08-25 12:25:27 -0700 | [diff] [blame] | 4111 | [[ldap.groupScope]]ldap.groupScope:: |
| 4112 | + |
| 4113 | Scope of the search performed for group objects. Must be one of: |
| 4114 | + |
| 4115 | * `one`: Search only one level below groupBase, but not recursive |
| 4116 | * `sub` or `subtree`: Search recursively below groupBase |
| 4117 | * `base` or `object`: Search exactly groupBase; probably not desired |
| 4118 | |
| 4119 | + |
| 4120 | Default is `subtree` as many directories have several levels. |
| 4121 | |
Shawn O. Pearce | 7d25f78 | 2009-10-30 08:01:03 -0700 | [diff] [blame] | 4122 | [[ldap.groupPattern]]ldap.groupPattern:: |
| 4123 | + |
| 4124 | Query pattern used when searching for an LDAP group to connect |
| 4125 | to a Gerrit group. This may be any valid LDAP query expression, |
| 4126 | including the standard `(&...)` and `(|...)` operators. The variable |
Edwin Kempin | cdb0e00 | 2011-09-08 14:23:30 +0200 | [diff] [blame] | 4127 | `${groupname}` is replaced with the search term supplied by the |
Shawn O. Pearce | 7d25f78 | 2009-10-30 08:01:03 -0700 | [diff] [blame] | 4128 | group owner. |
| 4129 | + |
Michal Pasierb | 3e26274 | 2017-01-23 12:50:48 +0100 | [diff] [blame] | 4130 | Default is `(cn=${groupname})` for FreeIPA and RFC 2307 servers, |
Edwin Kempin | cdb0e00 | 2011-09-08 14:23:30 +0200 | [diff] [blame] | 4131 | and `(&(objectClass=group)(cn=${groupname}))` for Active Directory. |
Shawn O. Pearce | 7d25f78 | 2009-10-30 08:01:03 -0700 | [diff] [blame] | 4132 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 4133 | [[ldap.groupMemberPattern]]ldap.groupMemberPattern:: |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 4134 | + |
| 4135 | Query pattern to use when searching for the groups that a user |
| 4136 | account is currently a member of. This may be any valid LDAP query |
| 4137 | expression, including the standard `(&...)` and `(|...)` operators. |
| 4138 | + |
David Pursehouse | 42f4204 | 2013-08-01 14:02:25 +0900 | [diff] [blame] | 4139 | If `auth.type` is `HTTP_LDAP` then the variable `${username}` is |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 4140 | replaced with a parameter set to the username that was supplied |
| 4141 | by the HTTP server. Other variables appearing in the pattern, |
Edwin Kempin | cdb0e00 | 2011-09-08 14:23:30 +0200 | [diff] [blame] | 4142 | such as `${fooBarAttribute}`, are replaced with the value of the |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 4143 | corresponding attribute (in this case, `fooBarAttribute`) as read |
| 4144 | from the user's account object matched under `ldap.accountBase`. |
Edwin Kempin | cdb0e00 | 2011-09-08 14:23:30 +0200 | [diff] [blame] | 4145 | Attributes such as `${dn}` or `${uidNumber}` may be useful. |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 4146 | + |
Scott Dial | 5045750 | 2013-08-11 16:52:51 -0400 | [diff] [blame] | 4147 | Default is `(|(memberUid=${username})(gidNumber=${gidNumber}))` for |
Michal Pasierb | 3e26274 | 2017-01-23 12:50:48 +0100 | [diff] [blame] | 4148 | RFC 2307, and unset (disabled) for Active Directory and FreeIPA. |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 4149 | |
Auke Schrijnen | 5780913 | 2012-09-26 21:05:39 +0200 | [diff] [blame] | 4150 | [[ldap.groupName]]ldap.groupName:: |
| 4151 | + |
David Pursehouse | 39489ae | 2012-10-12 13:50:04 +0900 | [diff] [blame] | 4152 | _(Optional)_ Name of the attribute on the group object which contains |
| 4153 | the value to use as the group name in Gerrit. |
Auke Schrijnen | 5780913 | 2012-09-26 21:05:39 +0200 | [diff] [blame] | 4154 | + |
David Pursehouse | 39489ae | 2012-10-12 13:50:04 +0900 | [diff] [blame] | 4155 | Typically the attribute name is `cn` for RFC 2307 and Active Directory |
| 4156 | servers. For other servers the attribute name may differ, for example |
| 4157 | `apple-group-realname` on Apple MacOS X Server. |
Auke Schrijnen | 5780913 | 2012-09-26 21:05:39 +0200 | [diff] [blame] | 4158 | + |
David Pursehouse | 39489ae | 2012-10-12 13:50:04 +0900 | [diff] [blame] | 4159 | It is also possible to specify a literal string containing a pattern of |
| 4160 | attribute values. For example to create a Gerrit group name consisting of |
| 4161 | LDAP group name and group ID, use the pattern `${cn} (${gidNumber})`. |
| 4162 | + |
| 4163 | Default is `cn`. |
Auke Schrijnen | 5780913 | 2012-09-26 21:05:39 +0200 | [diff] [blame] | 4164 | |
Gustaf Lundh | daf41af | 2016-12-05 19:05:09 +0100 | [diff] [blame] | 4165 | [[ldap.mandatoryGroup]]ldap.mandatoryGroup:: |
| 4166 | + |
| 4167 | All users must be a member of this group to allow account creation or |
| 4168 | authentication. |
| 4169 | + |
James Muir | 86d3241 | 2023-05-04 14:23:40 -0400 | [diff] [blame] | 4170 | For example, setting to `ldap/gerritaccess` limits account creation or |
| 4171 | authentication to members of the ldap group `gerritaccess`. |
| 4172 | + |
Gustaf Lundh | daf41af | 2016-12-05 19:05:09 +0100 | [diff] [blame] | 4173 | Setting mandatoryGroup implies enabling of `ldap.fetchMemberOfEagerly` |
| 4174 | + |
| 4175 | By default, unset. |
| 4176 | |
Edwin Kempin | b3b0d29 | 2011-09-14 14:17:34 +0200 | [diff] [blame] | 4177 | [[ldap.localUsernameToLowerCase]]ldap.localUsernameToLowerCase:: |
| 4178 | + |
| 4179 | Converts the local username, that is used to login into the Gerrit |
David Pursehouse | a1d633b | 2014-05-02 17:21:02 +0900 | [diff] [blame] | 4180 | Web UI, to lower case before doing the LDAP authentication. By setting |
| 4181 | 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] | 4182 | can be achieved. |
| 4183 | + |
| 4184 | If set, it must be ensured that the local usernames for all existing |
| 4185 | accounts are converted to lower case, otherwise a user that has a |
David Pursehouse | 221d4f6 | 2012-06-08 17:38:08 +0900 | [diff] [blame] | 4186 | 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] | 4187 | anymore. The local usernames for the existing accounts can be |
| 4188 | converted to lower case by running the server program |
| 4189 | link:pgm-LocalUsernamesToLowerCase.html[LocalUsernamesToLowerCase]. |
| 4190 | Please be aware that the conversion of the local usernames to lower |
| 4191 | case can't be undone. For newly created accounts the local username |
| 4192 | will be directly stored in lower case. |
| 4193 | + |
| 4194 | By default, unset/false. |
Shawn O. Pearce | 302a7dd | 2009-08-18 19:33:15 -0700 | [diff] [blame] | 4195 | |
Robin Rosenberg | a3baed0 | 2012-10-14 14:09:32 +0200 | [diff] [blame] | 4196 | [[ldap.authentication]]ldap.authentication:: |
| 4197 | + |
| 4198 | Defines how Gerrit authenticates with the server. When set to `GSSAPI` |
| 4199 | Gerrit will use Kerberos. To use kerberos the |
| 4200 | `java.security.auth.login.config` system property must point to a |
| 4201 | login to a JAAS configuration file and, if Java 6 is used, the system |
| 4202 | property `java.security.krb5.conf` must point to the appropriate |
| 4203 | krb5.ini file with references to the KDC. |
| 4204 | |
| 4205 | Typical jaas.conf. |
| 4206 | |
| 4207 | ---- |
| 4208 | KerberosLogin { |
| 4209 | com.sun.security.auth.module.Krb5LoginModule |
| 4210 | required |
| 4211 | useTicketCache=true |
| 4212 | doNotPrompt=true |
| 4213 | renewTGT=true; |
| 4214 | }; |
| 4215 | ---- |
| 4216 | |
| 4217 | See Java documentation on how to create the krb5.ini file. |
| 4218 | |
| 4219 | Note the `renewTGT` property to make sure the TGT does not expire, |
| 4220 | and `useTicketCache` to use the TGT supplied by the operating system. As |
| 4221 | the whole point of using GSSAPI is to have passwordless authentication |
David Pursehouse | 9246356 | 2013-06-24 10:16:28 +0900 | [diff] [blame] | 4222 | 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] | 4223 | |
| 4224 | On Windows servers the registry key `HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\Kerberos\Parameters` |
| 4225 | must have the DWORD value `allowtgtsessionkey` set to 1 and the account must not |
| 4226 | have local administrator privileges. |
| 4227 | |
Bruce Zu | cd04bbc | 2014-07-25 15:48:09 +0800 | [diff] [blame] | 4228 | [[ldap.useConnectionPooling]]ldap.useConnectionPooling:: |
| 4229 | + |
| 4230 | _(Optional)_ Enable the LDAP connection pooling or not. |
| 4231 | + |
| 4232 | If it is true, the LDAP service provider maintains a pool of (possibly) |
| 4233 | previously used connections and assigns them to a Context instance as |
| 4234 | needed. When a Context instance is done with a connection (closed or |
| 4235 | garbage collected), the connection is returned to the pool for future use. |
| 4236 | + |
| 4237 | For details, see link:http://docs.oracle.com/javase/tutorial/jndi/ldap/pool.html[ |
Marian Harbach | 3425337 | 2019-12-10 18:01:31 +0100 | [diff] [blame] | 4238 | LDAP connection management (Pool),role=external,window=_blank] and link:http://docs.oracle.com/javase/tutorial/jndi/ldap/config.html[ |
| 4239 | LDAP connection management (Configuration),role=external,window=_blank] |
Bruce Zu | cd04bbc | 2014-07-25 15:48:09 +0800 | [diff] [blame] | 4240 | + |
| 4241 | By default, false. |
| 4242 | |
| 4243 | [[ldap.connectTimeout]]ldap.connectTimeout:: |
| 4244 | + |
Saša Živkov | 303701a | 2015-01-19 16:24:44 +0100 | [diff] [blame] | 4245 | _(Optional)_ Timeout period for establishment of an LDAP connection. |
Bruce Zu | cd04bbc | 2014-07-25 15:48:09 +0800 | [diff] [blame] | 4246 | + |
| 4247 | The value is in the usual time-unit format like "1 s", "100 ms", |
| 4248 | etc... |
| 4249 | + |
| 4250 | By default there is no timeout and Gerrit will wait indefinitely. |
| 4251 | |
Saša Živkov | 5049f51 | 2015-01-19 17:04:43 +0100 | [diff] [blame] | 4252 | [[ldap-connection-pooling]] |
| 4253 | ==== LDAP Connection Pooling |
| 4254 | Once LDAP connection pooling is enabled by setting the link:#ldap.useConnectionPooling[ |
| 4255 | ldap.useConnectionPooling] configuration property to `true`, the connection pool |
| 4256 | can be configured using JVM system properties as explained in the |
| 4257 | link:http://docs.oracle.com/javase/7/docs/technotes/guides/jndi/jndi-ldap.html#POOL[ |
Marian Harbach | 3425337 | 2019-12-10 18:01:31 +0100 | [diff] [blame] | 4258 | Java SE Documentation,role=external,window=_blank]. |
Bruce Zu | cd04bbc | 2014-07-25 15:48:09 +0800 | [diff] [blame] | 4259 | |
Saša Živkov | 5049f51 | 2015-01-19 17:04:43 +0100 | [diff] [blame] | 4260 | For standalone Gerrit (running with the embedded Jetty), JVM system properties |
| 4261 | are specified in the link:#container[container section]: |
Bruce Zu | cd04bbc | 2014-07-25 15:48:09 +0800 | [diff] [blame] | 4262 | |
Saša Živkov | 5049f51 | 2015-01-19 17:04:43 +0100 | [diff] [blame] | 4263 | ---- |
| 4264 | javaOptions = -Dcom.sun.jndi.ldap.connect.pool.maxsize=20 |
| 4265 | javaOptions = -Dcom.sun.jndi.ldap.connect.pool.prefsize=10 |
| 4266 | javaOptions = -Dcom.sun.jndi.ldap.connect.pool.timeout=300000 |
| 4267 | ---- |
Bruce Zu | cd04bbc | 2014-07-25 15:48:09 +0800 | [diff] [blame] | 4268 | |
Saša Živkov | ca7a67e | 2015-12-01 14:25:10 +0100 | [diff] [blame] | 4269 | [[lfs]] |
| 4270 | === Section lfs |
| 4271 | |
| 4272 | [[lfs.plugin]]lfs.plugin:: |
| 4273 | + |
David Pursehouse | 2463c54 | 2016-08-02 16:04:58 +0900 | [diff] [blame] | 4274 | The name of a plugin which serves the |
| 4275 | link:https://github.com/github/git-lfs/blob/master/docs/api/v1/http-v1-batch.md[ |
Marian Harbach | 3425337 | 2019-12-10 18:01:31 +0100 | [diff] [blame] | 4276 | LFS protocol,role=external,window=_blank] on the `<project-name>/info/lfs/objects/batch` endpoint. When |
David Pursehouse | 2463c54 | 2016-08-02 16:04:58 +0900 | [diff] [blame] | 4277 | not configured Gerrit will respond with `501 Not Implemented` on LFS protocol |
| 4278 | requests. |
Saša Živkov | ca7a67e | 2015-12-01 14:25:10 +0100 | [diff] [blame] | 4279 | + |
| 4280 | By default unset. |
| 4281 | |
Gustaf Lundh | aef9012 | 2015-04-27 16:48:19 +0200 | [diff] [blame] | 4282 | [[log]] |
| 4283 | === Section log |
| 4284 | |
| 4285 | [[log.jsonLogging]]log.jsonLogging:: |
| 4286 | + |
Antoine Musso | 9ed4b4f | 2020-11-17 16:52:35 +0100 | [diff] [blame] | 4287 | If set to true, enables error, ssh and http logging in JSON format (file names: |
| 4288 | `logs/error_log.json`, `logs/sshd_log.json` and `logs/httpd_log.json`). |
| 4289 | + |
| 4290 | The option only applies to Gerrit built-in loggers. It is ignored when a log4j |
| 4291 | configuration is specified via |
| 4292 | link:#container.javaOptions[container.javaOptions], for example |
| 4293 | `-Dlog4j.configuration=file://etc/log4j.properties`. |
Gustaf Lundh | aef9012 | 2015-04-27 16:48:19 +0200 | [diff] [blame] | 4294 | + |
| 4295 | Defaults to false. |
| 4296 | |
| 4297 | [[log.textLogging]]log.textLogging:: |
| 4298 | + |
| 4299 | If set to true, enables error logging in regular plain text format. Can only be disabled |
| 4300 | if `jsonLogging` is enabled. |
| 4301 | + |
Antoine Musso | 9ed4b4f | 2020-11-17 16:52:35 +0100 | [diff] [blame] | 4302 | The option only applies to Gerrit built-in loggers. It is ignored when a log4j |
| 4303 | configuration is specified via |
| 4304 | link:#container.javaOptions[container.javaOptions], for example |
| 4305 | `-Dlog4j.configuration=file://etc/log4j.properties`. |
| 4306 | + |
Gustaf Lundh | aef9012 | 2015-04-27 16:48:19 +0200 | [diff] [blame] | 4307 | Defaults to true. |
| 4308 | |
David Pursehouse | 2281fef | 2017-11-21 21:27:17 +0900 | [diff] [blame] | 4309 | [[log.compress]]log.compress:: |
| 4310 | + |
| 4311 | If set to true, log files are compressed at server startup and then daily at 11pm |
| 4312 | (in the server's local time zone). |
| 4313 | + |
| 4314 | Defaults to true. |
| 4315 | |
David Pursehouse | 633fff3 | 2017-11-21 22:08:12 +0900 | [diff] [blame] | 4316 | [[log.rotate]]log.rotate:: |
| 4317 | + |
| 4318 | If set to true, log files are rotated daily at midnight (GMT). |
| 4319 | + |
| 4320 | Defaults to true. |
| 4321 | |
Luca Milanesio | 4015d34 | 2022-07-13 01:26:08 +0100 | [diff] [blame] | 4322 | [[metrics]] |
| 4323 | === Section metrics |
| 4324 | |
| 4325 | [[metrics.reservoir]]metrics.reservoir:: |
| 4326 | + |
| 4327 | The type of data reservoir used by the metrics system to calculate the percentile |
| 4328 | values for timers and histograms. |
| 4329 | It can be set to one of the following values: |
| 4330 | + |
| 4331 | * ExponentiallyDecaying: An exponentially-decaying random reservoir based on |
| 4332 | Cormode et al's forward-decaying priority reservoir sampling method to produce |
| 4333 | a statistically representative sampling reservoir, exponentially biased towards |
| 4334 | newer entries. |
| 4335 | * SlidingTimeWindowArray: A sliding window that stores only the measurements made |
| 4336 | in the last window using chunks of 512 samples. |
| 4337 | * SlidingTimeWindow: A sliding window that stores only the measurements made in |
| 4338 | the last window using a skip list. |
| 4339 | * SlidingWindow: A sliding window that stores only the last measurements. |
| 4340 | * Uniform: A random sampling reservoir that uses Vitter's Algorithm R to produce |
| 4341 | a statistically representative sample. |
| 4342 | + |
| 4343 | Defaults to ExponentiallyDecaying. |
| 4344 | |
| 4345 | [[metrics.ExponentiallyDecaying.alpha]]metrics.ExponentiallyDecaying.alpha:: |
| 4346 | + |
| 4347 | The exponential decay factor; the higher this is, the more biased the reservoir |
| 4348 | will be towards newer values. |
| 4349 | |
| 4350 | [[metrics.reservoirType.size]]metrics.<reservoirType>.size:: |
| 4351 | + |
| 4352 | The number of samples to keep in the reservoir. Applies to all reservoir types |
| 4353 | except the sliding time-based ones. |
| 4354 | + |
| 4355 | Defaults to 1028. |
| 4356 | |
| 4357 | [[metrics.reservoirType.window]]metrics.<reservoirType>.window:: |
| 4358 | + |
| 4359 | The window of time for keeping data in the reservoir. It only applies to sliding |
| 4360 | time-based reservoir types. |
| 4361 | |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 4362 | [[mimetype]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4363 | === Section mimetype |
Shawn O. Pearce | 01cb1190 | 2009-07-15 08:19:01 -0700 | [diff] [blame] | 4364 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 4365 | [[mimetype.name.safe]]mimetype.<name>.safe:: |
Shawn O. Pearce | 01cb1190 | 2009-07-15 08:19:01 -0700 | [diff] [blame] | 4366 | + |
| 4367 | If set to true, files with the MIME type `<name>` will be sent as |
| 4368 | direct downloads to the user's browser, rather than being wrapped up |
| 4369 | inside of zipped archives. The type name may be a complete type |
Jonathan Nieder | 5758f18 | 2015-03-30 11:28:55 -0700 | [diff] [blame] | 4370 | name, e.g. `image/gif`, a generic media type, e.g. `+image/*+`, |
| 4371 | or the wildcard `+*/*+` to match all types. |
Shawn O. Pearce | 01cb1190 | 2009-07-15 08:19:01 -0700 | [diff] [blame] | 4372 | + |
| 4373 | By default, false for all MIME types. |
| 4374 | |
| 4375 | Common examples: |
Shawn O. Pearce | 9d342a4 | 2009-12-16 15:49:05 -0800 | [diff] [blame] | 4376 | ---- |
| 4377 | [mimetype "image/*"] |
| 4378 | safe = true |
| 4379 | |
| 4380 | [mimetype "application/pdf"] |
| 4381 | safe = true |
| 4382 | |
| 4383 | [mimetype "application/msword"] |
| 4384 | safe = true |
| 4385 | |
| 4386 | [mimetype "application/vnd.ms-excel"] |
| 4387 | safe = true |
| 4388 | ---- |
Shawn O. Pearce | 01cb1190 | 2009-07-15 08:19:01 -0700 | [diff] [blame] | 4389 | |
Dave Borowitz | bc31491 | 2017-03-21 14:23:35 -0700 | [diff] [blame] | 4390 | [[note-db]] |
| 4391 | === Section noteDb |
| 4392 | |
Dave Borowitz | ada289c | 2018-12-18 13:24:14 -0800 | [diff] [blame] | 4393 | NoteDb is the Git-based database storage backend for Gerrit. For more |
| 4394 | information, including how to migrate data from an older Gerrit version, see the |
| 4395 | link:note-db.html[documentation]. |
Dave Borowitz | bc31491 | 2017-03-21 14:23:35 -0700 | [diff] [blame] | 4396 | |
Edwin Kempin | 5be9c31 | 2017-07-07 10:40:55 +0200 | [diff] [blame] | 4397 | [[notedb.accounts.sequenceBatchSize]]notedb.accounts.sequenceBatchSize:: |
| 4398 | + |
Edwin Kempin | 311d570 | 2017-07-28 15:10:24 +0200 | [diff] [blame] | 4399 | The next available account sequence number is stored as UTF-8 text in a |
| 4400 | 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] | 4401 | repository. Multiple processes share the same sequence by incrementing |
| 4402 | the counter using normal git ref updates. To amortize the cost of these |
| 4403 | ref updates, processes increment the counter by a larger number and |
| 4404 | hand out numbers from that range in memory until they run out. This |
| 4405 | configuration parameter controls the size of the account ID batch that |
| 4406 | each process retrieves at once. |
| 4407 | + |
Edwin Kempin | 5be9c31 | 2017-07-07 10:40:55 +0200 | [diff] [blame] | 4408 | By default, 1. |
| 4409 | |
David Pursehouse | 05eaefe | 2020-06-02 15:42:46 +0900 | [diff] [blame] | 4410 | [[notedb.changes.sequenceBatchSize]]notedb.changes.sequenceBatchSize:: |
| 4411 | + |
| 4412 | The next available change sequence number is stored as UTF-8 text in a |
| 4413 | blob pointed to by the `refs/sequences/changes` ref in the `All-Projects` |
| 4414 | repository. Multiple processes share the same sequence by incrementing |
| 4415 | the counter using normal git ref updates. To amortize the cost of these |
| 4416 | ref updates, processes increment the counter by a larger number and |
| 4417 | hand out numbers from that range in memory until they run out. This |
| 4418 | configuration parameter controls the size of the change ID batch that |
| 4419 | each process retrieves at once. |
| 4420 | + |
| 4421 | By default, 20. |
Han-Wen Nienhuys | e5ca19c | 2017-11-08 13:33:33 +0100 | [diff] [blame] | 4422 | |
Michael Ochmann | 6981326 | 2016-01-27 17:53:55 +0100 | [diff] [blame] | 4423 | [[oauth]] |
| 4424 | === Section oauth |
| 4425 | |
| 4426 | OAuth integration is only enabled if `auth.type` is set to `OAUTH`. See |
| 4427 | link:#auth.type[above] for a detailed description of the `auth.type` settings |
| 4428 | and their implications. |
| 4429 | |
| 4430 | By default, contact information, like the full name and email address, |
| 4431 | is retrieved from the selected OAuth provider when a user account is created, |
| 4432 | or when a user requests to reload that information in the settings UI. If |
| 4433 | that is not supported by the OAuth provider, users can be allowed to edit |
| 4434 | their contact information manually. |
| 4435 | |
| 4436 | [[oauth.allowEditFullName]]oauth.allowEditFullName:: |
| 4437 | + |
| 4438 | If true, the full name can be edited in the contact information. |
| 4439 | + |
| 4440 | Default is false. |
| 4441 | |
| 4442 | [[oauth.allowRegisterNewEmail]]oauth.allowRegisterNewEmail:: |
| 4443 | + |
| 4444 | If true, additional email addresses can be registered in the contact |
| 4445 | information. |
| 4446 | + |
| 4447 | Default is false. |
Shawn O. Pearce | 5f11b29 | 2010-08-05 17:57:35 -0700 | [diff] [blame] | 4448 | |
Zac Livingston | 70a1610 | 2018-11-20 15:07:34 -0700 | [diff] [blame] | 4449 | [[operator-alias]] |
| 4450 | === Section operator alias |
| 4451 | |
| 4452 | Operator aliasing allows global aliases to be defined for query operators. |
| 4453 | Currently only change queries are supported. The alias name is the git |
| 4454 | config key name, and the operator being aliased is the git config value. |
| 4455 | |
| 4456 | For example: |
| 4457 | |
| 4458 | ---- |
| 4459 | [operator-alias "change"] |
| 4460 | oldage = age |
| 4461 | number = change |
| 4462 | ---- |
| 4463 | |
| 4464 | This section is particularly useful to alias operator names which may be |
| 4465 | long and clunky because they include a plugin name in them to a shorter |
| 4466 | name without the plugin name. |
| 4467 | |
| 4468 | Aliases are resolved dynamically at invocation time to any currently |
| 4469 | loaded versions of plugins. If the alias points to an operator provided |
| 4470 | by a plugin which is not currently loaded, or the plugin does not define |
| 4471 | the operator, then "unsupported operator" is returned to the user. |
| 4472 | |
| 4473 | Aliases will override existing operators. In the case of multiple aliases |
| 4474 | with the same name, the last one defined will be used. |
| 4475 | |
| 4476 | When the target of an alias doesn't exist, the operator with the name |
| 4477 | of the alias will be used (if present). This enables an admin to config |
| 4478 | the system to override a core operator with an operator provided by a |
| 4479 | plugin when present and otherwise fall back to the operator provided by |
| 4480 | core. |
| 4481 | |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 4482 | [[pack]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4483 | === Section pack |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 4484 | |
Shawn O. Pearce | 5f11b29 | 2010-08-05 17:57:35 -0700 | [diff] [blame] | 4485 | Global settings controlling how Gerrit Code Review creates pack |
| 4486 | streams for Git clients running clone, fetch, or pull. Most of these |
| 4487 | variables are per-client request, and thus should be carefully set |
| 4488 | given the expected concurrent request load and available CPU and |
| 4489 | memory resources. |
| 4490 | |
| 4491 | [[pack.deltacompression]]pack.deltacompression:: |
| 4492 | + |
| 4493 | If true, delta compression between objects is enabled. This may |
| 4494 | result in a smaller overall transfer for the client, but requires |
| 4495 | more server memory and CPU time. |
| 4496 | + |
| 4497 | False (off) by default, matching Gerrit Code Review 2.1.4. |
| 4498 | |
| 4499 | [[pack.threads]]pack.threads:: |
| 4500 | + |
| 4501 | Maximum number of threads to use for delta compression (if enabled). |
| 4502 | This is per-client request. If set to 0 then the number of CPUs is |
| 4503 | auto-detected and one thread per CPU is used, per client request. |
| 4504 | + |
| 4505 | By default, 1. |
| 4506 | |
| 4507 | |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 4508 | [[plugins]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4509 | === Section plugins |
Shawn O. Pearce | 5ad16ea | 2012-05-09 14:24:25 -0700 | [diff] [blame] | 4510 | |
| 4511 | [[plugins.checkFrequency]]plugins.checkFrequency:: |
| 4512 | + |
| 4513 | How often plugins should be examined for new plugins to load, removed |
| 4514 | plugins to be unloaded, or updated plugins to be reloaded. Values can |
| 4515 | be specified using standard time unit abbreviations ('ms', 'sec', |
| 4516 | 'min', etc.). |
| 4517 | + |
| 4518 | If set to 0, automatic plugin reloading is disabled. Administrators |
Christian Aistleitner | 8ce1a4e | 2015-06-05 01:54:15 +0200 | [diff] [blame] | 4519 | 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] | 4520 | + |
| 4521 | Default is 1 minute. |
| 4522 | |
Shawn Pearce | fd03350 | 2014-02-14 16:42:35 -0800 | [diff] [blame] | 4523 | [[plugins.allowRemoteAdmin]]plugins.allowRemoteAdmin:: |
| 4524 | + |
| 4525 | Enable remote installation, enable and disable of plugins over HTTP |
| 4526 | and SSH. If set to true Administrators can install new plugins |
| 4527 | remotely, or disable existing plugins. Defaults to false. |
| 4528 | |
Saša Živkov | 350fc68 | 2019-05-13 14:13:51 +0200 | [diff] [blame] | 4529 | [[plugins.mandatory]]plugins.mandatory:: |
| 4530 | + |
| 4531 | 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] | 4532 | Gerrit will fail to start. |
| 4533 | + |
| 4534 | Disabling and restarting of a mandatory plugin is rejected, but reloading |
| 4535 | of a mandatory plugin is still possible. |
Saša Živkov | 350fc68 | 2019-05-13 14:13:51 +0200 | [diff] [blame] | 4536 | |
Dariusz Luksza | 98f2352 | 2015-03-11 11:41:41 +0100 | [diff] [blame] | 4537 | [[plugins.jsLoadTimeout]]plugins.jsLoadTimeout:: |
| 4538 | + |
| 4539 | Set the timeout value for loading JavaScript plugins in Gerrit UI. |
| 4540 | Values can be specified using standard time unit abbreviations ('ms', |
| 4541 | 'sec', 'min', etc.). |
| 4542 | + |
| 4543 | Default is 5 seconds. Negative values will be converted to 0. |
Shawn O. Pearce | 5ad16ea | 2012-05-09 14:24:25 -0700 | [diff] [blame] | 4544 | |
Dmitrii Filippov | 2ccf507 | 2022-10-25 21:37:39 +0200 | [diff] [blame] | 4545 | [[plugins.transitionalPushOptions]]plugins.transitionalPushOptions:: |
| 4546 | + |
| 4547 | Additional push options which should be accepted by gerrit as valid |
| 4548 | options even if they are not registered by any plugin(e.g. "myplugin~foo"). |
| 4549 | + |
| 4550 | This config can be used when gerrit migrates from a deprecated plugin to the new one. The new plugin |
| 4551 | can (temporary) accept push options of the old plugin without registering such options. |
| 4552 | |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 4553 | [[receive]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4554 | === Section receive |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 4555 | |
Dave Borowitz | ff24389 | 2015-08-31 15:35:28 -0400 | [diff] [blame] | 4556 | This section is used to configure behavior of the 'receive-pack' |
| 4557 | handler, which responds to 'git push' requests. |
lincoln | 2be1160 | 2010-07-05 10:53:25 -0300 | [diff] [blame] | 4558 | |
Dave Borowitz | ff24389 | 2015-08-31 15:35:28 -0400 | [diff] [blame] | 4559 | [[receive.allowGroup]]receive.allowGroup:: |
Dave Borowitz | 532342bf | 2015-06-18 20:28:22 -0400 | [diff] [blame] | 4560 | + |
Dave Borowitz | ff24389 | 2015-08-31 15:35:28 -0400 | [diff] [blame] | 4561 | Name of the groups of users that are allowed to execute |
| 4562 | 'receive-pack' on the server. One or more groups can be set. |
Dave Borowitz | 532342bf | 2015-06-18 20:28:22 -0400 | [diff] [blame] | 4563 | + |
Dave Borowitz | ff24389 | 2015-08-31 15:35:28 -0400 | [diff] [blame] | 4564 | If no groups are added, any user will be allowed to execute |
| 4565 | 'receive-pack' on the server. |
Dave Borowitz | 532342bf | 2015-06-18 20:28:22 -0400 | [diff] [blame] | 4566 | |
| 4567 | [[receive.certNonceSeed]]receive.certNonceSeed:: |
| 4568 | + |
| 4569 | If set to a non-empty value and server-side signed push validation is |
| 4570 | link:#receive.enableSignedPush[enabled], use this value as the seed to |
| 4571 | the HMAC SHA-1 nonce generator. If unset, a 64-byte random seed will be |
| 4572 | generated at server startup. |
| 4573 | + |
| 4574 | As this is used as the seed of a cryptographic algorithm, it is |
| 4575 | recommended to be placed in link:#secure-config[`secure.config`]. |
| 4576 | + |
| 4577 | Defaults to unset. |
| 4578 | |
| 4579 | [[receive.certNonceSlop]]receive.certNonceSlop:: |
| 4580 | + |
| 4581 | When validating the nonce passed as part of the signed push protocol, |
| 4582 | accept valid nonces up to this many seconds old. This allows |
| 4583 | certificate verification to work over HTTP where there is a lag between |
| 4584 | the HTTP response providing the nonce to sign and the next request |
| 4585 | containing the signed nonce. This can be significant on large |
| 4586 | repositories, since the lag also includes the time to count objects on |
| 4587 | the client. |
| 4588 | + |
| 4589 | Default is 5 minutes. |
| 4590 | |
Shawn Pearce | 5cb31bf | 2013-02-27 16:20:26 -0800 | [diff] [blame] | 4591 | [[receive.checkMagicRefs]]receive.checkMagicRefs:: |
| 4592 | + |
| 4593 | If true, Gerrit will verify the destination repository has |
David Ostrovsky | 6ffb7d9 | 2017-02-13 21:16:58 +0100 | [diff] [blame] | 4594 | no references under the magic 'refs/for' branch namespace. Names under |
| 4595 | these locations confuse clients when trying to upload code reviews so |
| 4596 | Gerrit requires them to be empty. |
Shawn Pearce | 5cb31bf | 2013-02-27 16:20:26 -0800 | [diff] [blame] | 4597 | + |
| 4598 | If false Gerrit skips the sanity check and assumes administrators |
| 4599 | have ensured the repository does not contain any magic references. |
| 4600 | Setting to false to skip the check can decrease latency during push. |
| 4601 | + |
| 4602 | Default is true. |
| 4603 | |
Gustaf Lundh | fd5fcf4 | 2018-06-25 16:15:21 +0200 | [diff] [blame] | 4604 | [[receive.allowProjectOwnersToChangeParent]]receive.allowProjectOwnersToChangeParent:: |
| 4605 | + |
| 4606 | If true, Gerrit will allow project owners to change the parent of a project. |
| 4607 | + |
| 4608 | By default only Gerrit administrators are allowed to change the parent |
| 4609 | of a project. By allowing project owners to change parents, it may |
| 4610 | allow the owner to circumvent certain enforced rules (like important |
| 4611 | BLOCK rules). |
| 4612 | + |
| 4613 | Default is false. |
Rikard Almgren | e9221be | 2018-09-18 11:12:03 +0200 | [diff] [blame] | 4614 | + |
| 4615 | This value supports configuration reloads: |
| 4616 | link:cmd-reload-config.html[reload-config] |
Gustaf Lundh | fd5fcf4 | 2018-06-25 16:15:21 +0200 | [diff] [blame] | 4617 | |
Gustaf Lundh | 9062fd6 | 2013-02-14 17:23:11 +0100 | [diff] [blame] | 4618 | [[receive.checkReferencedObjectsAreReachable]]receive.checkReferencedObjectsAreReachable:: |
| 4619 | + |
| 4620 | If set to true, Gerrit will validate that all referenced objects that |
| 4621 | are not included in the received pack are reachable by the user. |
| 4622 | + |
| 4623 | Carrying out this check on gits with many refs and commits can be a |
| 4624 | very CPU-heavy operation. For non public Gerrit-servers this check may |
| 4625 | be overkill. |
| 4626 | + |
Han-Wen Nienhuys | 37a1cab | 2021-04-01 12:46:00 +0200 | [diff] [blame] | 4627 | Only disable this check if you trust the clients not to forge SHA-1 |
Gustaf Lundh | 9062fd6 | 2013-02-14 17:23:11 +0100 | [diff] [blame] | 4628 | references to access commits intended to be hidden from the user. |
| 4629 | + |
| 4630 | Default is true. |
| 4631 | |
Patrick Hiesel | 24653be | 2019-10-22 09:47:32 +0200 | [diff] [blame] | 4632 | [[receive.enableInMemoryRefCache]]receive.enableInMemoryRefCache:: |
| 4633 | + |
| 4634 | If true, Gerrit will cache all refs advertised during push in memory and |
| 4635 | base later receive operations on that cache. |
| 4636 | + |
| 4637 | Turning this cache off is considered experimental. |
| 4638 | + |
| 4639 | This cache provides value when the ref database is slow and/or does not |
| 4640 | offer an inverse lookup of object ID to ref name. When RefTable is used, |
| 4641 | this cache can be turned off (experimental) to get speed improvements. |
| 4642 | + |
| 4643 | Default is true. |
| 4644 | |
Dave Borowitz | ff24389 | 2015-08-31 15:35:28 -0400 | [diff] [blame] | 4645 | [[receive.enableSignedPush]]receive.enableSignedPush:: |
lincoln | 2be1160 | 2010-07-05 10:53:25 -0300 | [diff] [blame] | 4646 | + |
Dave Borowitz | ff24389 | 2015-08-31 15:35:28 -0400 | [diff] [blame] | 4647 | If true, server-side signed push validation is enabled. |
lincoln | 2be1160 | 2010-07-05 10:53:25 -0300 | [diff] [blame] | 4648 | + |
Dave Borowitz | ff24389 | 2015-08-31 15:35:28 -0400 | [diff] [blame] | 4649 | When a client pushes with `git push --signed`, this ensures that the |
| 4650 | 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] | 4651 | the `refs/meta/gpg-keys` branch of `All-Users`. |
Dave Borowitz | ff24389 | 2015-08-31 15:35:28 -0400 | [diff] [blame] | 4652 | + |
| 4653 | Defaults to false. |
| 4654 | |
| 4655 | [[receive.maxBatchChanges]]receive.maxBatchChanges:: |
| 4656 | + |
| 4657 | The maximum number of changes that Gerrit allows to be pushed |
| 4658 | in a batch for review. When this number is exceeded Gerrit rejects |
| 4659 | the push with an error message. |
| 4660 | + |
| 4661 | May be overridden for certain groups by specifying a limit in the |
| 4662 | link:access-control.html#capability_batchChangesLimit['Batch Changes Limit'] |
| 4663 | global capability. |
| 4664 | + |
| 4665 | This setting can be used to prevent users from uploading large |
| 4666 | number of changes for review by mistake. |
| 4667 | + |
| 4668 | Default is zero, no limit. |
lincoln | 2be1160 | 2010-07-05 10:53:25 -0300 | [diff] [blame] | 4669 | |
Dave Borowitz | 7854219 | 2017-08-31 10:45:47 -0400 | [diff] [blame] | 4670 | [[receive.maxBatchCommits]]receive.maxBatchCommits:: |
| 4671 | + |
| 4672 | The maximum number of commits that Gerrit allows to be pushed in a batch |
| 4673 | directly to a branch when link:user-upload.html#bypass_review[bypassing review]. |
| 4674 | This limit can be bypassed if a user link:user-upload.html#skip_validation[skips |
| 4675 | validation]. |
| 4676 | + |
| 4677 | Default is 10000. |
| 4678 | |
Sasa Zivkov | 59d89c3 | 2011-11-18 15:32:35 +0100 | [diff] [blame] | 4679 | [[receive.maxObjectSizeLimit]]receive.maxObjectSizeLimit:: |
| 4680 | + |
| 4681 | Maximum allowed Git object size that 'receive-pack' will accept. |
| 4682 | If an object is larger than the given size the pack-parsing will abort |
| 4683 | and the push operation will fail. If set to zero then there is no |
| 4684 | limit. |
| 4685 | + |
David Pursehouse | 221d4f6 | 2012-06-08 17:38:08 +0900 | [diff] [blame] | 4686 | Gerrit administrators can use this setting to prevent developers |
Sasa Zivkov | 59d89c3 | 2011-11-18 15:32:35 +0100 | [diff] [blame] | 4687 | from pushing objects which are too large to Gerrit. |
| 4688 | + |
Fredrik Luthander | a3cf354 | 2012-07-04 16:55:35 -0700 | [diff] [blame] | 4689 | This setting can also be set in the `project.config` |
David Pursehouse | 2e54868 | 2018-08-01 15:12:47 +0200 | [diff] [blame] | 4690 | (link:config-project-config.html[receive.maxObjectSizeLimit]) in order |
Fredrik Luthander | a3cf354 | 2012-07-04 16:55:35 -0700 | [diff] [blame] | 4691 | to further reduce the global setting. The project specific setting is |
| 4692 | only honored when it further reduces the global limit. |
Sasa Zivkov | 5a708a8 | 2013-06-28 17:07:55 +0200 | [diff] [blame] | 4693 | + |
Sasa Zivkov | 59d89c3 | 2011-11-18 15:32:35 +0100 | [diff] [blame] | 4694 | Default is zero. |
| 4695 | + |
| 4696 | Common unit suffixes of 'k', 'm', or 'g' are supported. |
| 4697 | |
David Pursehouse | 3f9c740 | 2018-09-05 18:43:03 +0900 | [diff] [blame] | 4698 | [[receive.inheritProjectMaxObjectSizeLimit]]receive.inheritProjectMaxObjectSizeLimit:: |
| 4699 | + |
| 4700 | Controls whether the project-level link:config-project-config.html[`receive.maxObjectSizeLimit`] |
| 4701 | value is inherited from the parent project. When `true`, the value is |
| 4702 | inherited, otherwise it is not inherited. |
| 4703 | + |
| 4704 | Default is false, the value is not inherited. |
| 4705 | |
Dave Borowitz | 1bb4949 | 2015-08-31 15:36:59 -0400 | [diff] [blame] | 4706 | [[receive.maxTrustDepth]]receive.maxTrustDepth:: |
| 4707 | + |
| 4708 | If signed push validation is link:#receive.enableSignedPush[enabled], |
| 4709 | set to the maximum depth to search when checking if a key is |
| 4710 | link:#receive.trustedKey[trusted]. |
| 4711 | + |
| 4712 | Default is 0, meaning only explicitly trusted keys are allowed. |
| 4713 | |
Dave Borowitz | 234734a | 2012-03-01 14:22:29 -0800 | [diff] [blame] | 4714 | [[receive.threadPoolSize]]receive.threadPoolSize:: |
| 4715 | + |
| 4716 | Maximum size of the thread pool in which the change data in received packs is |
| 4717 | processed. |
| 4718 | + |
| 4719 | Defaults to the number of available CPUs according to the Java runtime. |
| 4720 | |
Dave Borowitz | 1c40136 | 2012-03-02 17:39:17 -0800 | [diff] [blame] | 4721 | [[receive.timeout]]receive.timeout:: |
| 4722 | + |
Shawn O. Pearce | 00dd12d | 2012-03-12 15:52:11 -0700 | [diff] [blame] | 4723 | Overall timeout on the time taken to process the change data in |
| 4724 | received packs. Only includes the time processing Gerrit changes |
| 4725 | and updating references, not the time to index the pack. Values can |
| 4726 | be specified using standard time unit abbreviations ('ms', 'sec', |
| 4727 | 'min', etc.). |
Dave Borowitz | 1c40136 | 2012-03-02 17:39:17 -0800 | [diff] [blame] | 4728 | + |
Edwin Kempin | 6635412 | 2021-08-05 11:20:27 +0200 | [diff] [blame] | 4729 | After the timeout is exceeded the task processing the receive gets a |
| 4730 | cancellation signal that allows the tast to finish gracefully. |
| 4731 | link:#receive.cancellationTimeout[receive.cancellationTimeout] |
| 4732 | defines how much time the task has to react to the cancellation signal |
| 4733 | before it is focefully cancelled. |
| 4734 | + |
Edwin Kempin | 77bbd8a | 2021-07-29 10:36:42 +0200 | [diff] [blame] | 4735 | The receive timeout cannot be overriden by setting a higher |
Fabio Ponciroli | 03f23d6 | 2021-10-20 09:15:48 +0200 | [diff] [blame] | 4736 | link:user-upload.html#deadline[deadline] on the git push request. |
Edwin Kempin | 77bbd8a | 2021-07-29 10:36:42 +0200 | [diff] [blame] | 4737 | + |
Dariusz Luksza | de482b0 | 2015-11-09 18:25:04 +0100 | [diff] [blame] | 4738 | Default is 4 minutes. If no unit is specified, milliseconds |
Shawn O. Pearce | 00dd12d | 2012-03-12 15:52:11 -0700 | [diff] [blame] | 4739 | is assumed. |
Dave Borowitz | 1c40136 | 2012-03-02 17:39:17 -0800 | [diff] [blame] | 4740 | |
Edwin Kempin | 6635412 | 2021-08-05 11:20:27 +0200 | [diff] [blame] | 4741 | [[receive.cancellationTimeout]]receive.cancellationTimeout:: |
| 4742 | + |
| 4743 | Defines the time that a receive task has to react to a cancellation |
| 4744 | signal and finish gracefully after link:#receive.timeout[receive.timeout] |
| 4745 | is exceeded. If the receive task is still not terminated after the |
| 4746 | cancellation timeout is exceeded the task is forcefully cancelled. |
| 4747 | Values can be specified using standard time unit abbreviations ('ms', |
| 4748 | 'sec', 'min', etc.). |
| 4749 | + |
| 4750 | Default is 5 seconds. If no unit is specified, milliseconds is assumed. |
| 4751 | |
Dave Borowitz | 1bb4949 | 2015-08-31 15:36:59 -0400 | [diff] [blame] | 4752 | [[receive.trustedKey]]receive.trustedKey:: |
| 4753 | + |
| 4754 | List of GPG key fingerprints that should be considered trust roots by |
| 4755 | the server when signed push validation is |
| 4756 | link:#receive.enableSignedPush[enabled]. A key is trusted by the server |
| 4757 | if it is either in this list, or a path of trust signatures leads from |
| 4758 | the key to a configured trust root. The maximum length of the path is |
| 4759 | determined by link:#receive.maxTrustDepth[`receive.maxTrustDepth`]. |
| 4760 | + |
| 4761 | Key fingerprints can be displayed with `gpg --list-keys |
| 4762 | --with-fingerprint`. |
| 4763 | + |
| 4764 | Trust signatures can be added to a key using the `tsign` command to |
| 4765 | link:https://www.gnupg.org/documentation/manuals/gnupg/OpenPGP-Key-Management.html[ |
Marian Harbach | 3425337 | 2019-12-10 18:01:31 +0100 | [diff] [blame] | 4766 | `gpg --edit-key`,role=external,window=_blank], after which the signed key should be re-uploaded. |
Dave Borowitz | 1bb4949 | 2015-08-31 15:36:59 -0400 | [diff] [blame] | 4767 | + |
| 4768 | If no keys are specified, web-of-trust checks are disabled. This is the |
| 4769 | default behavior. |
| 4770 | |
Edwin Kempin | 423c226 | 2023-06-30 08:33:04 +0000 | [diff] [blame] | 4771 | [[receive.enableChangeIdLinkFooters]]receive.enableChangeIdLinkFooters:: |
| 4772 | + |
| 4773 | Enables a `Link` footer to be used as an alternative change ID footer. |
| 4774 | + |
| 4775 | In some projects it may be desirable for the footer to contain a link to |
| 4776 | the Gerrit review page so that it is convenient to access the review |
| 4777 | page starting from the commit message. The `Link` footer is a standard |
| 4778 | footer used for inserting links in the commit message (e.g. used by the |
| 4779 | Linux kernel). |
| 4780 | + |
| 4781 | This option makes Gerrit interoperate well with `Link` footers. If |
| 4782 | change ID `Link` footers are enabled Gerrit recognizes footers of the |
| 4783 | form: |
| 4784 | + |
| 4785 | ---- |
| 4786 | Link: https://<host>/id/<change-ID> |
| 4787 | ---- |
| 4788 | + |
| 4789 | Example: |
| 4790 | ---- |
| 4791 | Link: https://gerrit-review.googlesource.com/id/I78e884a944cedb5144f661a057e4829c8f84e933 |
| 4792 | ---- |
| 4793 | + |
| 4794 | For Gerrit to recognize the change ID, the part of the URL before the |
| 4795 | '/id/' part must match with the link:#gerrit.canonicalWebUrl[canonical |
| 4796 | web URL]. |
| 4797 | + |
| 4798 | Default is `true`. |
| 4799 | |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 4800 | [[repository]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4801 | === Section repository |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 4802 | |
Hugo Josefson | 072b470 | 2010-04-21 19:27:11 +0200 | [diff] [blame] | 4803 | Repositories in this sense are the same as projects. |
| 4804 | |
Shawn O. Pearce | 897d921 | 2011-06-16 16:59:59 -0700 | [diff] [blame] | 4805 | In the following example configuration `Registered Users` is set |
| 4806 | to be the default owner of new projects. |
Hugo Josefson | 072b470 | 2010-04-21 19:27:11 +0200 | [diff] [blame] | 4807 | |
| 4808 | ---- |
| 4809 | [repository "*"] |
Hugo Josefson | 072b470 | 2010-04-21 19:27:11 +0200 | [diff] [blame] | 4810 | ownerGroup = Registered Users |
| 4811 | ---- |
| 4812 | |
Hugo Arès | 7d2b942 | 2014-11-25 15:33:42 -0500 | [diff] [blame] | 4813 | The only matching patterns supported are exact match or wildcard matching which |
| 4814 | can be specified by ending the name with a `*`. If a project matches more than one |
| 4815 | repository configuration, then the configuration from the more precise match |
| 4816 | will be used. In the following example, the default submit type for a project |
| 4817 | named `project/plugins/a` would be `CHERRY_PICK`. |
| 4818 | |
| 4819 | ---- |
| 4820 | [repository "project/*"] |
| 4821 | defaultSubmitType = MERGE_IF_NECESSARY |
| 4822 | [repository "project/plugins/*"] |
| 4823 | defaultSubmitType = CHERRY_PICK |
| 4824 | ---- |
| 4825 | |
Michael Ochmann | 8129ece | 2016-07-08 11:25:25 +0200 | [diff] [blame] | 4826 | [NOTE] |
| 4827 | All properties are used from the matching repository configuration. In |
Hugo Arès | 7d2b942 | 2014-11-25 15:33:42 -0500 | [diff] [blame] | 4828 | the previous example, all properties will be used from `project/plugins/\*` |
| 4829 | section and no properties will be inherited nor overridden from `project/*`. |
Hugo Josefson | 072b470 | 2010-04-21 19:27:11 +0200 | [diff] [blame] | 4830 | |
Hugo Arès | 218bb3b | 2015-04-22 15:05:14 -0400 | [diff] [blame] | 4831 | [[repository.name.basePath]]repository.<name>.basePath:: |
| 4832 | + |
| 4833 | Alternate to <<gerrit.basePath,gerrit.basePath>>. The repository will be created |
| 4834 | and used from this location instead: ${alternateBasePath}/${projectName}.git. |
| 4835 | + |
| 4836 | If configuring the basePath for an existing project in gerrit, make sure to stop |
| 4837 | gerrit, move the repository in the alternate basePath, configure basePath for |
| 4838 | this repository and then start Gerrit. |
| 4839 | + |
| 4840 | Path must be absolute. |
| 4841 | |
Edwin Kempin | a79ea55 | 2013-11-19 11:24:37 +0100 | [diff] [blame] | 4842 | [[repository.name.defaultSubmitType]]repository.<name>.defaultSubmitType:: |
| 4843 | + |
| 4844 | The default submit type for newly created projects. Supported values |
Dave Borowitz | c8f8d2e | 2017-10-23 11:18:23 -0400 | [diff] [blame] | 4845 | are `INHERIT`, `MERGE_IF_NECESSARY`, `FAST_FORWARD_ONLY`, `REBASE_IF_NECESSARY`, |
Gert van Dijk | a4e49d0 | 2017-08-27 22:50:40 +0200 | [diff] [blame] | 4846 | `REBASE_ALWAYS`, `MERGE_ALWAYS` and `CHERRY_PICK`. |
| 4847 | + |
Changcheng Xiao | 2188598 | 2019-01-15 18:16:51 +0100 | [diff] [blame] | 4848 | 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] | 4849 | + |
Changcheng Xiao | 2188598 | 2019-01-15 18:16:51 +0100 | [diff] [blame] | 4850 | Default is link:config-project-config.html#submit_type_inherit[`INHERIT`]. |
Dave Borowitz | cad4d26 | 2018-01-22 10:02:22 -0500 | [diff] [blame] | 4851 | + |
Dave Borowitz | 03e5174 | 2018-01-09 07:57:01 -0500 | [diff] [blame] | 4852 | This submit type is only applied at project creation time if a submit type is |
| 4853 | 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] | 4854 | submit type is unset in the project config at runtime, for backwards |
| 4855 | compatibility purposes, it defaults to |
| 4856 | link:project-configuration.html#merge_if_necessary[`MERGE_IF_NECESSARY`] rather |
| 4857 | than `INHERIT`. |
Edwin Kempin | a79ea55 | 2013-11-19 11:24:37 +0100 | [diff] [blame] | 4858 | |
Hugo Josefson | 072b470 | 2010-04-21 19:27:11 +0200 | [diff] [blame] | 4859 | [[repository.name.ownerGroup]]repository.<name>.ownerGroup:: |
| 4860 | + |
Nasser Grainawi | 8ea9fec | 2022-02-25 17:38:10 -0700 | [diff] [blame] | 4861 | A name of a link:config-groups.html[group] which exists. Zero, one or many |
| 4862 | groups are allowed. Each on its own line. Groups which don't exist are ignored. |
Hugo Josefson | 072b470 | 2010-04-21 19:27:11 +0200 | [diff] [blame] | 4863 | |
Edwin Kempin | 22687fa | 2018-01-22 11:55:07 +0100 | [diff] [blame] | 4864 | [[retry]] |
| 4865 | === Section retry |
| 4866 | |
| 4867 | [[retry.maxWait]]retry.maxWait:: |
| 4868 | + |
| 4869 | Maximum time to wait between attempts to retry an operations when one attempt |
| 4870 | fails (e.g. on NoteDb updates due to contention, aka lock failure, on the |
| 4871 | underlying ref storage). Operations are retried with exponential backoff, plus |
| 4872 | some random jitter, until the interval reaches this limit. After that, retries |
| 4873 | continue to occur after a fixed timeout (plus jitter), up to |
| 4874 | link:#retry.timeout[`retry.timeout`]. |
| 4875 | + |
| 4876 | Defaults to 5 seconds; unit suffixes are supported, and assumes milliseconds if |
| 4877 | not specified. |
| 4878 | |
| 4879 | [[retry.timeout]]retry.timeout:: |
| 4880 | + |
| 4881 | Total timeout for retrying operations when one attempt fails. |
| 4882 | + |
| 4883 | It is possible to overwrite this default timeout based on operation types by |
| 4884 | setting link:#retry.operationType.timeout[`retry.<operationType>.timeout`]. |
| 4885 | + |
| 4886 | Defaults to 20 seconds; unit suffixes are supported, and assumes milliseconds if |
| 4887 | not specified. |
| 4888 | |
| 4889 | [[retry.operationType.timeout]]retry.<operationType>.timeout:: |
| 4890 | + |
| 4891 | Total timeout for retrying operations of type `<operationType>` when one |
| 4892 | attempt fails. `<operationType>` can be `ACCOUNT_UPDATE`, `CHANGE_UPDATE`, |
| 4893 | `GROUP_UPDATE` and `INDEX_QUERY`. |
| 4894 | + |
| 4895 | Defaults to link:#retry.timeout[`retry.timeout`]; unit suffixes are supported, |
| 4896 | and assumes milliseconds if not specified. |
| 4897 | |
Edwin Kempin | dd837ae | 2019-06-18 11:42:14 +0200 | [diff] [blame] | 4898 | [[retry.retryWithTraceOnFailure]]retry.retryWithTraceOnFailure:: |
| 4899 | + |
| 4900 | Whether Gerrit should automatically retry operations on failure with tracing |
Edwin Kempin | f7e0307 | 2021-09-14 09:00:16 +0200 | [diff] [blame] | 4901 | enabled. The automatically generated traces can help with debugging. |
Edwin Kempin | dd837ae | 2019-06-18 11:42:14 +0200 | [diff] [blame] | 4902 | + |
| 4903 | By default this is set to false. |
| 4904 | |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 4905 | [[rules]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4906 | === Section rules |
Shawn O. Pearce | 94860ee | 2011-09-29 13:11:08 -0700 | [diff] [blame] | 4907 | |
| 4908 | [[rules.enable]]rules.enable:: |
| 4909 | + |
Matt Baker | 8ce12fc | 2013-11-26 21:43:12 -0700 | [diff] [blame] | 4910 | 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] | 4911 | project's refs/meta/config branch, if present. When set to false, |
| 4912 | only the default internal rules will be used. |
| 4913 | + |
| 4914 | Default is true, to execute project specific rules. |
| 4915 | |
Shawn Pearce | ed001d7 | 2014-12-17 14:25:55 -0800 | [diff] [blame] | 4916 | [[rules.reductionLimit]]rules.reductionLimit:: |
| 4917 | + |
| 4918 | Maximum number of Prolog reductions that can be performed when |
| 4919 | evaluating rules for a single change. Each function call made |
| 4920 | in user rule code, internal Gerrit Prolog code, or the Prolog |
| 4921 | interpreter counts against this limit. |
| 4922 | + |
| 4923 | Sites using very complex rules that need many reductions should |
| 4924 | compile Prolog to Java bytecode with link:pgm-rulec.html[rulec]. |
| 4925 | This eliminates the dynamic Prolog interpreter from charging its |
| 4926 | own reductions against the limit, enabling more logic to execute |
| 4927 | within the same bounds. |
| 4928 | + |
| 4929 | A reductionLimit of 0 is nearly infinite, implemented by setting |
| 4930 | the internal limit to 2^31-1. |
| 4931 | + |
| 4932 | Default is 100,000 reductions (about 14 ms on Intel Core i7 CPU). |
| 4933 | |
| 4934 | [[rules.compileReductionLimit]]rules.compileReductionLimit:: |
| 4935 | + |
| 4936 | Maximum number of Prolog reductions that can be performed when |
| 4937 | compiling source code to internal Prolog machine code. |
| 4938 | + |
| 4939 | Default is 10x reductionLimit (1,000,000). |
| 4940 | |
Shawn Pearce | a2b9852 | 2015-11-21 09:47:32 -0800 | [diff] [blame] | 4941 | [[rules.maxSourceBytes]]rules.maxSourceBytes:: |
| 4942 | + |
| 4943 | Maximum input size (in bytes) of a Prolog rules.pl file. Larger |
| 4944 | source files may need a larger rules.compileReductionLimit. Consider |
| 4945 | using link:pgm-rulec.html[rulec] to precompile larger rule files. |
| 4946 | + |
| 4947 | A size of 0 bytes disables rules, same as rules.enable = false. |
| 4948 | + |
David Pursehouse | 0c1dadf | 2015-11-24 09:14:21 +0000 | [diff] [blame] | 4949 | Common unit suffixes of 'k', 'm', or 'g' are supported. |
| 4950 | + |
Shawn Pearce | a2b9852 | 2015-11-21 09:47:32 -0800 | [diff] [blame] | 4951 | Default is 128 KiB. |
| 4952 | |
| 4953 | [[rules.maxPrologDatabaseSize]]rules.maxPrologDatabaseSize:: |
| 4954 | + |
| 4955 | Number of predicate clauses allowed to be defined in the Prolog |
| 4956 | database by project rules. Very complex rules may need more than the |
| 4957 | default 256 limit, but cost more memory and may need more time to |
| 4958 | evaluate. Consider using link:pgm-rulec.html[rulec] to precompile |
| 4959 | larger rule files. |
| 4960 | + |
| 4961 | Default is 256. |
| 4962 | |
David Pursehouse | 511a35b | 2014-04-04 10:27:13 +0900 | [diff] [blame] | 4963 | [[execution]] |
| 4964 | === Section execution |
Bruce Zu | a7e3431 | 2014-04-01 17:35:41 +0800 | [diff] [blame] | 4965 | |
| 4966 | [[execution.defaultThreadPoolSize]]execution.defaultThreadPoolSize:: |
| 4967 | + |
| 4968 | The default size of the background execution thread pool in |
| 4969 | which miscellaneous tasks are handled. |
| 4970 | + |
Jacek Centkowski | ce5510d | 2019-11-13 16:27:25 -0800 | [diff] [blame] | 4971 | Default and minimum is 2 so that a single, potentially longer executing |
| 4972 | task (e.g. GC), is not blocking the entire execution. |
Bruce Zu | a7e3431 | 2014-04-01 17:35:41 +0800 | [diff] [blame] | 4973 | |
Patrick Hiesel | 2ed3982 | 2018-04-16 12:04:02 +0200 | [diff] [blame] | 4974 | [[execution.fanOutThreadPoolSize]]execution.fanOutThreadPoolSize:: |
| 4975 | + |
| 4976 | Maximum size of thread pool to on which a serving thread can fan-out |
| 4977 | work to parallelize it. |
| 4978 | + |
| 4979 | When set to 0, a direct executor will be used. |
| 4980 | + |
| 4981 | By default, 25 which means that formatting happens in the caller thread. |
| 4982 | |
Patrick Hiesel | 328b761 | 2016-10-21 16:43:13 +0200 | [diff] [blame] | 4983 | [[receiveemail]] |
| 4984 | === Section receiveemail |
| 4985 | |
| 4986 | [[receiveemail.protocol]]receiveemail.protocol:: |
| 4987 | + |
| 4988 | Specifies the protocol used for receiving emails. Valid options are |
| 4989 | 'POP3', 'IMAP' and 'NONE'. Note that Gerrit will automatically switch between |
| 4990 | POP3 and POP3s as well as IMAP and IMAPS depending on the specified |
| 4991 | link:#receiveemail.encryption[encryption]. |
| 4992 | + |
| 4993 | Defaults to 'NONE' which means that receiving emails is disabled. |
| 4994 | |
| 4995 | [[receiveemail.host]]receiveemail.host:: |
| 4996 | + |
| 4997 | The hostname of the mailserver. Example: 'imap.gmail.com'. |
| 4998 | + |
| 4999 | Defaults to an empty string which means that receiving emails is disabled. |
| 5000 | |
| 5001 | [[receiveemail.port]]receiveemail.port:: |
| 5002 | + |
David Pursehouse | 4b06775 | 2017-03-03 15:54:53 +0900 | [diff] [blame] | 5003 | The port the email server exposes for receiving emails. |
Patrick Hiesel | 328b761 | 2016-10-21 16:43:13 +0200 | [diff] [blame] | 5004 | + |
| 5005 | Defaults to the industry standard for a given protocol and encryption: |
David Pursehouse | 3490744 | 2017-04-04 09:55:38 +0900 | [diff] [blame] | 5006 | POP3: 110; POP3S: 995; IMAP: 143; IMAPS: 993. |
Patrick Hiesel | 328b761 | 2016-10-21 16:43:13 +0200 | [diff] [blame] | 5007 | |
| 5008 | [[receiveemail.username]]receiveemail.username:: |
| 5009 | + |
| 5010 | Username used for authenticating with the email server. |
| 5011 | + |
| 5012 | Defaults to an empty string. |
| 5013 | |
| 5014 | [[receiveemail.password]]receiveemail.password:: |
| 5015 | + |
| 5016 | Password used for authenticating with the email server. |
| 5017 | + |
| 5018 | Defaults to an empty string. |
| 5019 | |
| 5020 | [[receiveemail.encryption]]receiveemail.encryption:: |
| 5021 | + |
| 5022 | Encryption standard used for transport layer security between Gerrit and the |
| 5023 | email server. Possible values include 'NONE', 'SSL' and 'TLS'. |
| 5024 | + |
| 5025 | Defaults to 'NONE'. |
| 5026 | |
| 5027 | [[receiveemail.fetchInterval]]receiveemail.fetchInterval:: |
| 5028 | + |
| 5029 | Time between two consecutive fetches from the email server. Communication with |
| 5030 | the email server is not kept alive. Examples: 60s, 10m, 1h. |
| 5031 | + |
| 5032 | Defaults to 60 seconds. |
| 5033 | |
| 5034 | [[receiveemail.enableImapIdle]]receiveemail.enableImapIdle:: |
| 5035 | + |
| 5036 | If the IMAP protocol is used for retrieving emails, IMAPv4 IDLE can be used to |
| 5037 | keep the connection with the email server alive and receive a push when a new |
| 5038 | email is delivered to the inbox. In this case, Gerrit will process the email |
| 5039 | immediately and will not have a fetch delay. |
Patrick Hiesel | 328b761 | 2016-10-21 16:43:13 +0200 | [diff] [blame] | 5040 | + |
| 5041 | Defaults to false. |
| 5042 | |
Patrick Hiesel | 4266cf7 | 2017-02-03 08:18:19 +0100 | [diff] [blame] | 5043 | [[receiveemail.filter.mode]]receiveemail.filter.mode:: |
| 5044 | + |
Gal Paikin | 166e443 | 2020-09-22 19:09:45 +0300 | [diff] [blame] | 5045 | An allow and block filter to filter incoming emails. |
Patrick Hiesel | 4266cf7 | 2017-02-03 08:18:19 +0100 | [diff] [blame] | 5046 | + |
| 5047 | If `OFF`, emails are not filtered by the list filter. |
| 5048 | + |
Gal Paikin | 166e443 | 2020-09-22 19:09:45 +0300 | [diff] [blame] | 5049 | If `ALLOW`, only emails where a pattern from |
Patrick Hiesel | 4266cf7 | 2017-02-03 08:18:19 +0100 | [diff] [blame] | 5050 | <<receiveemail.filter.patterns,receiveemail.filter.patterns>> |
| 5051 | matches 'From' will be processed. |
| 5052 | + |
Gal Paikin | 166e443 | 2020-09-22 19:09:45 +0300 | [diff] [blame] | 5053 | If `BLOCK`, only emails where no pattern from |
Patrick Hiesel | 4266cf7 | 2017-02-03 08:18:19 +0100 | [diff] [blame] | 5054 | <<receiveemail.filter.patterns,receiveemail.filter.patterns>> |
| 5055 | matches 'From' will be processed. |
| 5056 | + |
| 5057 | Defaults to `OFF`. |
Gal Paikin | 166e443 | 2020-09-22 19:09:45 +0300 | [diff] [blame] | 5058 | + |
| 5059 | The previous filter-names 'BLACKLIST' and 'WHITELIST' have been deprecated |
| 5060 | since they may be considered disrespectful and there's no technical or |
| 5061 | practical reason to use these exact terms for the filters. |
| 5062 | For backwards compatibility they are still supported but support for these |
| 5063 | deprecated terms will be removed in future releases. |
Patrick Hiesel | 4266cf7 | 2017-02-03 08:18:19 +0100 | [diff] [blame] | 5064 | |
| 5065 | [[receiveemail.filter.patterns]]receiveemail.filter.patterns:: |
| 5066 | + |
| 5067 | A list of regular expressions to match the email sender against. This can also |
| 5068 | be a list of addresses when regular expression characters are escaped. |
| 5069 | |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 5070 | [[sendemail]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 5071 | === Section sendemail |
Shawn O. Pearce | b0572c6 | 2009-06-01 14:18:22 -0700 | [diff] [blame] | 5072 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 5073 | [[sendemail.enable]]sendemail.enable:: |
Shawn O. Pearce | 2e4573b | 2009-06-02 09:09:50 -0700 | [diff] [blame] | 5074 | + |
| 5075 | If false Gerrit will not send email messages, for any reason, |
| 5076 | and all other properties of section sendemail are ignored. |
| 5077 | + |
| 5078 | By default, true, allowing notifications to be sent. |
| 5079 | |
Jonathan Nieder | dabd8c2 | 2016-09-20 14:10:11 -0700 | [diff] [blame] | 5080 | [[sendemail.html]]sendemail.html:: |
| 5081 | + |
| 5082 | If false, Gerrit will only send plain-text emails. |
| 5083 | If true, Gerrit will send multi-part emails with an HTML and |
| 5084 | plain text part. |
| 5085 | + |
| 5086 | By default, true, allowing HTML in the emails Gerrit sends. |
| 5087 | |
Bruce Zu | a7e3431 | 2014-04-01 17:35:41 +0800 | [diff] [blame] | 5088 | [[sendemail.connectTimeout]]sendemail.connectTimeout:: |
| 5089 | + |
| 5090 | The connection timeout of opening a socket connected to a |
| 5091 | remote SMTP server. |
| 5092 | + |
| 5093 | Values can be specified using standard time unit abbreviations |
| 5094 | ('ms', 'sec', 'min', etc.). |
| 5095 | If no unit is specified, milliseconds is assumed. |
| 5096 | + |
| 5097 | Default is 0. A timeout of zero is interpreted as an infinite |
| 5098 | timeout. The connection will then block until established or |
| 5099 | an error occurs. |
| 5100 | |
| 5101 | [[sendemail.threadPoolSize]]sendemail.threadPoolSize:: |
Alice Kober-Sotzek | da0559e | 2020-09-18 09:25:15 +0000 | [diff] [blame] | 5102 | + |
| 5103 | Maximum size of thread pool in which the review comments |
| 5104 | notifications are sent out asynchronously. |
| 5105 | + |
| 5106 | By default, 1. |
Bruce Zu | a7e3431 | 2014-04-01 17:35:41 +0800 | [diff] [blame] | 5107 | |
Shawn O. Pearce | 5c31bd7 | 2009-09-10 18:13:33 -0700 | [diff] [blame] | 5108 | [[sendemail.from]]sendemail.from:: |
| 5109 | + |
| 5110 | Designates what name and address Gerrit will place in the From |
| 5111 | field of any generated email messages. The supported values are: |
| 5112 | + |
| 5113 | * `USER` |
| 5114 | + |
| 5115 | Gerrit will set the From header to use the current user's |
David Pursehouse | 9246356 | 2013-06-24 10:16:28 +0900 | [diff] [blame] | 5116 | Full Name and Preferred Email. This may cause messages to be |
Shawn O. Pearce | 5c31bd7 | 2009-09-10 18:13:33 -0700 | [diff] [blame] | 5117 | classified as spam if the user's domain has SPF or DKIM enabled |
| 5118 | and <<sendemail.smtpServer,sendemail.smtpServer>> is not a trusted |
Zhen Chen | ae765aa | 2016-08-08 15:49:44 -0700 | [diff] [blame] | 5119 | relay for that domain. You can specify |
| 5120 | <<sendemail.allowedDomain,sendemail.allowedDomain>> to instruct Gerrit to only |
| 5121 | send as USER if USER is from those domains. |
Shawn O. Pearce | 5c31bd7 | 2009-09-10 18:13:33 -0700 | [diff] [blame] | 5122 | + |
| 5123 | * `MIXED` |
| 5124 | + |
Edwin Kempin | cdb0e00 | 2011-09-08 14:23:30 +0200 | [diff] [blame] | 5125 | Shorthand for `${user} (Code Review) <review@example.com>` where |
Shawn O. Pearce | 5c31bd7 | 2009-09-10 18:13:33 -0700 | [diff] [blame] | 5126 | `review@example.com` is the same as <<user.email,user.email>>. |
| 5127 | See below for a description of how the replacement is handled. |
| 5128 | + |
| 5129 | * `SERVER` |
| 5130 | + |
| 5131 | Gerrit will set the From header to the same name and address |
| 5132 | it records in any commits Gerrit creates. This is set by |
| 5133 | <<user.name,user.name>> and <<user.email,user.email>>, or guessed |
| 5134 | from the local operating system. |
| 5135 | + |
Edwin Kempin | ebfbbac | 2015-07-01 16:02:39 +0200 | [diff] [blame] | 5136 | * `Code Review <review@example.com>` |
Shawn O. Pearce | 5c31bd7 | 2009-09-10 18:13:33 -0700 | [diff] [blame] | 5137 | + |
| 5138 | If set to a name and email address in brackets, Gerrit will use |
| 5139 | this name and email address for any messages, overriding the name |
| 5140 | 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] | 5141 | Optionally, the name portion may contain the placeholder `${user}`, |
Shawn O. Pearce | 5c31bd7 | 2009-09-10 18:13:33 -0700 | [diff] [blame] | 5142 | which is replaced by the Full Name of the current user. |
| 5143 | |
| 5144 | + |
| 5145 | By default, MIXED. |
| 5146 | |
Zhen Chen | ae765aa | 2016-08-08 15:49:44 -0700 | [diff] [blame] | 5147 | [[sendemail.allowedDomain]]sendemail.allowedDomain:: |
| 5148 | + |
| 5149 | Only used when `sendemail.from` is set to `USER`. |
| 5150 | List of allowed domains. If user's email matches one of the domains, emails will |
| 5151 | 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] | 5152 | including `\*` to match any number of characters, for example `*.example.com` |
Zhen Chen | ae765aa | 2016-08-08 15:49:44 -0700 | [diff] [blame] | 5153 | matches any subdomain of `example.com`. |
| 5154 | + |
| 5155 | By default, `*`. |
| 5156 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 5157 | [[sendemail.smtpServer]]sendemail.smtpServer:: |
Shawn O. Pearce | b0572c6 | 2009-06-01 14:18:22 -0700 | [diff] [blame] | 5158 | + |
| 5159 | Hostname (or IP address) of a SMTP server that will relay |
| 5160 | messages generated by Gerrit to end users. |
| 5161 | + |
| 5162 | By default, 127.0.0.1 (aka localhost). |
| 5163 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 5164 | [[sendemail.smtpServerPort]]sendemail.smtpServerPort:: |
Shawn O. Pearce | b0572c6 | 2009-06-01 14:18:22 -0700 | [diff] [blame] | 5165 | + |
| 5166 | Port number of the SMTP server in sendemail.smtpserver. |
| 5167 | + |
Shawn O. Pearce | 6e9a83f | 2009-11-02 10:30:48 -0800 | [diff] [blame] | 5168 | By default, 25, or 465 if smtpEncryption is 'ssl'. |
| 5169 | |
| 5170 | [[sendemail.smtpEncryption]]sendemail.smtpEncryption:: |
| 5171 | + |
| 5172 | Specify the encryption to use, either 'ssl' or 'tls'. |
| 5173 | + |
| 5174 | By default, 'none', indicating no encryption is used. |
| 5175 | |
| 5176 | [[sendemail.sslVerify]]sendemail.sslVerify:: |
| 5177 | + |
| 5178 | If false and sendemail.smtpEncryption is 'ssl' or 'tls', Gerrit |
| 5179 | will not verify the server certificate when it connects to send |
| 5180 | an email message. |
| 5181 | + |
| 5182 | By default, true, requiring the certificate to be verified. |
Shawn O. Pearce | b0572c6 | 2009-06-01 14:18:22 -0700 | [diff] [blame] | 5183 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 5184 | [[sendemail.smtpUser]]sendemail.smtpUser:: |
Shawn O. Pearce | b0572c6 | 2009-06-01 14:18:22 -0700 | [diff] [blame] | 5185 | + |
| 5186 | User name to authenticate with, if required for relay. |
| 5187 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 5188 | [[sendemail.smtpPass]]sendemail.smtpPass:: |
Shawn O. Pearce | b0572c6 | 2009-06-01 14:18:22 -0700 | [diff] [blame] | 5189 | + |
| 5190 | Password for the account named by sendemail.smtpUser. |
| 5191 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 5192 | [[sendemail.allowrcpt]]sendemail.allowrcpt:: |
Shawn O. Pearce | 219a8ee | 2009-06-01 18:13:57 -0700 | [diff] [blame] | 5193 | + |
Gal Paikin | 166e443 | 2020-09-22 19:09:45 +0300 | [diff] [blame] | 5194 | If present, each value adds one entry to the list of allowed email |
| 5195 | addresses that Gerrit can send emails to. If set to a complete |
| 5196 | email address, that one address is added to the list of allowed |
| 5197 | emails. |
Shawn O. Pearce | 219a8ee | 2009-06-01 18:13:57 -0700 | [diff] [blame] | 5198 | If set to a domain name, any address at that domain can receive |
| 5199 | email from Gerrit. |
| 5200 | + |
Rikard Almgren | 5b9de1c | 2019-03-12 17:55:16 +0100 | [diff] [blame] | 5201 | If allowrcpt is configured, The set of allowed recipients is: |
| 5202 | `allowrcpt - denyrcpt`. |
| 5203 | + |
| 5204 | By default, unset, permitting delivery to any email address. |
| 5205 | |
| 5206 | [[sendemail.denyrcpt]]sendemail.denyrcpt:: |
| 5207 | + |
Gal Paikin | 166e443 | 2020-09-22 19:09:45 +0300 | [diff] [blame] | 5208 | If present, each value adds one entry to the list of email |
| 5209 | addresses that Gerrit can't send emails to. If set to a complete |
| 5210 | email address, that one address is added to the list of blocked |
| 5211 | emails. |
Rikard Almgren | 5b9de1c | 2019-03-12 17:55:16 +0100 | [diff] [blame] | 5212 | If set to a domain name, any address at that domain can *not* receive |
| 5213 | email from Gerrit. |
| 5214 | + |
Shawn O. Pearce | 219a8ee | 2009-06-01 18:13:57 -0700 | [diff] [blame] | 5215 | By default, unset, permitting delivery to any email address. |
| 5216 | |
Shawn O. Pearce | 02aacbc | 2012-06-12 13:44:22 -0700 | [diff] [blame] | 5217 | [[sendemail.includeDiff]]sendemail.includeDiff:: |
| 5218 | + |
Bruce Zu | eb00ff3 | 2012-11-27 17:38:10 +0800 | [diff] [blame] | 5219 | If true, new change emails and merged change emails from Gerrit |
| 5220 | will include the complete unified diff of the change. |
| 5221 | Variable maxmimumDiffSize places an upper limit on how large the |
| 5222 | email can get when this option is enabled. |
Shawn O. Pearce | 02aacbc | 2012-06-12 13:44:22 -0700 | [diff] [blame] | 5223 | + |
| 5224 | By default, false. |
| 5225 | |
Shawn O. Pearce | 28a950b | 2012-06-12 14:36:34 -0700 | [diff] [blame] | 5226 | [[sendemail.maximumDiffSize]]sendemail.maximumDiffSize:: |
| 5227 | + |
| 5228 | Largest size of unified diff output to include in an email. When |
| 5229 | the diff exceeds this size the file paths will be listed instead. |
| 5230 | Standard byte unit suffixes are supported. |
| 5231 | + |
| 5232 | By default, 256 KiB. |
| 5233 | |
Alex Blewitt | 9cca740 | 2011-02-11 01:39:30 +0000 | [diff] [blame] | 5234 | [[sendemail.importance]]sendemail.importance:: |
| 5235 | + |
| 5236 | If present, emails sent from Gerrit will have the given level |
| 5237 | of importance. Valid values include 'high' and 'low', which |
| 5238 | email clients will render in different ways. |
| 5239 | + |
| 5240 | By default, unset, so no Importance header is generated. |
| 5241 | |
| 5242 | [[sendemail.expiryDays]]sendemail.expiryDays:: |
| 5243 | + |
| 5244 | If present, emails sent from Gerrit will expire after the given |
| 5245 | number of days. This will add the Expiry-Date header and |
| 5246 | email clients may expire or expunge mails whose Expiry-Date |
| 5247 | header is in the past. This should be a positive non-zero |
| 5248 | number indicating how many days in the future the mails |
| 5249 | should expire. |
| 5250 | + |
| 5251 | By default, unset, so no Expiry-Date header is generated. |
| 5252 | |
Patrick Hiesel | 31d60f0 | 2017-02-09 17:38:40 +0100 | [diff] [blame] | 5253 | [[sendemail.replyToAddress]]sendemail.replyToAddress:: |
| 5254 | + |
| 5255 | A custom Reply-To address should only be provided if Gerrit is set up to |
| 5256 | receive emails and the inbound address differs from |
| 5257 | <<sendemail.from,sendemail.from>>. |
| 5258 | It will be set as Reply-To header on all types of outgoing email where |
| 5259 | Gerrit can parse back a user's reply. |
| 5260 | + |
| 5261 | Defaults to an empty string which adds <<sendemail.from,sendemail.from>> as |
| 5262 | 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] | 5263 | |
David Pursehouse | 917b726 | 2017-04-21 18:18:52 +0200 | [diff] [blame] | 5264 | [[sendemail.allowTLD]]sendemail.allowTLD:: |
| 5265 | + |
| 5266 | List of custom TLDs to allow sending emails to in addition to those specified |
Marian Harbach | 3425337 | 2019-12-10 18:01:31 +0100 | [diff] [blame] | 5267 | in the link:http://data.iana.org/TLD/[IANA list,role=external,window=_blank]. |
David Pursehouse | 917b726 | 2017-04-21 18:18:52 +0200 | [diff] [blame] | 5268 | + |
| 5269 | Defaults to an empty list, meaning no additional TLDs are allowed. |
| 5270 | |
Maxime Guerreiro | 8d129d4 | 2018-03-21 18:59:27 +0100 | [diff] [blame] | 5271 | |
| 5272 | [[sendemail.addInstanceNameInSubject]]sendemail.addInstanceNameInSubject:: |
| 5273 | + |
| 5274 | When set to true, Gerrit will add its short name to the email subject, allowing recipients to quickly identify |
| 5275 | what Gerrit instance the email came from. |
| 5276 | + |
| 5277 | The short name can be customized via the gerrit.instanceName option. |
| 5278 | + |
Luca Milanesio | fdfca77 | 2018-04-04 23:42:32 +0100 | [diff] [blame] | 5279 | Defaults to false. |
Maxime Guerreiro | 8d129d4 | 2018-03-21 18:59:27 +0100 | [diff] [blame] | 5280 | |
| 5281 | |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 5282 | [[site]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 5283 | === Section site |
Shawn O. Pearce | dba9764 | 2011-09-07 20:12:31 -0700 | [diff] [blame] | 5284 | |
Shawn Pearce | c896eaa | 2016-08-23 19:38:58 -0700 | [diff] [blame] | 5285 | [[site.allowOriginRegex]]site.allowOriginRegex:: |
| 5286 | + |
| 5287 | List of regular expressions matching origins that should be permitted |
Shawn Pearce | 53ebad4 | 2017-06-10 11:14:20 -0700 | [diff] [blame] | 5288 | to use the full Gerrit REST API. These should be trusted applications, |
| 5289 | as the sites may be able to use the user's credentials. Applies to |
| 5290 | all requests, including state changing methods (PUT, DELETE, POST). |
| 5291 | + |
| 5292 | Expressions should not require trailing slash. For example a valid |
| 5293 | pattern might be `https://build-status[.]example[.]com`. |
Shawn Pearce | c896eaa | 2016-08-23 19:38:58 -0700 | [diff] [blame] | 5294 | + |
| 5295 | By default, unset, denying all cross-origin requests. |
| 5296 | |
Shawn O. Pearce | dba9764 | 2011-09-07 20:12:31 -0700 | [diff] [blame] | 5297 | [[site.refreshHeaderFooter]]site.refreshHeaderFooter:: |
| 5298 | + |
| 5299 | If true the server checks the site header, footer and CSS files for |
| 5300 | updated versions. If false, a server restart is required to change |
| 5301 | any of these resources. Default is true, allowing automatic reloads. |
| 5302 | |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 5303 | [[ssh-alias]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 5304 | === Section ssh-alias |
Shawn O. Pearce | 521380a | 2012-05-11 14:57:56 -0700 | [diff] [blame] | 5305 | |
| 5306 | Variables in section ssh-alias permit the site administrator to alias |
| 5307 | another command from Gerrit or a plugin into the `gerrit` command |
| 5308 | namespace. To alias `replication start` to `gerrit replicate`: |
| 5309 | |
| 5310 | ---- |
| 5311 | [ssh-alias] |
| 5312 | replicate = replication start |
| 5313 | ---- |
Shawn O. Pearce | dba9764 | 2011-09-07 20:12:31 -0700 | [diff] [blame] | 5314 | |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 5315 | [[sshd]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 5316 | === Section sshd |
Shawn O. Pearce | 9410f2c | 2009-05-14 10:26:47 -0700 | [diff] [blame] | 5317 | |
Gustaf Lundh | d60e90f | 2015-08-03 16:18:33 +0200 | [diff] [blame] | 5318 | [[sshd.enableCompression]]sshd.enableCompression:: |
| 5319 | + |
| 5320 | In the general case, we want to disable transparent compression, since |
| 5321 | the majority of our data transfer is highly compressed Git pack files |
| 5322 | and we cannot make them any smaller than they already are. |
| 5323 | + |
| 5324 | However, if there are CPU in abundance and the server is reachable |
| 5325 | through slow networks, gits with huge amount of refs can benefit from |
| 5326 | SSH-compression since git does not compress the ref announcement during |
| 5327 | handshake. |
| 5328 | + |
Han-Wen Nienhuys | 348a603 | 2019-09-24 19:44:57 +0200 | [diff] [blame] | 5329 | Compression can be especially useful when Gerrit replicas are being used |
Matthias Sohn | d8182ba | 2019-12-09 14:50:23 +0100 | [diff] [blame] | 5330 | for the larger clones and fetches and the primary server mostly takes |
Gustaf Lundh | d60e90f | 2015-08-03 16:18:33 +0200 | [diff] [blame] | 5331 | small receive-packs. |
| 5332 | + |
| 5333 | By default, `false`. |
| 5334 | |
David Ostrovsky | e2921b6 | 2015-03-04 22:36:10 +0100 | [diff] [blame] | 5335 | [[sshd.backend]]sshd.backend:: |
| 5336 | + |
| 5337 | 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] | 5338 | IoSession. To use the old MINA session the `backend` option must be set |
| 5339 | to `MINA`. |
David Ostrovsky | e2921b6 | 2015-03-04 22:36:10 +0100 | [diff] [blame] | 5340 | + |
Luca Milanesio | fc1ed9c | 2016-03-01 18:28:36 +0000 | [diff] [blame] | 5341 | By default, `NIO2`. |
David Ostrovsky | e2921b6 | 2015-03-04 22:36:10 +0100 | [diff] [blame] | 5342 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 5343 | [[sshd.listenAddress]]sshd.listenAddress:: |
Shawn O. Pearce | 1d3cb444 | 2009-05-30 14:03:31 -0700 | [diff] [blame] | 5344 | + |
| 5345 | Specifies the local addresses the internal SSHD should listen |
| 5346 | for connections on. The following forms may be used to specify |
| 5347 | an address. In any form, `:'port'` may be omitted to use the |
David Pursehouse | a3af255 | 2016-08-02 14:04:44 +0900 | [diff] [blame] | 5348 | default of `29418`. |
Shawn O. Pearce | 1d3cb444 | 2009-05-30 14:03:31 -0700 | [diff] [blame] | 5349 | + |
David Pursehouse | a3af255 | 2016-08-02 14:04:44 +0900 | [diff] [blame] | 5350 | * `'hostname':'port'` (for example `review.example.com:29418`) |
| 5351 | * `'IPv4':'port'` (for example `10.0.0.1:29418`) |
| 5352 | * `['IPv6']:'port'` (for example `[ff02::1]:29418`) |
| 5353 | * `+*:'port'+` (for example `+*:29418+`) |
Shawn O. Pearce | 1d3cb444 | 2009-05-30 14:03:31 -0700 | [diff] [blame] | 5354 | |
| 5355 | + |
Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 5356 | -- |
Shawn O. Pearce | 1d3cb444 | 2009-05-30 14:03:31 -0700 | [diff] [blame] | 5357 | If multiple values are supplied, the daemon will listen on all |
| 5358 | of them. |
Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 5359 | |
Shawn O. Pearce | 6af6f5f | 2010-06-08 17:38:43 -0700 | [diff] [blame] | 5360 | To disable the internal SSHD, set listenAddress to `off`. |
Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 5361 | |
David Pursehouse | a3af255 | 2016-08-02 14:04:44 +0900 | [diff] [blame] | 5362 | By default, `*:29418`. |
Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 5363 | -- |
Shawn O. Pearce | 1d3cb444 | 2009-05-30 14:03:31 -0700 | [diff] [blame] | 5364 | |
James Y Knight | 910bd86 | 2011-01-11 20:05:56 -0500 | [diff] [blame] | 5365 | [[sshd.advertisedAddress]]sshd.advertisedAddress:: |
| 5366 | + |
| 5367 | Specifies the addresses clients should be told to connect to. |
| 5368 | This may differ from sshd.listenAddress if a firewall based port |
| 5369 | redirector is being used, making Gerrit appear to answer on port |
| 5370 | 22. The following forms may be used to specify an address. In any |
| 5371 | 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] | 5372 | |
David Pursehouse | a3af255 | 2016-08-02 14:04:44 +0900 | [diff] [blame] | 5373 | * `'hostname':'port'` (for example `review.example.com:22`) |
| 5374 | * `'IPv4':'port'` (for example `10.0.0.1:29418`) |
| 5375 | * `['IPv6']:'port'` (for example `[ff02::1]:29418`) |
James Y Knight | 910bd86 | 2011-01-11 20:05:56 -0500 | [diff] [blame] | 5376 | |
| 5377 | + |
Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 5378 | -- |
James Y Knight | 910bd86 | 2011-01-11 20:05:56 -0500 | [diff] [blame] | 5379 | If multiple values are supplied, the daemon will advertise all |
| 5380 | of them. |
Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 5381 | |
David Pursehouse | a3af255 | 2016-08-02 14:04:44 +0900 | [diff] [blame] | 5382 | By default uses the value of `sshd.listenAddress`. |
Edwin Kempin | a09ebcf | 2015-04-16 14:53:23 +0200 | [diff] [blame] | 5383 | -- |
James Y Knight | 910bd86 | 2011-01-11 20:05:56 -0500 | [diff] [blame] | 5384 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 5385 | [[sshd.tcpKeepAlive]]sshd.tcpKeepAlive:: |
Shawn O. Pearce | fc9081f | 2009-05-14 10:26:59 -0700 | [diff] [blame] | 5386 | + |
| 5387 | If true, enables TCP keepalive messages to the other side, so |
| 5388 | the daemon can terminate connections if the peer disappears. |
| 5389 | + |
David Ostrovsky | e5b7f1a | 2013-10-23 21:10:39 +0200 | [diff] [blame] | 5390 | Only effective when `sshd.backend` is set to `MINA`. |
| 5391 | + |
David Pursehouse | a3af255 | 2016-08-02 14:04:44 +0900 | [diff] [blame] | 5392 | By default, `true`. |
Shawn O. Pearce | fc9081f | 2009-05-14 10:26:59 -0700 | [diff] [blame] | 5393 | |
Shawn O. Pearce | 1a4580b | 2009-11-19 17:37:10 -0800 | [diff] [blame] | 5394 | [[sshd.threads]]sshd.threads:: |
| 5395 | + |
| 5396 | Number of threads to use when executing SSH command requests. |
| 5397 | If additional requests are received while all threads are busy they |
David Pursehouse | 221d4f6 | 2012-06-08 17:38:08 +0900 | [diff] [blame] | 5398 | are queued and serviced in a first-come-first-served order. |
Shawn O. Pearce | 1a4580b | 2009-11-19 17:37:10 -0800 | [diff] [blame] | 5399 | + |
Florian Klink | 2a38946 | 2019-07-23 14:14:32 +0200 | [diff] [blame] | 5400 | By default, 2x the number of CPUs available to the JVM (but at least 4 |
| 5401 | threads). |
Saša Živkov | 3d4ed9f | 2017-10-13 15:30:29 +0200 | [diff] [blame] | 5402 | + |
| 5403 | [NOTE] |
| 5404 | When SSH daemon is enabled then this setting also defines the max number of |
| 5405 | concurrent Git requests for interactive users over SSH and HTTP together. |
Shawn O. Pearce | 1a4580b | 2009-11-19 17:37:10 -0800 | [diff] [blame] | 5406 | |
Nico Sallembien | fc53f7f | 2010-05-18 16:40:10 -0700 | [diff] [blame] | 5407 | [[sshd.batchThreads]]sshd.batchThreads:: |
| 5408 | + |
| 5409 | Number of threads to allocate for SSH command requests from |
Patrick Hiesel | e587c40 | 2020-08-07 16:11:29 +0200 | [diff] [blame] | 5410 | link:access-control.html#service_users[service users]. |
Fredrik Luthander | 4684302 | 2012-03-13 16:11:02 +0100 | [diff] [blame] | 5411 | If equals to 0, then all non-interactive requests are executed in the same |
| 5412 | queue as interactive requests. |
Nico Sallembien | fc53f7f | 2010-05-18 16:40:10 -0700 | [diff] [blame] | 5413 | + |
| 5414 | Any other value will remove the number of threads from the queue |
| 5415 | allocated to interactive users, and create a separate thread pool |
| 5416 | of the requested size, which will be used to run commands from |
Patrick Hiesel | e587c40 | 2020-08-07 16:11:29 +0200 | [diff] [blame] | 5417 | service users. |
Nico Sallembien | fc53f7f | 2010-05-18 16:40:10 -0700 | [diff] [blame] | 5418 | + |
Patrick Hiesel | e587c40 | 2020-08-07 16:11:29 +0200 | [diff] [blame] | 5419 | If the number of threads requested for service users is larger |
Nico Sallembien | fc53f7f | 2010-05-18 16:40:10 -0700 | [diff] [blame] | 5420 | than the total number of threads allocated in sshd.threads, then the |
David Pursehouse | 9246356 | 2013-06-24 10:16:28 +0900 | [diff] [blame] | 5421 | value of sshd.threads is increased to accommodate the requested value. |
Nico Sallembien | fc53f7f | 2010-05-18 16:40:10 -0700 | [diff] [blame] | 5422 | + |
Dariusz Luksza | 145de47 | 2015-11-09 18:44:35 +0100 | [diff] [blame] | 5423 | By default is 1 on single core node, 2 otherwise. |
Saša Živkov | 3d4ed9f | 2017-10-13 15:30:29 +0200 | [diff] [blame] | 5424 | + |
| 5425 | [NOTE] |
| 5426 | When SSH daemon is enabled then this setting also defines the max number of |
| 5427 | concurrent Git requests for batch users over SSH and HTTP together. |
Nico Sallembien | fc53f7f | 2010-05-18 16:40:10 -0700 | [diff] [blame] | 5428 | |
Kenny Root | 15ac1b8 | 2010-02-24 00:29:20 -0800 | [diff] [blame] | 5429 | [[sshd.streamThreads]]sshd.streamThreads:: |
| 5430 | + |
| 5431 | Number of threads to use when formatting events to asynchronous |
| 5432 | streaming clients. Event formatting is multiplexed onto this thread |
| 5433 | pool by a simple FIFO scheduling system. |
| 5434 | + |
| 5435 | By default, 1 plus the number of CPUs available to the JVM. |
| 5436 | |
Edwin Kempin | b5df3b8 | 2011-10-10 11:31:14 +0200 | [diff] [blame] | 5437 | [[sshd.commandStartThreads]]sshd.commandStartThreads:: |
Shawn O. Pearce | d629655 | 2011-05-15 13:56:30 -0700 | [diff] [blame] | 5438 | + |
| 5439 | Number of threads used to parse a command line submitted by a client |
| 5440 | over SSH for execution, create the internal data structures used by |
| 5441 | that command, and schedule it for execution on another thread. |
| 5442 | + |
| 5443 | By default, 2. |
| 5444 | |
Shawn O. Pearce | 8a0bf36 | 2010-11-05 17:49:41 -0700 | [diff] [blame] | 5445 | [[sshd.maxAuthTries]]sshd.maxAuthTries:: |
| 5446 | + |
| 5447 | Maximum number of authentication attempts before the server |
| 5448 | disconnects the client. Each public key that a client has loaded |
| 5449 | into its local agent counts as one auth request. Users can work |
| 5450 | around the server's limit by loading less keys into their agent, |
| 5451 | or selecting a specific key in their `~/.ssh/config` file with |
| 5452 | the `IdentityFile` option. |
| 5453 | + |
| 5454 | By default, 6. |
| 5455 | |
| 5456 | [[sshd.loginGraceTime]]sshd.loginGraceTime:: |
| 5457 | + |
| 5458 | Time in seconds that a client has to authenticate before the server |
| 5459 | automatically terminates their connection. Values should use common |
| 5460 | unit suffixes to express their setting: |
| 5461 | + |
| 5462 | * s, sec, second, seconds |
| 5463 | * m, min, minute, minutes |
| 5464 | * h, hr, hour, hours |
| 5465 | * d, day, days |
| 5466 | |
| 5467 | + |
| 5468 | By default, 2 minutes. |
| 5469 | |
Christian Aistleitner | 3d79459 | 2013-04-08 00:19:40 +0200 | [diff] [blame] | 5470 | [[sshd.idleTimeout]]sshd.idleTimeout:: |
| 5471 | + |
| 5472 | Time in seconds after which the server automatically terminates idle |
Luca Milanesio | 9ba08ea | 2017-10-16 16:04:28 +0000 | [diff] [blame] | 5473 | connections (or 0 to disable closing of idle connections) not waiting for |
| 5474 | any server operation to complete. |
| 5475 | Values should use common unit suffixes to express their setting: |
Christian Aistleitner | 3d79459 | 2013-04-08 00:19:40 +0200 | [diff] [blame] | 5476 | + |
| 5477 | * s, sec, second, seconds |
| 5478 | * m, min, minute, minutes |
| 5479 | * h, hr, hour, hours |
| 5480 | * d, day, days |
| 5481 | |
| 5482 | + |
| 5483 | By default, 0. |
| 5484 | |
Paladox none | daafdb6 | 2017-10-14 16:18:42 +0000 | [diff] [blame] | 5485 | [[sshd.waitTimeout]]sshd.waitTimeout:: |
| 5486 | + |
Luca Milanesio | 9ba08ea | 2017-10-16 16:04:28 +0000 | [diff] [blame] | 5487 | Time in seconds after which the server automatically terminates |
| 5488 | connections waiting for a server operation to complete, like for instance |
| 5489 | cloning a very large repo with lots of refs. |
Paladox none | daafdb6 | 2017-10-14 16:18:42 +0000 | [diff] [blame] | 5490 | Values should use common unit suffixes to express their setting: |
| 5491 | + |
| 5492 | * s, sec, second, seconds |
| 5493 | * m, min, minute, minutes |
| 5494 | * h, hr, hour, hours |
| 5495 | * d, day, days |
| 5496 | |
| 5497 | + |
| 5498 | By default, 30s. |
| 5499 | |
Thomas Draebing | 2c7346a | 2020-08-03 17:51:15 +0200 | [diff] [blame] | 5500 | [[sshd.gracefulStopTimeout]]sshd.gracefulStopTimeout:: |
| 5501 | + |
| 5502 | Set a graceful stop time. If set, Gerrit ensures that all open SSH |
| 5503 | sessions are preserved for a maximum period of time, before forcing the |
| 5504 | shutdown of the SSH daemon. During this period, no new requests |
| 5505 | will be accepted. This option is meant to be used in setups performing |
| 5506 | rolling restarts. |
| 5507 | + |
| 5508 | Values should use common unit suffixes to express their setting: |
| 5509 | + |
| 5510 | * s, sec, second, seconds |
| 5511 | * m, min, minute, minutes |
| 5512 | + |
| 5513 | By default, 0 seconds (immediate shutdown). |
| 5514 | |
Shawn O. Pearce | 8a0bf36 | 2010-11-05 17:49:41 -0700 | [diff] [blame] | 5515 | [[sshd.maxConnectionsPerUser]]sshd.maxConnectionsPerUser:: |
| 5516 | + |
| 5517 | Maximum number of concurrent SSH sessions that a user account |
| 5518 | 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] | 5519 | 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] | 5520 | the number of commands a user may issue over a single connection. |
| 5521 | If set to 0, there is no limit. |
| 5522 | + |
| 5523 | By default, 64. |
| 5524 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 5525 | [[sshd.cipher]]sshd.cipher:: |
Shawn O. Pearce | 0bf2f52 | 2009-05-14 11:02:03 -0700 | [diff] [blame] | 5526 | + |
| 5527 | Available ciphers. To permit multiple ciphers, specify multiple |
| 5528 | `sshd.cipher` keys in the configuration file, one cipher name |
| 5529 | per key. Cipher names starting with `+` are enabled in addition |
| 5530 | to the default ciphers, cipher names starting with `-` are removed |
| 5531 | from the default cipher set. |
| 5532 | + |
Gert van Dijk | cc03e8a | 2017-10-23 23:45:24 +0200 | [diff] [blame] | 5533 | Supported ciphers: |
| 5534 | + |
Gert van Dijk | cc03e8a | 2017-10-23 23:45:24 +0200 | [diff] [blame] | 5535 | * `aes128-cbc` |
David Ostrovsky | e77996f | 2022-06-25 13:20:39 +0200 | [diff] [blame] | 5536 | * `aes128-ctr` |
| 5537 | * `aes128-gcm@openssh.com` |
Gert van Dijk | cc03e8a | 2017-10-23 23:45:24 +0200 | [diff] [blame] | 5538 | * `aes192-cbc` |
David Ostrovsky | e77996f | 2022-06-25 13:20:39 +0200 | [diff] [blame] | 5539 | * `aes192-ctr` |
Gert van Dijk | cc03e8a | 2017-10-23 23:45:24 +0200 | [diff] [blame] | 5540 | * `aes256-cbc` |
David Ostrovsky | e77996f | 2022-06-25 13:20:39 +0200 | [diff] [blame] | 5541 | * `aes256-ctr` |
| 5542 | * `aes256-gcm@openssh.com` |
Gert van Dijk | cc03e8a | 2017-10-23 23:45:24 +0200 | [diff] [blame] | 5543 | * `arcfour128` |
| 5544 | * `arcfour256` |
David Ostrovsky | e77996f | 2022-06-25 13:20:39 +0200 | [diff] [blame] | 5545 | * `blowfish-cbc` |
| 5546 | * `chacha20-poly1305@openssh.com` |
| 5547 | * `3des-cbc` |
Gert van Dijk | cc03e8a | 2017-10-23 23:45:24 +0200 | [diff] [blame] | 5548 | * `none` |
Shawn O. Pearce | 0bf2f52 | 2009-05-14 11:02:03 -0700 | [diff] [blame] | 5549 | + |
Gert van Dijk | cc03e8a | 2017-10-23 23:45:24 +0200 | [diff] [blame] | 5550 | If your setup allows for it, it's recommended to disable all ciphers except |
| 5551 | the AES-CTR modes. |
David Ostrovsky | bcbf70d | 2022-06-29 13:27:03 +0200 | [diff] [blame] | 5552 | + |
| 5553 | See also link:https://github.com/apache/mina-sshd/tree/master#ciphers[ciphers,role=external,window=_blank]. |
| 5554 | + |
| 5555 | By default, all supported ciphers except `none` are available. |
Shawn O. Pearce | 0bf2f52 | 2009-05-14 11:02:03 -0700 | [diff] [blame] | 5556 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 5557 | [[sshd.mac]]sshd.mac:: |
Shawn O. Pearce | 0bf2f52 | 2009-05-14 11:02:03 -0700 | [diff] [blame] | 5558 | + |
| 5559 | Available MAC (message authentication code) algorithms. To permit |
| 5560 | multiple algorithms, specify multiple `sshd.mac` keys in the |
| 5561 | configuration file, one MAC per key. MAC names starting with `+` |
| 5562 | are enabled in addition to the default MACs, MAC names starting with |
| 5563 | `-` are removed from the default MACs. |
| 5564 | + |
Gert van Dijk | cc03e8a | 2017-10-23 23:45:24 +0200 | [diff] [blame] | 5565 | Supported MACs: |
| 5566 | + |
| 5567 | * `hmac-md5` |
| 5568 | * `hmac-md5-96` |
| 5569 | * `hmac-sha1` |
| 5570 | * `hmac-sha1-96` |
| 5571 | * `hmac-sha2-256` |
| 5572 | * `hmac-sha2-512` |
David Ostrovsky | bd0e6bb | 2022-06-26 09:19:29 +0200 | [diff] [blame] | 5573 | * `hmac-sha1-etm@openssh.com` |
| 5574 | * `hmac-sha2-256-etm@openssh.com` |
| 5575 | * `hmac-sha2-512-etm@openssh.com` |
Shawn O. Pearce | 0bf2f52 | 2009-05-14 11:02:03 -0700 | [diff] [blame] | 5576 | + |
David Ostrovsky | bcbf70d | 2022-06-29 13:27:03 +0200 | [diff] [blame] | 5577 | See also link:https://github.com/apache/mina-sshd/tree/master#macs[macs,role=external,window=_blank]. |
Shawn O. Pearce | 0bf2f52 | 2009-05-14 11:02:03 -0700 | [diff] [blame] | 5578 | + |
| 5579 | By default, all supported MACs are available. |
| 5580 | |
David Ostrovsky | a0f77df | 2021-06-07 23:04:35 +0200 | [diff] [blame] | 5581 | [[sshd.enableDeprecatedKexAlgorithms]]sshd.enableDeprecatedKexAlgorithms:: |
| 5582 | + |
| 5583 | Enable deprecated kex algorithms: |
| 5584 | + |
| 5585 | * `diffie-hellman-group1-sha1` |
| 5586 | * `diffie-hellman-group14-sha1` |
| 5587 | * `diffie-hellman-group-exchange-sha1` |
| 5588 | |
| 5589 | By default, the deprecated kex algorithms are disabled. |
| 5590 | |
Scott Dial | b4a04fa | 2016-03-15 09:44:11 -0400 | [diff] [blame] | 5591 | [[sshd.kex]]sshd.kex:: |
| 5592 | + |
| 5593 | -- |
| 5594 | Available key exchange algorithms. To permit multiple algorithms, |
| 5595 | specify multiple `sshd.kex` keys in the configuration file, one key |
| 5596 | exchange algorithm per key. Key exchange algorithm names starting |
| 5597 | with `+` are enabled in addition to the default key exchange |
| 5598 | algorithms, key exchange algorithm names starting with `-` are |
| 5599 | removed from the default key exchange algorithms. |
| 5600 | |
Scott Dial | b4a04fa | 2016-03-15 09:44:11 -0400 | [diff] [blame] | 5601 | Supported key exchange algorithms: |
| 5602 | |
| 5603 | * `ecdh-sha2-nistp521` |
| 5604 | * `ecdh-sha2-nistp384` |
| 5605 | * `ecdh-sha2-nistp256` |
David Ostrovsky | d4e08c3 | 2022-06-26 09:40:05 +0200 | [diff] [blame] | 5606 | * `curve25519-sha256` |
| 5607 | * `curve25519-sha256@libssh.org` |
| 5608 | * `curve448-sha512` |
Scott Dial | b4a04fa | 2016-03-15 09:44:11 -0400 | [diff] [blame] | 5609 | * `diffie-hellman-group-exchange-sha256` |
David Ostrovsky | a0f77df | 2021-06-07 23:04:35 +0200 | [diff] [blame] | 5610 | * `diffie-hellman-group18-sha512` |
| 5611 | * `diffie-hellman-group17-sha512` |
| 5612 | * `diffie-hellman-group16-sha512` |
| 5613 | * `diffie-hellman-group15-sha512` |
| 5614 | * `diffie-hellman-group14-sha256` |
| 5615 | |
| 5616 | See link:#sshd.enableDeprecatedKexAlgorithms[sshd.enableDeprecatedKexAlgorithms] |
| 5617 | for deprecated key algorithms and how to enable them. |
Scott Dial | b4a04fa | 2016-03-15 09:44:11 -0400 | [diff] [blame] | 5618 | |
Gert van Dijk | cc03e8a | 2017-10-23 23:45:24 +0200 | [diff] [blame] | 5619 | It is strongly recommended to disable at least `diffie-hellman-group1-sha1` |
| 5620 | as it's known to be vulnerable (logjam attack). Additionally, if your setup |
| 5621 | allows for it, it is recommended to disable the remaining two `sha1` key |
| 5622 | exchange algorithms. |
David Ostrovsky | bcbf70d | 2022-06-29 13:27:03 +0200 | [diff] [blame] | 5623 | |
| 5624 | See also link:https://github.com/apache/mina-sshd/tree/master#key-exchange[key exchange,role=external,window=_blank]. |
| 5625 | |
| 5626 | By default, all supported key exchange algorithms are available. |
Scott Dial | b4a04fa | 2016-03-15 09:44:11 -0400 | [diff] [blame] | 5627 | -- |
| 5628 | |
Alex Blewitt | 7efb06f | 2013-04-01 12:46:48 -0400 | [diff] [blame] | 5629 | [[sshd.kerberosKeytab]]sshd.kerberosKeytab:: |
| 5630 | + |
| 5631 | Enable kerberos authentication for SSH connections. To permit |
| 5632 | kerberos authentication, the server must have a host principal |
| 5633 | (see `sshd.kerberosPrincipal`) which is acquired from a keytab. |
| 5634 | This must be provisioned by the kerberos administrators, and is |
| 5635 | typically installed into `/etc/krb5.keytab` on host machines. |
| 5636 | + |
| 5637 | The keytab must contain at least one `host/` principal, typically |
| 5638 | using the host's canonical name. If it does not use the |
| 5639 | canonical name, the `sshd.kerberosPrincipal` should be configured |
| 5640 | with the correct name. |
| 5641 | + |
| 5642 | By default, not set and so kerberos authentication is not enabled. |
| 5643 | |
| 5644 | [[sshd.kerberosPrincipal]]sshd.kerberosPrincipal:: |
| 5645 | + |
| 5646 | If kerberos authentication is enabled with `sshd.kerberosKeytab`, |
| 5647 | instead use the given principal name instead of the default. |
| 5648 | If the principal does not begin with `host/` a warning message is |
| 5649 | printed and may prevent successful authentication. |
| 5650 | + |
| 5651 | This may be useful if the host is behind an IP load balancer or |
| 5652 | other SSH forwarding systems, since the principal name is constructed |
| 5653 | by the client and must match for kerberos authentication to work. |
| 5654 | + |
| 5655 | By default, `host/canonical.host.name` |
| 5656 | |
Shawn Pearce | 318bfca | 2013-10-17 22:15:38 -0700 | [diff] [blame] | 5657 | [[sshd.requestLog]]sshd.requestLog:: |
| 5658 | + |
| 5659 | Enable (or disable) the `'$site_path'/logs/sshd_log` request log. |
| 5660 | If enabled, a request log file is written out by the SSH daemon. |
Matthias Sohn | 450bc20 | 2020-08-20 14:40:32 +0200 | [diff] [blame] | 5661 | The sshd log format is documented link:logs.html#_sshd_log[here]. |
Shawn Pearce | 318bfca | 2013-10-17 22:15:38 -0700 | [diff] [blame] | 5662 | + |
David Ostrovsky | 8e4a990 | 2013-11-19 23:57:48 +0100 | [diff] [blame] | 5663 | `log4j.appender` with the name `sshd_log` can be configured to overwrite |
| 5664 | programmatic configuration. |
| 5665 | + |
David Pursehouse | a3af255 | 2016-08-02 14:04:44 +0900 | [diff] [blame] | 5666 | By default, `true`. |
Gustaf Lundh | 4e85993 | 2018-04-16 10:56:31 +0200 | [diff] [blame] | 5667 | + |
Sven Selberg | 2a0beab | 2018-04-20 14:49:20 +0200 | [diff] [blame] | 5668 | This value supports link:#reloadConfig[configuration reloads]. |
Shawn Pearce | 318bfca | 2013-10-17 22:15:38 -0700 | [diff] [blame] | 5669 | |
David Ostrovsky | 985201b | 2015-03-04 22:37:33 +0100 | [diff] [blame] | 5670 | [[sshd.rekeyBytesLimit]]sshd.rekeyBytesLimit:: |
| 5671 | + |
| 5672 | The SSH daemon will issue a rekeying after a certain amount of data. |
| 5673 | This configuration option allows you to tweak that setting. |
| 5674 | + |
| 5675 | By default, 1073741824 (bytes, 1GB). |
| 5676 | + |
David Pursehouse | a3af255 | 2016-08-02 14:04:44 +0900 | [diff] [blame] | 5677 | The `rekeyBytesLimit` cannot be set to lower than 32. |
David Ostrovsky | 985201b | 2015-03-04 22:37:33 +0100 | [diff] [blame] | 5678 | |
| 5679 | [[sshd.rekeyTimeLimit]]sshd.rekeyTimeLimit:: |
| 5680 | + |
| 5681 | The SSH daemon will issue a rekeying after a certain amount of time. |
| 5682 | This configuration option allows you to tweak that setting. |
| 5683 | + |
| 5684 | By default, 1h. |
| 5685 | + |
| 5686 | Set to 0 to disable this check. |
| 5687 | |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 5688 | [[suggest]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 5689 | === Section suggest |
Shawn O. Pearce | 07bd6fb | 2011-04-29 19:15:47 -0700 | [diff] [blame] | 5690 | |
Sven Selberg | 42d9d29 | 2014-08-13 11:20:11 +0200 | [diff] [blame] | 5691 | [[suggest.maxSuggestedReviewers]]suggest.maxSuggestedReviewers:: |
| 5692 | + |
| 5693 | The maximum numbers of reviewers suggested. |
| 5694 | + |
| 5695 | By default 10. |
Gustaf Lundh | 25e608f | 2018-04-16 10:54:53 +0200 | [diff] [blame] | 5696 | + |
Sven Selberg | 2a0beab | 2018-04-20 14:49:20 +0200 | [diff] [blame] | 5697 | This value supports link:#reloadConfig[configuration reloads]. |
Sven Selberg | 42d9d29 | 2014-08-13 11:20:11 +0200 | [diff] [blame] | 5698 | |
Edwin Kempin | f957dc2 | 2012-10-19 20:41:18 +0200 | [diff] [blame] | 5699 | [[suggest.from]]suggest.from:: |
| 5700 | + |
| 5701 | The number of characters that a user must have typed before suggestions |
Patrick Hiesel | 87880b0 | 2016-05-03 18:15:08 +0200 | [diff] [blame] | 5702 | are provided. If set to 0, suggestions are always provided. This is only |
| 5703 | used for suggesting accounts when adding members to a group. |
Edwin Kempin | f957dc2 | 2012-10-19 20:41:18 +0200 | [diff] [blame] | 5704 | + |
| 5705 | By default 0. |
Nasser Grainawi | c3b0534 | 2022-02-25 16:58:13 -0700 | [diff] [blame] | 5706 | |
Gal Paikin | 0d07c54 | 2020-01-08 17:11:53 +0200 | [diff] [blame] | 5707 | [[suggest.relevantChanges]]suggest.relevantChanges:: |
| 5708 | + |
| 5709 | When suggesting reviewers, we go over recent changes of the user, and |
| 5710 | give priority to users that are present as reviewers in any of those |
| 5711 | changes. The number of changes we go over is `sugggest.relevantChanges`. |
| 5712 | + |
Gal Paikin | cb5a7ca | 2020-02-18 09:44:28 +0100 | [diff] [blame] | 5713 | This nubmer is a tradeoff between speed and accuracy. |
Gal Paikin | 0d07c54 | 2020-01-08 17:11:53 +0200 | [diff] [blame] | 5714 | A high number would be accurate but slow, and a low number would be |
| 5715 | fast but inaccurate. |
Gal Paikin | cb5a7ca | 2020-02-18 09:44:28 +0100 | [diff] [blame] | 5716 | + |
| 5717 | By default 50. |
Edwin Kempin | f957dc2 | 2012-10-19 20:41:18 +0200 | [diff] [blame] | 5718 | |
Matthias Sohn | 21b652c | 2021-02-22 22:51:18 +0100 | [diff] [blame] | 5719 | [[suggest.skipServiceUsers]]suggest.skipServiceUsers:: |
| 5720 | + |
| 5721 | If link:access-control.html#service_users[service users] should be skipped when |
| 5722 | suggesting reviewers. |
| 5723 | + |
| 5724 | By default true. |
| 5725 | |
Edwin Kempin | 0a49eca | 2019-06-21 09:38:46 +0200 | [diff] [blame] | 5726 | [[tracing]] |
| 5727 | === Section tracing |
| 5728 | |
| 5729 | [[tracing.performanceLogging]]tracing.performanceLogging:: |
| 5730 | + |
| 5731 | Whether performance logging is enabled. |
| 5732 | + |
| 5733 | When performance logging is enabled, performance events for some |
| 5734 | operations are collected in memory while a request is running. At the |
| 5735 | end of the request the performance events are handed over to the |
| 5736 | link:dev-plugins.html#performance-logger[PerformanceLogger] plugins. |
| 5737 | This means if performance logging is enabled, the memory footprint of |
Sven Selberg | c5fcca0 | 2022-04-22 13:37:53 +0200 | [diff] [blame] | 5738 | requests can be markedly increased. |
| 5739 | In one recorded case the impact was an overall heap increase of 40% |
| 5740 | (using the metrics-reporter-graphite plugin), in other instances the |
| 5741 | heap increase wasn't nearly as dramatic and the impact is most likely |
| 5742 | dependent on which plugin is used. |
Edwin Kempin | 0a49eca | 2019-06-21 09:38:46 +0200 | [diff] [blame] | 5743 | + |
Sven Selberg | c5fcca0 | 2022-04-22 13:37:53 +0200 | [diff] [blame] | 5744 | By default, false. |
Edwin Kempin | 0a49eca | 2019-06-21 09:38:46 +0200 | [diff] [blame] | 5745 | |
Edwin Kempin | 2cba298 | 2019-07-05 13:19:43 +0200 | [diff] [blame] | 5746 | [[tracing.traceid]] |
| 5747 | ==== Subsection tracing.<trace-id> |
| 5748 | |
| 5749 | There can be multiple `tracing.<trace-id>` subsections to configure |
| 5750 | automatic tracing of requests. To be traced a request must match all |
| 5751 | conditions of one `tracing.<trace-id>` subsection. The subsection name |
| 5752 | is used as trace ID. Using this trace ID administrators can find |
| 5753 | matching log entries. |
| 5754 | |
| 5755 | [[tracing.traceid.requestType]]tracing.<trace-id>.requestType:: |
| 5756 | + |
| 5757 | Type of request for which request tracing should be always enabled (can |
| 5758 | be `GIT_RECEIVE`, `GIT_UPLOAD`, `REST` and `SSH`). |
| 5759 | + |
| 5760 | May be specified multiple times. |
| 5761 | + |
| 5762 | By default, unset (all request types are matched). |
| 5763 | |
Edwin Kempin | b0ddb0b | 2019-07-08 12:11:32 +0200 | [diff] [blame] | 5764 | [[tracing.traceid.requestUriPattern]]tracing.<trace-id>.requestUriPattern:: |
| 5765 | + |
| 5766 | Regular expression to match request URIs for which request tracing |
Edwin Kempin | 764dec8 | 2021-09-22 10:45:01 +0200 | [diff] [blame] | 5767 | should be enabled except if they match |
| 5768 | link:tracing.traceid.excludedRequestUriPattern[excludedRequestUriPattern]. |
| 5769 | Request URIs are only available for REST requests. Request URIs never include |
| 5770 | the '/a' prefix. |
Edwin Kempin | b0ddb0b | 2019-07-08 12:11:32 +0200 | [diff] [blame] | 5771 | + |
| 5772 | May be specified multiple times. |
| 5773 | + |
| 5774 | By default, unset (all request URIs are matched). |
| 5775 | |
Edwin Kempin | 764dec8 | 2021-09-22 10:45:01 +0200 | [diff] [blame] | 5776 | [[tracing.traceid.excludedRequestUriPattern]]tracing.<trace-id>.excludedRequestUriPattern:: |
| 5777 | + |
| 5778 | Regular expression to match request URIs for which request tracing |
| 5779 | should not be enabled even if they match |
| 5780 | link:#tracing.traceid.requestUriPattern[requestUriPattern]. |
| 5781 | Request URIs are only available for REST requests. Request URIs never include |
Edwin Kempin | 631abf1 | 2023-09-01 09:01:58 +0000 | [diff] [blame] | 5782 | the '/a' prefix and don't contain the query string with the request parameters. |
Edwin Kempin | 764dec8 | 2021-09-22 10:45:01 +0200 | [diff] [blame] | 5783 | + |
| 5784 | May be specified multiple times. |
| 5785 | + |
| 5786 | By default, unset (no request URIs are excluded). |
| 5787 | |
Edwin Kempin | 631abf1 | 2023-09-01 09:01:58 +0000 | [diff] [blame] | 5788 | [[tracing.traceid.requestQueryStringPattern]]tracing.<trace-id>.requestQueryStringPattern:: |
| 5789 | + |
| 5790 | Regular expression to match request query strings for which request tracing |
| 5791 | should be enabled. The query string is the portion of the URL that contains |
| 5792 | the request parameters. |
| 5793 | + |
| 5794 | May be specified multiple times. |
| 5795 | + |
| 5796 | Example: |
| 5797 | ---- |
| 5798 | requestQueryStringPattern = .*limit=.* |
| 5799 | ---- |
| 5800 | + |
| 5801 | By default, unset (all request query strings are matched). |
| 5802 | |
Edwin Kempin | 24434fe | 2023-11-03 12:41:19 +0000 | [diff] [blame] | 5803 | [[tracing.traceid.headerPattern]]tracing.<trace-id>.headerPattern:: |
| 5804 | + |
| 5805 | Regular expression to match headers for which request tracing should be |
| 5806 | enabled. The regular expression is matched against the headers in the |
| 5807 | format '<header-name>=<header-value>'. |
| 5808 | + |
| 5809 | May be specified multiple times. |
| 5810 | + |
| 5811 | Example: |
| 5812 | ---- |
| 5813 | requestQueryStringPattern = User-Agent=foo-.* |
| 5814 | ---- |
| 5815 | + |
| 5816 | By default, unset (all headers are matched). |
| 5817 | |
Edwin Kempin | 2cba298 | 2019-07-05 13:19:43 +0200 | [diff] [blame] | 5818 | [[tracing.traceid.account]]tracing.<trace-id>.account:: |
| 5819 | + |
| 5820 | Account ID of an account for which request tracing should be always |
| 5821 | enabled. |
| 5822 | + |
| 5823 | May be specified multiple times. |
| 5824 | + |
| 5825 | By default, unset (all accounts are matched). |
| 5826 | |
| 5827 | [[tracing.traceid.projectPattern]]tracing.<trace-id>.projectPattern:: |
| 5828 | + |
| 5829 | Regular expression to match project names for which request tracing |
| 5830 | should be always enabled. |
| 5831 | + |
| 5832 | May be specified multiple times. |
| 5833 | + |
| 5834 | By default, unset (all projects are matched). |
| 5835 | |
Edwin Kempin | 927ff82 | 2021-08-03 15:46:34 +0200 | [diff] [blame] | 5836 | [[deadline.id]] |
| 5837 | ==== Subsection deadline.<id> |
| 5838 | |
| 5839 | There can be multiple `deadline.<id>` subsections to configure deadlines for |
| 5840 | request executions. For a deadline to apply all conditions of the |
| 5841 | `deadline.<id>` subsection must match. The subsection name is the ID of the |
| 5842 | deadline configuration and allows to track back an applied deadline to its |
| 5843 | configuration. |
| 5844 | |
| 5845 | Clients can override the deadlines that are configured here by setting a |
| 5846 | deadline on the request. |
| 5847 | |
| 5848 | Deadlines are only supported for `REST`, `SSH` and `GIT_RECEIVE` requests, but |
| 5849 | not for `GIT_UPLOAD` requests. |
| 5850 | |
| 5851 | [[deadline.id.timeout]]deadline.<id>.timeout:: |
| 5852 | + |
| 5853 | Timeout after which matching requests should be cancelled. |
| 5854 | + |
| 5855 | Values must be specified using standard time unit abbreviations ('ms', 'sec', |
| 5856 | 'min', etc.). |
| 5857 | + |
| 5858 | For some requests additional timeout configurations may apply, e.g. |
| 5859 | link:#receive.timeout[receive.timeout] for git pushes. |
| 5860 | + |
| 5861 | By default, unset. |
| 5862 | |
Edwin Kempin | 0fecade | 2021-08-04 11:14:44 +0200 | [diff] [blame] | 5863 | [[deadline.id.isAdvisory]]deadline.<id>.isAdvisory:: |
| 5864 | + |
| 5865 | Whether this deadline is an advisory deadline. Advisory deadlines do not cause |
| 5866 | requests to be aborted when they are exceeded. Instead, if an advisory deadline |
Edwin Kempin | 0bc9df9 | 2021-08-05 16:15:09 +0200 | [diff] [blame] | 5867 | is exceeded, only the `cancellation/advisory_deadline_count` metrics is |
| 5868 | incremented and a log is written. This is useful to test how many requests would |
| 5869 | be affected by a new deadline configuration. |
Edwin Kempin | 0fecade | 2021-08-04 11:14:44 +0200 | [diff] [blame] | 5870 | + |
| 5871 | By default, `false`. |
| 5872 | |
Edwin Kempin | 927ff82 | 2021-08-03 15:46:34 +0200 | [diff] [blame] | 5873 | [[deadline.id.requestType]]deadline.<id>.requestType:: |
| 5874 | + |
| 5875 | Type of request to which the deadline applies (can be `GIT_RECEIVE`, `REST` and |
| 5876 | `SSH`). |
| 5877 | + |
| 5878 | May be specified multiple times. |
| 5879 | + |
| 5880 | By default, unset (all request types are matched). |
| 5881 | |
| 5882 | [[deadline.id.requestUriPattern]]deadline.<id>.requestUriPattern:: |
| 5883 | + |
Edwin Kempin | 764dec8 | 2021-09-22 10:45:01 +0200 | [diff] [blame] | 5884 | Regular expression to match request URIs to which the deadline applies except if |
| 5885 | they match |
| 5886 | link:#deadline.id.excludedRequestUriPattern[excludedRequestUriPattern]. Request |
Edwin Kempin | 927ff82 | 2021-08-03 15:46:34 +0200 | [diff] [blame] | 5887 | URIs are only available for REST requests. Request URIs never include the '/a' |
| 5888 | prefix. |
| 5889 | + |
| 5890 | May be specified multiple times. |
| 5891 | + |
| 5892 | By default, unset (all request URIs are matched). |
| 5893 | |
Edwin Kempin | 764dec8 | 2021-09-22 10:45:01 +0200 | [diff] [blame] | 5894 | [[deadline.id.excludedRequestUriPattern]]deadline.<id>.excludedRequestUriPattern:: |
| 5895 | + |
| 5896 | Regular expression to match request URIs to which the deadline should not be |
| 5897 | applied even if they match |
| 5898 | link:#deadline.id.requestUriPattern[requestUriPattern]. Request URIs are only |
| 5899 | available for REST requests. Request URIs never include the '/a' prefix. |
| 5900 | + |
| 5901 | May be specified multiple times. |
| 5902 | + |
| 5903 | By default, unset (no request URIs are excluded). |
| 5904 | |
Edwin Kempin | 927ff82 | 2021-08-03 15:46:34 +0200 | [diff] [blame] | 5905 | [[deadline.id.account]]deadline.<id>.account:: |
| 5906 | + |
| 5907 | Account ID of an account to which the deadline applies. |
| 5908 | + |
| 5909 | May be specified multiple times. |
| 5910 | + |
| 5911 | By default, unset (all accounts are matched). |
| 5912 | |
| 5913 | [[deadline.id.projectPattern]]deadline.<id>.projectPattern:: |
| 5914 | + |
| 5915 | Regular expression to match project names to which the deadline applies. |
| 5916 | + |
| 5917 | May be specified multiple times. |
| 5918 | + |
| 5919 | By default, unset (all projects are matched). |
| 5920 | |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 5921 | [[trackingid]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 5922 | === Section trackingid |
Goran Lungberg | 04132a1 | 2010-06-15 17:20:37 -0700 | [diff] [blame] | 5923 | |
Shawn O. Pearce | e800b1e | 2010-06-16 17:33:43 -0700 | [diff] [blame] | 5924 | Tagged footer lines containing references to external |
| 5925 | tracking systems, parsed out of the commit message and |
David Pursehouse | d55a6b6 | 2015-02-27 17:39:38 +0900 | [diff] [blame] | 5926 | saved in Gerrit's secondary index. |
Shawn Pearce | ff61c8a | 2013-10-07 19:35:53 -0700 | [diff] [blame] | 5927 | |
| 5928 | After making changes to this section, existing changes |
Shawn Pearce | 9f4de52 | 2013-11-29 11:57:53 -0800 | [diff] [blame] | 5929 | must be reindexed with link:pgm-reindex.html[reindex]. |
Goran Lungberg | 04132a1 | 2010-06-15 17:20:37 -0700 | [diff] [blame] | 5930 | |
Edwin Kempin | bb421f1 | 2011-08-25 11:19:00 +0200 | [diff] [blame] | 5931 | The tracking ids are searchable using tr:<tracking id> or |
Shawn O. Pearce | 91763a0 | 2010-06-16 15:39:33 -0700 | [diff] [blame] | 5932 | bug:<tracking id>. |
Goran Lungberg | 04132a1 | 2010-06-15 17:20:37 -0700 | [diff] [blame] | 5933 | |
| 5934 | ---- |
| 5935 | [trackingid "jira-bug"] |
| 5936 | footer = Bugfix: |
David Pursehouse | ce7f686 | 2015-02-19 14:52:45 +0900 | [diff] [blame] | 5937 | footer = Bug: |
Goran Lungberg | 04132a1 | 2010-06-15 17:20:37 -0700 | [diff] [blame] | 5938 | match = JRA\\d{2,8} |
| 5939 | system = JIRA |
| 5940 | |
| 5941 | [trackingid "jira-feature"] |
| 5942 | footer = Feature |
| 5943 | match = JRA(\\d{2,8}) |
| 5944 | system = JIRA |
| 5945 | ---- |
| 5946 | |
| 5947 | [[trackingid.name.footer]]trackingid.<name>.footer:: |
| 5948 | + |
David Pursehouse | ce7f686 | 2015-02-19 14:52:45 +0900 | [diff] [blame] | 5949 | A prefix tag that identifies the footer line to parse for tracking ids. |
| 5950 | + |
| 5951 | Several trackingid entries can have the same footer tag, and a single trackingid |
| 5952 | entry can have multiple footer tags. |
| 5953 | + |
| 5954 | If multiple footer tags are specified, each tag will be parsed separately and |
| 5955 | duplicates will be ignored. |
| 5956 | + |
| 5957 | The trailing ":" is optional. |
Goran Lungberg | 04132a1 | 2010-06-15 17:20:37 -0700 | [diff] [blame] | 5958 | |
| 5959 | [[trackingid.name.match]]trackingid.<name>.match:: |
| 5960 | + |
Magnus Bäck | e561183 | 2011-02-02 08:57:15 +0100 | [diff] [blame] | 5961 | A link:http://download.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html[standard |
Marian Harbach | 3425337 | 2019-12-10 18:01:31 +0100 | [diff] [blame] | 5962 | Java regular expression (java.util.regex),role=external,window=_blank] used to match the |
Magnus Bäck | e561183 | 2011-02-02 08:57:15 +0100 | [diff] [blame] | 5963 | external tracking id part of the footer line. The match can |
| 5964 | result in several entries in the DB. If grouping is used in the |
| 5965 | regex the first group will be interpreted as the tracking id. |
Christian Aistleitner | 5cec368 | 2013-03-16 23:02:37 +0100 | [diff] [blame] | 5966 | Tracking ids longer than 32 characters will be ignored. |
Goran Lungberg | 04132a1 | 2010-06-15 17:20:37 -0700 | [diff] [blame] | 5967 | + |
| 5968 | The configuration file parser eats one level of backslashes, so the |
| 5969 | character class `\s` requires `\\s` in the configuration file. The |
| 5970 | parser also terminates the line at the first `#`, so a match |
| 5971 | expression containing # must be wrapped in double quotes. |
| 5972 | |
| 5973 | [[trackingid.name.system]]trackingid.<name>.system:: |
| 5974 | + |
Marija Savtchouk | 957b17a | 2022-06-29 16:22:50 +0100 | [diff] [blame] | 5975 | The name of the external tracking system (maximum 20 characters). |
Goran Lungberg | 04132a1 | 2010-06-15 17:20:37 -0700 | [diff] [blame] | 5976 | It is possible to have several trackingid entries for the same |
| 5977 | tracking system. |
| 5978 | |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 5979 | [[transfer]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 5980 | === Section transfer |
Shawn O. Pearce | 6e4dfdd | 2010-05-12 17:26:08 -0700 | [diff] [blame] | 5981 | |
| 5982 | [[transfer.timeout]]transfer.timeout:: |
| 5983 | + |
| 5984 | Number of seconds to wait for a single network read or write |
| 5985 | to complete before giving up and declaring the remote side is |
| 5986 | not responding. If 0, there is no timeout, and this server will |
| 5987 | wait indefinitely for a transfer to finish. |
| 5988 | + |
| 5989 | A timeout should be large enough to mostly transfer the objects to |
| 5990 | the other side. 1 second may be too small for larger projects, |
| 5991 | especially over a WAN link, while 10-30 seconds is a much more |
| 5992 | reasonable timeout value. |
| 5993 | + |
| 5994 | Defaults to 0 seconds, wait indefinitely. |
| 5995 | |
lincoln | 2be1160 | 2010-07-05 10:53:25 -0300 | [diff] [blame] | 5996 | |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 5997 | [[upload]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 5998 | === Section upload |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 5999 | |
Dave Borowitz | b179514 | 2017-10-12 07:13:37 -0700 | [diff] [blame] | 6000 | Options to control the behavior of `upload-pack` on the server side, |
| 6001 | which handles a user's fetch, clone, or repo sync command. |
lincoln | 2be1160 | 2010-07-05 10:53:25 -0300 | [diff] [blame] | 6002 | |
| 6003 | ---- |
| 6004 | [upload] |
| 6005 | allowGroup = GROUP_ALLOWED_TO_EXECUTE |
| 6006 | allowGroup = YET_ANOTHER_GROUP_ALLOWED_TO_EXECUTE |
| 6007 | ---- |
| 6008 | |
| 6009 | [[upload.allowGroup]]upload.allowGroup:: |
| 6010 | + |
Dave Borowitz | b179514 | 2017-10-12 07:13:37 -0700 | [diff] [blame] | 6011 | Name of the groups of users that are allowed to execute 'upload-pack'. |
| 6012 | One or more groups can be set. |
lincoln | 2be1160 | 2010-07-05 10:53:25 -0300 | [diff] [blame] | 6013 | + |
| 6014 | If no groups are added, any user will be allowed to execute |
| 6015 | 'upload-pack' on the server. |
| 6016 | |
Owen Li | e2877bb | 2017-07-14 09:11:20 -0400 | [diff] [blame] | 6017 | [[accountDeactivation]] |
| 6018 | === Section accountDeactivation |
| 6019 | |
| 6020 | Configures the parameters for the scheduled task to sweep and deactivate Gerrit |
| 6021 | accounts according to their status reported by the auth backend. Currently only |
| 6022 | supported for LDAP backends. |
| 6023 | |
| 6024 | [[accountDeactivation.startTime]]accountDeactivation.startTime:: |
| 6025 | + |
Edwin Kempin | d33d95a | 2018-02-16 11:44:04 +0100 | [diff] [blame] | 6026 | The link:#schedule-configuration-startTime[start time] for running |
| 6027 | account deactivations. |
Owen Li | e2877bb | 2017-07-14 09:11:20 -0400 | [diff] [blame] | 6028 | |
| 6029 | [[accountDeactivation.interval]]accountDeactivation.interval:: |
| 6030 | + |
Edwin Kempin | d33d95a | 2018-02-16 11:44:04 +0100 | [diff] [blame] | 6031 | The link:#schedule-configuration-interval[interval] for running |
| 6032 | account deactivations. |
| 6033 | |
Saša Živkov | f096611 | 2020-03-17 12:20:31 +0100 | [diff] [blame] | 6034 | Note that the task will only be scheduled if the |
| 6035 | link:#autoUpdateAccountActiveStatus[auth.autoUpdateAccountActiveStatus] |
| 6036 | is set to true. |
| 6037 | |
Edwin Kempin | d33d95a | 2018-02-16 11:44:04 +0100 | [diff] [blame] | 6038 | link:#schedule-configuration-examples[Schedule examples] can be found |
| 6039 | in the link:#schedule-configuration[Schedule Configuration] section. |
Owen Li | e2877bb | 2017-07-14 09:11:20 -0400 | [diff] [blame] | 6040 | |
Stefan Beller | 0f724ff | 2015-07-17 10:17:51 -0700 | [diff] [blame] | 6041 | [[submodule]] |
| 6042 | === Section submodule |
| 6043 | |
Shawn Pearce | dc477cd | 2016-03-24 19:56:18 -0700 | [diff] [blame] | 6044 | [[submodule.verbosesuperprojectupdate]]submodule.verboseSuperprojectUpdate:: |
Stefan Beller | 0f724ff | 2015-07-17 10:17:51 -0700 | [diff] [blame] | 6045 | + |
| 6046 | When using link:user-submodules.html#automatic_update[automatic superproject updates] |
Zhen Chen | c877ca9 | 2016-07-27 14:22:37 -0700 | [diff] [blame] | 6047 | this option will determine how the submodule commit messages are included into |
Stefan Beller | 0f724ff | 2015-07-17 10:17:51 -0700 | [diff] [blame] | 6048 | the commit message of the superproject update. |
| 6049 | + |
Zhen Chen | c877ca9 | 2016-07-27 14:22:37 -0700 | [diff] [blame] | 6050 | If `FALSE`, will not include any commit messages for the gitlink update. |
| 6051 | + |
| 6052 | If `SUBJECT_ONLY`, will include only the commit subjects. |
| 6053 | + |
| 6054 | If `TRUE`, will include full commit messages. |
| 6055 | + |
| 6056 | By default this is `TRUE`. |
Stefan Beller | 0f724ff | 2015-07-17 10:17:51 -0700 | [diff] [blame] | 6057 | |
Shawn Pearce | dc477cd | 2016-03-24 19:56:18 -0700 | [diff] [blame] | 6058 | [[submodule.enableSuperProjectSubscriptions]]submodule.enableSuperProjectSubscriptions:: |
Stefan Beller | 8cc252e | 2016-03-10 10:06:53 -0800 | [diff] [blame] | 6059 | + |
| 6060 | This allows to enable the superproject subscription mechanism. |
| 6061 | + |
| 6062 | By default this is true. |
Stefan Beller | 0f724ff | 2015-07-17 10:17:51 -0700 | [diff] [blame] | 6063 | |
Patrick Hiesel | 44e5d6e | 2017-08-24 16:07:26 +0200 | [diff] [blame] | 6064 | [[submodule.maxCombinedCommitMessageSize]]submodule.maxCombinedCommitMessageSize:: |
| 6065 | + |
| 6066 | This allows to limit the length of the commit message for a submodule. |
| 6067 | + |
| 6068 | By default this is 262144 (256 KiB). |
| 6069 | + |
| 6070 | Common unit suffixes of k, m, or g are supported. |
| 6071 | |
| 6072 | [[submodule.maxCommitMessages]]submodule.maxCommitMessages:: |
| 6073 | + |
| 6074 | This allows to limit the number of commit messages that should be combined when creating |
| 6075 | a commit message for a submodule. |
| 6076 | + |
| 6077 | By default this is 1000. |
| 6078 | |
Yuxuan 'fishy' Wang | 3fba03a | 2013-12-10 15:08:11 -0800 | [diff] [blame] | 6079 | [[user]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 6080 | === Section user |
Shawn O. Pearce | 0a35191 | 2009-06-01 08:14:46 -0700 | [diff] [blame] | 6081 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 6082 | [[user.name]]user.name:: |
Shawn O. Pearce | 0a35191 | 2009-06-01 08:14:46 -0700 | [diff] [blame] | 6083 | + |
| 6084 | Name that Gerrit calls itself in Git when it creates a new Git |
| 6085 | commit, such as a merge during change submission. |
| 6086 | + |
| 6087 | By default this is "Gerrit Code Review". |
| 6088 | |
Shawn O. Pearce | 92a7fd1 | 2009-08-18 19:52:48 -0700 | [diff] [blame] | 6089 | [[user.email]]user.email:: |
Shawn O. Pearce | 0a35191 | 2009-06-01 08:14:46 -0700 | [diff] [blame] | 6090 | + |
| 6091 | Email address that Gerrit refers to itself as when it creates a |
| 6092 | new Git commit, such as a merge commit during change submission. |
| 6093 | + |
Kenyon Ralph | 5d1deb0 | 2021-10-05 14:55:32 -0700 | [diff] [blame] | 6094 | If not set, Gerrit generates this as "gerrit@``hostname``", where |
Shawn O. Pearce | 0a35191 | 2009-06-01 08:14:46 -0700 | [diff] [blame] | 6095 | `hostname` is the hostname of the system Gerrit is running on. |
| 6096 | + |
| 6097 | By default, not set, generating the value at startup. |
| 6098 | |
Edwin Kempin | 0e02ded | 2011-09-16 15:10:14 +0200 | [diff] [blame] | 6099 | [[user.anonymousCoward]]user.anonymousCoward:: |
| 6100 | + |
David Pursehouse | a1d633b | 2014-05-02 17:21:02 +0900 | [diff] [blame] | 6101 | 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] | 6102 | notifications if the full name of the user is not set. |
| 6103 | + |
Han-Wen Nienhuys | 3fb723d | 2017-11-20 19:21:13 +0100 | [diff] [blame] | 6104 | By default "Name of user not set" is used. |
Edwin Kempin | 0e02ded | 2011-09-16 15:10:14 +0200 | [diff] [blame] | 6105 | |
Edwin Kempin | d33d95a | 2018-02-16 11:44:04 +0100 | [diff] [blame] | 6106 | [[schedule-configuration]] |
| 6107 | === Schedule Configuration |
| 6108 | |
| 6109 | Schedule configurations are used for running periodic background jobs. |
| 6110 | |
| 6111 | A schedule configuration consists of two parameters: |
| 6112 | |
| 6113 | [[schedule-configuration-interval]] |
| 6114 | * `interval`: |
| 6115 | Interval for running the periodic background job. The interval must be |
| 6116 | larger than zero. The following suffixes are supported to define the |
| 6117 | time unit for the interval: |
| 6118 | ** `s`, `sec`, `second`, `seconds` |
| 6119 | ** `m`, `min`, `minute`, `minutes` |
| 6120 | ** `h`, `hr`, `hour`, `hours` |
| 6121 | ** `d`, `day`, `days` |
| 6122 | ** `w`, `week`, `weeks` (`1 week` is treated as `7 days`) |
| 6123 | ** `mon`, `month`, `months` (`1 month` is treated as `30 days`) |
| 6124 | ** `y`, `year`, `years` (`1 year` is treated as `365 days`) |
| 6125 | |
| 6126 | [[schedule-configuration-startTime]] |
| 6127 | * `startTime`: |
| 6128 | The start time defines the first execution of the periodic background |
| 6129 | job. If the configured `interval` is shorter than `startTime - now` the |
| 6130 | start time will be preponed by the maximum integral multiple of |
| 6131 | `interval` so that the start time is still in the future. `startTime` |
| 6132 | must have one of the following formats: |
| 6133 | |
| 6134 | ** `<day of week> <hours>:<minutes>` |
| 6135 | ** `<hours>:<minutes>` |
| 6136 | |
| 6137 | + |
| 6138 | The placeholders can have the following values: |
| 6139 | |
| 6140 | *** `<day of week>`: |
| 6141 | `Mon`, `Tue`, `Wed`, `Thu`, `Fri`, `Sat`, `Sun` |
| 6142 | *** `<hours>`: |
| 6143 | `00`-`23` |
| 6144 | *** `<minutes>`: |
| 6145 | `00`-`59` |
| 6146 | |
| 6147 | + |
| 6148 | The time zone cannot be specified but is always the system default |
David Pursehouse | 18f388a | 2019-04-10 09:36:18 +0900 | [diff] [blame] | 6149 | 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] | 6150 | |
| 6151 | The section (and optionally the subsection) in which the `interval` and |
| 6152 | `startTime` keys must be set depends on the background job for which a |
| 6153 | schedule should be configured. E.g. for the change cleanup job the keys |
| 6154 | must be set in the link:#changeCleanup[changeCleanup] section: |
| 6155 | |
| 6156 | ---- |
| 6157 | [changeCleanup] |
| 6158 | startTime = Fri 10:30 |
| 6159 | interval = 2 days |
| 6160 | ---- |
| 6161 | |
| 6162 | [[schedule-configuration-examples]] |
| 6163 | Examples for a schedule configuration: |
| 6164 | |
| 6165 | * Example 1: |
| 6166 | + |
| 6167 | ---- |
| 6168 | startTime = Fri 10:30 |
| 6169 | interval = 2 days |
| 6170 | ---- |
| 6171 | + |
| 6172 | Assuming that the server is started on `Mon 07:00` then |
| 6173 | `startTime - now` is `4 days 3:30 hours`. This is larger than the |
| 6174 | interval hence the start time is preponed by the maximum integral |
| 6175 | multiple of the interval so that start time is still in the future, |
| 6176 | i.e. preponed by 4 days. This yields a start time of `Mon 10:30`, next |
| 6177 | executions are `Wed 10:30`, `Fri 10:30`. etc. |
| 6178 | |
| 6179 | * Example 2: |
| 6180 | + |
| 6181 | ---- |
| 6182 | startTime = 06:00 |
| 6183 | interval = 1 day |
| 6184 | ---- |
| 6185 | + |
| 6186 | Assuming that the server is started on `Mon 07:00` then this yields the |
| 6187 | first run on Tuesday at 06:00 and a repetition interval of 1 day. |
| 6188 | |
Dave Borowitz | d4fdc93 | 2018-11-02 15:06:25 -0700 | [diff] [blame] | 6189 | [[All-Projects-project.config]] |
| 6190 | == File `etc/All-Projects/project.config` |
| 6191 | |
| 6192 | The optional file `'$site_path'/etc/All-Projects/project.config` provides |
| 6193 | defaults for configuration read from |
| 6194 | link:config-project-config.html[`project.config`] in the |
| 6195 | `All-Projects` repo. Unlike `gerrit.config`, this file contains project-type |
| 6196 | configuration rather than server-type configuration. |
| 6197 | |
| 6198 | Most administrators will not need this file, and should instead make commits to |
| 6199 | `All-Projects` to modify global config. However, a separate file can be useful |
| 6200 | when managing multiple Gerrit servers, since pushing changes to defaults using |
| 6201 | Puppet or a similar tool can be easier than scripting git updates to |
| 6202 | `All-Projects`. |
| 6203 | |
| 6204 | The contents of the file are loaded each time the `All-Projects` project is |
| 6205 | reloaded. Updating the file requires either evicting the project cache or |
| 6206 | restarting the server. |
| 6207 | |
| 6208 | Caveats: |
| 6209 | |
| 6210 | * The path from which the file is read corresponds to the name of the repo, |
| 6211 | which is link:#gerrit.allProjects[configurable]. |
| 6212 | * Although the file lives in a directory that shares a name with a repository, |
| 6213 | this directory is not a Git repository. |
| 6214 | * Only the file `project.config` is read from this directory to provide |
| 6215 | defaults; any other files in this directory, such as `rules.pl`, are ignored. |
| 6216 | (This behavior may change in the future.) |
| 6217 | * Group names listed in the access config in this file are resolved to UUIDs |
| 6218 | using the `groups` file in the repository, not in the config directory. As a |
| 6219 | result, setting ACLs in this file is not recommended. |
| 6220 | |
Hector Oswaldo Caballero | 98952b0 | 2017-08-24 06:31:28 -0400 | [diff] [blame] | 6221 | [[secure.config]] |
| 6222 | == File `etc/secure.config` |
Shawn O. Pearce | 0bf2f52 | 2009-05-14 11:02:03 -0700 | [diff] [blame] | 6223 | |
Shawn O. Pearce | c5fed82 | 2009-11-17 16:10:10 -0800 | [diff] [blame] | 6224 | The optional file `'$site_path'/etc/secure.config` overrides (or |
| 6225 | supplements) the settings supplied by `'$site_path'/etc/gerrit.config`. |
Shawn O. Pearce | 0d4037a | 2009-11-12 18:33:46 -0800 | [diff] [blame] | 6226 | The file should be readable only by the daemon process and can be |
| 6227 | used to contain private configuration entries that wouldn't normally |
| 6228 | be exposed to everyone. |
| 6229 | |
Shawn O. Pearce | c5fed82 | 2009-11-17 16:10:10 -0800 | [diff] [blame] | 6230 | Sample `etc/secure.config`: |
Shawn O. Pearce | 0d4037a | 2009-11-12 18:33:46 -0800 | [diff] [blame] | 6231 | ---- |
Shawn O. Pearce | 34f38cf | 2011-06-16 19:18:54 -0700 | [diff] [blame] | 6232 | [auth] |
| 6233 | registerEmailPrivateKey = 2zHNrXE2bsoylzUqDxZp0H1cqUmjgWb6 |
| 6234 | |
Shawn O. Pearce | 0d4037a | 2009-11-12 18:33:46 -0800 | [diff] [blame] | 6235 | [ldap] |
Shawn O. Pearce | 9d342a4 | 2009-12-16 15:49:05 -0800 | [diff] [blame] | 6236 | password = l3tm3srch |
Shawn O. Pearce | 0d4037a | 2009-11-12 18:33:46 -0800 | [diff] [blame] | 6237 | |
| 6238 | [httpd] |
Shawn O. Pearce | 9d342a4 | 2009-12-16 15:49:05 -0800 | [diff] [blame] | 6239 | sslKeyPassword = g3rr1t |
Shawn O. Pearce | 0d4037a | 2009-11-12 18:33:46 -0800 | [diff] [blame] | 6240 | |
| 6241 | [sendemail] |
Shawn O. Pearce | 9d342a4 | 2009-12-16 15:49:05 -0800 | [diff] [blame] | 6242 | smtpPass = sp@m |
Shawn O. Pearce | 7929d87 | 2011-05-15 13:33:15 -0700 | [diff] [blame] | 6243 | |
| 6244 | [remote "bar"] |
| 6245 | password = s3kr3t |
Shawn O. Pearce | 0d4037a | 2009-11-12 18:33:46 -0800 | [diff] [blame] | 6246 | ---- |
| 6247 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 6248 | == File `etc/peer_keys` |
Johan Bjork | 3e5ee30 | 2012-01-27 17:59:54 +0100 | [diff] [blame] | 6249 | |
| 6250 | The optional file `'$site_path'/etc/peer_keys` controls who can |
| 6251 | login as the 'Gerrit Code Review' user, required for the link:cmd-suexec.html[suexec] |
| 6252 | command. |
| 6253 | |
David Pursehouse | 90bed3f | 2020-06-09 22:07:19 +0200 | [diff] [blame] | 6254 | The format is one Base-64 encoded public key per line with optional comment, e.g.: |
| 6255 | ---- |
| 6256 | # Comments allowed at start of line |
| 6257 | AAAAC3...51R== john@example.net |
| 6258 | # Another comment |
| 6259 | AAAAB5...21S== jane@example.net |
| 6260 | ---- |
Johan Bjork | 3e5ee30 | 2012-01-27 17:59:54 +0100 | [diff] [blame] | 6261 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 6262 | === Configurable Parameters |
Shawn O. Pearce | d2b73db | 2009-01-09 11:55:47 -0800 | [diff] [blame] | 6263 | |
Shawn O. Pearce | 8e9c73b | 2009-05-08 17:38:25 -0700 | [diff] [blame] | 6264 | site_path:: |
| 6265 | + |
Shawn O. Pearce | d2b73db | 2009-01-09 11:55:47 -0800 | [diff] [blame] | 6266 | Local filesystem directory holding the site customization assets. |
| 6267 | Placing this directory under version control and/or backup is a |
| 6268 | good idea. |
Shawn O. Pearce | 8e9c73b | 2009-05-08 17:38:25 -0700 | [diff] [blame] | 6269 | + |
Shawn O. Pearce | c5fed82 | 2009-11-17 16:10:10 -0800 | [diff] [blame] | 6270 | Files in this directory provide additional configuration. |
Shawn O. Pearce | 8e9c73b | 2009-05-08 17:38:25 -0700 | [diff] [blame] | 6271 | + |
Shawn O. Pearce | d2b73db | 2009-01-09 11:55:47 -0800 | [diff] [blame] | 6272 | Other files support site customization. |
Shawn O. Pearce | 8e9c73b | 2009-05-08 17:38:25 -0700 | [diff] [blame] | 6273 | + |
Dave Borowitz | 1e49e14 | 2013-04-09 12:14:57 -0700 | [diff] [blame] | 6274 | * link:config-themes.html[Themes] |
Shawn O. Pearce | d2b73db | 2009-01-09 11:55:47 -0800 | [diff] [blame] | 6275 | |
Saša Živkov | d34dfe3 | 2017-11-20 11:14:35 +0100 | [diff] [blame] | 6276 | [[jgitConfig]] |
| 6277 | == File `etc/jgit.config` |
| 6278 | |
| 6279 | Gerrit uses the `$site_path/etc/jgit.config` file instead of the |
| 6280 | system-wide and user-global Git configuration for its runtime JGit |
| 6281 | configuration. |
| 6282 | |
| 6283 | Sample `etc/jgit.config` file: |
| 6284 | ---- |
| 6285 | [core] |
| 6286 | trustFolderStat = false |
| 6287 | ---- |
| 6288 | |
Matthias Sohn | 85c1879 | 2020-09-08 01:42:03 +0200 | [diff] [blame] | 6289 | [[jgit-gc]] |
| 6290 | === Section gc |
| 6291 | |
| 6292 | Options in section gc are used when command link:cmd-gc.html[gerrit gc] is used |
| 6293 | or scheduled via options link:cmd-gc.html#gc.startTime[gc.startTime] and |
| 6294 | link:cmd-gc.html#gc.interval[gc.interval]. |
| 6295 | |
| 6296 | [[gc.auto]]gc.auto:: |
| 6297 | + |
| 6298 | When there are approximately more than this many loose objects in the repository, |
| 6299 | auto gc will pack them. Some commands use this command to perform a light-weight |
| 6300 | garbage collection from time to time. The default value is 6700. |
| 6301 | + |
| 6302 | Setting this to 0 disables not only automatic packing based on the number of |
| 6303 | loose objects, but any other heuristic auto gc will otherwise use to determine |
| 6304 | if there’s work to do, such as link:#gc.autoPackLimit[gc.autoPackLimit]. |
| 6305 | |
| 6306 | [[gc.autodetach]]gc.autodetach:: |
| 6307 | + |
| 6308 | Makes auto gc run in a background thread. Default is `true`. |
| 6309 | |
| 6310 | [[gc.autopacklimit]]gc.autopacklimit:: |
| 6311 | + |
| 6312 | When there are more than this many packs that are not marked with `*.keep` file |
| 6313 | in the repository, auto gc consolidates them into one larger pack. The |
| 6314 | default value is 50. Setting this to 0 disables it. Setting `gc.auto` to 0 will |
| 6315 | also disable this. |
| 6316 | |
| 6317 | [[gc.packRefs]]gc.packRefs:: |
| 6318 | + |
| 6319 | This variable determines whether gc runs git pack-refs. The default is `true`. |
| 6320 | |
| 6321 | [[gc.reflogExpire]]gc.reflogExpire:: |
| 6322 | + |
| 6323 | Removes reflog entries older than this time; defaults to 90 days. The value "now" |
| 6324 | expires all entries immediately, and "never" suppresses expiration altogether. |
| 6325 | |
| 6326 | [[gc.reflogExpireUnreachable]]gc.reflogExpireUnreachable:: |
| 6327 | + |
| 6328 | Removes reflog entries older than this time and not reachable from the |
| 6329 | current tip; defaults to 30 days. The value "now" expires all entries immediately, |
| 6330 | and "never" suppresses expiration altogether. |
| 6331 | |
Matthias Sohn | bf7ca5a | 2020-09-08 00:57:20 +0200 | [diff] [blame] | 6332 | [[jgit-protocol]] |
| 6333 | === Section protocol |
| 6334 | |
| 6335 | [[protocol.version]]protocol.version:: |
| 6336 | + |
| 6337 | If set, the server will accept requests from a client attempting to communicate |
David Ostrovsky | dafac1c | 2021-01-04 09:26:52 +0100 | [diff] [blame] | 6338 | using the specified protocol version. Default is `2`. If set in file |
| 6339 | `etc/jgit.config` this option will be used for all repositories of the site. |
| 6340 | It can be overridden for a given repository by configuring a different value in |
| 6341 | the repository's `config` file. |
Matthias Sohn | bf7ca5a | 2020-09-08 00:57:20 +0200 | [diff] [blame] | 6342 | + |
| 6343 | Supported versions: |
| 6344 | 0:: the original wire protocol. |
| 6345 | 1:: the original wire protocol with the addition of a version string in the initial response from the server. |
| 6346 | 2:: wire protocol version 2. Speeds up fetches from repositories with many refs by allowing the client |
| 6347 | to specify which refs to list before the server lists them. |
| 6348 | |
Matthias Sohn | 85c1879 | 2020-09-08 01:42:03 +0200 | [diff] [blame] | 6349 | [[jgit-receive]] |
| 6350 | === Section receive |
| 6351 | |
| 6352 | [[receive.autogc]]receive.autogc:: |
| 6353 | + |
Matthias Sohn | 53528f4 | 2020-11-23 16:23:50 +0100 | [diff] [blame] | 6354 | By default, up to Gerrit 3.2 `git-receive-pack` will run auto gc after receiving data from git-push and updating refs. |
Matthias Sohn | 85c1879 | 2020-09-08 01:42:03 +0200 | [diff] [blame] | 6355 | You can stop it by setting this variable to `false`. This is recommended in gerrit to avoid the |
| 6356 | additional load this creates. Instead schedule gc using link:cmd-gc.html#gc.startTime[gc.startTime] |
| 6357 | and link:cmd-gc.html#gc.interval[gc.interval] or e.g. in a cron job that runs gc in a separate process. |
Matthias Sohn | 53528f4 | 2020-11-23 16:23:50 +0100 | [diff] [blame] | 6358 | Since Gerrit 3.3 the init command will auto-configure `git-receive-pack = false` in `etc/jgit.config` if |
| 6359 | it wasn't set manually and show a warning if it was set to `true` manually. |
Matthias Sohn | 85c1879 | 2020-09-08 01:42:03 +0200 | [diff] [blame] | 6360 | |
Shawn O. Pearce | 5500e69 | 2009-05-28 15:55:01 -0700 | [diff] [blame] | 6361 | GERRIT |
| 6362 | ------ |
| 6363 | Part of link:index.html[Gerrit Code Review] |
Yuxuan 'fishy' Wang | 99cb68d | 2013-10-31 17:26:00 -0700 | [diff] [blame] | 6364 | |
| 6365 | SEARCHBOX |
| 6366 | --------- |