configuration.rst 64 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240
  1. Configuration
  2. =============
  3. Pagure offers a wide varieties of options that must or can be used to
  4. adjust its behavior.
  5. All of these options can be edited or added to your configuration file.
  6. If you have installed pagure, this configuration file is likely located in
  7. ``/etc/pagure/pagure.cfg``. Otherwise, it will depend on your
  8. setup/deployment.
  9. Must options
  10. ------------
  11. Here are the options you must set up in order to get pagure running.
  12. SECRET_KEY
  13. ~~~~~~~~~~
  14. This configuration key is used by flask to create the session. It should be kept secret
  15. and set as a long and random string.
  16. SALT_EMAIL
  17. ~~~~~~~~~~
  18. This configuration key is used to ensure that when sending
  19. notifications to different users, each one of them has a different, unique
  20. and unfakeable ``Reply-To`` header. This header is then used by the milter to find
  21. out if the response received is a real one or a fake/invalid one.
  22. DB_URL
  23. ~~~~~~
  24. This configuration key indicates to the framework how and where to connect to the database
  25. server. Pagure uses `SQLAchemy <http://www.sqlalchemy.org/>`_ to connect
  26. to a wide range of database server including MySQL, PostgreSQL, and SQLite.
  27. Examples values:
  28. ::
  29. DB_URL = 'mysql://user:pass@host/db_name'
  30. DB_URL = 'postgres://user:pass@host/db_name'
  31. DB_URL = 'sqlite:////var/tmp/pagure_dev.sqlite'
  32. Defaults to ``sqlite:////var/tmp/pagure_dev.sqlite``
  33. APP_URL
  34. ~~~~~~~
  35. This configuration key indicates the URL at which this pagure instance will be made available.
  36. Defaults to: ``http://localhost.localdomain/``
  37. EMAIL_ERROR
  38. ~~~~~~~~~~~
  39. Pagure sends email when it catches an unexpected error (which saves you from
  40. having to monitor the logs regularly; but if you like, the error is still
  41. present in the logs).
  42. This configuration key allows you to specify to which email address to send
  43. these error reports.
  44. GIT_URL_SSH
  45. ~~~~~~~~~~~
  46. This configuration key provides the information to the user on how to clone
  47. the git repos hosted on pagure via `SSH <https://en.wikipedia.org/wiki/Secure_Shell>`_.
  48. The URL should end with a slash ``/``.
  49. Defaults to: ``'ssh://git@llocalhost.localdomain/'``
  50. .. note:: If you are using a custom setup for your deployment where every
  51. user has an account on the machine you may want to tweak this URL
  52. to include the username. If that is the case, you can use
  53. ``{username}`` in the URL and it will be expanded to the username
  54. of the user viewing the page when rendered.
  55. For example: ``'ssh://{username}@pagure.org/'``
  56. GIT_URL_GIT
  57. ~~~~~~~~~~~
  58. This configuration key provides the information to the user on how to clone
  59. the git repos hosted on pagure anonymously. This access can be granted via
  60. the ``git://`` or ``http(s)://`` protocols.
  61. The URL should end with a slash ``/``.
  62. Defaults to: ``'git://localhost.localdomain/'``
  63. BROKER_URL
  64. ~~~~~~~~~~
  65. This configuration key is used to point celery to the broker to use. This
  66. is the broker that is used to communicate between the web application and
  67. its workers.
  68. Defaults to: ``'redis://%s' % APP.config['REDIS_HOST']``
  69. .. note:: See the :ref:`redis-section` for the ``REDIS_HOST`` configuration
  70. key
  71. Repo Directories
  72. ----------------
  73. Each project in pagure has 2 to 4 git repositories, depending on configuration
  74. of the Pagure instance (see below):
  75. - the main repo for the code
  76. - the doc repo showed in the doc server (optional)
  77. - the ticket repo storing the metadata of the tickets (optional)
  78. - the request repo storing the metadata of the pull-requests
  79. There are then another 3 folders: one for specifying the locations of the forks, one
  80. for the remote git repo used for the remotes pull-requests (ie: those coming from
  81. a project not hosted on this instance of pagure), and one for user-uploaded tarballs.
  82. GIT_FOLDER
  83. ~~~~~~~~~~
  84. This configuration key points to the folder where the git repos are stored.
  85. For every project, two to four repos are created:
  86. * a repo with source code of the project
  87. * a repo with documentation of the project
  88. (if ``ENABLE_DOCS`` is ``True``)
  89. * a repo with metadata of tickets opened against the project
  90. (if ``ENABLE_TICKETS`` is ``True``)
  91. * a repo with metadata of pull requests opened against the project
  92. Note that gitolite config value ``GL_REPO_BASE`` (if using gitolite 3)
  93. or ``$REPO_BASE`` (if using gitolite 2) **must** have exactly the same
  94. value as ``GIT_FOLDER``.
  95. REMOTE_GIT_FOLDER
  96. ~~~~~~~~~~~~~~~~~
  97. This configuration key points to the folder where the remote git repos (ie:
  98. not hosted on pagure) that someone used to open a pull-request against a
  99. project hosted on pagure are stored.
  100. UPLOAD_FOLDER_PATH
  101. ~~~~~~~~~~~~~~~~~~
  102. This configuration key points to the folder where user-uploaded tarballs
  103. are stored and served from.
  104. ATTACHMENTS_FOLDER
  105. ~~~~~~~~~~~~~~~~~~
  106. This configuration key points to the folder where attachments can be cached
  107. for easier access by the web-server (allowing to not interact with the git
  108. repo having it to serve it).
  109. UPLOAD_FOLDER_URL
  110. ~~~~~~~~~~~~~~~~~~
  111. Full URL to where the uploads are available. It is highly recommended for
  112. security reasons that this URL lives on a different domain than the main
  113. application (an entirely different domain, not just a sub-domain).
  114. Defaults to: ``/releases/``, unsafe for production!
  115. .. warning:: both `UPLOAD_FOLDER_PATH` and `UPLOAD_FOLDER_URL` must be
  116. specified for the upload release feature to work
  117. SESSION_COOKIE_SECURE
  118. ~~~~~~~~~~~~~~~~~~~~~
  119. When this is set to True, the session cookie will only be returned to the
  120. server via ssl (https). If you connect to the server via plain http, the
  121. cookie will not be sent. This prevents sniffing of the cookie contents.
  122. This may be set to False when testing your application but should always
  123. be set to True in production.
  124. Defaults to: ``False`` for development, must be ``True`` in production with
  125. https.
  126. SESSION_TYPE
  127. ~~~~~~~~~~~~
  128. Enables the `flask-session <https://pythonhosted.org/Flask-Session/>`_
  129. extension if set to a value other than ``None``. The ``flask-session``
  130. package needs to be installed and proper
  131. `configuration <https://pythonhosted.org/Flask-Session/#configuration>`_
  132. needs to be included in the Pagure config file.
  133. This is useful when the Pagure server needs to be scaled up to multiple
  134. instances, which requires the flask session keys to be shared between those.
  135. Flask-session allows you to use Redis, Memcached, relational database
  136. or MongoDB for storing shared session keys.
  137. FROM_EMAIL
  138. ~~~~~~~~~~
  139. This configuration key specifies the email address used by this pagure instance
  140. when sending emails (notifications).
  141. Defaults to: ``pagure@localhost.localdomain``
  142. DOMAIN_EMAIL_NOTIFICATIONS
  143. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  144. This configuration key specifies the domain used by this pagure instance
  145. when sending emails (notifications). More precisely, it is used
  146. when building the ``msg-id`` header of the emails sent.
  147. Defaults to: ``localhost.localdomain``
  148. VIRUS_SCAN_ATTACHMENTS
  149. ~~~~~~~~~~~~~~~~~~~~~~
  150. This configuration key configures whether attachments are scanned for viruses on
  151. upload. For more information, see the install.rst guide.
  152. Defaults to: ``False``
  153. GIT_AUTH_BACKEND
  154. ^^^^^^^^^^^^^^^^
  155. This configuration key allows specifying which git auth backend to use.
  156. Git auth backends can either be static (like gitolite), where a file is
  157. generated when something changed and then used on login, or dynamic,
  158. where the actual ACLs are checked in a git hook before being applied.
  159. By default pagure provides the following backends:
  160. - `test_auth`: simple debugging backend printing and returning the string ``Called GitAuthTestHelper.generate_acls()``
  161. - `gitolite2`: allows deploying pagure on the top of gitolite 2
  162. - `gitolite3`: allows deploying pagure on the top of gitolite 3
  163. - `pagure`: Pagure git auth implementation (using keyhelper.py and aclchecker.py) that is used via sshd AuthorizedKeysCommand
  164. - `pagure_authorized_keys`: Pagure git auth implementation that writes to authorized_keys file
  165. Defaults to: ``gitolite3``
  166. .. note:: The option GITOLITE_BACKEND is the legacy name, and for backwards compatibility reasons will override this setting
  167. .. note:: These options can be expended, cf :ref:`custom-gitolite`.
  168. Configure Pagure Auth
  169. ---------------------
  170. Pagure offers a simple, but extensible internal authentication mechanism
  171. for Git repositories. It relies on `SSH <https://en.wikipedia.org/wiki/Secure_Shell>`_
  172. for authentication. In other words, SSH lets you in and Pagure checks if
  173. you are allowed to do what you are trying to do once you are inside.
  174. This authentication mechanism uses ``keyhelper.py`` and ``aclchecker.py`` to
  175. check the Pagure database for user registered SSH keys to do the authentication.
  176. The integrated authentication mechanism has two modes of operation: one
  177. where it is configured as the ``AuthorizedKeysCommand`` for the SSH user (preferred)
  178. and one where it is configured to manage the ``authorized_keys`` file for
  179. the SSH user.
  180. In the preferred mode, when you attempt to do an action with a remote Git repo
  181. over SSH (e.g. ``git clone ssh://git@localhost.localdomain/repository.git``),
  182. the SSH server will ask Pagure to validate the SSH user key. This has the
  183. advantage of performance (no racey and slow file I/O) but has the disadvantage
  184. of requiring changes to the system's ``sshd_config`` file to use it.
  185. To use this variant, set the following in ``pagure.cfg``:
  186. ::
  187. GIT_AUTH_BACKEND = "pagure"
  188. HTTP_REPO_ACCESS_GITOLITE = None
  189. SSH_KEYS_USERNAME_EXPECT = "git"
  190. SSH_COMMAND_NON_REPOSPANNER = ([
  191. "/usr/bin/%(cmd)s",
  192. "/srv/git/repositories/%(reponame)s",
  193. ], {"GL_USER": "%(username)s"})
  194. Setting the following in ``/etc/ssh/sshd_config`` is also required:
  195. ::
  196. Match User git
  197. AuthorizedKeysCommand /usr/libexec/pagure/keyhelper.py "%u" "%h" "%t" "%f"
  198. AuthorizedKeysCommandUser git
  199. If you do not have the ability to modify the sshd configuration to set up
  200. the ``pagure`` backend, then you need to use the ``pagure_authorized_keys``
  201. alternative backend. This backend will write to the git user's ``authorized_keys``
  202. file instead. This is slower than the preferred mode and also has the
  203. disadvantage of making it impossible to scale to multiple Pagure frontend
  204. instances on top of a shared Git storage without causing races and triggering
  205. inconsistencies. It also adds to the I/O contention on a heavily used system,
  206. but for most smaller setups with few users, the trade-off is not noticeable.
  207. To use this variant, enable the ``pagure_authorized_keys_worker`` service and
  208. set the following to ``pagure.cfg``:
  209. ::
  210. SSH_FOLDER = "/srv/git/.ssh"
  211. GIT_AUTH_BACKEND = "pagure_authorized_keys"
  212. HTTP_REPO_ACCESS_GITOLITE = None
  213. SSH_COMMAND_NON_REPOSPANNER = ([
  214. "/usr/bin/%(cmd)s",
  215. "/srv/git/repositories/%(reponame)s",
  216. ], {"GL_USER": "%(username)s"})
  217. Configure Gitolite
  218. ------------------
  219. Pagure can use `gitolite <http://gitolite.com/>`_ as an authorization layer.
  220. Gitolite relies on `SSH <https://en.wikipedia.org/wiki/Secure_Shell>`_ for
  221. the authentication. In other words, SSH lets you in and gitolite checks if
  222. you are allowed to do what you are trying to do once you are inside.
  223. Pagure supports both gitolite 2 and gitolite 3 and the code generating
  224. the gitolite configuration can be customized for easier integration with
  225. other systems (cf :ref:`custom-gitolite`).
  226. Using Gitolite also requires setting the following in ``pagure.cfg``:
  227. ::
  228. HTTP_REPO_ACCESS_GITOLITE = "/usr/share/gitolite3/gitolite-shell"
  229. SSH_COMMAND_NON_REPOSPANNER = (
  230. [
  231. "/usr/share/gitolite3/gitolite-shell",
  232. "%(username)s",
  233. "%(cmd)s",
  234. "%(reponame)s",
  235. ],
  236. {},
  237. )
  238. This ensures that the Gitolite environment is used for interacting with
  239. Git repositories. Further customizations are listed below.
  240. **gitolite 2 and 3**
  241. ~~~~~~~~~~~~~~~~~~~~
  242. GITOLITE_HOME
  243. ^^^^^^^^^^^^^
  244. This configuration key points to the home directory of the user under which
  245. gitolite is ran.
  246. GITOLITE_KEYDIR
  247. ^^^^^^^^^^^^^^^
  248. This configuration key points to the folder where gitolite stores and accesses
  249. the public SSH keys of all the user have access to the server.
  250. Since pagure is the user interface, it is pagure that writes down the files
  251. in this directory, effectively setting up the users to be able to use gitolite.
  252. GITOLITE_CONFIG
  253. ^^^^^^^^^^^^^^^
  254. This configuration key points to the gitolite.conf file where pagure writes
  255. the gitolite repository access configuration.
  256. GITOLITE_CELERY_QUEUE
  257. ^^^^^^^^^^^^^^^^^^^^^
  258. This configuration is useful for large pagure deployment where recompiling
  259. the gitolite config file can take a long time. By default the compilation
  260. of gitolite's configuration file is done by the pagure_worker, which spawns
  261. by default 4 concurrent workers. If it takes a while to recompile the
  262. gitolite configuration file, these workers may be stepping on each others'
  263. toes.
  264. In this situation, this configuration key allows you to direct the messages
  265. asking for the gitolite configuration file to be compiled to a different
  266. queue which can then be handled by a different service/worker.
  267. Pagure provides a ``pagure_gitolite_worker.service`` systemd service file
  268. pre-configured to handles these messages if this configuration key is set
  269. to ``gitolite_queue``.
  270. **gitolite 2 only**
  271. ~~~~~~~~~~~~~~~~~~~
  272. GL_RC
  273. ^^^^^
  274. This configuration key points to the file ``gitolite.rc`` used by gitolite
  275. to record who has access to what (ie: who has access to which repo/branch).
  276. GL_BINDIR
  277. ^^^^^^^^^
  278. This configuration key indicates the folder in which the gitolite tools can
  279. be found. It can be as simple as ``/usr/bin/`` if the tools have been installed
  280. using a package manager or something like ``/opt/bin/`` for a more custom
  281. install.
  282. **gitolite 3 only**
  283. ~~~~~~~~~~~~~~~~~~~
  284. GITOLITE_HAS_COMPILE_1
  285. ^^^^^^^^^^^^^^^^^^^^^^
  286. By setting this configuration key to ``True``, you can turn on using the
  287. gitolite ``compile-1`` binary. This speeds up gitolite task when it recompiles
  288. configuration after new project is created. In order to use this, you need to
  289. have the ``compile-1`` gitolite command.
  290. There are two ways to have it,
  291. #. You distribution already has the file installed for you and you can then
  292. just use it.
  293. #. You need to download and install it yourself. We are describing what
  294. needs to be done for this here below.
  295. Installing the ``compile-1`` command:
  296. * You also have to make sure that your distribution of gitolite contains
  297. `patch <https://github.com/sitaramc/gitolite/commit/c4b6521a4b82e639f6ed776abad79c>`_
  298. which makes gitolite respect ``ALLOW_ORPHAN_GL_CONF`` configuration variable,
  299. if this patch isn't already present, you will have to make the change yourself.
  300. * In your ``gitolite.rc`` set ``ALLOW_ORPHAN_GL_CONF`` to ``1`` (you may
  301. have to add it yourself).
  302. * Still in your ``gitolite.rc`` file, uncomment ``LOCAL_CODE`` file and set
  303. it to a full path of a directory that you choose (for example
  304. ``/usr/local/share/gitolite3``).
  305. * Create a subdirectory ``commands`` under the path you picked for ``LOCAL_CODE``
  306. (in our example, you will need to do: ``mkdir -p /usr/local/share/gitolite3/commands``)
  307. * Finally, install the ``compile-1`` command in this ``commands`` subdirectory
  308. If your installation doesn't ship this file, you can `download it
  309. <https://github.com/sitaramc/gitolite/blob/master/contrib/commands/compile-1>`_.
  310. (Ensure the file is executable, otherwise gitolite will not find it)
  311. Defaults to: ``False``
  312. EventSource options
  313. -------------------
  314. EVENTSOURCE_SOURCE
  315. ~~~~~~~~~~~~~~~~~~
  316. This configuration key indicates the URL at which the EventSource server is
  317. available. If not defined, pagure will behave as if there are no EventSource
  318. server running.
  319. EVENTSOURCE_PORT
  320. ~~~~~~~~~~~~~~~~
  321. This configuration key indicates the port at which the EventSource server is
  322. running.
  323. .. note:: The EventSource server requires a redis server (see ``Redis options``
  324. below)
  325. Web-hooks notifications
  326. -----------------------
  327. WEBHOOK
  328. ~~~~~~~
  329. This configuration key allows turning on or off web-hooks notifications for
  330. this pagure instance.
  331. Defaults to: ``False``.
  332. .. note:: The Web-hooks server requires a redis server (see ``Redis options``
  333. below)
  334. .. _redis-section:
  335. Redis options
  336. -------------
  337. REDIS_HOST
  338. ~~~~~~~~~~
  339. This configuration key indicates the host at which the `redis <http://redis.io/>`_
  340. server is running.
  341. Defaults to: ``0.0.0.0``.
  342. REDIS_PORT
  343. ~~~~~~~~~~
  344. This configuration key indicates the port at which the redis server can be
  345. contacted.
  346. Defaults to: ``6379``.
  347. REDIS_DB
  348. ~~~~~~~~
  349. This configuration key indicates the name of the redis database to use for
  350. communicating with the EventSource server.
  351. Defaults to: ``0``.
  352. Authentication options
  353. ----------------------
  354. ADMIN_GROUP
  355. ~~~~~~~~~~~
  356. List of groups, either local or remote (if the openid server used supports the
  357. group extension), that are the site admins. These admins can regenerate the
  358. gitolite configuration, the ssh key files, and the hook-token for every project
  359. as well as manage users and groups.
  360. PAGURE_ADMIN_USERS
  361. ~~~~~~~~~~~~~~~~~~
  362. List of local users that are the site admins. These admins have the same rights as
  363. the users in the admin groups listed above as well as admin rights to
  364. all projects hosted on this pagure instance.
  365. Celery Queue options
  366. --------------------
  367. In order to help prioritize between tasks having a direct impact on the user
  368. experience and tasks needed to be run on the background but not directly
  369. impacting the users, we have split the generic tasks triggered by the web
  370. application into three possible queues: Fast, Medium, Slow.
  371. If none of these options are set, a single queue will be used for all tasks.
  372. FAST_CELERY_QUEUE
  373. ~~~~~~~~~~~~~~~~~
  374. This configuration key can be used to specify a dedicated queue for tasks that
  375. are triggered by the web frontend and need to be processed quickly for the
  376. best user experience.
  377. This will be used for tasks such as creating a new project, forking or
  378. merging a pull-request.
  379. Defaults to: ``None``.
  380. MEDIUM_CELERY_QUEUE
  381. ~~~~~~~~~~~~~~~~~~~
  382. This configuration key can be used to specify a dedicated queue for tasks that
  383. are triggered by the web frontend and need to be processed but aren't critical
  384. for the best user experience.
  385. This will be used for tasks such as updating a file in a git repository.
  386. Defaults to: ``None``.
  387. SLOW_CELERY_QUEUE
  388. ~~~~~~~~~~~~~~~~~
  389. This configuration key can be used to specify a dedicated queue for tasks that
  390. are triggered by the web frontend, are slow and do not impact the user
  391. experience in the user interface.
  392. This will be used for tasks such as updating the ticket git repo based on
  393. the content posted in the user interface.
  394. Defaults to: ``None``.
  395. Stomp Options
  396. -------------
  397. Pagure integration with Stomp allows you to emit messages to any
  398. stomp-compliant message bus.
  399. STOMP_NOTIFICATIONS
  400. ~~~~~~~~~~~~~~~~~~~
  401. This configuration key can be used to turn on or off notifications via
  402. `stomp protocol <https://stomp.github.io/>`_. All other stomp-related
  403. settings don't need to be present if this is set to ``False``.
  404. Defaults to: ``False``.
  405. STOMP_BROKERS
  406. ~~~~~~~~~~~~~
  407. List of 2-tuples with broker domain names and ports. For example
  408. ``[('primary.msg.bus.com', 6543), ('backup.msg.bus.com`, 6543)]``.
  409. STOMP_HIERARCHY
  410. ~~~~~~~~~~~~~~~
  411. Base name of the hierarchy to emit messages to. For example
  412. ``/queue/some.hierarchy.``. Note that this **must** end with
  413. a dot. Pagure will append queue names such as ``project.new``
  414. to this value, resulting in queue names being e.g.
  415. ``/queue/some.hierarchy.project.new``.
  416. STOMP_SSL
  417. ~~~~~~~~~
  418. Whether or not to use SSL when connecting to message brokers.
  419. Defaults to: ``False``.
  420. STOMP_KEY_FILE
  421. ~~~~~~~~~~~~~~
  422. Absolute path to key file for SSL connection. Only required if
  423. ``STOMP_SSL`` is set to ``True``.
  424. STOMP_CERT_FILE
  425. ~~~~~~~~~~~~~~~
  426. Absolute path to certificate file for SSL connection. Only required if
  427. ``STOMP_SSL`` is set to ``True``.
  428. STOMP_CREDS_PASSWORD
  429. ~~~~~~~~~~~~~~~~~~~~
  430. Password for decoding ``STOMP_CERT_FILE`` and ``STOMP_KEY_FILE``. Only
  431. required if ``STOMP_SSL`` is set to ``True`` and credentials files are
  432. password-encoded.
  433. ALWAYS_STOMP_ON_COMMITS
  434. ~~~~~~~~~~~~~~~~~~~~~~~
  435. This configuration key can be used to enforce `stomp <https://stomp.github.io/>`_
  436. notifications on commits made on all projects in a pagure instance.
  437. Defaults to: ``False``.
  438. API token ACLs
  439. --------------
  440. ACLS
  441. ~~~~
  442. This configuration key lists all the ACLs that can be associated with an API
  443. token with a short description of what the ACL allows one to do.
  444. This key it not really meant to be changed unless you really know what you
  445. are doing.
  446. USER_ACLS
  447. ~~~~~~~~~
  448. This configuration key can be used to list which of the ACLs listed in ``ACLS``
  449. can be associated with an API token of a project in the (web) user interface.
  450. Use this configuration key in combination with ``ADMIN_API_ACLS`` to disable
  451. certain ACLs for users while allowing admins to generate keys with them.
  452. Defaults to: ``[key for key in ACLS.keys() if key != 'generate_acls_project']``
  453. (ie: all the ACLs in ``ACLS`` except for ``generate_acls_project``)
  454. ADMIN_API_ACLS
  455. ~~~~~~~~~~~~~~
  456. This configuration key can be used to list which of the ACLs listed in ``ACLS``
  457. can be generated by the ``pagure-admin`` CLI tool by admins.
  458. Defaults to: ``['issue_comment', 'issue_create', 'issue_change_status', 'pull_request_flag', 'pull_request_comment', 'pull_request_merge', 'generate_acls_project', 'commit_flag', 'create_branch']``
  459. CROSS_PROJECT_ACLS
  460. ~~~~~~~~~~~~~~~~~~
  461. This configuration key can be used to list which of the ACLs listed in ``ACLS``
  462. can be associated with a project-less API token in the (web) user interface.
  463. These project-less API tokens can be generated in the user's settings page
  464. and allows action in multiple projects instead of being restricted to a
  465. specific one.
  466. Defaults to: ``['create_project', 'fork_project', 'modify_project']``
  467. Optional options
  468. ----------------
  469. Theming
  470. ~~~~~~~
  471. THEME
  472. ^^^^^
  473. This configuration key allows you to specify the theme to be used. The
  474. string specified is the name of the theme directory in ``pagure/themes/``
  475. For more information about theming see the :doc:`usage/theming`
  476. Default options:
  477. - ``chameleon`` The OpenSUSE theme for pagure
  478. - ``default`` The default theme for pagure
  479. - ``pagureio`` The theme used at https://pagure.io
  480. - ``srcfpo`` The theme used at https://src.fedoraproject.org
  481. Defaults to: ``default``
  482. Git repository templates
  483. ~~~~~~~~~~~~~~~~~~~~~~~~
  484. PROJECT_TEMPLATE_PATH
  485. ^^^^^^^^^^^^^^^^^^^^^
  486. This configuration key allows you to specify the path to a git repository
  487. to use as a template when creating new repository for new projects.
  488. This template will not be used for forks nor any of the git repository but
  489. the one used for the sources (ie: it will not be used for the tickets,
  490. requests or docs repositories).
  491. FORK_TEMPLATE_PATH
  492. ^^^^^^^^^^^^^^^^^^
  493. This configuration key allows you to specify the path to a git repository
  494. to use as a template when creating new repository for new forks.
  495. This template will not be used for any of the git repository but
  496. the one used for the sources of forks (ie: it will not be used for the
  497. tickets, requests or docs repositories).
  498. SSH_KEYS
  499. ~~~~~~~~
  500. It is a good practice to publish the fingerprint and public SSH key of a
  501. server you provide access to.
  502. Pagure offers the possibility to expose this information based on the values
  503. set in the configuration file, in the ``SSH_KEYS`` configuration key.
  504. See the `SSH hostkeys/Fingerprints page on pagure.io <https://pagure.io/ssh_info>`_.
  505. .. warning: The format is important
  506. SSH_KEYS = {'RSA': {'fingerprint': '<foo>', 'pubkey': '<bar>'}}
  507. Where `<foo>` and `<bar>` must be replaced by your values.
  508. CSP_HEADERS
  509. ~~~~~~~~~~~
  510. Content Security Policy (CSP) is a computer security standard introduced to
  511. prevent cross-site scripting (XSS), clickjacking and other code injection
  512. attacks resulting from execution of malicious content in the trusted web page
  513. context
  514. Source: https://en.wikipedia.org/wiki/Content_Security_Policy
  515. Defaults to:
  516. ::
  517. CSP_HEADERS = (
  518. "default-src 'self' https:; "
  519. "script-src 'self' 'nonce-{nonce}'; "
  520. "style-src 'self' 'nonce-{nonce}'"
  521. )
  522. Where ``{nonce}`` is dynamically set by pagure.
  523. LOGGING
  524. ~~~~~~~
  525. This configuration key allows you to set up the logging of the application.
  526. It relies on the standard `python logging module
  527. <https://docs.python.org/2/library/logging.html>`_.
  528. The default value is:
  529. ::
  530. LOGGING = {
  531. 'version': 1,
  532. 'disable_existing_loggers': False,
  533. 'formatters': {
  534. 'standard': {
  535. 'format': '%(asctime)s [%(levelname)s] %(name)s: %(message)s'
  536. },
  537. 'email_format': {
  538. 'format': MSG_FORMAT
  539. }
  540. },
  541. 'filters': {
  542. 'myfilter': {
  543. '()': ContextInjector,
  544. }
  545. },
  546. 'handlers': {
  547. 'console': {
  548. 'level': 'INFO',
  549. 'formatter': 'standard',
  550. 'class': 'logging.StreamHandler',
  551. 'stream': 'ext://sys.stdout',
  552. },
  553. 'email': {
  554. 'level': 'ERROR',
  555. 'formatter': 'email_format',
  556. 'class': 'logging.handlers.SMTPHandler',
  557. 'mailhost': 'localhost',
  558. 'fromaddr': 'pagure@localhost',
  559. 'toaddrs': 'root@localhost',
  560. 'subject': 'ERROR on pagure',
  561. 'filters': ['myfilter'],
  562. },
  563. },
  564. # The root logger configuration; this is a catch-all configuration
  565. # that applies to all log messages not handled by a different logger
  566. 'root': {
  567. 'level': 'INFO',
  568. 'handlers': ['console'],
  569. },
  570. 'loggers': {
  571. 'pagure': {
  572. 'handlers': ['console'],
  573. 'level': 'DEBUG',
  574. 'propagate': True
  575. },
  576. 'flask': {
  577. 'handlers': ['console'],
  578. 'level': 'INFO',
  579. 'propagate': False
  580. },
  581. 'sqlalchemy': {
  582. 'handlers': ['console'],
  583. 'level': 'WARN',
  584. 'propagate': False
  585. },
  586. 'binaryornot': {
  587. 'handlers': ['console'],
  588. 'level': 'WARN',
  589. 'propagate': True
  590. },
  591. 'pagure.lib.encoding_utils': {
  592. 'handlers': ['console'],
  593. 'level': 'WARN',
  594. 'propagate': False
  595. },
  596. }
  597. }
  598. .. note:: as you can see there is an ``email`` handler defined. It's not used
  599. anywhere by default but you can use it to get report of errors by email
  600. and thus monitor your pagure instance.
  601. To do this the easiest is to set, on the ``root`` logger:
  602. ::
  603. 'handlers': ['console', 'email'],
  604. ITEM_PER_PAGE
  605. ~~~~~~~~~~~~~
  606. This configuration key allows you to configure the length of a page by
  607. setting the number of items on the page. Items can be commits, users, groups,
  608. or projects for example.
  609. Defaults to: ``50``.
  610. PR_TARGET_MATCHING_BRANCH
  611. ~~~~~~~~~~~~~~~~~~~~~~~~~
  612. If set to ``True``, the default target branch for all pull requests in UI
  613. is the branch that is longest substring of the branch that the pull request
  614. is created from. For example, a ``mybranch`` branch in original repo will
  615. be the default target of a pull request from branch ``mybranch-feature-1``
  616. in a fork when opening a new pull request. If this is set to ``False``,
  617. the default branch of the repo will be the default target of all pull requests.
  618. Defaults to: ``False``.
  619. SSH_ACCESS_GROUPS
  620. ~~~~~~~~~~~~~~~~~
  621. Some instances of pagure are deployed in such a way that only the members of
  622. certain groups are allowed to commit via ssh. This configuration key allows
  623. to specify which groups have commit access and thus let pagure hide the ssh
  624. URL from the drop-down "Clone" menu for all the person who are not in one of
  625. these groups.
  626. If this configuration key is not defined or left empty, it is assume that there
  627. is no such group restriction and everyone can commit via ssh (default behavior).
  628. Defaults to: ``[]``
  629. SMTP configuration
  630. ~~~~~~~~~~~~~~~~~~
  631. SMTP_SERVER
  632. ^^^^^^^^^^^
  633. This configuration key specifies the SMTP server to use when
  634. sending emails.
  635. Defaults to: ``localhost``.
  636. See also the SMTP_STARTTLS section.
  637. SMTP_PORT
  638. ^^^^^^^^^
  639. This configuration key specifies the SMTP server port.
  640. SMTP by default uses TCP port 25. The protocol for mail submission is
  641. the same, but uses port 587.
  642. SMTP connections secured by SSL, known as SMTPS, default to port 465
  643. (nonstandard, but sometimes used for legacy reasons).
  644. Defaults to: ``25``
  645. SMTP_SSL
  646. ^^^^^^^^
  647. This configuration key specifies whether the SMTP connections
  648. should be secured over SSL.
  649. Defaults to: ``False``
  650. SMTP_STARTTLS
  651. ^^^^^^^^^^^^^
  652. This configuration key specifies instructs pagure to starts connecting to
  653. the SMTP server via a `starttls` command.
  654. When enabling STARTTLS in conjunction with a local smtp server, you should
  655. replace ``localhost`` with a host name that is included in the server's
  656. certificate. If the server only relays messages originating from ``localhost``,
  657. then you should also ensure that the above host name resolves to the same
  658. tcp address as ``localhost``, for instance by adding an appropriate record
  659. to */etc/hosts*.
  660. Defaults to: ``False``
  661. SMTP_KEYFILE
  662. ^^^^^^^^^^^^
  663. This configuration key allows to specify a key file to be used in the
  664. `starttls` command when connecting to the smtp server.
  665. Defaults to: ``None``
  666. SMTP_CERTFILE
  667. ^^^^^^^^^^^^
  668. This configuration key allows to specify a certificate file to be used in
  669. the `starttls` command when connecting to the smtp server.
  670. Defaults to: ``None``
  671. SMTP_USERNAME
  672. ^^^^^^^^^^^^^
  673. This configuration key allows usage of SMTP with auth.
  674. Note: Specify SMTP_USERNAME and SMTP_PASSWORD for using SMTP auth
  675. Defaults to: ``None``
  676. SMTP_PASSWORD
  677. ^^^^^^^^^^^^^
  678. This configuration key allows usage of SMTP with auth.
  679. Note: Specify SMTP_USERNAME and SMTP_PASSWORD for using SMTP auth
  680. Defaults to: ``None``
  681. SHORT_LENGTH
  682. ~~~~~~~~~~~~
  683. This configuration key specifies the length of the commit ids or
  684. file hex displayed in the user interface.
  685. Defaults to: ``6``.
  686. BLACKLISTED_PROJECTS
  687. ~~~~~~~~~~~~~~~~~~~~
  688. This configuration key specifies a list of project names that are forbidden.
  689. This list is used for example to avoid conflicts at the URL level between the
  690. static files located under ``/static/`` and a project that would be named
  691. ``static`` and thus be located at ``/static``.
  692. Defaults to:
  693. ::
  694. [
  695. 'static', 'pv', 'releases', 'new', 'api', 'settings',
  696. 'logout', 'login', 'users', 'groups', 'about'
  697. ]
  698. CHECK_SESSION_IP
  699. ~~~~~~~~~~~~~~~~
  700. This configuration key specifies whether to check the user's IP
  701. address when retrieving its session. This makes things more secure but
  702. under certain setups it might not work (for example if there
  703. are proxies in front of the application).
  704. Defaults to: ``True``.
  705. PAGURE_AUTH
  706. ~~~~~~~~~~~~
  707. This configuration key specifies which authentication method to use.
  708. Valid options are ``fas``, ``openid``, ``oidc``, or ``local``.
  709. * ``fas`` uses the Fedora Account System `FAS <https://admin.fedoraproject.org/accounts>`
  710. to provide user authentication and enforces that users sign the FPCA.
  711. * ``openid`` uses OpenID authentication. Any provider may be used by
  712. changing the FAS_OPENID_ENDPOINT configuration key. By default
  713. FAS (without FPCA) will be used.
  714. * ``oidc`` enables OpenID Connect using any provider. This provider requires
  715. the configuration options starting with ``OIDC_`` (see below) to be provided.
  716. * ``local`` causes pagure to use the local pagure database for user management.
  717. Defaults to: ``local``.
  718. OIDC Settings
  719. ~~~~~~~~~~~~~
  720. .. note:: Pagure uses `flask-oidc <https://github.com/puiterwijk/flask-oidc/>`_
  721. to support OIDC authentication. This extension has a `number of configuration
  722. keys <http://flask-oidc.readthedocs.io/en/latest/#settings-reference>`_
  723. that may be useful depending on your set-up
  724. OIDC_CLIENT_SECRETS
  725. ^^^^^^^^^^^^^^^^^^^
  726. Provide a path to client secrets file on local filesystem. This file can be
  727. obtained from your OpenID Connect identity provider. Note that some providers
  728. don't fill in ``userinfo_uri``. If that is the case, you need to add it to
  729. the secrets file manually.
  730. OIDC_ID_TOKEN_COOKIE_SECURE
  731. ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  732. When this is set to True, the cookie with OpenID Connect Token will only be
  733. returned to the server via ssl (https). If you connect to the server via plain
  734. http, the cookie will not be sent. This prevents sniffing of the cookie contents.
  735. This may be set to False when testing your application but should always
  736. be set to True in production.
  737. Defaults to: ``True`` for production with https, can be set to ``False`` for
  738. convenient development.
  739. OIDC_SCOPES
  740. ^^^^^^^^^^^
  741. List of `OpenID Connect scopes http://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims`
  742. to request from identity provider.
  743. OIDC_PAGURE_EMAIL
  744. ^^^^^^^^^^^^^^^^^
  745. Name of key of user's email in userinfo JSON returned by identity provider.
  746. OIDC_PAGURE_FULLNAME
  747. ^^^^^^^^^^^^^^^^^^^^
  748. Name of key of user's full name in userinfo JSON returned by identity provider.
  749. OIDC_PAGURE_USERNAME
  750. ^^^^^^^^^^^^^^^^^^^^
  751. Name of key of user's preferred username in userinfo JSON returned by identity
  752. provider.
  753. OIDC_PAGURE_SSH_KEY
  754. ^^^^^^^^^^^^^^^^^^^
  755. Name of key of user's ssh key in userinfo JSON returned by identity provider.
  756. OIDC_PAGURE_GROUPS
  757. ^^^^^^^^^^^^^^^^^^
  758. Name of key of user's groups in userinfo JSON returned by identity provider.
  759. OIDC_PAGURE_USERNAME_FALLBACK
  760. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  761. This specifies fallback for getting username assuming ``OIDC_PAGURE_USERNAME``
  762. is empty - can be ``email`` (to use the part before ``@``) or ``sub``
  763. (IdP-specific user id, can be a nickname, email or a numeric ID
  764. depending on identity provider).
  765. IP_ALLOWED_INTERNAL
  766. ~~~~~~~~~~~~~~~~~~~
  767. This configuration key specifies which IP addresses are allowed
  768. to access the internal API endpoint. These endpoints are accessed by the
  769. milters for example and allow performing actions in the name of someone else
  770. which is sensitive, thus the origin of the request using
  771. these endpoints is validated.
  772. Defaults to: ``['127.0.0.1', 'localhost', '::1']``.
  773. MAX_CONTENT_LENGTH
  774. ~~~~~~~~~~~~~~~~~~
  775. This configuration key specifies the maximum file size allowed when
  776. uploading content to pagure (for example, screenshots to a ticket).
  777. Defaults to: ``4 * 1024 * 1024`` which corresponds to 4 megabytes.
  778. ENABLE_TICKETS
  779. ~~~~~~~~~~~~~~
  780. This configuration key activates or deactivates the ticketing system
  781. for all the projects hosted on this pagure instance.
  782. Defaults to: ``True``
  783. ENABLE_TICKETS_NAMESPACE
  784. ~~~~~~~~~~~~~~~~~~~~~~~~
  785. This configuration key can be used to restrict the namespace in which the ticketing
  786. system is enabled.
  787. So if your pagure instance has ``ENABLE_TICKETS`` as ``True`` and sets
  788. ``ENABLE_TICKETS_NAMESPACE`` to ``['tests', 'infra']`` only the projects opened
  789. in these two namespaces will have the ticketing system enabled. All the other
  790. namespaces will not.
  791. Defaults to: ``[]``
  792. ENABLE_DOCS
  793. ~~~~~~~~~~~
  794. This configuration key activates or deactivates creation of git repos
  795. for documentation for all the projects hosted on this pagure instance.
  796. Defaults to: ``True``
  797. ENABLE_NEW_PROJECTS
  798. ~~~~~~~~~~~~~~~~~~~
  799. This configuration key permits or forbids creation of new projects via
  800. the user interface and the API of this pagure instance.
  801. Defaults to: ``True``
  802. ENABLE_UI_NEW_PROJECTS
  803. ~~~~~~~~~~~~~~~~~~~~~~
  804. This configuration key permits or forbids creation of new projects via
  805. the user interface (only) of this pagure instance. It allows forbidding
  806. to create new project in the user interface while letting a set of trusted
  807. person to create projects via the API granted they have the API token with
  808. the corresponding ACL.
  809. Defaults to: ``True``
  810. ENABLE_DEL_PROJECTS
  811. ~~~~~~~~~~~~~~~~~~~
  812. This configuration key permits or forbids deletion of projects via
  813. the user interface of this pagure instance.
  814. Defaults to: ``True``
  815. ENABLE_DEL_FORKS
  816. ~~~~~~~~~~~~~~~~
  817. This configuration key permits or forbids deletion of forks via
  818. the user interface of this pagure instance.
  819. Defaults to: ``ENABLE_DEL_PROJECTS``
  820. GIT_HOOK_DB_RO
  821. ~~~~~~~~~~~~~~
  822. This configuration key specifies if the git hook have a read-only (RO) access
  823. to the database or not.
  824. Some pagure deployment provide an actual shell account on the host and thus the
  825. git hook called upon git push are executed under that account. If the user
  826. manages to by-pass git and is able to access the configuration file, they could
  827. have access to "private" information. So in those deployments the git hooks
  828. have a specific configuration file with a database access that is read-only,
  829. making pagure behave differently in those situations.
  830. Defaults to: ``False``
  831. EMAIL_SEND
  832. ~~~~~~~~~~
  833. This configuration key enables or disables all email notifications for
  834. this pagure instance. This can be useful to turn off when developing on
  835. pagure, or for test or pre-production instances.
  836. Defaults to: ``False``.
  837. .. note::
  838. This does not disable emails to the email address set in ``EMAIL_ERROR``.
  839. FEDMSG_NOTIFICATIONS
  840. ~~~~~~~~~~~~~~~~~~~~
  841. This configuration key can be used to turn on or off notifications via `fedmsg
  842. <http://www.fedmsg.com/>`_.
  843. Defaults to: ``False``.
  844. FEDORA_MESSAGING_NOTIFICATIONS
  845. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  846. This configuration key can be used to turn on or off sending notifications via
  847. `fedora-messaging <https://fedora-messaging.readthedocs.io/en/stable/>`_.
  848. Defaults to: ``False``.
  849. ALWAYS_FEDMSG_ON_COMMITS
  850. ~~~~~~~~~~~~~~~~~~~~~~~~
  851. This configuration key can be used to enforce `fedmsg <http://www.fedmsg.com/>`_
  852. notifications on commits made on all projects in a pagure instance.
  853. Defaults to: ``True``.
  854. ALLOW_DELETE_BRANCH
  855. ~~~~~~~~~~~~~~~~~~~
  856. This configuration keys enables or disables allowing users to delete git
  857. branches from the user interface. In sensible pagure instance you may
  858. want to turn this off and with a customized gitolite configuration you can
  859. prevent users from deleting branches in their git repositories.
  860. Defaults to: ``True``.
  861. ALLOW_ADMIN_IGNORE_EXISTING_REPOS
  862. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  863. This enables a checkbox "Ignore existing repos" for admins when creating a new
  864. project. When this is checkbox is checked, existing repositories will not cause
  865. project creation to fail.
  866. This could be used to assume responsibility of existing repositories.
  867. Defaults to: ``False``.
  868. USERS_IGNORE_EXISTING_REPOS
  869. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  870. List of users who can al create a project while ignoring existing repositories.
  871. Defaults to: ``[]``.
  872. LOCAL_SSH_KEY
  873. ~~~~~~~~~~~~~
  874. This configuration key can be used to let pagure administrate the user's ssh keys
  875. or have a third party tool do it for you.
  876. In most cases, it will be fine to let pagure handle it.
  877. Defaults to ``True``.
  878. DEPLOY_KEY
  879. ~~~~~~~~~~
  880. This configuration key can be used to disable the deploy keys feature of an
  881. entire pagure instance. This feature enable to add extra public ssh keys
  882. that a third party could use to push to a project.
  883. Defaults to ``True``.
  884. OLD_VIEW_COMMIT_ENABLED
  885. ~~~~~~~~~~~~~~~~~~~~~~~
  886. In version 1.3, pagure changed its URL scheme to view the commit of a
  887. project in order to add support for pseudo-namespaced projects.
  888. For pagure instances older than 1.3, who care about backward compatibility,
  889. we added an endpoint ``view_commit_old`` that brings URL backward
  890. compatibility for URLs using the complete git hash (the 40 characters).
  891. For URLs using a shorter hash, the URLs will remain broken.
  892. This configuration key enables or disables this backward compatibility
  893. which is useful for pagure instances running since before 1.3 but is not
  894. for newer instances.
  895. Defaults to: ``False``.
  896. DISABLE_REMOTE_PR
  897. ~~~~~~~~~~~~~~~~~
  898. In some pagure deployments remote pull requests need to be disabled
  899. due to legal / policy reasons.
  900. Defaults to: ``False``.
  901. PAGURE_CI_SERVICES
  902. ~~~~~~~~~~~~~~~~~~
  903. Pagure can be configure to integrate results of a Continuous Integration (CI)
  904. service to pull-requests open against a project.
  905. To enable this integration, follow the documentation on how to install
  906. pagure-ci and set this configuration key to ``['jenkins']`` (Jenkins being
  907. the only CI service supported at the moment).
  908. Defaults to: ``None``.
  909. .. warning:: Requires `Redis` to be configured and running.
  910. INSTANCE_NAME
  911. ~~~~~~~~~~~~~
  912. This allows giving a name to this running instance of pagure. The name is
  913. then used in the welcome screen shown upon first login.
  914. Defaults to: ``Pagure``
  915. .. note: the welcome screen currently does not work with the `local`
  916. authentication.
  917. ADMIN_EMAIL
  918. ~~~~~~~~~~~
  919. This configuration key allows you to change the default administrator email
  920. which is displayed on the "about" page. It can also be used elsewhere.
  921. Defaults to: ``root@localhost.localdomain``
  922. USER_NAMESPACE
  923. ~~~~~~~~~~~~~~
  924. This configuration key can be used to enforce that project are namespaced under
  925. the user's username, behaving in this way in a similar fashion as github.com
  926. or gitlab.com.
  927. Defaults to: ``False``
  928. DOC_APP_URL
  929. ~~~~~~~~~~~
  930. This configuration key allows you to specify where the documentation server
  931. is running (preferably in a different domain name entirely).
  932. If not set, the documentation page will show an error message saying that
  933. this pagure instance does not have a documentation server.
  934. Defaults to: ``None``
  935. PRIVATE_PROJECTS
  936. ~~~~~~~~~~~~~~~~
  937. This configuration key allows you to host private repositories. These
  938. repositories are visible only to the creator of the repository and to the
  939. users who are given access to the repository. No information is leaked about the
  940. private repository which means redis doesn't have the access to the repository
  941. and even fedmsg doesn't get any notifications.
  942. Defaults to: ``True``
  943. EXCLUDE_GROUP_INDEX
  944. ~~~~~~~~~~~~~~~~~~~
  945. This configuration key can be used to hide project an user has access to via
  946. one of the groups listed in this key.
  947. The use-case is the following: the Fedora project is deploying pagure has a
  948. front-end for the git repos of the packages in the distribution, that means
  949. about 17,000 git repositories in pagure. The project has a group of people
  950. that have access to all of these repositories, so when viewing the user's
  951. page of one member of that group, instead of seeing all the project that
  952. this user works on, you can see all the projects hosted in that pagure
  953. instance. Using this configuration key, pagure will hide all the projects
  954. that this user has access to via the specified groups and thus return only
  955. the groups of forks of that users.
  956. Defaults to: ``[]``
  957. TRIGGER_CI
  958. ~~~~~~~~~~
  959. A run of pagure-ci can be manually triggered if some key sentences are added
  960. as comment to a pull-request, either manually or via the "Rerun CI" dropdown.
  961. This allows one to re-run a test that failed due to some network outage or other
  962. unexpected issues unrelated to the test suite.
  963. This configuration key can be used to define all the sentences that can be used
  964. to trigger this pagure-ci run. The format is following: ``{"<sentence>":
  965. {"name": "<name of the CI>", "description": "<short description>"}}``
  966. Sentences which have ``None`` as value won't show up in the "Rerun CI"
  967. dropdown. Additionally, it's possible to add a ``requires_project_hook_attr``
  968. key to the dict with data about a sentence. For example, having
  969. ``"requires_project_hook_attr": ("ci_hook", "active_pr", True)`` would make
  970. the "Rerun CI" dropdown have a button for this specific CI only if the
  971. project has ``ci_hook`` activated and its ``active_pr`` value is ``True``.
  972. In versions before 5.2, this was a list containing just the sentences.
  973. Defaults to: ``{"pretty please pagure-ci rebuild": {"name": "Default CI",
  974. "description": "Rerun default CI"}}``
  975. .. note:: The sentences defined in this configuration key should be lower
  976. case only!
  977. FLAG_STATUSES_LABELS
  978. ~~~~~~~~~~~~~~~~~~~~
  979. By default, Pagure has ``success``, ``failure``, ``error``, ``pending`` and
  980. ``canceled`` statuses of PR and commit flags. This setting allows you to
  981. define a custom mapping of statuses to their respective Bootstrap labels.
  982. FLAG_SUCCESS
  983. ~~~~~~~~~~~~
  984. Holds name of PR/commit flag that is considered a success.
  985. Defaults to: ``success``
  986. FLAG_FAILURE
  987. ~~~~~~~~~~~~
  988. Holds name of PR/commit flag that is considered a failure.
  989. Defaults to: ``failure``
  990. FLAG_PENDING
  991. ~~~~~~~~~~~~
  992. Holds name of PR/commit flag that is considered a pending state.
  993. Defaults to: ``pending``
  994. EXTERNAL_COMMITTER
  995. ~~~~~~~~~~~~~~~~~~
  996. The external committer feature is a way to allow members of groups defined
  997. outside pagure (and provided to pagure upon login by the authentication
  998. system) to be consider committers on pagure.
  999. This feature can give access to all the projects on the instance, all but
  1000. some or just some.
  1001. Defaults to: ``{}``
  1002. To give access to all the projects to a group named ``fedora-altarch`` use
  1003. a such a structure::
  1004. EXTERNAL_COMMITTER = {
  1005. 'fedora-altarch': {}
  1006. }
  1007. To give access to all the projects but one (named ``rpms/test``) to a group
  1008. named ``provenpackager`` use a such a structure::
  1009. EXTERNAL_COMMITTER = {
  1010. 'fedora-altarch': {},
  1011. 'provenpackager': {
  1012. 'exclude': ['rpms/test']
  1013. }
  1014. }
  1015. To give access to just some projects (named ``rpms/test`` and
  1016. ``modules/test``) to a group named ``testers`` use a such a structure::
  1017. EXTERNAL_COMMITTER = {
  1018. 'fedora-altarch': {},
  1019. 'provenpackager': {
  1020. 'exclude': ['rpms/test']
  1021. },
  1022. 'testers': {
  1023. 'restrict': ['rpms/test', 'modules/test']
  1024. }
  1025. }
  1026. REQUIRED_GROUPS
  1027. ~~~~~~~~~~~~~~~
  1028. The required groups allows one to specify in which group an user must be to be
  1029. added to a project with commit or admin access.
  1030. Defaults to: ``{}``
  1031. Example configuration::
  1032. REQUIRED_GROUPS = {
  1033. 'rpms/kernel': ['packager', 'kernel-team'],
  1034. 'modules/*': ['module-packager', 'packager'],
  1035. 'rpms/*': ['packager'],
  1036. '*': ['contributor'],
  1037. }
  1038. With this configuration (evaluated in the provided order):
  1039. * only users that are in the groups ``packager`` and ``kernel-team`` will be
  1040. allowed to be added the ``rpms/kernel`` project (where ``rpms`` is the
  1041. namespace and ``kernel`` the project name).
  1042. * only users that are in the groups ``module-packager`` and ``packager``
  1043. will be allowed to be added to projects in the ``modules`` namespace.
  1044. * only users that are in the group ``packager`` will be allowed to be added
  1045. to projects in the ``rpms`` namespace.
  1046. * only users in the ``contributor`` group will be allowed to be added to
  1047. any project on this pagure instance.
  1048. GITOLITE_PRE_CONFIG
  1049. ~~~~~~~~~~~~~~~~~~~
  1050. This configuration key allows you to include some content at the *top* of
  1051. the gitolite configuration file (such as some specific group definition),
  1052. thus allowing to customize the gitolite configuration file with elements
  1053. and information that are outside of pagure's control.
  1054. This can be used in combination with ``GITOLITE_POST_CONFIG`` to further
  1055. customize gitolite's configuration file. It can also be used with
  1056. ``EXTERNAL_COMMITTER`` to give commit access to git repos based on external
  1057. information.
  1058. Defaults to: ``None``
  1059. GITOLITE_POST_CONFIG
  1060. ~~~~~~~~~~~~~~~~~~~~
  1061. This configuration key allows you to include some content at the *end* of
  1062. the gitolite configuration file (such as some project definition or access),
  1063. thus allowing to customize the gitolite configuration file with elements
  1064. and information that are outside of pagure's control.
  1065. This can be used in combination with ``GITOLITE_PRE_CONFIG`` to further
  1066. customize gitolite's configuration file. It can also be used with
  1067. ``EXTERNAL_COMMITTER`` to give commit access to git repos based on external
  1068. information.
  1069. Defaults to: ``None``
  1070. GIT_GARBAGE_COLLECT
  1071. ~~~~~~~~~~~~~~~~~~~
  1072. This configuration key allows for explicit running of ``git gc --auto``
  1073. after every operation that adds new objects to any git repository -
  1074. that is after pushing and merging. The reason for having this functionality
  1075. in Pagure is that gc is not guaranteed to be run by git after every
  1076. object-adding operation.
  1077. The garbage collection run by Pagure will respect git settings, so you
  1078. can tweak ``gc.auto`` and ``gc.autoPackLimit`` to your liking
  1079. and that will have immediate effect on the task that runs the garbage
  1080. collection. These values can be configured system-wide in ``/etc/gitconfig``.
  1081. See https://git-scm.com/docs/git-gc#git-gc---auto for more details.
  1082. This is especially useful if repositories are stored on NFS (or similar
  1083. network storage), where file metadata access is expensive - having unpacked
  1084. objects in repositories requires *a lot* of metadata reads.
  1085. Note that the garbage collection is only run on repos that are not on
  1086. repoSpanner.
  1087. Defaults to: ``False``
  1088. CELERY_CONFIG
  1089. ~~~~~~~~~~~~~
  1090. This configuration key allows you to tweak the configuration of celery for
  1091. your needs.
  1092. See the documentation about `celery configuration
  1093. <http://docs.celeryproject.org/en/latest/userguide/configuration.html>`_ for
  1094. more information.
  1095. Defaults to: ``{}``
  1096. CASE_SENSITIVE
  1097. ~~~~~~~~~~~~~~
  1098. This configuration key can be used to make this pagure instance case sensitive
  1099. instead of its default: case-insensitive.
  1100. Defaults to: ``False``
  1101. PROJECT_NAME_REGEX
  1102. ~~~~~~~~~~~~~~~~~~
  1103. This configuration key can be used to customize the regular expression used to
  1104. validate new project name.
  1105. Defaults to: ``^[a-zA-z0-9_][a-zA-Z0-9-_]*$``
  1106. APPLICATION_ROOT
  1107. ~~~~~~~~~~~~~~~~
  1108. This configuration key is used in the path of the cookie used by pagure.
  1109. Defaults to: ``'/'``
  1110. ALLOWED_PREFIX
  1111. ~~~~~~~~~~~~~~
  1112. This configuration key can be used to specify a list of allowed namespaces that
  1113. will not require creating a group for users to create projects in.
  1114. Defaults to: ``[]``
  1115. ADMIN_SESSION_LIFETIME
  1116. ~~~~~~~~~~~~~~~~~~~~~~
  1117. This configuration key allows specifying the lifetime of the session during
  1118. which the user won't have to re-login for admin actions.
  1119. In other words, the maximum time between which an user can access a project's
  1120. settings page without re-login.
  1121. Defaults to: ``timedelta(minutes=20)``
  1122. where timedelta comes from the python datetime module
  1123. BLACKLISTED_GROUPS
  1124. ~~~~~~~~~~~~~~~~~~
  1125. This configuration key can be used to blacklist some group names.
  1126. Defaults to: ``['forks', 'group']``
  1127. ENABLE_GROUP_MNGT
  1128. ~~~~~~~~~~~~~~~~~
  1129. This configuration key can be used to turn on or off managing (ie: creating a
  1130. group, adding or removing users in that group) groups in this pagure instance.
  1131. If turned off, groups and group members are to be managed outside of pagure
  1132. and synced upon login.
  1133. Defaults to: ``True``
  1134. ENABLE_USER_MNGT
  1135. ~~~~~~~~~~~~~~~~
  1136. This configuration key can be used to turn on or off managing users (adding or
  1137. removing them from a project) in this pagure instance.
  1138. If turned off, users are managed outside of pagure.
  1139. Defaults to: ``True``
  1140. SESSION_COOKIE_NAME
  1141. ~~~~~~~~~~~~~~~~~~~
  1142. This configuration key can be used to specify the name of the session cookie used
  1143. by pagure.
  1144. Defaults to: ``'pagure'``
  1145. SHOW_PROJECTS_INDEX
  1146. ~~~~~~~~~~~~~~~~~~~
  1147. This configuration key can be used to specify what is shown in the index page of
  1148. logged in users.
  1149. Defaults to: ``['repos', 'myrepos', 'myforks']``
  1150. EMAIL_ON_WATCHCOMMITS
  1151. ~~~~~~~~~~~~~~~~~~~~~
  1152. By default pagure sends an email to every one watch commits on a project when a
  1153. commit is made.
  1154. However some pagure instances may be using a different notification mechanism on
  1155. commits and thus may not want this feature to double the notifications received.
  1156. This configuration key can be used to turn on or off email being sent to people
  1157. watching commits on a project upon commits.
  1158. Defaults to: ``True``
  1159. ALLOW_HTTP_PULL_PUSH
  1160. ~~~~~~~~~~~~~~~~~~~~
  1161. This configuration key controls whether any HTTP access to repositories is provided
  1162. via the support for that that's embedded in Pagure.
  1163. This provides HTTP pull access via <pagureurl>/<reponame>.git if nothing else
  1164. serves this URL.
  1165. Defaults to: ``True``
  1166. ALLOW_HTTP_PUSH
  1167. ~~~~~~~~~~~~~~~
  1168. This configuration key controls whether pushing is possible via the HTTP interface.
  1169. This is disabled by default, as it requires setting up an authentication mechanism
  1170. on the webserver that sets REMOTE_USER.
  1171. Defaults to: ``False``
  1172. HTTP_REPO_ACCESS_GITOLITE
  1173. ~~~~~~~~~~~~~~~~~~~~~~~~~
  1174. This configuration key configures the path to the gitolite-shell binary.
  1175. If this is set to None, Git http-backend is used directly.
  1176. Only set this to ``None`` if you intend to provide HTTP push access via Pagure, and
  1177. are using a dynamic ACL backend.
  1178. Defaults to: ``/usr/share/gitolite3/gitolite-shell``
  1179. MIRROR_SSHKEYS_FOLDER
  1180. ~~~~~~~~~~~~~~~~~~~~~
  1181. This configuration key specificies where pagure should store the ssh keys
  1182. generated for the mirroring feature. This folder should be properly backed up
  1183. and kept secure.
  1184. Defaults to: ``/var/lib/pagure/sshkeys/``
  1185. LOG_ALL_COMMITS
  1186. ~~~~~~~~~~~~~~~
  1187. This configuration key will make pagure log all commits pushed to all
  1188. branches of all repositories instead of logging only the once that are
  1189. pushed to the default branch.
  1190. Defaults to: ``False``
  1191. DISABLE_MIRROR_IN
  1192. ~~~~~~~~~~~~~~~~~
  1193. This configuration key allows a pagure instance to not support mirroring in
  1194. projects (from third party git server).
  1195. Defaults to: ``False``
  1196. SYNTAX_ALIAS_OVERRIDES
  1197. ~~~~~~~~~~~~~~~~~~~~~~
  1198. This configuration key can be used to force highlight.js to use a certain logic
  1199. on certain files based on their extensions.
  1200. It should be a dictionary containing the file extensions as keys and
  1201. the highlighting language/category to use as values.
  1202. Defaults to: ``{".spec": "specfile", ".patch": "diff"}``
  1203. ALLOW_API_UPDATE_GIT_TAGS
  1204. ~~~~~~~~~~~~~~~~~~~~~~~~~
  1205. This configuration key determines whether users are allowed to update
  1206. existing git tags via the API.
  1207. When set to ``False``, this essentially makes the API ignore whether the
  1208. ``force`` argument is set or not.
  1209. Default to: ``True``
  1210. RepoSpanner Options
  1211. -------------------
  1212. Pagure can be integrated with `repoSpanner <https://repospanner.org>`_
  1213. allowing to deploy pagure in a load-balanced environment since the git
  1214. repositories are then synced across multiple servers simultaneously.
  1215. Support for this integration has been included in Pagure version 5.0 and higher.
  1216. Here below are the different options one can/should use to integrate pagure
  1217. with repoSpanner.
  1218. REPOBRIDGE_BINARY
  1219. ~~~~~~~~~~~~~~~~~
  1220. This should contain the path to the repoBridge binary, which is used for pushing
  1221. and pulling to/from repoSpanner.
  1222. Defaults to: ``/usr/libexec/repobridge``.
  1223. REPOSPANNER_NEW_REPO
  1224. ~~~~~~~~~~~~~~~~~~~~
  1225. This configuration key instructs pagure to create new git repositories on
  1226. repoSpanner or not.
  1227. Its value should be the region in which the new git repositories should be
  1228. created on.
  1229. Defaults to: ``None``.
  1230. REPOSPANNER_NEW_REPO_ADMIN_OVERRIDE
  1231. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1232. This configuration key can be used to let pagure admin override the default
  1233. region used when creating new git repositories on repoSpanner.
  1234. Its value should be a boolean.
  1235. Defaults to: ``False``
  1236. REPOSPANNER_NEW_FORK
  1237. ~~~~~~~~~~~~~~~~~~~~
  1238. This configuration key instructs pagure on where/how to create new git
  1239. repositories for the forks with repoSpanner.
  1240. If ``None``, git repositories for forks are created outside of repoSpanner
  1241. entirely.
  1242. If ``True``, git repositories for forks are created in the same region as
  1243. the parent project.
  1244. Otherwise, a region can be directly specified where git repositories for
  1245. forks will be created.
  1246. Defaults to: ``True``
  1247. REPOSPANNER_ADMIN_MIGRATION
  1248. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1249. This configuration key can be used to let admin manually migrate individual
  1250. project into repoSpanner once it is set up.
  1251. Defaults to: ``False``
  1252. REPOSPANNER_REGIONS
  1253. ~~~~~~~~~~~~~~~~~~~
  1254. This configuration key can be used to specify the different region where repoSpanner
  1255. is deployed and thus with which this pagure instance can be integrated.
  1256. An example entry could look like:
  1257. ::
  1258. REPOSPANNER_REGIONS = {
  1259. 'default': {'url': 'https://nodea.regiona.repospanner.local:8444',
  1260. 'repo_prefix': 'pagure/',
  1261. 'hook': None,
  1262. 'ca': '/etc/pki/repospanner/pki/ca.crt',
  1263. 'admin_cert': {'cert': '/etc/pki/repospanner/pki/admin.crt',
  1264. 'key': '/etc/pki/repospanner/pki/admin.key'},
  1265. 'push_cert': {'cert': '/etc/pki/repospanner/pki/pagure.crt',
  1266. 'key': '/etc/pki/repospanner/pki/pagure.key'}}
  1267. }
  1268. If this configuration key is not defined, pagure will consider that it is
  1269. not set to be integrated with repoSpanner.
  1270. Defaults to: ``{}``
  1271. SSH_KEYS_USERNAME_LOOKUP
  1272. ~~~~~~~~~~~~~~~~~~~~~~~~
  1273. This configuration key is used by the keyhelper script to indicate that the
  1274. git username should be used and looked up. Use this if the username that is sent
  1275. to ssh is specific for a unique Pagure user (i.e. not using a single "git@" user
  1276. for all git operations).
  1277. SSH_KEYS_USERNAME_FORBIDDEN
  1278. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1279. A list of usernames that are exempted from being verified via the keyhelper.
  1280. SSH_KEYS_USERNAME_EXPECT
  1281. ~~~~~~~~~~~~~~~~~~~~~~~~
  1282. This configuration key should contain the username that is used for git if a single
  1283. SSH user is used for all git ssh traffic (i.e. "git").
  1284. SSH_KEYS_OPTIONS
  1285. ~~~~~~~~~~~~~~~~
  1286. This configuration key provides the options added to keys as they are returned
  1287. to sshd, in the same format as AuthorizedKeysFile
  1288. (see "AUTHORIZED_KEYS FILE FORMAT" in sshd(8)).
  1289. SSH_ADMIN_TOKEN
  1290. ~~~~~~~~~~~~~~~
  1291. If not set to ``None``, ``aclchecker`` and ``keyhelper`` will use this api
  1292. admin token to get authorized to internal endpoints that they use. The token
  1293. must have the ``internal_access`` ACL.
  1294. This is useful when the IP address of sshd service is not predictable
  1295. (e.g. because of running in a distributed cloud environment) and so
  1296. it's not possible to use the ``IP_ALLOWED_INTERNAL`` address list.
  1297. Defaults to: ``None``
  1298. SSH_COMMAND_REPOSPANNER
  1299. ~~~~~~~~~~~~~~~~~~~~~~~
  1300. The command to run if a repository is on repospanner when aclchecker is in use.
  1301. SSH_COMMAND_NON_REPOSPANNER
  1302. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1303. The command to run if a repository is not on repospanner when aclchecker is in use.
  1304. MQTT Options
  1305. ------------
  1306. If approprietly configured pagure supports sending messages to an MQTT
  1307. message queue.
  1308. Here below are the different configuration options to make it so.
  1309. MQTT_NOTIFICATIONS
  1310. ~~~~~~~~~~~~~~~~~~
  1311. Global configuration key to turn on or off the code to send notifications
  1312. to an MQTT message queue.
  1313. Defaults to: ``False``
  1314. MQTT_HOST
  1315. ~~~~~~~~~
  1316. Host name of the MQTT server to send the MQTT notifications to.
  1317. Defaults to: ``None``
  1318. MQTT_PORT
  1319. ~~~~~~~~~
  1320. Port of the MQTT server to use to send the MQTT notifications to.
  1321. Defaults to: ``None``
  1322. MQTT_USERNAME
  1323. ~~~~~~~~~~~~~
  1324. Username to authenticate to the MQTT server as.
  1325. Defaults to: ``None``
  1326. MQTT_PASSWORD
  1327. ~~~~~~~~~~~~~
  1328. Password to authenticate to the MQTT server with.
  1329. Defaults to: ``None``
  1330. MQTT_CA_CERTS
  1331. ~~~~~~~~~~~~~
  1332. When using SSL-based authentication to the MQTT server, use this
  1333. configuration key to point to the CA cert to use.
  1334. Defaults to: ``None``
  1335. MQTT_CERTFILE
  1336. ~~~~~~~~~~~~~
  1337. When using SSL-based authentication to the MQTT server, use this
  1338. configuration key to point to the cert file to use.
  1339. Defaults to: ``None``
  1340. MQTT_KEYFILE
  1341. ~~~~~~~~~~~~~
  1342. When using SSL-based authentication to the MQTT server, use this
  1343. configuration key to point to the key file to use.
  1344. Defaults to: ``None``
  1345. MQTT_CERT_REQS
  1346. ~~~~~~~~~~~~~~
  1347. When using SSL-based authentication to the MQTT server, use this
  1348. configuration key to specify if the CERT is required.
  1349. Defaults to: ``ssl.CERT_REQUIRED`` (from python's ssl library)
  1350. MQTT_TLS_VERSION
  1351. ~~~~~~~~~~~~~~~~
  1352. When using SSL-based authentication to the MQTT server, use this
  1353. configuration key to specify the TLS protocols to support/use.
  1354. Defaults to: ``ssl.PROTOCOL_TLSv1_2`` (from python's ssl library)
  1355. MQTT_CIPHERS
  1356. ~~~~~~~~~~~~
  1357. When using SSL-based authentication to the MQTT server, use this
  1358. configuration key to specify the ciphers.
  1359. Defaults to: ``None``
  1360. MQTT_TOPIC_PREFIX
  1361. ~~~~~~~~~~~~~~~~~
  1362. This configuration key can be used to specify a prefix to the mqtt messages sent.
  1363. This prefix will be added to the topic used by pagure thus allowing the mqtt
  1364. admins to specify a parent topic for all pagure-related messages.
  1365. Defaults to: ``None``
  1366. ALWAYS_MQTT_ON_COMMITS
  1367. ~~~~~~~~~~~~~~~~~~~~~~
  1368. This configuration key can be used to enforce `mqtt <https://mqtt.org/>`_
  1369. notifications on commits made on all projects in a pagure instance.
  1370. Defaults to: ``False``.
  1371. PAGURE_PLUGINS_CONFIG
  1372. ~~~~~~~~~~~~~~~~~~~~~~
  1373. This option can be used to specify the configuration file used for loading
  1374. plugins. It is not set by default, instead if must be declared explicitly.
  1375. Also see the documentation on plugins at :ref:`plugins`.
  1376. Deprecated configuration keys
  1377. -----------------------------
  1378. FORK_FOLDER
  1379. ~~~~~~~~~~~
  1380. This configuration key used to be use to specify the folder where the forks
  1381. are placed. Since the release 2.0 of pagure, it has been deprecated, forks
  1382. are now automatically placed in a sub-folder of the folder containing the
  1383. mains git repositories (ie ``GIT_FOLDER``).
  1384. See the ``UPGRADING.rst`` file for more information about this change and
  1385. how to handle it.
  1386. UPLOAD_FOLDER
  1387. ~~~~~~~~~~~~~
  1388. This configuration key used to be use to specify where the uploaded releases
  1389. are available. It has been replaced by `UPLOAD_FOLDER_PATH` in the release
  1390. 2.10 of pagure.
  1391. GITOLITE_VERSION
  1392. ~~~~~~~~~~~~~~~~
  1393. This configuration key specifies which version of gitolite you are
  1394. using, it can be either ``2`` or ``3``.
  1395. Defaults to: ``3``.
  1396. This has been replaced by `GITOLITE_BACKEND` in the release 3.0 of pagure.
  1397. DOCS_FOLDER, REQUESTS_FOLDER, TICKETS_FOLDER
  1398. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1399. These configuration values were removed. It has been found out that
  1400. due to how Pagure writes repo names in the gitolite configuration file,
  1401. these must have fixed paths relative to `GIT_FOLDER`. Specifically, they
  1402. must occupy subdirectories `docs`, `requests` and `tickets` under `GIT_FOLDER`.
  1403. They are now computed automatically based on value of `GIT_FOLDER`.
  1404. Usage of docs and tickets can be triggered by setting `ENABLE_DOCS` and
  1405. `ENABLE_TICKETS` to `True` (this is the default).
  1406. FILE_SIZE_HIGHLIGHT
  1407. ~~~~~~~~~~~~~~~~~~~
  1408. This configuration key can be used to specify the maximum number of characters a file
  1409. or diff should have to have syntax highlighting. Everything above this limit
  1410. will not have syntax highlighting as this is a memory intensive procedure that
  1411. easily leads to out of memory error on large files or diff.
  1412. Defaults to: ``5000``
  1413. BOOTSTRAP_URLS_CSS
  1414. ~~~~~~~~~~~~~~~~~~
  1415. This configuration key can be used to specify the URL where are hosted the bootstrap
  1416. CSS file since the files hosted on apps.fedoraproject.org used in pagure.io
  1417. are not restricted in browser access.
  1418. Defaults to: ``'https://apps.fedoraproject.org/global/fedora-bootstrap-1.1.1/fedora-bootstrap.css'``
  1419. This has been deprecated by the new way of theming pagure, see the `theming
  1420. documentation <https://docs.pagure.org/pagure/usage/theming.html>`_
  1421. BOOTSTRAP_URLS_JS
  1422. ~~~~~~~~~~~~~~~~~
  1423. This configuration key can be used to specify the URL where are hosted the bootstrap
  1424. JS file since the files hosted on apps.fedoraproject.org used in pagure.io
  1425. are not restricted in browser access.
  1426. Defaults to: ``'https://apps.fedoraproject.org/global/fedora-bootstrap-1.1.1/fedora-bootstrap.js'``
  1427. This has been deprecated by the new way of theming pagure, see the `theming
  1428. documentation <https://docs.pagure.org/pagure/usage/theming.html>`_
  1429. HTML_TITLE
  1430. ~~~~~~~~~~
  1431. This configuration key allows you to customize the HTML title of all the
  1432. pages, from ``... - pagure`` (default) to ``... - <your value>``.
  1433. Defaults to: ``Pagure``
  1434. This has been deprecated by the new way of theming pagure, see the `theming
  1435. documentation <https://docs.pagure.org/pagure/usage/theming.html>`_
  1436. GITOLITE_BACKEND
  1437. ~~~~~~~~~~~~~~~~
  1438. This configuration key allowed specifying the gitolite backend.
  1439. This has now been replaced by GIT_AUTH_BACKEND, please see that option
  1440. for information on valid values.
  1441. PAGURE_PLUGIN
  1442. ~~~~~~~~~~~~~
  1443. This configuration key allows to specify the path to the plugins configuration
  1444. file. It is set as an environment variable. It has been replaced by
  1445. PAGURE_PLUGINS_CONFIG. The new variable does not modify the behavior of the old
  1446. variable, however unlike PAGURE_PLUGIN it can be set in the main Pagure
  1447. configuration.