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