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