configuration.rst 67 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325
  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_GIT_HOOKS
  524. ~~~~~~~~~~~~~~~~~
  525. This configuration key allows to have a different logging configuration for the
  526. web application and the git hooks.
  527. If un-specified (default), the logging configuration used by the git hooks will
  528. be the same as the one for the web application (i.e.: defined in ``LOGGING`` here
  529. below).
  530. Defaults to: ``None``.
  531. LOGGING
  532. ~~~~~~~
  533. This configuration key allows you to set up the logging of the application.
  534. It relies on the standard `python logging module
  535. <https://docs.python.org/2/library/logging.html>`_.
  536. The default value is:
  537. ::
  538. LOGGING = {
  539. "version": 1,
  540. "disable_existing_loggers": False,
  541. "formatters": {
  542. "standard": {
  543. "format": "%(asctime)s [%(levelname)s] %(name)s: %(message)s"
  544. },
  545. "email_format": {"format": MSG_FORMAT},
  546. },
  547. "filters": {"myfilter": {"()": ContextInjector}},
  548. "handlers": {
  549. "console": {
  550. "formatter": "standard",
  551. "class": "logging.StreamHandler",
  552. "stream": "ext://sys.stdout",
  553. },
  554. "auth_handler": {
  555. "formatter": "standard",
  556. "class": "logging.StreamHandler",
  557. "stream": "ext://sys.stdout",
  558. },
  559. "email": {
  560. "level": "ERROR",
  561. "formatter": "email_format",
  562. "class": "logging.handlers.SMTPHandler",
  563. "mailhost": "localhost",
  564. "fromaddr": "pagure@localhost",
  565. "toaddrs": "root@localhost",
  566. "subject": "ERROR on pagure",
  567. "filters": ["myfilter"],
  568. },
  569. },
  570. # The root logger configuration; this is a catch-all configuration
  571. # that applies to all log messages not handled by a different logger
  572. "root": {"level": "INFO", "handlers": ["console"]},
  573. "loggers": {
  574. "pagure": {
  575. "handlers": ["console"],
  576. "level": "DEBUG",
  577. "propagate": True,
  578. },
  579. "pagure_auth": {
  580. "handlers": ["auth_handler"],
  581. "level": "DEBUG",
  582. "propagate": False,
  583. },
  584. "flask": {
  585. "handlers": ["console"],
  586. "level": "INFO",
  587. "propagate": False,
  588. },
  589. "sqlalchemy": {
  590. "handlers": ["console"],
  591. "level": "WARN",
  592. "propagate": False,
  593. },
  594. "binaryornot": {
  595. "handlers": ["console"],
  596. "level": "WARN",
  597. "propagate": True,
  598. },
  599. "MARKDOWN": {
  600. "handlers": ["console"],
  601. "level": "WARN",
  602. "propagate": True,
  603. },
  604. "PIL": {"handlers": ["console"], "level": "WARN", "propagate": True},
  605. "chardet": {
  606. "handlers": ["console"],
  607. "level": "WARN",
  608. "propagate": True,
  609. },
  610. "pagure.lib.encoding_utils": {
  611. "handlers": ["console"],
  612. "level": "WARN",
  613. "propagate": False,
  614. },
  615. },
  616. }
  617. .. note:: as you can see there is an ``email`` handler defined. It's not used
  618. anywhere by default but you can use it to get report of errors by email
  619. and thus monitor your pagure instance.
  620. To do this the easiest is to set, on the ``root`` logger:
  621. ::
  622. 'handlers': ['console', 'email'],
  623. .. note:: The ``pagure_auth`` logger is a special one logging all activities
  624. regarding read/write access to git repositories. It will be a pretty
  625. important log for auditing if needed.
  626. You can separate this log into its own file if you like by using the
  627. following handler:
  628. ::
  629. "auth_handler": {
  630. "formatter": "standard",
  631. "class": "logging.handlers.TimedRotatingFileHandler",
  632. "filename": "/var/log/pagure/pagure_auth.log",
  633. "backupCount": 10,
  634. "when": "midnight",
  635. "utc": True,
  636. },
  637. This snippet will automatically make the logs rotate at midnight each day,
  638. keep the logs for 10 days and use UTC as timezone for the logs. Depending on
  639. how your pagure instance is set-up, you may have to tweak the filesystem
  640. permissions on the folder and file so the rotation works properly.
  641. ITEM_PER_PAGE
  642. ~~~~~~~~~~~~~
  643. This configuration key allows you to configure the length of a page by
  644. setting the number of items on the page. Items can be commits, users, groups,
  645. or projects for example.
  646. Defaults to: ``50``.
  647. PR_TARGET_MATCHING_BRANCH
  648. ~~~~~~~~~~~~~~~~~~~~~~~~~
  649. If set to ``True``, the default target branch for all pull requests in UI
  650. is the branch that is longest substring of the branch that the pull request
  651. is created from. For example, a ``mybranch`` branch in original repo will
  652. be the default target of a pull request from branch ``mybranch-feature-1``
  653. in a fork when opening a new pull request. If this is set to ``False``,
  654. the default branch of the repo will be the default target of all pull requests.
  655. Defaults to: ``False``.
  656. SSH_ACCESS_GROUPS
  657. ~~~~~~~~~~~~~~~~~
  658. Some instances of pagure are deployed in such a way that only the members of
  659. certain groups are allowed to commit via ssh. This configuration key allows
  660. to specify which groups have commit access and thus let pagure hide the ssh
  661. URL from the drop-down "Clone" menu for all the person who are not in one of
  662. these groups.
  663. If this configuration key is not defined or left empty, it is assume that there
  664. is no such group restriction and everyone can commit via ssh (default behavior).
  665. Defaults to: ``[]``
  666. SMTP configuration
  667. ~~~~~~~~~~~~~~~~~~
  668. SMTP_SERVER
  669. ^^^^^^^^^^^
  670. This configuration key specifies the SMTP server to use when
  671. sending emails.
  672. Defaults to: ``localhost``.
  673. See also the SMTP_STARTTLS section.
  674. SMTP_PORT
  675. ^^^^^^^^^
  676. This configuration key specifies the SMTP server port.
  677. SMTP by default uses TCP port 25. The protocol for mail submission is
  678. the same, but uses port 587.
  679. SMTP connections secured by SSL, known as SMTPS, default to port 465
  680. (nonstandard, but sometimes used for legacy reasons).
  681. Defaults to: ``25``
  682. SMTP_SSL
  683. ^^^^^^^^
  684. This configuration key specifies whether the SMTP connections
  685. should be secured over SSL.
  686. Defaults to: ``False``
  687. SMTP_STARTTLS
  688. ^^^^^^^^^^^^^
  689. This configuration key specifies instructs pagure to starts connecting to
  690. the SMTP server via a `starttls` command.
  691. When enabling STARTTLS in conjunction with a local smtp server, you should
  692. replace ``localhost`` with a host name that is included in the server's
  693. certificate. If the server only relays messages originating from ``localhost``,
  694. then you should also ensure that the above host name resolves to the same
  695. tcp address as ``localhost``, for instance by adding an appropriate record
  696. to */etc/hosts*.
  697. Defaults to: ``False``
  698. SMTP_KEYFILE
  699. ^^^^^^^^^^^^
  700. This configuration key allows to specify a key file to be used in the
  701. `starttls` command when connecting to the smtp server.
  702. Defaults to: ``None``
  703. SMTP_CERTFILE
  704. ^^^^^^^^^^^^^
  705. This configuration key allows to specify a certificate file to be used in
  706. the `starttls` command when connecting to the smtp server.
  707. Defaults to: ``None``
  708. SMTP_USERNAME
  709. ^^^^^^^^^^^^^
  710. This configuration key allows usage of SMTP with auth.
  711. Note: Specify SMTP_USERNAME and SMTP_PASSWORD for using SMTP auth
  712. Defaults to: ``None``
  713. SMTP_PASSWORD
  714. ^^^^^^^^^^^^^
  715. This configuration key allows usage of SMTP with auth.
  716. Note: Specify SMTP_USERNAME and SMTP_PASSWORD for using SMTP auth
  717. Defaults to: ``None``
  718. SHORT_LENGTH
  719. ~~~~~~~~~~~~
  720. This configuration key specifies the length of the commit ids or
  721. file hex displayed in the user interface.
  722. Defaults to: ``6``.
  723. BLACKLISTED_PROJECTS
  724. ~~~~~~~~~~~~~~~~~~~~
  725. This configuration key specifies a list of project names that are forbidden.
  726. This list is used for example to avoid conflicts at the URL level between the
  727. static files located under ``/static/`` and a project that would be named
  728. ``static`` and thus be located at ``/static``.
  729. Defaults to:
  730. ::
  731. [
  732. 'static', 'pv', 'releases', 'new', 'api', 'settings',
  733. 'logout', 'login', 'users', 'groups', 'about'
  734. ]
  735. CHECK_SESSION_IP
  736. ~~~~~~~~~~~~~~~~
  737. This configuration key specifies whether to check the user's IP
  738. address when retrieving its session. This makes things more secure but
  739. under certain setups it might not work (for example if there
  740. are proxies in front of the application).
  741. Defaults to: ``True``.
  742. PAGURE_AUTH
  743. ~~~~~~~~~~~~
  744. This configuration key specifies which authentication method to use.
  745. Valid options are ``fas``, ``openid``, ``oidc``, or ``local``.
  746. * ``fas`` uses the Fedora Account System `FAS <https://admin.fedoraproject.org/accounts>`
  747. to provide user authentication and enforces that users sign the FPCA.
  748. * ``openid`` uses OpenID authentication. Any provider may be used by
  749. changing the FAS_OPENID_ENDPOINT configuration key. By default
  750. FAS (without FPCA) will be used.
  751. * ``oidc`` enables OpenID Connect using any provider. This provider requires
  752. the configuration options starting with ``OIDC_`` (see below) to be provided.
  753. * ``local`` causes pagure to use the local pagure database for user management.
  754. User registration can be disabled with the ALLOW_USER_REGISTRATION configuration key.
  755. Defaults to: ``local``.
  756. OIDC Settings
  757. ~~~~~~~~~~~~~
  758. .. note:: Pagure uses `flask-oidc <https://github.com/puiterwijk/flask-oidc/>`_
  759. to support OIDC authentication. This extension has a `number of configuration
  760. keys <http://flask-oidc.readthedocs.io/en/latest/#settings-reference>`_
  761. that may be useful depending on your set-up
  762. OIDC_CLIENT_SECRETS
  763. ^^^^^^^^^^^^^^^^^^^
  764. Provide a path to client secrets file on local filesystem. This file can be
  765. obtained from your OpenID Connect identity provider. Note that some providers
  766. don't fill in ``userinfo_uri``. If that is the case, you need to add it to
  767. the secrets file manually.
  768. OIDC_ID_TOKEN_COOKIE_SECURE
  769. ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  770. When this is set to True, the cookie with OpenID Connect Token will only be
  771. returned to the server via ssl (https). If you connect to the server via plain
  772. http, the cookie will not be sent. This prevents sniffing of the cookie contents.
  773. This may be set to False when testing your application but should always
  774. be set to True in production.
  775. Defaults to: ``True`` for production with https, can be set to ``False`` for
  776. convenient development.
  777. OIDC_SCOPES
  778. ^^^^^^^^^^^
  779. List of `OpenID Connect scopes http://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims`
  780. to request from identity provider.
  781. OIDC_PAGURE_EMAIL
  782. ^^^^^^^^^^^^^^^^^
  783. Name of key of user's email in userinfo JSON returned by identity provider.
  784. OIDC_PAGURE_FULLNAME
  785. ^^^^^^^^^^^^^^^^^^^^
  786. Name of key of user's full name in userinfo JSON returned by identity provider.
  787. OIDC_PAGURE_USERNAME
  788. ^^^^^^^^^^^^^^^^^^^^
  789. Name of key of user's preferred username in userinfo JSON returned by identity
  790. provider.
  791. OIDC_PAGURE_SSH_KEY
  792. ^^^^^^^^^^^^^^^^^^^
  793. Name of key of user's ssh key in userinfo JSON returned by identity provider.
  794. OIDC_PAGURE_GROUPS
  795. ^^^^^^^^^^^^^^^^^^
  796. Name of key of user's groups in userinfo JSON returned by identity provider.
  797. OIDC_PAGURE_USERNAME_FALLBACK
  798. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  799. This specifies fallback for getting username assuming ``OIDC_PAGURE_USERNAME``
  800. is empty - can be ``email`` (to use the part before ``@``) or ``sub``
  801. (IdP-specific user id, can be a nickname, email or a numeric ID
  802. depending on identity provider).
  803. IP_ALLOWED_INTERNAL
  804. ~~~~~~~~~~~~~~~~~~~
  805. This configuration key specifies which IP addresses are allowed
  806. to access the internal API endpoint. These endpoints are accessed by the
  807. milters for example and allow performing actions in the name of someone else
  808. which is sensitive, thus the origin of the request using
  809. these endpoints is validated.
  810. Defaults to: ``['127.0.0.1', 'localhost', '::1']``.
  811. MAX_CONTENT_LENGTH
  812. ~~~~~~~~~~~~~~~~~~
  813. This configuration key specifies the maximum file size allowed when
  814. uploading content to pagure (for example, screenshots to a ticket).
  815. Defaults to: ``4 * 1024 * 1024`` which corresponds to 4 megabytes.
  816. ENABLE_TICKETS
  817. ~~~~~~~~~~~~~~
  818. This configuration key activates or deactivates the ticketing system
  819. for all the projects hosted on this pagure instance.
  820. Defaults to: ``True``
  821. ENABLE_TICKETS_NAMESPACE
  822. ~~~~~~~~~~~~~~~~~~~~~~~~
  823. This configuration key can be used to restrict the namespace in which the ticketing
  824. system is enabled.
  825. So if your pagure instance has ``ENABLE_TICKETS`` as ``True`` and sets
  826. ``ENABLE_TICKETS_NAMESPACE`` to ``['tests', 'infra']`` only the projects opened
  827. in these two namespaces will have the ticketing system enabled. All the other
  828. namespaces will not.
  829. Defaults to: ``[]``
  830. ENABLE_DOCS
  831. ~~~~~~~~~~~
  832. This configuration key activates or deactivates creation of git repos
  833. for documentation for all the projects hosted on this pagure instance.
  834. Defaults to: ``True``
  835. ENABLE_NEW_PROJECTS
  836. ~~~~~~~~~~~~~~~~~~~
  837. This configuration key permits or forbids creation of new projects via
  838. the user interface and the API of this pagure instance.
  839. Defaults to: ``True``
  840. ENABLE_UI_NEW_PROJECTS
  841. ~~~~~~~~~~~~~~~~~~~~~~
  842. This configuration key permits or forbids creation of new projects via
  843. the user interface (only) of this pagure instance. It allows forbidding
  844. to create new project in the user interface while letting a set of trusted
  845. person to create projects via the API granted they have the API token with
  846. the corresponding ACL.
  847. Defaults to: ``True``
  848. ENABLE_DEL_PROJECTS
  849. ~~~~~~~~~~~~~~~~~~~
  850. This configuration key permits or forbids deletion of projects via
  851. the user interface of this pagure instance.
  852. Defaults to: ``True``
  853. ENABLE_DEL_FORKS
  854. ~~~~~~~~~~~~~~~~
  855. This configuration key permits or forbids deletion of forks via
  856. the user interface of this pagure instance.
  857. Defaults to: ``ENABLE_DEL_PROJECTS``
  858. GIT_HOOK_DB_RO
  859. ~~~~~~~~~~~~~~
  860. This configuration key specifies if the git hook have a read-only (RO) access
  861. to the database or not.
  862. Some pagure deployment provide an actual shell account on the host and thus the
  863. git hook called upon git push are executed under that account. If the user
  864. manages to by-pass git and is able to access the configuration file, they could
  865. have access to "private" information. So in those deployments the git hooks
  866. have a specific configuration file with a database access that is read-only,
  867. making pagure behave differently in those situations.
  868. Defaults to: ``False``
  869. EMAIL_SEND
  870. ~~~~~~~~~~
  871. This configuration key enables or disables all email notifications for
  872. this pagure instance. This can be useful to turn off when developing on
  873. pagure, or for test or pre-production instances.
  874. Defaults to: ``False``.
  875. .. note::
  876. This does not disable emails to the email address set in ``EMAIL_ERROR``.
  877. FEDMSG_NOTIFICATIONS
  878. ~~~~~~~~~~~~~~~~~~~~
  879. This configuration key can be used to turn on or off notifications via `fedmsg
  880. <http://www.fedmsg.com/>`_.
  881. Defaults to: ``False``.
  882. FEDORA_MESSAGING_NOTIFICATIONS
  883. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  884. This configuration key can be used to turn on or off sending notifications via
  885. `fedora-messaging <https://fedora-messaging.readthedocs.io/en/stable/>`_.
  886. Defaults to: ``False``.
  887. ALWAYS_FEDMSG_ON_COMMITS
  888. ~~~~~~~~~~~~~~~~~~~~~~~~
  889. This configuration key can be used to enforce `fedmsg <http://www.fedmsg.com/>`_
  890. notifications on commits made on all projects in a pagure instance.
  891. Defaults to: ``True``.
  892. ALLOW_DELETE_BRANCH
  893. ~~~~~~~~~~~~~~~~~~~
  894. This configuration keys enables or disables allowing users to delete git
  895. branches from the user interface. In sensible pagure instance you may
  896. want to turn this off and with a customized gitolite configuration you can
  897. prevent users from deleting branches in their git repositories.
  898. Defaults to: ``True``.
  899. ALLOW_ADMIN_IGNORE_EXISTING_REPOS
  900. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  901. This enables a checkbox "Ignore existing repos" for admins when creating a new
  902. project. When this is checkbox is checked, existing repositories will not cause
  903. project creation to fail.
  904. This could be used to assume responsibility of existing repositories.
  905. Defaults to: ``False``.
  906. USERS_IGNORE_EXISTING_REPOS
  907. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  908. List of users who can al create a project while ignoring existing repositories.
  909. Defaults to: ``[]``.
  910. LOCAL_SSH_KEY
  911. ~~~~~~~~~~~~~
  912. This configuration key can be used to let pagure administrate the user's ssh keys
  913. or have a third party tool do it for you.
  914. In most cases, it will be fine to let pagure handle it.
  915. Defaults to ``True``.
  916. DEPLOY_KEY
  917. ~~~~~~~~~~
  918. This configuration key can be used to disable the deploy keys feature of an
  919. entire pagure instance. This feature enable to add extra public ssh keys
  920. that a third party could use to push to a project.
  921. Defaults to ``True``.
  922. OLD_VIEW_COMMIT_ENABLED
  923. ~~~~~~~~~~~~~~~~~~~~~~~
  924. In version 1.3, pagure changed its URL scheme to view the commit of a
  925. project in order to add support for pseudo-namespaced projects.
  926. For pagure instances older than 1.3, who care about backward compatibility,
  927. we added an endpoint ``view_commit_old`` that brings URL backward
  928. compatibility for URLs using the complete git hash (the 40 characters).
  929. For URLs using a shorter hash, the URLs will remain broken.
  930. This configuration key enables or disables this backward compatibility
  931. which is useful for pagure instances running since before 1.3 but is not
  932. for newer instances.
  933. Defaults to: ``False``.
  934. DISABLE_REMOTE_PR
  935. ~~~~~~~~~~~~~~~~~
  936. In some pagure deployments remote pull requests need to be disabled
  937. due to legal / policy reasons.
  938. Defaults to: ``False``.
  939. PAGURE_CI_SERVICES
  940. ~~~~~~~~~~~~~~~~~~
  941. Pagure can be configure to integrate results of a Continuous Integration (CI)
  942. service to pull-requests open against a project.
  943. To enable this integration, follow the documentation on how to install
  944. pagure-ci and set this configuration key to ``['jenkins']`` (Jenkins being
  945. the only CI service supported at the moment).
  946. Defaults to: ``None``.
  947. .. warning:: Requires `Redis` to be configured and running.
  948. INSTANCE_NAME
  949. ~~~~~~~~~~~~~
  950. This allows giving a name to this running instance of pagure. The name is
  951. then used in the welcome screen shown upon first login.
  952. Defaults to: ``Pagure``
  953. .. note: the welcome screen currently does not work with the `local`
  954. authentication.
  955. ADMIN_EMAIL
  956. ~~~~~~~~~~~
  957. This configuration key allows you to change the default administrator email
  958. which is displayed on the "about" page. It can also be used elsewhere.
  959. Defaults to: ``root@localhost.localdomain``
  960. USER_NAMESPACE
  961. ~~~~~~~~~~~~~~
  962. This configuration key can be used to enforce that project are namespaced under
  963. the user's username, behaving in this way in a similar fashion as github.com
  964. or gitlab.com.
  965. Defaults to: ``False``
  966. DOC_APP_URL
  967. ~~~~~~~~~~~
  968. This configuration key allows you to specify where the documentation server
  969. is running (preferably in a different domain name entirely).
  970. If not set, the documentation page will show an error message saying that
  971. this pagure instance does not have a documentation server.
  972. Defaults to: ``None``
  973. PRIVATE_PROJECTS
  974. ~~~~~~~~~~~~~~~~
  975. This configuration key allows you to host private repositories. These
  976. repositories are visible only to the creator of the repository and to the
  977. users who are given access to the repository. No information is leaked about the
  978. private repository which means redis doesn't have the access to the repository
  979. and even fedmsg doesn't get any notifications.
  980. Defaults to: ``True``
  981. EXCLUDE_GROUP_INDEX
  982. ~~~~~~~~~~~~~~~~~~~
  983. This configuration key can be used to hide project an user has access to via
  984. one of the groups listed in this key.
  985. The use-case is the following: the Fedora project is deploying pagure has a
  986. front-end for the git repos of the packages in the distribution, that means
  987. about 17,000 git repositories in pagure. The project has a group of people
  988. that have access to all of these repositories, so when viewing the user's
  989. page of one member of that group, instead of seeing all the project that
  990. this user works on, you can see all the projects hosted in that pagure
  991. instance. Using this configuration key, pagure will hide all the projects
  992. that this user has access to via the specified groups and thus return only
  993. the groups of forks of that users.
  994. Defaults to: ``[]``
  995. TRIGGER_CI
  996. ~~~~~~~~~~
  997. A run of pagure-ci can be manually triggered if some key sentences are added
  998. as comment to a pull-request, either manually or via the "Rerun CI" dropdown.
  999. This allows one to re-run a test that failed due to some network outage or other
  1000. unexpected issues unrelated to the test suite.
  1001. This configuration key can be used to define all the sentences that can be used
  1002. to trigger this pagure-ci run. The format is following: ``{"<sentence>":
  1003. {"name": "<name of the CI>", "description": "<short description>"}}``
  1004. Sentences which have ``None`` as value won't show up in the "Rerun CI"
  1005. dropdown. Additionally, it's possible to add a ``requires_project_hook_attr``
  1006. key to the dict with data about a sentence. For example, having
  1007. ``"requires_project_hook_attr": ("ci_hook", "active_pr", True)`` would make
  1008. the "Rerun CI" dropdown have a button for this specific CI only if the
  1009. project has ``ci_hook`` activated and its ``active_pr`` value is ``True``.
  1010. In versions before 5.2, this was a list containing just the sentences.
  1011. Defaults to: ``{"pretty please pagure-ci rebuild": {"name": "Default CI",
  1012. "description": "Rerun default CI"}}``
  1013. .. note:: The sentences defined in this configuration key should be lower
  1014. case only!
  1015. FLAG_STATUSES_LABELS
  1016. ~~~~~~~~~~~~~~~~~~~~
  1017. By default, Pagure has ``success``, ``failure``, ``error``, ``pending`` and
  1018. ``canceled`` statuses of PR and commit flags. This setting allows you to
  1019. define a custom mapping of statuses to their respective Bootstrap labels.
  1020. FLAG_SUCCESS
  1021. ~~~~~~~~~~~~
  1022. Holds name of PR/commit flag that is considered a success.
  1023. Defaults to: ``success``
  1024. FLAG_FAILURE
  1025. ~~~~~~~~~~~~
  1026. Holds name of PR/commit flag that is considered a failure.
  1027. Defaults to: ``failure``
  1028. FLAG_PENDING
  1029. ~~~~~~~~~~~~
  1030. Holds name of PR/commit flag that is considered a pending state.
  1031. Defaults to: ``pending``
  1032. EXTERNAL_COMMITTER
  1033. ~~~~~~~~~~~~~~~~~~
  1034. The external committer feature is a way to allow members of groups defined
  1035. outside pagure (and provided to pagure upon login by the authentication
  1036. system) to be consider committers on pagure.
  1037. This feature can give access to all the projects on the instance, all but
  1038. some or just some.
  1039. Defaults to: ``{}``
  1040. To give access to all the projects to a group named ``fedora-altarch`` use
  1041. a such a structure::
  1042. EXTERNAL_COMMITTER = {
  1043. 'fedora-altarch': {}
  1044. }
  1045. To give access to all the projects but one (named ``rpms/test``) to a group
  1046. named ``provenpackager`` use a such a structure::
  1047. EXTERNAL_COMMITTER = {
  1048. 'fedora-altarch': {},
  1049. 'provenpackager': {
  1050. 'exclude': ['rpms/test']
  1051. }
  1052. }
  1053. To give access to just some projects (named ``rpms/test`` and
  1054. ``modules/test``) to a group named ``testers`` use a such a structure::
  1055. EXTERNAL_COMMITTER = {
  1056. 'fedora-altarch': {},
  1057. 'provenpackager': {
  1058. 'exclude': ['rpms/test']
  1059. },
  1060. 'testers': {
  1061. 'restrict': ['rpms/test', 'modules/test']
  1062. }
  1063. }
  1064. REQUIRED_GROUPS
  1065. ~~~~~~~~~~~~~~~
  1066. The required groups allows one to specify in which group an user must be to be
  1067. added to a project with commit or admin access.
  1068. Defaults to: ``{}``
  1069. Example configuration::
  1070. REQUIRED_GROUPS = {
  1071. 'rpms/kernel': ['packager', 'kernel-team'],
  1072. 'modules/*': ['module-packager', 'packager'],
  1073. 'rpms/*': ['packager'],
  1074. '*': ['contributor'],
  1075. }
  1076. With this configuration (evaluated in the provided order):
  1077. * only users that are in the groups ``packager`` and ``kernel-team`` will be
  1078. allowed to be added the ``rpms/kernel`` project (where ``rpms`` is the
  1079. namespace and ``kernel`` the project name).
  1080. * only users that are in the groups ``module-packager`` and ``packager``
  1081. will be allowed to be added to projects in the ``modules`` namespace.
  1082. * only users that are in the group ``packager`` will be allowed to be added
  1083. to projects in the ``rpms`` namespace.
  1084. * only users in the ``contributor`` group will be allowed to be added to
  1085. any project on this pagure instance.
  1086. GITOLITE_PRE_CONFIG
  1087. ~~~~~~~~~~~~~~~~~~~
  1088. This configuration key allows you to include some content at the *top* of
  1089. the gitolite configuration file (such as some specific group definition),
  1090. thus allowing to customize the gitolite configuration file with elements
  1091. and information that are outside of pagure's control.
  1092. This can be used in combination with ``GITOLITE_POST_CONFIG`` to further
  1093. customize gitolite's configuration file. It can also be used with
  1094. ``EXTERNAL_COMMITTER`` to give commit access to git repos based on external
  1095. information.
  1096. Defaults to: ``None``
  1097. GITOLITE_POST_CONFIG
  1098. ~~~~~~~~~~~~~~~~~~~~
  1099. This configuration key allows you to include some content at the *end* of
  1100. the gitolite configuration file (such as some project definition or access),
  1101. thus allowing to customize the gitolite configuration file with elements
  1102. and information that are outside of pagure's control.
  1103. This can be used in combination with ``GITOLITE_PRE_CONFIG`` to further
  1104. customize gitolite's configuration file. It can also be used with
  1105. ``EXTERNAL_COMMITTER`` to give commit access to git repos based on external
  1106. information.
  1107. Defaults to: ``None``
  1108. GIT_GARBAGE_COLLECT
  1109. ~~~~~~~~~~~~~~~~~~~
  1110. This configuration key allows for explicit running of ``git gc --auto``
  1111. after every operation that adds new objects to any git repository -
  1112. that is after pushing and merging. The reason for having this functionality
  1113. in Pagure is that gc is not guaranteed to be run by git after every
  1114. object-adding operation.
  1115. The garbage collection run by Pagure will respect git settings, so you
  1116. can tweak ``gc.auto`` and ``gc.autoPackLimit`` to your liking
  1117. and that will have immediate effect on the task that runs the garbage
  1118. collection. These values can be configured system-wide in ``/etc/gitconfig``.
  1119. See https://git-scm.com/docs/git-gc#git-gc---auto for more details.
  1120. This is especially useful if repositories are stored on NFS (or similar
  1121. network storage), where file metadata access is expensive - having unpacked
  1122. objects in repositories requires *a lot* of metadata reads.
  1123. Note that the garbage collection is only run on repos that are not on
  1124. repoSpanner.
  1125. Defaults to: ``False``
  1126. CELERY_CONFIG
  1127. ~~~~~~~~~~~~~
  1128. This configuration key allows you to tweak the configuration of celery for
  1129. your needs.
  1130. See the documentation about `celery configuration
  1131. <http://docs.celeryproject.org/en/latest/userguide/configuration.html>`_ for
  1132. more information.
  1133. Defaults to: ``{}``
  1134. CASE_SENSITIVE
  1135. ~~~~~~~~~~~~~~
  1136. This configuration key can be used to make this pagure instance case sensitive
  1137. instead of its default: case-insensitive.
  1138. Defaults to: ``False``
  1139. PROJECT_NAME_REGEX
  1140. ~~~~~~~~~~~~~~~~~~
  1141. This configuration key can be used to customize the regular expression used to
  1142. validate new project name.
  1143. Defaults to: ``^[a-zA-z0-9_][a-zA-Z0-9-_]*$``
  1144. APPLICATION_ROOT
  1145. ~~~~~~~~~~~~~~~~
  1146. This configuration key is used in the path of the cookie used by pagure.
  1147. Defaults to: ``'/'``
  1148. ALLOWED_PREFIX
  1149. ~~~~~~~~~~~~~~
  1150. This configuration key can be used to specify a list of allowed namespaces that
  1151. will not require creating a group for users to create projects in.
  1152. Defaults to: ``[]``
  1153. ADMIN_SESSION_LIFETIME
  1154. ~~~~~~~~~~~~~~~~~~~~~~
  1155. This configuration key allows specifying the lifetime of the session during
  1156. which the user won't have to re-login for admin actions.
  1157. In other words, the maximum time between which an user can access a project's
  1158. settings page without re-login.
  1159. Defaults to: ``timedelta(minutes=20)``
  1160. where timedelta comes from the python datetime module
  1161. BLACKLISTED_GROUPS
  1162. ~~~~~~~~~~~~~~~~~~
  1163. This configuration key can be used to blacklist some group names.
  1164. Defaults to: ``['forks', 'group']``
  1165. ENABLE_GROUP_MNGT
  1166. ~~~~~~~~~~~~~~~~~
  1167. This configuration key can be used to turn on or off managing (ie: creating a
  1168. group, adding or removing users in that group) groups in this pagure instance.
  1169. If turned off, groups and group members are to be managed outside of pagure
  1170. and synced upon login.
  1171. Defaults to: ``True``
  1172. ENABLE_USER_MNGT
  1173. ~~~~~~~~~~~~~~~~
  1174. This configuration key can be used to turn on or off managing users (adding or
  1175. removing them from a project) in this pagure instance.
  1176. If turned off, users are managed outside of pagure.
  1177. Defaults to: ``True``
  1178. ALLOW_USER_REGISTRATION
  1179. ~~~~~~~~~~~~~~~~~~~~~~~
  1180. This configuration key can be used to turn on or off user registration
  1181. (that is, the ability for users to create an account) in this pagure instance.
  1182. If turned off, user accounts cannot be created through the UI or API.
  1183. Currently, this key only applies to pagure instances configured with the ``local``
  1184. authentication backend and has no effect with the other authentication backends.
  1185. Defaults to: ``True``
  1186. SESSION_COOKIE_NAME
  1187. ~~~~~~~~~~~~~~~~~~~
  1188. This configuration key can be used to specify the name of the session cookie used
  1189. by pagure.
  1190. Defaults to: ``'pagure'``
  1191. SHOW_PROJECTS_INDEX
  1192. ~~~~~~~~~~~~~~~~~~~
  1193. This configuration key can be used to specify what is shown in the index page of
  1194. logged in users.
  1195. Defaults to: ``['repos', 'myrepos', 'myforks']``
  1196. EMAIL_ON_WATCHCOMMITS
  1197. ~~~~~~~~~~~~~~~~~~~~~
  1198. By default pagure sends an email to every one watch commits on a project when a
  1199. commit is made.
  1200. However some pagure instances may be using a different notification mechanism on
  1201. commits and thus may not want this feature to double the notifications received.
  1202. This configuration key can be used to turn on or off email being sent to people
  1203. watching commits on a project upon commits.
  1204. Defaults to: ``True``
  1205. ALLOW_HTTP_PULL_PUSH
  1206. ~~~~~~~~~~~~~~~~~~~~
  1207. This configuration key controls whether any HTTP access to repositories is provided
  1208. via the support for that that's embedded in Pagure.
  1209. This provides HTTP pull access via <pagureurl>/<reponame>.git if nothing else
  1210. serves this URL.
  1211. Defaults to: ``True``
  1212. ALLOW_HTTP_PUSH
  1213. ~~~~~~~~~~~~~~~
  1214. This configuration key controls whether pushing is possible via the HTTP interface.
  1215. This is disabled by default, as it requires setting up an authentication mechanism
  1216. on the webserver that sets REMOTE_USER.
  1217. Defaults to: ``False``
  1218. HTTP_REPO_ACCESS_GITOLITE
  1219. ~~~~~~~~~~~~~~~~~~~~~~~~~
  1220. This configuration key configures the path to the gitolite-shell binary.
  1221. If this is set to None, Git http-backend is used directly.
  1222. Only set this to ``None`` if you intend to provide HTTP push access via Pagure, and
  1223. are using a dynamic ACL backend.
  1224. Defaults to: ``/usr/share/gitolite3/gitolite-shell``
  1225. MIRROR_SSHKEYS_FOLDER
  1226. ~~~~~~~~~~~~~~~~~~~~~
  1227. This configuration key specificies where pagure should store the ssh keys
  1228. generated for the mirroring feature. This folder should be properly backed up
  1229. and kept secure.
  1230. Defaults to: ``/var/lib/pagure/sshkeys/``
  1231. LOG_ALL_COMMITS
  1232. ~~~~~~~~~~~~~~~
  1233. This configuration key will make pagure log all commits pushed to all
  1234. branches of all repositories instead of logging only the once that are
  1235. pushed to the default branch.
  1236. Defaults to: ``False``
  1237. DISABLE_MIRROR_IN
  1238. ~~~~~~~~~~~~~~~~~
  1239. This configuration key allows a pagure instance to not support mirroring in
  1240. projects (from third party git server).
  1241. Defaults to: ``False``
  1242. SYNTAX_ALIAS_OVERRIDES
  1243. ~~~~~~~~~~~~~~~~~~~~~~
  1244. This configuration key can be used to force highlight.js to use a certain logic
  1245. on certain files based on their extensions.
  1246. It should be a dictionary containing the file extensions as keys and
  1247. the highlighting language/category to use as values.
  1248. Defaults to: ``{".spec": "specfile", ".patch": "diff"}``
  1249. ALLOW_API_UPDATE_GIT_TAGS
  1250. ~~~~~~~~~~~~~~~~~~~~~~~~~
  1251. This configuration key determines whether users are allowed to update
  1252. existing git tags via the API.
  1253. When set to ``False``, this essentially makes the API ignore whether the
  1254. ``force`` argument is set or not.
  1255. Defaults to: ``True``
  1256. PAGURE_PLUGINS_CONFIG
  1257. ~~~~~~~~~~~~~~~~~~~~~~
  1258. This option can be used to specify the configuration file used for loading
  1259. plugins. It is not set by default, instead if must be declared explicitly.
  1260. Also see the documentation on plugins at :ref:`plugins`.
  1261. GIT_DEFAULT_BRANCH
  1262. ~~~~~~~~~~~~~~~~~~
  1263. This configuration key allows to specify the default branch configured upon
  1264. project creation. The default branch can be specified by the user upon project
  1265. creation but if the user does not specify any branch, this branch name will be
  1266. used.
  1267. Defaults to: ``None`` (which results in the default branch being ``master``).
  1268. RepoSpanner Options
  1269. -------------------
  1270. Pagure can be integrated with `repoSpanner <https://repospanner.org>`_
  1271. allowing to deploy pagure in a load-balanced environment since the git
  1272. repositories are then synced across multiple servers simultaneously.
  1273. Support for this integration has been included in Pagure version 5.0 and higher.
  1274. Here below are the different options one can/should use to integrate pagure
  1275. with repoSpanner.
  1276. REPOBRIDGE_BINARY
  1277. ~~~~~~~~~~~~~~~~~
  1278. This should contain the path to the repoBridge binary, which is used for pushing
  1279. and pulling to/from repoSpanner.
  1280. Defaults to: ``/usr/libexec/repobridge``.
  1281. REPOSPANNER_NEW_REPO
  1282. ~~~~~~~~~~~~~~~~~~~~
  1283. This configuration key instructs pagure to create new git repositories on
  1284. repoSpanner or not.
  1285. Its value should be the region in which the new git repositories should be
  1286. created on.
  1287. Defaults to: ``None``.
  1288. REPOSPANNER_NEW_REPO_ADMIN_OVERRIDE
  1289. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1290. This configuration key can be used to let pagure admin override the default
  1291. region used when creating new git repositories on repoSpanner.
  1292. Its value should be a boolean.
  1293. Defaults to: ``False``
  1294. REPOSPANNER_NEW_FORK
  1295. ~~~~~~~~~~~~~~~~~~~~
  1296. This configuration key instructs pagure on where/how to create new git
  1297. repositories for the forks with repoSpanner.
  1298. If ``None``, git repositories for forks are created outside of repoSpanner
  1299. entirely.
  1300. If ``True``, git repositories for forks are created in the same region as
  1301. the parent project.
  1302. Otherwise, a region can be directly specified where git repositories for
  1303. forks will be created.
  1304. Defaults to: ``True``
  1305. REPOSPANNER_ADMIN_MIGRATION
  1306. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1307. This configuration key can be used to let admin manually migrate individual
  1308. project into repoSpanner once it is set up.
  1309. Defaults to: ``False``
  1310. REPOSPANNER_REGIONS
  1311. ~~~~~~~~~~~~~~~~~~~
  1312. This configuration key can be used to specify the different region where repoSpanner
  1313. is deployed and thus with which this pagure instance can be integrated.
  1314. An example entry could look like:
  1315. ::
  1316. REPOSPANNER_REGIONS = {
  1317. 'default': {'url': 'https://nodea.regiona.repospanner.local:8444',
  1318. 'repo_prefix': 'pagure/',
  1319. 'hook': None,
  1320. 'ca': '/etc/pki/repospanner/pki/ca.crt',
  1321. 'admin_cert': {'cert': '/etc/pki/repospanner/pki/admin.crt',
  1322. 'key': '/etc/pki/repospanner/pki/admin.key'},
  1323. 'push_cert': {'cert': '/etc/pki/repospanner/pki/pagure.crt',
  1324. 'key': '/etc/pki/repospanner/pki/pagure.key'}}
  1325. }
  1326. If this configuration key is not defined, pagure will consider that it is
  1327. not set to be integrated with repoSpanner.
  1328. Defaults to: ``{}``
  1329. SSH_KEYS_USERNAME_LOOKUP
  1330. ~~~~~~~~~~~~~~~~~~~~~~~~
  1331. This configuration key is used by the keyhelper script to indicate that the
  1332. git username should be used and looked up. Use this if the username that is sent
  1333. to ssh is specific for a unique Pagure user (i.e. not using a single "git@" user
  1334. for all git operations).
  1335. SSH_KEYS_USERNAME_FORBIDDEN
  1336. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1337. A list of usernames that are exempted from being verified via the keyhelper.
  1338. SSH_KEYS_USERNAME_EXPECT
  1339. ~~~~~~~~~~~~~~~~~~~~~~~~
  1340. This configuration key should contain the username that is used for git if a single
  1341. SSH user is used for all git ssh traffic (i.e. "git").
  1342. SSH_KEYS_OPTIONS
  1343. ~~~~~~~~~~~~~~~~
  1344. This configuration key provides the options added to keys as they are returned
  1345. to sshd, in the same format as AuthorizedKeysFile
  1346. (see "AUTHORIZED_KEYS FILE FORMAT" in sshd(8)).
  1347. SSH_ADMIN_TOKEN
  1348. ~~~~~~~~~~~~~~~
  1349. If not set to ``None``, ``aclchecker`` and ``keyhelper`` will use this api
  1350. admin token to get authorized to internal endpoints that they use. The token
  1351. must have the ``internal_access`` ACL.
  1352. This is useful when the IP address of sshd service is not predictable
  1353. (e.g. because of running in a distributed cloud environment) and so
  1354. it's not possible to use the ``IP_ALLOWED_INTERNAL`` address list.
  1355. Defaults to: ``None``
  1356. SSH_COMMAND_REPOSPANNER
  1357. ~~~~~~~~~~~~~~~~~~~~~~~
  1358. The command to run if a repository is on repospanner when aclchecker is in use.
  1359. SSH_COMMAND_NON_REPOSPANNER
  1360. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1361. The command to run if a repository is not on repospanner when aclchecker is in use.
  1362. MQTT Options
  1363. ------------
  1364. If approprietly configured pagure supports sending messages to an MQTT
  1365. message queue.
  1366. Here below are the different configuration options to make it so.
  1367. MQTT_NOTIFICATIONS
  1368. ~~~~~~~~~~~~~~~~~~
  1369. Global configuration key to turn on or off the code to send notifications
  1370. to an MQTT message queue.
  1371. Defaults to: ``False``
  1372. MQTT_HOST
  1373. ~~~~~~~~~
  1374. Host name of the MQTT server to send the MQTT notifications to.
  1375. Defaults to: ``None``
  1376. MQTT_PORT
  1377. ~~~~~~~~~
  1378. Port of the MQTT server to use to send the MQTT notifications to.
  1379. Defaults to: ``None``
  1380. MQTT_USERNAME
  1381. ~~~~~~~~~~~~~
  1382. Username to authenticate to the MQTT server as.
  1383. Defaults to: ``None``
  1384. MQTT_PASSWORD
  1385. ~~~~~~~~~~~~~
  1386. Password to authenticate to the MQTT server with.
  1387. Defaults to: ``None``
  1388. MQTT_CA_CERTS
  1389. ~~~~~~~~~~~~~
  1390. When using SSL-based authentication to the MQTT server, use this
  1391. configuration key to point to the CA cert to use.
  1392. Defaults to: ``None``
  1393. MQTT_CERTFILE
  1394. ~~~~~~~~~~~~~
  1395. When using SSL-based authentication to the MQTT server, use this
  1396. configuration key to point to the cert file to use.
  1397. Defaults to: ``None``
  1398. MQTT_KEYFILE
  1399. ~~~~~~~~~~~~~
  1400. When using SSL-based authentication to the MQTT server, use this
  1401. configuration key to point to the key file to use.
  1402. Defaults to: ``None``
  1403. MQTT_CERT_REQS
  1404. ~~~~~~~~~~~~~~
  1405. When using SSL-based authentication to the MQTT server, use this
  1406. configuration key to specify if the CERT is required.
  1407. Defaults to: ``ssl.CERT_REQUIRED`` (from python's ssl library)
  1408. MQTT_TLS_VERSION
  1409. ~~~~~~~~~~~~~~~~
  1410. When using SSL-based authentication to the MQTT server, use this
  1411. configuration key to specify the TLS protocols to support/use.
  1412. Defaults to: ``ssl.PROTOCOL_TLSv1_2`` (from python's ssl library)
  1413. MQTT_CIPHERS
  1414. ~~~~~~~~~~~~
  1415. When using SSL-based authentication to the MQTT server, use this
  1416. configuration key to specify the ciphers.
  1417. Defaults to: ``None``
  1418. MQTT_TOPIC_PREFIX
  1419. ~~~~~~~~~~~~~~~~~
  1420. This configuration key can be used to specify a prefix to the mqtt messages sent.
  1421. This prefix will be added to the topic used by pagure thus allowing the mqtt
  1422. admins to specify a parent topic for all pagure-related messages.
  1423. Defaults to: ``None``
  1424. ALWAYS_MQTT_ON_COMMITS
  1425. ~~~~~~~~~~~~~~~~~~~~~~
  1426. This configuration key can be used to enforce `mqtt <https://mqtt.org/>`_
  1427. notifications on commits made on all projects in a pagure instance.
  1428. Defaults to: ``False``.
  1429. NOGITHOOKS
  1430. ~~~~~~~~~~
  1431. This configuration key should not be touched. It is used in the test suite as a
  1432. way to prevent all the git hooks from running (which includes checking if the
  1433. user is allowed to push). Using this mechanism we are able to check some
  1434. behavior in the test suite that in a deployed pagure instance are happening in
  1435. a different process.
  1436. **Do not change this option in production**
  1437. Defaults to: ``None``.
  1438. Deprecated configuration keys
  1439. -----------------------------
  1440. FORK_FOLDER
  1441. ~~~~~~~~~~~
  1442. This configuration key used to be use to specify the folder where the forks
  1443. are placed. Since the release 2.0 of pagure, it has been deprecated, forks
  1444. are now automatically placed in a sub-folder of the folder containing the
  1445. mains git repositories (ie ``GIT_FOLDER``).
  1446. See the ``UPGRADING.rst`` file for more information about this change and
  1447. how to handle it.
  1448. UPLOAD_FOLDER
  1449. ~~~~~~~~~~~~~
  1450. This configuration key used to be use to specify where the uploaded releases
  1451. are available. It has been replaced by `UPLOAD_FOLDER_PATH` in the release
  1452. 2.10 of pagure.
  1453. GITOLITE_VERSION
  1454. ~~~~~~~~~~~~~~~~
  1455. This configuration key specifies which version of gitolite you are
  1456. using, it can be either ``2`` or ``3``.
  1457. Defaults to: ``3``.
  1458. This has been replaced by `GITOLITE_BACKEND` in the release 3.0 of pagure.
  1459. DOCS_FOLDER, REQUESTS_FOLDER, TICKETS_FOLDER
  1460. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1461. These configuration values were removed. It has been found out that
  1462. due to how Pagure writes repo names in the gitolite configuration file,
  1463. these must have fixed paths relative to `GIT_FOLDER`. Specifically, they
  1464. must occupy subdirectories `docs`, `requests` and `tickets` under `GIT_FOLDER`.
  1465. They are now computed automatically based on value of `GIT_FOLDER`.
  1466. Usage of docs and tickets can be triggered by setting `ENABLE_DOCS` and
  1467. `ENABLE_TICKETS` to `True` (this is the default).
  1468. FILE_SIZE_HIGHLIGHT
  1469. ~~~~~~~~~~~~~~~~~~~
  1470. This configuration key can be used to specify the maximum number of characters a file
  1471. or diff should have to have syntax highlighting. Everything above this limit
  1472. will not have syntax highlighting as this is a memory intensive procedure that
  1473. easily leads to out of memory error on large files or diff.
  1474. Defaults to: ``5000``
  1475. BOOTSTRAP_URLS_CSS
  1476. ~~~~~~~~~~~~~~~~~~
  1477. This configuration key can be used to specify the URL where are hosted the bootstrap
  1478. CSS file since the files hosted on apps.fedoraproject.org used in pagure.io
  1479. are not restricted in browser access.
  1480. Defaults to: ``'https://apps.fedoraproject.org/global/fedora-bootstrap-1.1.1/fedora-bootstrap.css'``
  1481. This has been deprecated by the new way of theming pagure, see the `theming
  1482. documentation <https://docs.pagure.org/pagure/usage/theming.html>`_
  1483. BOOTSTRAP_URLS_JS
  1484. ~~~~~~~~~~~~~~~~~
  1485. This configuration key can be used to specify the URL where are hosted the bootstrap
  1486. JS file since the files hosted on apps.fedoraproject.org used in pagure.io
  1487. are not restricted in browser access.
  1488. Defaults to: ``'https://apps.fedoraproject.org/global/fedora-bootstrap-1.1.1/fedora-bootstrap.js'``
  1489. This has been deprecated by the new way of theming pagure, see the `theming
  1490. documentation <https://docs.pagure.org/pagure/usage/theming.html>`_
  1491. HTML_TITLE
  1492. ~~~~~~~~~~
  1493. This configuration key allows you to customize the HTML title of all the
  1494. pages, from ``... - pagure`` (default) to ``... - <your value>``.
  1495. Defaults to: ``Pagure``
  1496. This has been deprecated by the new way of theming pagure, see the `theming
  1497. documentation <https://docs.pagure.org/pagure/usage/theming.html>`_
  1498. GITOLITE_BACKEND
  1499. ~~~~~~~~~~~~~~~~
  1500. This configuration key allowed specifying the gitolite backend.
  1501. This has now been replaced by GIT_AUTH_BACKEND, please see that option
  1502. for information on valid values.
  1503. PAGURE_PLUGIN
  1504. ~~~~~~~~~~~~~
  1505. This configuration key allows to specify the path to the plugins configuration
  1506. file. It is set as an environment variable. It has been replaced by
  1507. PAGURE_PLUGINS_CONFIG. The new variable does not modify the behavior of the old
  1508. variable, however unlike PAGURE_PLUGIN it can be set in the main Pagure
  1509. configuration.