/Documentation/config-gerrit.txt

https://code.google.com/ · Plain Text · 2440 lines · 2128 code · 312 blank · 0 comment · 0 complexity · ebb8d6e47bacb68a3059fe9cad2ac960 MD5 · raw file

Large files are truncated click here to view the full file

  1. Gerrit Code Review - Configuration
  2. ==================================
  3. File `etc/gerrit.config`
  4. ------------------------
  5. The optional file `'$site_path'/etc/gerrit.config` is a Git-style
  6. config file that controls many host specific settings for Gerrit.
  7. [NOTE]
  8. The contents of the `etc/gerrit.config` file are cached at startup
  9. by Gerrit. If you modify any properties in this file, Gerrit needs
  10. to be restarted before it will use the new values.
  11. Sample `etc/gerrit.config`:
  12. ----
  13. [core]
  14. packedGitLimit = 200 m
  15. [cache]
  16. directory = /var/cache/gerrit2
  17. [cache "diff"]
  18. diskbuffer = 10 m
  19. ----
  20. [[accounts]]Section accounts
  21. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  22. [[accounts.visibility]]accounts.visibility::
  23. +
  24. Controls visibility of other users' dashboard pages and
  25. completion suggestions to web users.
  26. +
  27. If `ALL`, all users are visible to all other users, even
  28. anonymous users.
  29. +
  30. If `SAME_GROUP`, only users who are also members of a group the
  31. current user is a member of are visible.
  32. +
  33. If `VISIBLE_GROUP`, only users who are members of at least one group
  34. that is visible to the current user are visible.
  35. +
  36. If `NONE`, no users other than the current user are visible.
  37. +
  38. Default is `ALL`.
  39. [[addreviewer]]Section addreviewer
  40. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  41. [[addreviewer.maxWithoutConfirmation]]addreviewer.maxWithoutConfirmation::
  42. +
  43. The maximum number of reviewers a user can add at once by adding a
  44. group as reviewer without being asked to confirm the operation.
  45. +
  46. If set to 0, the user will never be asked to confirm adding a group
  47. as reviewer.
  48. +
  49. Default is 10.
  50. +
  51. This setting only applies for adding reviewers in the Gerrit WebUI,
  52. but is ignored when adding reviewers with the
  53. link:cmd-set-reviewers.html[set-reviewers] command.
  54. [[addreviewer.maxAllowed]]addreviewer.maxAllowed::
  55. +
  56. The maximum number of reviewers a user can add at once by adding a
  57. group as reviewer.
  58. +
  59. If set to 0, there is no limit for the number of reviewers that can
  60. be added at once by adding a group as reviewer.
  61. +
  62. Default is 20.
  63. [[auth]]Section auth
  64. ~~~~~~~~~~~~~~~~~~~~
  65. See also link:config-sso.html[SSO configuration].
  66. [[auth.type]]auth.type::
  67. +
  68. Type of user authentication employed by Gerrit. The supported
  69. values are:
  70. +
  71. * `OpenID`
  72. +
  73. The default setting. Gerrit uses any valid OpenID
  74. provider chosen by the end-user. For more information see
  75. http://openid.net/[openid.net].
  76. +
  77. * `HTTP`
  78. +
  79. Gerrit relies upon data presented in the HTTP request. This includes
  80. HTTP basic authentication, or some types of commercial single-sign-on
  81. solutions. With this setting enabled the authentication must
  82. take place in the web server or servlet container, and not from
  83. within Gerrit.
  84. +
  85. * `HTTP_LDAP`
  86. +
  87. Exactly like `HTTP` (above), but additionally Gerrit pre-populates
  88. a user's full name and email address based on information obtained
  89. from the user's account object in LDAP. The user's group membership
  90. is also pulled from LDAP, making any LDAP groups that a user is a
  91. member of available as groups in Gerrit.
  92. +
  93. * `CLIENT_SSL_CERT_LDAP`
  94. +
  95. This authentication type is actually kind of SSO. Gerrit will configure
  96. Jetty's SSL channel to request the client's SSL certificate. For this
  97. authentication to work a Gerrit administrator has to import the root
  98. certificate of the trust chain used to issue the client's certificate
  99. into the <review-site>/etc/keystore.
  100. After the authentication is done Gerrit will obtain basic user
  101. registration (name and email) from LDAP, and some group memberships.
  102. Therefore, the "_LDAP" suffix in the name of this authentication type.
  103. This authentication type can only be used under hosted daemon mode, and
  104. the httpd.listenUrl must use https:// as the protocol.
  105. +
  106. * `LDAP`
  107. +
  108. Gerrit prompts the user to enter a username and a password, which
  109. it then verifies by performing a simple bind against the configured
  110. <<ldap.server,ldap.server>>. In this configuration the web server
  111. is not involved in the user authentication process.
  112. +
  113. The actual username used in the LDAP simple bind request is the
  114. account's full DN, which is discovered by first querying the
  115. directory using either an anonymous request, or the configured
  116. <<ldap.username>> identity.
  117. * `LDAP_BIND`
  118. +
  119. Gerrit prompts the user to enter a username and a password, which
  120. it then verifies by performing a simple bind against the configured
  121. <<ldap.server,ldap.server>>. In this configuration the web server
  122. is not involved in the user authentication process.
  123. +
  124. Unlike LDAP above, the username used to perform the LDAP simple bind
  125. request is the exact string supplied by in the dialog by the user.
  126. The configured <<ldap.username>> identity is not used to obtain
  127. account information.
  128. +
  129. * `DEVELOPMENT_BECOME_ANY_ACCOUNT`
  130. +
  131. *DO NOT USE*. Only for use in a development environment.
  132. +
  133. When this is the configured authentication method a hyperlink titled
  134. `Become` appears in the top right corner of the page, taking the
  135. user to a form where they can enter the username of any existing
  136. user account, and immediately login as that account, without any
  137. authentication taking place. This form of authentication is only
  138. useful for the GWT hosted mode shell, where OpenID authentication
  139. redirects might be risky to the developer's host computer, and HTTP
  140. authentication is not possible.
  141. +
  142. By default, OpenID.
  143. [[auth.allowedOpenID]]auth.allowedOpenID::
  144. +
  145. List of permitted OpenID providers. A user may only authenticate
  146. with an OpenID that matches this list. Only used if `auth.type`
  147. is set to OpenID (the default).
  148. +
  149. Patterns may be either a
  150. link:http://download.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html[standard
  151. Java regular expression (java.util.regex)] (start with `^` and
  152. end with `$`) or be a simple prefix (any other string).
  153. +
  154. By default, the list contains two values, `http://` and `https://`,
  155. allowing users to authenticate with any OpenID provider.
  156. [[auth.trustedOpenID]]auth.trustedOpenID::
  157. +
  158. List of trusted OpenID providers. Only used if `auth.type` is
  159. set to OpenID (the default).
  160. +
  161. In order for a user to take advantage of permissions beyond those
  162. granted to the `Anonymous Users` and `Registered Users` groups,
  163. the user account must only have OpenIDs which match at least one
  164. pattern from this list.
  165. +
  166. Patterns may be either a
  167. link:http://download.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html[standard
  168. Java regular expression (java.util.regex)] (start with `^` and
  169. end with `$`) or be a simple prefix (any other string).
  170. +
  171. By default, the list contains two values, `http://` and `https://`,
  172. allowing Gerrit to trust any OpenID it receives.
  173. [[auth.maxOpenIdSessionAge]]auth.maxOpenIdSessionAge::
  174. +
  175. Time in seconds before an OpenID provider must force the user
  176. to authenticate themselves again before authentication to this
  177. Gerrit server. Currently this is only a polite request, and users
  178. coming from providers that don't support the PAPE extension will
  179. be accepted anyway. In the future it may be enforced, rejecting
  180. users coming from providers that don't honor the max session age.
  181. +
  182. If set to 0, the provider will always force the user to authenticate
  183. (e.g. supply their password). Values should use common unit suffixes
  184. to express their setting:
  185. +
  186. * s, sec, second, seconds
  187. * m, min, minute, minutes
  188. * h, hr, hour, hours
  189. * d, day, days
  190. * w, week, weeks (`1 week` is treated as `7 days`)
  191. * mon, month, months (`1 month` is treated as `30 days`)
  192. * y, year, years (`1 year` is treated as `365 days`)
  193. +
  194. Default is -1, permitting infinite time between authentications.
  195. [[auth.maxRegisterEmailTokenAge]]auth.maxRegisterEmailTokenAge::
  196. +
  197. Time in seconds before an email verification token sent to a user in
  198. order to validate their email address expires.
  199. +
  200. * s, sec, second, seconds
  201. * m, min, minute, minutes
  202. * h, hr, hour, hours
  203. * d, day, days
  204. * w, week, weeks (`1 week` is treated as `7 days`)
  205. * mon, month, months (`1 month` is treated as `30 days`)
  206. * y, year, years (`1 year` is treated as `365 days`)
  207. +
  208. Default is 12 hours.
  209. [[auth.httpHeader]]auth.httpHeader::
  210. +
  211. HTTP header to trust the username from, or unset to select HTTP basic
  212. or digest authentication. Only used if `auth.type` is set to HTTP.
  213. [[auth.logoutUrl]]auth.logoutUrl::
  214. +
  215. URL to redirect a browser to after the end-user has clicked on the
  216. "Sign Out" link in the upper right corner. Organizations using an
  217. enterprise single-sign-on solution may want to redirect the browser
  218. to the SSO product's sign-out page.
  219. +
  220. If not set, the redirect returns to the list of all open changes.
  221. [[auth.registerUrl]]auth.registerUrl::
  222. +
  223. Target for the "Register" link in the upper right corner. Used only
  224. when auth.type is `LDAP`.
  225. +
  226. If not set, no "Register" link is displayed.
  227. [[auth.cookiePath]]auth.cookiePath::
  228. +
  229. Sets "path" attribute of the authentication cookie.
  230. +
  231. If not set, HTTP request's path is used.
  232. [[auth.cookieSecure]]auth.cookieSecure::
  233. +
  234. Sets "secure" flag of the authentication cookie. If true, cookies
  235. will be transmitted only over HTTPS protocol.
  236. +
  237. By default, false.
  238. [[auth.emailFormat]]auth.emailFormat::
  239. +
  240. Optional format string to construct user email addresses out of
  241. user login names. Only used if auth.type is `HTTP`, `HTTP_LDAP`
  242. or `LDAP`.
  243. +
  244. This value can be set to a format string, where `{0}` is replaced
  245. with the login name. E.g. "\{0\}+gerrit@example.com" with a user
  246. login name of "foo" will produce "foo+gerrit@example.com" during
  247. the first time user "foo" registers.
  248. +
  249. If the site is using `HTTP_LDAP` or `LDAP`, using this option is
  250. discouraged. Setting `ldap.accountEmailAddress` and importing the
  251. email address from the LDAP directory is generally preferred.
  252. [[auth.contributorAgreements]]auth.contributorAgreements::
  253. +
  254. Controls whether or not the contributor agreement features are
  255. enabled for the Gerrit site. If enabled a user must complete a
  256. contributor agreement before they can upload changes.
  257. +
  258. If enabled, the admin must also insert one or more rows into
  259. `contributor_agreements` and create agreement files under
  260. `'$site_path'/static`, so users can actually complete one or
  261. more agreements.
  262. +
  263. By default this is false (no agreements are used).
  264. auth.allowGoogleAccountUpgrade::
  265. +
  266. Allows Google Account users to automatically update their Gerrit
  267. account when/if their Google Account OpenID identity token changes.
  268. Identity tokens can change if the server changes hostnames, or
  269. for other reasons known only to Google. The upgrade path works
  270. by matching users by email address if the identity is not present,
  271. and then changing the identity.
  272. +
  273. This setting also permits old Gerrit 1.x users to seamlessly upgrade
  274. from Google Accounts on Google App Engine to OpenID authentication.
  275. +
  276. Having this enabled incurs an extra database query when Google
  277. Account users register with the Gerrit server.
  278. +
  279. By default, unset/false.
  280. [[auth.trustContainerAuth]]auth.trustContainerAuth::
  281. +
  282. If true then it is the responsibility of the container hosting
  283. Gerrit to authenticate users. In this case Gerrit will blindly trust
  284. the container.
  285. +
  286. This parameter only affects git over http traffic. If set to false
  287. then Gerrit will do the authentication (using DIGEST authentication).
  288. +
  289. By default this is set to false.
  290. [[auth.gitBasicAuth]]auth.gitBasicAuth::
  291. +
  292. If true then Git over HTTP and HTTP/S traffic is authenticated using
  293. standard BasicAuth and credentials validated using the same auth
  294. method configured for Gerrit Web UI.
  295. +
  296. This parameter only affects git over http traffic. If set to false
  297. then Gerrit will authenticate through DIGEST authentication and
  298. the randomly generated HTTP password in Gerrit DB.
  299. +
  300. By default this is set to false.
  301. [[auth.userNameToLowerCase]]auth.userNameToLowerCase::
  302. +
  303. If set the username that is received to authenticate a git operation
  304. is converted to lower case for looking up the user account in Gerrit.
  305. +
  306. By setting this parameter a case insensitive authentication for the
  307. git operations can be achieved, if it is ensured that the usernames in
  308. Gerrit (scheme `username`) are stored in lower case (e.g. if the
  309. parameter link:#ldap.accountSshUserName[ldap.accountSshUserName] is
  310. set to `${sAMAccountName.toLowerCase}`). It is important that for all
  311. existing accounts this username is already in lower case. It is not
  312. possible to convert the usernames of the existing accounts to lower
  313. case because this would break the access to existing per-user
  314. branches.
  315. +
  316. This parameter only affects git over http and git over SSH traffic.
  317. +
  318. By default this is set to false.
  319. [[cache]]Section cache
  320. ~~~~~~~~~~~~~~~~~~~~~~
  321. [[cache.directory]]cache.directory::
  322. +
  323. Path to a local directory where Gerrit can write cached entities for
  324. future lookup. This local disk cache is used to retain potentially
  325. expensive to compute information across restarts. If the location
  326. does not exist, Gerrit will try to create it.
  327. +
  328. If not absolute, the path is resolved relative to `$site_path`.
  329. +
  330. Default is unset, no disk cache.
  331. [[cache.name.maxAge]]cache.<name>.maxAge::
  332. +
  333. Maximum age to keep an entry in the cache. Entries are removed from
  334. the cache and refreshed from source data every maxAge interval.
  335. Values should use common unit suffixes to express their setting:
  336. +
  337. * s, sec, second, seconds
  338. * m, min, minute, minutes
  339. * h, hr, hour, hours
  340. * d, day, days
  341. * w, week, weeks (`1 week` is treated as `7 days`)
  342. * mon, month, months (`1 month` is treated as `30 days`)
  343. * y, year, years (`1 year` is treated as `365 days`)
  344. +
  345. If a unit suffix is not specified, `minutes` is assumed. If 0 is
  346. supplied, the maximum age is infinite and items are never purged
  347. except when the cache is full.
  348. +
  349. Default is `0`, meaning store forever with no expire, except:
  350. +
  351. * `"adv_bases"`: default is `10 minutes`
  352. * `"ldap_groups"`: default is `1 hour`
  353. * `"web_sessions"`: default is `12 hours`
  354. [[cache.name.memoryLimit]]cache.<name>.memoryLimit::
  355. +
  356. The total cost of entries to retain in memory. The cost computation
  357. varies by the cache. For most caches where the in-memory size of each
  358. entry is relatively the same, memoryLimit is currently defined to be
  359. the number of entries held by the cache (each entry costs 1).
  360. +
  361. For caches where the size of an entry can vary significantly between
  362. individual entries (notably `"diff"`, `"diff_intraline"`), memoryLimit
  363. is an approximation of the total number of bytes stored by the cache.
  364. Larger entries that represent bigger patch sets or longer source files
  365. will consume a bigger portion of the memoryLimit. For these caches the
  366. memoryLimit should be set to roughly the amount of RAM (in bytes) the
  367. administrator can dedicate to the cache.
  368. +
  369. Default is 1024 for most caches, except:
  370. +
  371. * `"adv_bases"`: default is `4096`
  372. * `"diff"`: default is `10m` (10 MiB of memory)
  373. * `"diff_intraline"`: default is `10m` (10 MiB of memory)
  374. * `"plugin_resources"`: default is 2m (2 MiB of memory)
  375. +
  376. If set to 0 the cache is disabled. Entries are removed immediately
  377. after being stored by the cache. This is primarily useful for testing.
  378. [[cache.name.diskLimit]]cache.<name>.diskLimit::
  379. +
  380. Total size in bytes of the keys and values stored on disk. Caches that
  381. have grown bigger than this size are scanned daily at 1 AM local
  382. server time to trim the cache. Entries are removed in least recently
  383. accessed order until the cache fits within this limit. Caches may
  384. grow larger than this during the day, as the size check is only
  385. performed once every 24 hours.
  386. +
  387. Default is 128 MiB per cache.
  388. +
  389. If 0, disk storage for the cache is disabled.
  390. [[cache_names]]Standard Caches
  391. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  392. cache `"accounts"`::
  393. +
  394. Cache entries contain important details of an active user, including
  395. their display name, preferences, known email addresses, and group
  396. memberships. Entry information is obtained from the following
  397. database tables:
  398. +
  399. * `accounts`
  400. +
  401. * `account_group_members`
  402. +
  403. * `account_external_ids`
  404. +
  405. If direct updates are made to any of these database tables, this
  406. cache should be flushed.
  407. cache `"accounts_byemail"`::
  408. +
  409. Caches account identities keyed by email address, which is scanned
  410. from the `account_external_ids` database table. If updates are
  411. made to this table, this cache should be flushed.
  412. cache `"adv_bases"`::
  413. +
  414. Used only for push over smart HTTP when branch level access controls
  415. are enabled. The cache entry contains all commits that are avaliable
  416. for the client to use as potential delta bases. Push over smart HTTP
  417. requires two HTTP requests, and this cache tries to carry state from
  418. the first request into the second to ensure it can complete.
  419. cache `"diff"`::
  420. +
  421. Each item caches the differences between two commits, at both the
  422. directory and file levels. Gerrit uses this cache to accelerate
  423. the display of affected file names, as well as file contents.
  424. +
  425. Entries in this cache are relatively large, so memoryLimit is an
  426. estimate in bytes of memory used. Administrators should try to target
  427. cache.diff.memoryLimit to fit all changes users will view in a 1 or 2
  428. day span.
  429. cache `"diff_intraline"`::
  430. +
  431. Each item caches the intraline difference of one file, when compared
  432. between two commits. Gerrit uses this cache to accelerate display of
  433. intraline differences when viewing a file.
  434. +
  435. Entries in this cache are relatively large, so memoryLimit is an
  436. estimate in bytes of memory used. Administrators should try to target
  437. cache.diff.memoryLimit to fit all files users will view in a 1 or 2
  438. day span.
  439. cache `"git_tags"`::
  440. +
  441. If branch or reference level READ access controls are used, this
  442. cache tracks which tags are reachable from the branch tips of a
  443. repository. Gerrit uses this information to determine the set
  444. of tags that a client may access, derived from which tags are
  445. part of the history of a visible branch.
  446. +
  447. The cache is persisted to disk across server restarts as it can
  448. be expensive to compute (60 or more seconds for a large history
  449. like the Linux kernel repository).
  450. cache `"groups"`::
  451. +
  452. Caches the basic group information from the `account_groups` table,
  453. including the group owner, name, and description.
  454. +
  455. Gerrit group membership obtained from the `account_group_members`
  456. table is cached under the `"accounts"` cache, above. External group
  457. membership obtained from LDAP is cached under `"ldap_groups"`.
  458. cache `"groups_byinclude"`::
  459. +
  460. Caches group inclusions in other groups. If direct updates are made
  461. to the `account_group_includes` table, this cache should be flushed.
  462. cache `"ldap_groups"`::
  463. +
  464. Caches the LDAP groups that a user belongs to, if LDAP has been
  465. configured on this server. This cache should be configured with a
  466. low maxAge setting, to ensure LDAP modifications are picked up in
  467. a timely fashion.
  468. cache `"ldap_usernames"`::
  469. +
  470. Caches a mapping of LDAP username to Gerrit account identity. The
  471. cache automatically updates when a user first creates their account
  472. within Gerrit, so the cache expire time is largely irrelevant.
  473. cache `"permission_sort"`::
  474. +
  475. Caches the order in which access control sections must be applied to a
  476. reference. Sorting the sections can be expensive when regular
  477. expressions are used, so this cache remembers the ordering for
  478. each branch.
  479. cache `"plugin_resources"`::
  480. +
  481. Caches formatted plugin resources, such as plugin documentation that
  482. has been converted from Markdown to HTML. The memoryLimit refers to
  483. the bytes of memory dedicated to storing the documentation.
  484. cache `"projects"`::
  485. +
  486. Caches the project description records, from the `projects` table
  487. in the database. If a project record is updated or deleted, this
  488. cache should be flushed. Newly inserted projects do not require
  489. a cache flush, as they will be read upon first reference.
  490. cache `"sshkeys"`::
  491. +
  492. Caches unpacked versions of user SSH keys, so the internal SSH daemon
  493. can match against them during authentication. The unit of storage
  494. is per-user, so 1024 items translates to 1024 unique user accounts.
  495. As each individual user account may configure multiple SSH keys,
  496. the total number of keys may be larger than the item count.
  497. +
  498. This cache is based off the `account_ssh_keys` table and the
  499. `accounts.ssh_user_name` column in the database. If either is
  500. modified directly, this cache should be flushed.
  501. cache `"web_sessions"`::
  502. +
  503. Tracks the live user sessions coming in over HTTP. Flushing this
  504. cache would cause all users to be signed out immediately, forcing
  505. them to sign-in again. To avoid breaking active users, this cache
  506. is not flushed automatically by `gerrit flush-caches --all`, but
  507. instead must be explicitly requested.
  508. +
  509. If no disk cache is configured (or `cache.web_sessions.diskLimit`
  510. is set to 0) a server restart will force all users to sign-out,
  511. and need to sign-in again after the restart, as the cache was
  512. unable to persist the session information. Enabling a disk cache
  513. is strongly recommended.
  514. +
  515. Session storage is relatively inexpensive. The average entry in
  516. this cache is approximately 346 bytes.
  517. See also link:cmd-flush-caches.html[gerrit flush-caches].
  518. [[cache_options]]Cache Options
  519. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  520. cache.diff_intraline.maxIdleWorkers::
  521. +
  522. Number of idle worker threads to maintain for the intraline difference
  523. computations. There is no upper bound on how many concurrent requests
  524. can occur at once, if additional threads are started to handle a peak
  525. load, only this many will remain idle afterwards.
  526. +
  527. Default is 1.5x number of available CPUs.
  528. cache.diff_intraline.timeout::
  529. +
  530. Maximum number of milliseconds to wait for intraline difference data
  531. before giving up and disabling it for a particular file pair. This is
  532. a work around for an infinite loop bug in the intraline difference
  533. implementation. If computation takes longer than the timeout the
  534. worker thread is terminated and no intraline difference is displayed.
  535. +
  536. Values should use common unit suffixes to express their setting:
  537. +
  538. * ms, milliseconds
  539. * s, sec, second, seconds
  540. * m, min, minute, minutes
  541. * h, hr, hour, hours
  542. +
  543. If a unit suffix is not specified, `milliseconds` is assumed.
  544. +
  545. Default is 5 seconds.
  546. cache.diff_intraline.enabled::
  547. +
  548. Boolean to enable or disable the computation of intraline differences
  549. when populating a diff cache entry. This flag is provided primarily
  550. as a backdoor to disable the intraline difference feature if
  551. necessary. To maintain backwards compatability with prior versions,
  552. this setting will fallback to `cache.diff.intraline` if not set in the
  553. configuration.
  554. +
  555. Default is true, enabled.
  556. cache.projects.checkFrequency::
  557. +
  558. How often project configuration should be checked for update from Git.
  559. Gerrit Code Review caches project access rules and configuration in
  560. memory, checking the refs/meta/config branch every checkFrequency
  561. minutes to see if a new revision should be loaded and used for future
  562. access. Values can be specified using standard time unit abbreviations
  563. ('ms', 'sec', 'min', etc.).
  564. +
  565. If set to 0, checks occur every time, which may slow down operations.
  566. Administrators may force the cache to flush with
  567. link:cmd-flush-caches.html[gerrit flush-caches].
  568. +
  569. Default is 5 minutes.
  570. [[changeMerge]]Section changeMerge
  571. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  572. Controls whether or not the mergeability test of changes is
  573. enabled. If enabled, when the change page is loaded, the test is
  574. triggered. The submit button will be enabled or disabled according to
  575. the result.
  576. ----
  577. [changeMerge]
  578. test = true
  579. ----
  580. By default this is false (test is not enabled).
  581. [[commentlink]]Section commentlink
  582. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  583. Comment links are find/replace strings applied to change descriptions,
  584. patch comments, and in-line code comments to turn set strings into
  585. hyperlinks. One common use is for linking to bug-tracking systems.
  586. In the following example configuration the 'changeid' comment link
  587. will match typical Gerrit Change-Id values and create a hyperlink
  588. to changes which reference it. The second configuration 'bugzilla'
  589. will hyperlink terms such as 'bug 42' to an external bug tracker,
  590. supplying the argument record number '42' for display. The third
  591. configuration 'tracker' uses raw HTML to more precisely control
  592. how the replacement is displayed to the user.
  593. ----
  594. [commentlink "changeid"]
  595. match = (I[0-9a-f]{8,40})
  596. link = "#q,$1,n,z"
  597. [commentlink "bugzilla"]
  598. match = "(bug\\s+#?)(\\d+)"
  599. link = http://bugs.example.com/show_bug.cgi?id=$2
  600. [commentlink "tracker"]
  601. match = ([Bb]ug:\\s+)(\\d+)
  602. html = $1<a href=\"http://trak.example.com/$2\">$2</a>
  603. ----
  604. [[commentlink.name.match]]commentlink.<name>.match::
  605. +
  606. A JavaScript regular expression to match positions to be replaced
  607. with a hyperlink. Subexpressions of the matched string can be
  608. stored using groups and accessed with `$'n'` syntax, where 'n'
  609. is the group number, starting from 1.
  610. +
  611. The configuration file parser eats one level of backslashes, so the
  612. character class `\s` requires `\\s` in the configuration file. The
  613. parser also terminates the line at the first `#`, so a match
  614. expression containing # must be wrapped in double quotes.
  615. +
  616. To match case insensitive strings, a character class with both the
  617. upper and lower case character for each position must be used. For
  618. example, to match the string `bug` in a case insensitive way the match
  619. pattern `[bB][uU][gG]` needs to be used.
  620. +
  621. A common pattern to match is `bug\\s+(\\d+)`.
  622. [[commentlink.name.link]]commentlink.<name>.link::
  623. +
  624. The URL to direct the user to whenever the regular expression is
  625. matched. Groups in the match expression may be accessed as `$'n'`.
  626. +
  627. The link property is used only when the html property is not present.
  628. [[commentlink.name.html]]commentlink.<name>.html::
  629. +
  630. HTML to replace the entire matched string with. If present,
  631. this property overrides the link property above. Groups in the
  632. match expression may be accessed as `$'n'`.
  633. +
  634. The configuration file eats double quotes, so escaping them as
  635. `\"` is necessary to protect them from the parser.
  636. [[contactstore]]Section contactstore
  637. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  638. [[contactstore.url]]contactstore.url::
  639. +
  640. URL of the web based contact store Gerrit will send any offline
  641. contact information to when it collects the data from users as part
  642. of a contributor agreement.
  643. +
  644. See link:config-contact.html[Contact Information].
  645. [[contactstore.appsec]]contactstore.appsec::
  646. +
  647. Shared secret of the web based contact store.
  648. [[container]]Section container
  649. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  650. These settings are applied only if Gerrit is started as the container
  651. process through Gerrit's 'gerrit.sh' rc.d compatible wrapper script.
  652. [[container.heapLimit]]container.heapLimit::
  653. +
  654. Maximum heap size of the Java process running Gerrit, in bytes.
  655. This property is translated into the '-Xmx' flag for the JVM.
  656. +
  657. Default is platform and JVM specific.
  658. +
  659. Common unit suffixes of 'k', 'm', or 'g' are supported.
  660. [[container.javaHome]]container.javaHome::
  661. +
  662. Path of the JRE/JDK installation to run Gerrit with. If not set, the
  663. Gerrit startup script will attempt to search your system and guess
  664. a suitable JRE. Overrides the environment variable 'JAVA_HOME'.
  665. [[container.javaOptions]]container.javaOptions::
  666. +
  667. Additional options to pass along to the Java runtime. If multiple
  668. values are configured, they are passed in order on the command line,
  669. separated by spaces. These options are appended onto 'JAVA_OPTIONS'.
  670. [[container.slave]]container.slave::
  671. +
  672. Used on Gerrit slave installations. If set to true the Gerrit JVM is
  673. called with the '--slave' switch, enabling slave mode. If no value is
  674. set (or any other value), gerrit defaults to master mode.
  675. [[container.user]]container.user::
  676. +
  677. Login name (or UID) of the operating system user the Gerrit JVM
  678. will execute as. If not set, defaults to the user who launched
  679. the 'gerrit.sh' wrapper script.
  680. [[container.war]]container.war::
  681. +
  682. Path of the JAR file to start daemon execution with. This should
  683. be the path of the local 'gerrit.war' archive. Overrides the
  684. environment variable 'GERRIT_WAR'.
  685. +
  686. If not set, defaults to '$site_path/bin/gerrit.war', or to
  687. '$HOME/gerrit.war'.
  688. [[core]]Section core
  689. ~~~~~~~~~~~~~~~~~~~~
  690. [[core.packedGitWindowSize]]core.packedGitWindowSize::
  691. +
  692. Number of bytes of a pack file to load into memory in a single
  693. read operation. This is the "page size" of the JGit buffer cache,
  694. used for all pack access operations. All disk IO occurs as single
  695. window reads. Setting this too large may cause the process to load
  696. more data than is required; setting this too small may increase
  697. the frequency of `read()` system calls.
  698. +
  699. Default on JGit is 8 KiB on all platforms.
  700. +
  701. Common unit suffixes of 'k', 'm', or 'g' are supported.
  702. [[core.packedGitLimit]]core.packedGitLimit::
  703. +
  704. Maximum number of bytes to load and cache in memory from pack files.
  705. If JGit needs to access more than this many bytes it will unload less
  706. frequently used windows to reclaim memory space within the process.
  707. As this buffer must be shared with the rest of the JVM heap, it
  708. should be a fraction of the total memory available.
  709. +
  710. Default on JGit is 10 MiB on all platforms.
  711. +
  712. Common unit suffixes of 'k', 'm', or 'g' are supported.
  713. [[core.deltaBaseCaseLimit]]core.deltaBaseCacheLimit::
  714. +
  715. Maximum number of bytes to reserve for caching base objects
  716. that multiple deltafied objects reference. By storing the entire
  717. decompressed base object in a cache Git is able to avoid unpacking
  718. and decompressing frequently used base objects multiple times.
  719. +
  720. Default on JGit is 10 MiB on all platforms. You probably do not
  721. need to adjust this value.
  722. +
  723. Common unit suffixes of 'k', 'm', or 'g' are supported.
  724. [[core.packedGitOpenFiles]]core.packedGitOpenFiles::
  725. +
  726. Maximum number of pack files to have open at once. A pack file
  727. must be opened in order for any of its data to be available in
  728. a cached window.
  729. +
  730. If you increase this to a larger setting you may need to also adjust
  731. the ulimit on file descriptors for the host JVM, as Gerrit needs
  732. additional file descriptors available for network sockets and other
  733. repository data manipulation.
  734. +
  735. Default on JGit is 128 file descriptors on all platforms.
  736. [[core.streamFileThreshold]]core.streamFileThreshold::
  737. +
  738. Largest object size, in bytes, that JGit will allocate as a
  739. contiguous byte array. Any file revision larger than this threshold
  740. will have to be streamed, typically requiring the use of temporary
  741. files under '$GIT_DIR/objects' to implement psuedo-random access
  742. during delta decompression.
  743. +
  744. Servers with very high traffic should set this to be larger than
  745. the size of their common big files. For example a server managing
  746. the Android platform typically has to deal with ~10-12 MiB XML
  747. files, so `15 m` would be a reasonable setting in that environment.
  748. Setting this too high may cause the JVM to run out of heap space
  749. when handling very big binary files, such as device firmware or
  750. CD-ROM ISO images.
  751. +
  752. Default is 50 MiB on all platforms. Prior to Gerrit 2.1.6,
  753. this value was effectively 2047 MiB.
  754. +
  755. Common unit suffixes of 'k', 'm', or 'g' are supported.
  756. [[core.packedGitMmap]]core.packedGitMmap::
  757. +
  758. When true, JGit will use `mmap()` rather than `malloc()+read()`
  759. to load data from pack files. The use of mmap can be problematic
  760. on some JVMs as the garbage collector must deduce that a memory
  761. mapped segment is no longer in use before a call to `munmap()`
  762. can be made by the JVM native code.
  763. +
  764. In server applications (such as Gerrit) that need to access many
  765. pack files, setting this to true risks artifically running out
  766. of virtual address space, as the garbage collector cannot reclaim
  767. unused mapped spaces fast enough.
  768. +
  769. Default on JGit is false. Although potentially slower, it yields
  770. much more predictable behavior.
  771. [[core.asyncLoggingBufferSize]]core.asyncLoggingBufferSize::
  772. +
  773. Size of the buffer to store logging events for asynchronous logging.
  774. Putting a larger value can protect threads from stalling when the
  775. AsyncAppender threads are not fast enough to consume the logging events
  776. from the buffer. It also protects from loosing log entries in this case.
  777. +
  778. Default is 64 entries.
  779. [[database]]Section database
  780. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  781. The database section configures where Gerrit stores its metadata
  782. records about user accounts and change reviews.
  783. ----
  784. [database]
  785. type = POSTGRESQL
  786. hostname = localhost
  787. database = reviewdb
  788. username = gerrit2
  789. password = s3kr3t
  790. ----
  791. [[database.type]]database.type::
  792. +
  793. Type of database server to connect to. If set this value will be
  794. used to automatically create correct database.driver and database.url
  795. values to open the connection.
  796. +
  797. * `POSTGRESQL`
  798. +
  799. Connect to a PostgreSQL database server.
  800. +
  801. * `H2`
  802. +
  803. Connect to a local embedded H2 database.
  804. +
  805. * `MYSQL`
  806. +
  807. Connect to a MySQL database server.
  808. +
  809. * `JDBC`
  810. +
  811. Connect using a JDBC driver class name and URL.
  812. +
  813. If not specified, database.driver and database.url are used as-is,
  814. and if they are also not specified, defaults to H2.
  815. [[database.hostname]]database.hostname::
  816. +
  817. Hostname of the database server. Defaults to 'localhost'.
  818. [[database.port]]database.port::
  819. +
  820. Port number of the database server. Defaults to the default port
  821. of the server named by database.type.
  822. [[database.database]]database.database::
  823. +
  824. For POSTGRESQL or MYSQL, the name of the database on the server.
  825. +
  826. For H2, this is the path to the database, and if not absolute is
  827. relative to `'$site_path'`.
  828. [[database.username]]database.username::
  829. +
  830. Username to connect to the database server as.
  831. [[database.password]]database.password::
  832. +
  833. Password to authenticate to the database server with.
  834. [[database.driver]]database.driver::
  835. +
  836. Name of the JDBC driver class to connect to the database with.
  837. Setting this usually isn't necessary as it can be derived from
  838. database.type or database.url for any supported database.
  839. [[database.url]]database.url::
  840. +
  841. 'jdbc:' URL for the database. Setting this variable usually
  842. isn't necessary as it can be constructed from the all of the
  843. above properties.
  844. [[database.poolLimit]]database.poolLimit::
  845. +
  846. Maximum number of open database connections. If the server needs
  847. more than this number, request processing threads will wait up
  848. to <<database.poolMaxWait, poolMaxWait>> seconds for a
  849. connection to be released before they abort with an exception.
  850. This limit must be several units higher than the total number of
  851. httpd and sshd threads as some request processing code paths may
  852. need multiple connections.
  853. +
  854. Default is 8.
  855. [[database.poolMinIdle]]database.poolMinIdle::
  856. +
  857. Minimum number of connections to keep idle in the pool.
  858. Default is 4.
  859. [[database.poolMaxIdle]]database.poolMaxIdle::
  860. +
  861. Maximum number of connections to keep idle in the pool. If there
  862. are more idle connections, connections will be closed instead of
  863. being returned back to the pool.
  864. Default is 4.
  865. [[database.poolMaxWait]]database.poolMaxWait::
  866. +
  867. Maximum amount of time a request processing thread will wait to
  868. acquire a database connection from the pool. If no connection is
  869. released within this time period, the processing thread will abort
  870. its current operations and return an error to the client.
  871. Values should use common unit suffixes to express their setting:
  872. +
  873. * ms, milliseconds
  874. * s, sec, second, seconds
  875. * m, min, minute, minutes
  876. * h, hr, hour, hours
  877. +
  878. If a unit suffix is not specified, `milliseconds` is assumed.
  879. +
  880. Default is `30 seconds`.
  881. [[download]]Section download
  882. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  883. ----
  884. [download]
  885. scheme = ssh
  886. scheme = http
  887. scheme = anon_http
  888. scheme = anon_git
  889. scheme = repo_download
  890. ----
  891. The download section configures the allowed download methods.
  892. [[download.scheme]]download.scheme::
  893. +
  894. Schemes that should be used to download changes.
  895. +
  896. Multiple schemes are supported:
  897. +
  898. * `http`
  899. +
  900. Authenticated HTTP download is allowed.
  901. +
  902. * `ssh`
  903. +
  904. Authenticated SSH download is allowed.
  905. +
  906. * `anon_http`
  907. +
  908. Anonymous HTTP download is allowed.
  909. +
  910. * `anon_git`
  911. +
  912. Anonymous Git download is allowed. This is not default, it is also
  913. necessary to set <<gerrit.canonicalGitUrl,gerrit.canonicalGitUrl>>
  914. variable.
  915. +
  916. * `repo_download`
  917. +
  918. Gerrit advertises patch set downloads with the `repo download`
  919. command, assuming that all projects managed by this instance are
  920. generally worked on with the repo multi-repository tool. This is
  921. not default, as not all instances will deploy repo.
  922. +
  923. If download.scheme is not specified, SSH, HTTP and Anonymous HTTP
  924. downloads are allowed.
  925. [[gerrit]]Section gerrit
  926. ~~~~~~~~~~~~~~~~~~~~~~~~
  927. [[gerrit.basePath]]gerrit.basePath::
  928. +
  929. Local filesystem directory holding all Git repositories that
  930. Gerrit knows about and can process changes for. A project
  931. entity in Gerrit maps to a local Git repository by creating
  932. the path string `"${basePath}/${project_name}.git"`.
  933. +
  934. If relative, the path is resolved relative to `'$site_path'`.
  935. [[gerrit.allProjects]]gerrit.allProjects::
  936. +
  937. Name of the permissions-only project defining global server
  938. access controls and settings. These are inherited into every
  939. other project managed by the running server. The name is
  940. relative to `gerrit.basePath`.
  941. +
  942. Defaults to `All-Projects` if not set.
  943. [[gerrit.canonicalWebUrl]]gerrit.canonicalWebUrl::
  944. +
  945. The default URL for Gerrit to be accessed through.
  946. +
  947. Typically this would be set to "http://review.example.com/" or
  948. "http://example.com/gerrit/" so Gerrit can output links that point
  949. back to itself.
  950. +
  951. Setting this is highly recommended, as its necessary for the upload
  952. code invoked by "git push" or "repo upload" to output hyperlinks
  953. to the newly uploaded changes.
  954. [[gerrit.canonicalGitUrl]]gerrit.canonicalGitUrl::
  955. +
  956. Optional base URL for repositories available over the anonymous git
  957. protocol. For example, set this to `git://mirror.example.com/base/`
  958. to have Gerrit display patch set download URLs in the UI. Gerrit
  959. automatically appends the project name onto the end of the URL.
  960. +
  961. By default unset, as the git daemon must be configured externally
  962. by the system administrator, and might not even be running on the
  963. same host as Gerrit.
  964. [[gerrit.gitHttpUrl]]gerrit.gitHttpUrl::
  965. +
  966. Optional base URL for repositories available over the HTTP
  967. protocol. For example, set this to `http://mirror.example.com/base/`
  968. to have Gerrit display URLs from this server, rather than itself.
  969. +
  970. By default unset, as the HTTP daemon must be configured externally
  971. by the system administrator, and might not even be running on the
  972. same host as Gerrit.
  973. [[gitweb]]Section gitweb
  974. ~~~~~~~~~~~~~~~~~~~~~~~~
  975. Gerrit can forward requests to either an internally managed gitweb
  976. (which allows Gerrit to enforce some access controls), or to an
  977. externally managed gitweb (where the web server manages access).
  978. See also link:config-gitweb.html[Gitweb Integration].
  979. [[gitweb.cgi]]gitweb.cgi::
  980. +
  981. Path to the locally installed `gitweb.cgi` executable. This CGI will
  982. be called by Gerrit Code Review when the URL `/gitweb` is accessed.
  983. Project level access controls are enforced prior to calling the CGI.
  984. +
  985. Defaults to `/usr/lib/cgi-bin/gitweb.cgi` if gitweb.url is not set.
  986. [[gitweb.url]]gitweb.url::
  987. +
  988. Optional URL of an affiliated gitweb service. Defines the
  989. web location where a `gitweb.cgi` is installed to browse
  990. gerrit.basePath and the repositories it contains.
  991. +
  992. Gerrit appends any necessary query arguments onto the end of this URL.
  993. For example, "?p=$project.git;h=$commit".
  994. [[gitweb.type]]gitweb.type::
  995. +
  996. Optional type of affiliated gitweb service. This allows using
  997. alternatives to gitweb, such as cgit. If set to disabled there
  998. is no gitweb hyperlinking support.
  999. +
  1000. Valid values are `gitweb`, `cgit`, `disabled` or `custom`.
  1001. [[gitweb.revision]]gitweb.revision::
  1002. +
  1003. Optional pattern to use for constructing the gitweb URL when pointing
  1004. at a specific commit when `custom` is used above.
  1005. +
  1006. Valid replacements are `${project}` for the project name in Gerrit
  1007. and `${commit}` for the SHA1 hash for the commit.
  1008. [[gitweb.project]]gitweb.project::
  1009. +
  1010. Optional pattern to use for constructing the gitweb URL when pointing
  1011. at a specific project when `custom` is used above.
  1012. +
  1013. Valid replacements are `${project}` for the project name in Gerrit.
  1014. [[gitweb.branch]]gitweb.branch::
  1015. +
  1016. Optional pattern to use for constructing the gitweb URL when pointing
  1017. at a specific branch when `custom` is used above.
  1018. +
  1019. Valid replacements are `${project}` for the project name in Gerrit
  1020. and `${branch}` for the name of the branch.
  1021. [[gitweb.filehistory]]gitweb.filehistory::
  1022. +
  1023. Optional pattern to use for constructing the gitweb URL when pointing
  1024. at the history of a file in a specific branch when `custom` is used
  1025. above.
  1026. +
  1027. Valid replacements are `${project}` for the project name in Gerrit,
  1028. `${file}` for the file name and `${branch}` for the name of the
  1029. branch.
  1030. [[gitweb.linkname]]gitweb.linkname::
  1031. +
  1032. Optional setting for modifying the link name presented to the user
  1033. in the Gerrit web-UI.
  1034. +
  1035. Default linkname for custom type is "gitweb".
  1036. [[gitweb.pathSeparator]]gitweb.pathSeparator::
  1037. +
  1038. Optional character to substitute the standard path separator (slash) in
  1039. project names and branch names.
  1040. +
  1041. By default, Gerrit will use hexadecimal encoding for slashes in project and
  1042. branch names. Some web servers, such as Tomcat, reject this hexadecimal
  1043. encoding in the URL.
  1044. +
  1045. Some alternative gitweb services, such as link:http://gitblit.com[Gitblit],
  1046. allow using an alternative path separator character. In Gitblit, this can be
  1047. configured through the property link:http://gitblit.com/properties.html[web.forwardSlashCharacter].
  1048. In Gerrit, the alternative path separator can be configured correspondingly
  1049. using the property 'gitweb.pathSeparator'.
  1050. +
  1051. Valid values are the characters '*', '(' and ')'.
  1052. [[hooks]]Section hooks
  1053. ~~~~~~~~~~~~~~~~~~~~~~
  1054. See also link:config-hooks.html[Hooks].
  1055. [[hooks.path]]hooks.path::
  1056. +
  1057. Optional path to hooks, if not specified then `'$site_path'/hooks` will be used.
  1058. [[hooks.patchsetCreatedHook]]hooks.patchsetCreatedHook::
  1059. +
  1060. Optional filename for the patchset created hook, if not specified then
  1061. `patchset-created` will be used.
  1062. [[hooks.draftPublishedHook]]hooks.draftPublishedHook::
  1063. +
  1064. Optional filename for the draft published hook, if not specified then
  1065. `draft-published` will be used.
  1066. [[hooks.commentAddedHook]]hooks.commentAddedHook::
  1067. +
  1068. Optional filename for the comment added hook, if not specified then
  1069. `comment-added` will be used.
  1070. [[hooks.changeMergedHook]]hooks.changeMergedHook::
  1071. +
  1072. Optional filename for the change merged hook, if not specified then
  1073. `change-merged` will be used.
  1074. [[hooks.changeAbandonedHook]]hooks.changeAbandonedHook::
  1075. +
  1076. Optional filename for the change abandoned hook, if not specified then
  1077. `change-abandoned` will be used.
  1078. [[hooks.changeRestoredHook]]hooks.changeRestoredHook::
  1079. +
  1080. Optional filename for the change restored hook, if not specified then
  1081. `change-restored` will be used.
  1082. [[hooks.refUpdatedHook]]hooks.refUpdatedHook::
  1083. +
  1084. Optional filename for the ref updated hook, if not specified then
  1085. `ref-updated` will be used.
  1086. [[hooks.claSignedHook]]hooks.claSignedHook::
  1087. +
  1088. Optional filename for the CLA signed hook, if not specified then
  1089. `cla-signed` will be used.
  1090. [[http]]Section http
  1091. ~~~~~~~~~~~~~~~~~~~~
  1092. [[http.proxy]]http.proxy::
  1093. +
  1094. URL of the proxy server when making outgoing HTTP
  1095. connections for OpenID login transactions. Syntax
  1096. should be `http://`'hostname'`:`'port'.
  1097. [[http.proxyUsername]]http.proxyUsername::
  1098. +
  1099. Optional username to authenticate to the HTTP proxy with.
  1100. This property is honored only if the username does not
  1101. appear in the http.proxy property above.
  1102. [[http.proxyPassword]]http.proxyPassword::
  1103. +
  1104. Optional password to authenticate to the HTTP proxy with.
  1105. This property is honored only if the password does not
  1106. appear in the http.proxy property above.
  1107. [[httpd]]Section httpd
  1108. ~~~~~~~~~~~~~~~~~~~~~~
  1109. The httpd section configures the embedded servlet container.
  1110. [[httpd.listenUrl]]httpd.listenUrl::
  1111. +
  1112. Specifies the URLs the internal HTTP daemon should listen for
  1113. connections on. The special hostname '*' may be used to listen
  1114. on all local addresses. A context path may optionally be included,
  1115. placing Gerrit Code Review's web address within a subdirectory of
  1116. the server.
  1117. +
  1118. Multiple protocol schemes are supported:
  1119. +
  1120. * `http://`'hostname'`:`'port'
  1121. +
  1122. Plain-text HTTP protocol. If port is not supplied, defaults to 80,
  1123. the standard HTTP port.
  1124. +
  1125. * `https://`'hostname'`:`'port'
  1126. +
  1127. SSL encrypted HTTP protocol. If port is not supplied, defaults to
  1128. 443, the standard HTTPS port.
  1129. +
  1130. Externally facing production sites are encouraged to use a reverse
  1131. proxy configuration and `proxy-https://` (below), rather than using
  1132. the embedded servlet container to implement the SSL processing.
  1133. The proxy server with SSL support is probably easier to configure,
  1134. provides more configuration options to control cipher usage, and
  1135. is likely using natively compiled encryption algorithms, resulting
  1136. in higher throughput.
  1137. +
  1138. * `proxy-http://`'hostname'`:`'port'
  1139. +
  1140. Plain-text HTTP relayed from a reverse proxy. If port is not
  1141. supplied, defaults to 8080.
  1142. +
  1143. Like http, but additional header parsing features are
  1144. enabled to honor X-Forwarded-For, X-Forwarded-Host and
  1145. X-Forwarded-Server. These headers are typically set by Apache's
  1146. link:http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#x-headers[mod_proxy].
  1147. +
  1148. * `proxy-https://`'hostname'`:`'port'
  1149. +
  1150. Plain text HTTP relayed from a reverse proxy that has already
  1151. handled the SSL encryption/decryption. If port is not supplied,
  1152. defaults to 8080.
  1153. +
  1154. Behaves exactly like proxy-http, but also sets the scheme to assume
  1155. 'https://' is the proper URL back to the server.
  1156. +
  1157. If multiple values are supplied, the daemon will listen on all
  1158. of them.
  1159. +
  1160. By default, http://*:8080.
  1161. [[httpd.reuseAddress]]httpd.reuseAddress::
  1162. +
  1163. If true, permits the daemon to bind to the port even if the port
  1164. is already in use. If false, the daemon ensures the port is not
  1165. in use before starting. Busy sites may need to set this to true
  1166. to permit fast restarts.
  1167. +
  1168. By default, true.
  1169. [[httpd.requestHeaderSize]]httpd.requestHeaderSize::
  1170. +
  1171. Size, in bytes, of the buffer used to parse the HTTP headers of an
  1172. incoming HTTP request. The entire request headers, including any
  1173. cookies sent by the browser, must fit within this buffer, otherwise
  1174. the server aborts with the response '413 Request Entity Too Large'.
  1175. +
  1176. One buffer of this size is allocated per active connection.
  1177. Allocating a buffer that is too large wastes memory that cannot be
  1178. reclaimed, allocating a buffer that is too small may cause unexpected
  1179. errors caused by very long Referer URLs or large cookie values.
  1180. +
  1181. By default, 16384 (16 K), which is sufficient for most OpenID and
  1182. other web-based single-sign-on integrations.
  1183. [[httpd.sslKeyStore]]httpd.sslKeyStore::
  1184. +
  1185. Path of the Java keystore containing the server's SSL certificate
  1186. and private key. This keystore is required for `https://` in URL.
  1187. +
  1188. To create a self-signed certificate for simple internal usage:
  1189. +
  1190. ----
  1191. keytool -keystore keystore -alias jetty -genkey -keyalg RSA
  1192. chmod 600 keystore
  1193. ----
  1194. +
  1195. If not absolute, the path is resolved relative to `$site_path`.
  1196. +
  1197. By default, `$site_path/etc/keystore`.
  1198. [[httpd.sslKeyPassword]]httpd.sslKeyPassword::
  1199. +
  1200. Password used to decrypt the private portion of the sslKeyStore.
  1201. Java keystores require a password, even if the administrator
  1202. doesn't want to enable one.
  1203. +
  1204. If set to the empty string the embedded server will prompt for the
  1205. password during startup.
  1206. +
  1207. By default, `gerrit`.
  1208. [[httpd.requestLog]]httpd.requestLog::
  1209. +
  1210. Enable (or disable) the `'$site_path'/logs/httpd_log` request log.
  1211. If enabled, an NCSA combined log format request log file is written
  1212. out by the internal HTTP daemon.
  1213. +
  1214. By default, true if httpd.listenUrl uses http:// or https://,
  1215. and false if httpd.listenUrl uses proxy-http:// or proxy-https://.
  1216. [[httpd.acceptorThreads]]httpd.acceptorThreads::
  1217. +
  1218. Number of worker threads dedicated to accepting new incoming TCP
  1219. connections and allocating them connection-specific resources.
  1220. +
  1221. By default, 2, which should be suitable for most high-traffic sites.
  1222. [[httpd.minThreads]]httpd.minThreads::
  1223. +
  1224. Minimum number of spare threads to keep in the worker thread pool.
  1225. This number must be at least 1 larger than httpd.acceptorThreads
  1226. multipled by the number of httpd.listenUrls configured.
  1227. +
  1228. By default, 5, suitable for most lower-volume traffic sites.
  1229. [[httpd.maxThreads]]httpd.maxThreads::
  1230. +
  1231. Maximum number of threads to permit in the worker thread pool.
  1232. +
  1233. By default 25, suitable for most lower-volume traffic sites.
  1234. [[httpd.maxQueued]]httpd.maxQueued::
  1235. +
  1236. Maximum number of client connections which can enter the worker
  1237. thread pool waiting for a worker thread to become available.
  1238. 0 disables the queue and permits infinite number of connections.
  1239. +
  1240. By default 50.
  1241. [[httpd.maxWait]]httpd.maxWait::
  1242. +
  1243. Maximum amount of time a client will wait for an available
  1244. thread to handle a project clone, fetch or push request over the
  1245. smart HTTP transport.
  1246. +
  1247. Values should use common unit suffixes to express their setting:
  1248. +
  1249. * s, sec, second, seconds
  1250. * m, min, minute, minutes
  1251. * h, hr, hour, hours
  1252. * d, day, days
  1253. * w, week, weeks (`1 week` is treated as `7 days`)
  1254. * mon, month, months (`1 month` is treated as `30 days`)
  1255. * y, year, years (`1 year` is treated as `365 days`)
  1256. +
  1257. If a unit suffix is not specified, `minutes` is assumed. If 0
  1258. is supplied, the maximum age is infinite and connections will not
  1259. abort until the client disconnects.
  1260. +
  1261. By default, 5 minutes.
  1262. [[ldap]]Section ldap
  1263. ~~~~~~~~~~~~~~~~~~~~
  1264. LDAP integration is only enabled if `auth.type` is set to
  1265. `HTTP_LDAP`, `LDAP` or `CLIENT_SSL_CERT_LDAP`. See above for a
  1266. detailed description of the auth.type settings and their
  1267. implications.
  1268. An example LDAP configuration follows, and then discussion of
  1269. the parameters introduced here. Suitable defaults for most
  1270. parameters are automatically guessed based on the type of server
  1271. detected during startup. The guessed defaults support both
  1272. link:http://www.ietf.org/rfc/rfc2307.txt[RFC 2307] and Active
  1273. Directory.
  1274. ----
  1275. [ldap]
  1276. server = ldap://ldap.example.com
  1277. accountBase = ou=people,dc=example,dc=com
  1278. accountPattern = (&(objectClass=person)(uid=${username}))
  1279. accountFullName = displayName
  1280. accountEmailAddress = mail
  1281. groupBase = ou=groups,dc=example,dc=com
  1282. groupMemberPattern = (&(objectClass=group)(member=${dn}))
  1283. ----
  1284. [[ldap.server]]ldap.server::
  1285. +
  1286. URL of the organization's LDAP server to query for user information
  1287. and group membership from. Must be of the form `ldap://host…