configuration.rst 49 KB

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