|
Pierre-Yves Chibon |
2cf341 |
Configuration
|
|
Pierre-Yves Chibon |
2cf341 |
=============
|
|
Pierre-Yves Chibon |
2cf341 |
|
|
Pierre-Yves Chibon |
2cf341 |
Pagure offers a wide-varieties of options that must or can be used to
|
|
Pierre-Yves Chibon |
2cf341 |
adjust its behavior.
|
|
Pierre-Yves Chibon |
a6079f |
|
|
Pierre-Yves Chibon |
909a5f |
|
|
Pierre-Yves Chibon |
a6079f |
Must options
|
|
Pierre-Yves Chibon |
a6079f |
------------
|
|
Pierre-Yves Chibon |
a6079f |
|
|
Pierre-Yves Chibon |
a6079f |
Here are listed the options you must set-up in order to get pagure running.
|
|
Pierre-Yves Chibon |
a6079f |
|
|
Pierre-Yves Chibon |
a6079f |
|
|
Pierre-Yves Chibon |
a6079f |
SECRET_KEY
|
|
Pierre-Yves Chibon |
a6079f |
~~~~~~~~~~
|
|
Pierre-Yves Chibon |
a6079f |
|
|
Pierre-Yves Chibon |
a6079f |
This key is used by flask to create the session. It should be kept secret
|
|
Pierre-Yves Chibon |
a6079f |
and set as a long and random string.
|
|
Pierre-Yves Chibon |
a6079f |
|
|
Pierre-Yves Chibon |
a6079f |
|
|
Pierre-Yves Chibon |
764459 |
SALT_EMAIL
|
|
Pierre-Yves Chibon |
764459 |
~~~~~~~~~~
|
|
Pierre-Yves Chibon |
764459 |
|
|
Pierre-Yves Chibon |
764459 |
This key is used for when sending notification to ensure that when sending
|
|
Pierre-Yves Chibon |
764459 |
notifications to different users, each one of them has a different, unique
|
|
Pierre-Yves Chibon |
764459 |
and un-fakable ``Reply-To`` header that is then used by the milter to find
|
|
Pierre-Yves Chibon |
764459 |
out if the response received is a real one or a fake/invalid one.
|
|
Pierre-Yves Chibon |
764459 |
|
|
Pierre-Yves Chibon |
764459 |
|
|
Pierre-Yves Chibon |
a6079f |
DB_URL
|
|
Pierre-Yves Chibon |
a6079f |
~~~~~~
|
|
Pierre-Yves Chibon |
a6079f |
|
|
Pierre-Yves Chibon |
a6079f |
This key indicates to the framework how and where to connect to the database
|
|
Pierre-Yves Chibon |
a6079f |
server. Pagure using `SQLAchemy <http://www.sqlalchemy.org/>`_ it can connect
|
|
Pierre-Yves Chibon |
a6079f |
to a wide range of database server including MySQL, PostgreSQL and SQLite.
|
|
Pierre-Yves Chibon |
a6079f |
|
|
Pierre-Yves Chibon |
a6079f |
Examples values:
|
|
Pierre-Yves Chibon |
a6079f |
|
|
Pierre-Yves Chibon |
a6079f |
::
|
|
Pierre-Yves Chibon |
a6079f |
|
|
Pierre-Yves Chibon |
a6079f |
DB_URL=mysql://user:pass@host/db_name
|
|
Pierre-Yves Chibon |
a6079f |
DB_URL=postgres://user:pass@host/db_name
|
|
Pierre-Yves Chibon |
a6079f |
DB_URL = 'sqlite:////var/tmp/pagure_dev.sqlite'
|
|
Pierre-Yves Chibon |
a6079f |
|
|
Pierre-Yves Chibon |
a6079f |
Defaults to ``sqlite:////var/tmp/pagure_dev.sqlite``
|
|
Pierre-Yves Chibon |
a6079f |
|
|
Pierre-Yves Chibon |
a6079f |
|
|
Pierre-Yves Chibon |
a6079f |
APP_URL
|
|
Pierre-Yves Chibon |
a6079f |
~~~~~~~
|
|
Pierre-Yves Chibon |
a6079f |
|
|
Pierre-Yves Chibon |
a6079f |
This key indicates the URL at which this pagure instance will be made available.
|
|
Pierre-Yves Chibon |
a6079f |
|
|
Pierre-Yves Chibon |
7a3469 |
Defaults to: ``https://pagure.org/``
|
|
Pierre-Yves Chibon |
2e4eca |
|
|
Pierre-Yves Chibon |
2e4eca |
|
|
Pierre-Yves Chibon |
2e4eca |
EMAIL_ERROR
|
|
Pierre-Yves Chibon |
2e4eca |
~~~~~~~~~~~
|
|
Pierre-Yves Chibon |
2e4eca |
|
|
Pierre-Yves Chibon |
2e4eca |
Pagure sends email when it caches an un-expected error (which saves you from
|
|
Pierre-Yves Chibon |
2e4eca |
having to monitor the logs regularly but if you like, the error is still
|
|
Pierre-Yves Chibon |
2e4eca |
present in the logs).
|
|
Pierre-Yves Chibon |
2e4eca |
This setting allows you to specify to which email address to send these error
|
|
Pierre-Yves Chibon |
2e4eca |
reports.
|
|
Pierre-Yves Chibon |
7a3469 |
|
|
Pierre-Yves Chibon |
7a3469 |
|
|
Pierre-Yves Chibon |
7a3469 |
GIT_URL_SSH
|
|
Pierre-Yves Chibon |
7a3469 |
~~~~~~~~~~~
|
|
Pierre-Yves Chibon |
7a3469 |
|
|
Pierre-Yves Chibon |
7a3469 |
This configuration key provides the information to the user on how to clone
|
|
Pierre-Yves Chibon |
7a3469 |
the git repos hosted on pagure via `SSH <>`_.
|
|
Pierre-Yves Chibon |
7a3469 |
|
|
Pierre-Yves Chibon |
7a3469 |
The URL should end with a slash ``/``.
|
|
Pierre-Yves Chibon |
7a3469 |
|
|
Pierre-Yves Chibon |
7a3469 |
Defaults to: ``'ssh://git@pagure.org/'``
|
|
Pierre-Yves Chibon |
7a3469 |
|
|
Pierre-Yves Chibon |
7a3469 |
|
|
Pierre-Yves Chibon |
7a3469 |
GIT_URL_GIT
|
|
Pierre-Yves Chibon |
7a3469 |
~~~~~~~~~~~
|
|
Pierre-Yves Chibon |
7a3469 |
This configuration key provides the information to the user on how to clone
|
|
Pierre-Yves Chibon |
7a3469 |
the git repos hosted on pagure anonymously. These access can be granted via
|
|
Pierre-Yves Chibon |
7a3469 |
the ``git://`` or ``http(s)://`` protocols.
|
|
Pierre-Yves Chibon |
7a3469 |
|
|
Pierre-Yves Chibon |
7a3469 |
The URL should end with a slash ``/``.
|
|
Pierre-Yves Chibon |
7a3469 |
|
|
Pierre-Yves Chibon |
7a3469 |
Defaults to: ``'git://pagure.org/'``
|
|
Pierre-Yves Chibon |
d4c756 |
|
|
Pierre-Yves Chibon |
d4c756 |
|
|
Pierre-Yves Chibon |
d4c756 |
GIT_FOLDER
|
|
Pierre-Yves Chibon |
d4c756 |
~~~~~~~~~~
|
|
Pierre-Yves Chibon |
d4c756 |
|
|
Pierre-Yves Chibon |
d4c756 |
This configuration key points to the folder where are stored the git repos
|
|
Pierre-Yves Chibon |
d4c756 |
of the projects.
|
|
Pierre-Yves Chibon |
d4c756 |
|
|
Pierre-Yves Chibon |
d4c756 |
Each project in pagure has 4 git repositories:
|
|
Pierre-Yves Chibon |
d4c756 |
|
|
Pierre-Yves Chibon |
d4c756 |
- the main repo for the code
|
|
Pierre-Yves Chibon |
d4c756 |
- the doc repo showed in the doc server
|
|
Pierre-Yves Chibon |
d4c756 |
- the ticket and request repos storing the metadata of the
|
|
Pierre-Yves Chibon |
d4c756 |
tickets/pull-requests
|
|
Pierre-Yves Chibon |
d4c756 |
|
|
Pierre-Yves Chibon |
d4c756 |
There are then another 2 folders specifying the locations of the forks and
|
|
Pierre-Yves Chibon |
d4c756 |
remote git repo used for the remotes pull-requests (ie: pull-request coming
|
|
Pierre-Yves Chibon |
d4c756 |
from a project not hosted on pagure).
|
|
Pierre-Yves Chibon |
d4c756 |
|
|
Pierre-Yves Chibon |
d4c756 |
|
|
Pierre-Yves Chibon |
d4c756 |
FORK_FOLDER
|
|
Pierre-Yves Chibon |
d4c756 |
~~~~~~~~~~~
|
|
Pierre-Yves Chibon |
d4c756 |
|
|
Pierre-Yves Chibon |
d4c756 |
This configuration key points to the folder where are stored the git repos
|
|
Pierre-Yves Chibon |
d4c756 |
of forks of the projects.
|
|
Pierre-Yves Chibon |
d4c756 |
|
|
Pierre-Yves Chibon |
d4c756 |
|
|
Pierre-Yves Chibon |
d4c756 |
DOCS_FOLDER
|
|
Pierre-Yves Chibon |
d4c756 |
~~~~~~~~~~~
|
|
Pierre-Yves Chibon |
d4c756 |
|
|
Pierre-Yves Chibon |
d4c756 |
This configuration key points to the folder where are stored the git repos
|
|
Pierre-Yves Chibon |
d4c756 |
for the documentation of the projects.
|
|
Pierre-Yves Chibon |
d4c756 |
|
|
Pierre-Yves Chibon |
d4c756 |
|
|
Pierre-Yves Chibon |
d4c756 |
TICKETS_FOLDER
|
|
Pierre-Yves Chibon |
d4c756 |
~~~~~~~~~~~~~~
|
|
Pierre-Yves Chibon |
d4c756 |
|
|
Pierre-Yves Chibon |
d4c756 |
This configuration key points to the folder where are stored the git repos
|
|
Pierre-Yves Chibon |
d4c756 |
storing the metadata of the tickets opened against the project.
|
|
Pierre-Yves Chibon |
d4c756 |
|
|
Pierre-Yves Chibon |
d4c756 |
|
|
Pierre-Yves Chibon |
d4c756 |
REQUESTS_FOLDER
|
|
Pierre-Yves Chibon |
d4c756 |
~~~~~~~~~~~~~~~
|
|
Pierre-Yves Chibon |
d4c756 |
|
|
Pierre-Yves Chibon |
d4c756 |
This configuration key points to the folder where are stored the git repos
|
|
Pierre-Yves Chibon |
d4c756 |
storing the metadata of the pull-requests opened against the project.
|
|
Pierre-Yves Chibon |
d4c756 |
|
|
Pierre-Yves Chibon |
d4c756 |
|
|
Pierre-Yves Chibon |
d4c756 |
REMOTE_GIT_FOLDER
|
|
Pierre-Yves Chibon |
d4c756 |
~~~~~~~~~~~~~~~~~
|
|
Pierre-Yves Chibon |
d4c756 |
|
|
Pierre-Yves Chibon |
d4c756 |
This configuration key points to the folder where are stored the remote git
|
|
Pierre-Yves Chibon |
d4c756 |
repos (ie: not hosted on pagure) that someone used to open a pull-request
|
|
Pierre-Yves Chibon |
d4c756 |
against a project hosted on pagure.
|
|
Pierre-Yves Chibon |
0928d4 |
|
|
Pierre-Yves Chibon |
0928d4 |
|
|
Pierre-Yves Chibon |
0928d4 |
SESSION_COOKIE_SECURE
|
|
Pierre-Yves Chibon |
0928d4 |
~~~~~~~~~~~~~~~~~~~~~
|
|
Pierre-Yves Chibon |
0928d4 |
|
|
Pierre-Yves Chibon |
0928d4 |
When this is set to True, the session cookie will only be returned to the
|
|
Pierre-Yves Chibon |
0928d4 |
server via ssl (https). If you connect to the server via plain http, the
|
|
Pierre-Yves Chibon |
0928d4 |
cookie will not be sent. This prevents sniffing of the cookie contents.
|
|
Pierre-Yves Chibon |
0928d4 |
This may be set to False when testing your application but should always
|
|
Pierre-Yves Chibon |
0928d4 |
be set to True in production.
|
|
Pierre-Yves Chibon |
0928d4 |
|
|
Pierre-Yves Chibon |
0928d4 |
Defaults to: ``False`` for development, must be ``True`` in production with
|
|
Pierre-Yves Chibon |
0928d4 |
https.
|
|
Pierre-Yves Chibon |
f17ee3 |
|
|
Pierre-Yves Chibon |
f17ee3 |
|
|
Pierre-Yves Chibon |
909a5f |
FROM_EMAIL
|
|
Pierre-Yves Chibon |
909a5f |
~~~~~~~~~~
|
|
Pierre-Yves Chibon |
909a5f |
|
|
Pierre-Yves Chibon |
909a5f |
This setting allows to specify the email address used by this pagure instance
|
|
Pierre-Yves Chibon |
909a5f |
when sending emails (notifications).
|
|
Pierre-Yves Chibon |
909a5f |
|
|
Pierre-Yves Chibon |
909a5f |
Defaults to: ``pagure@pagure.org``
|
|
Pierre-Yves Chibon |
909a5f |
|
|
Pierre-Yves Chibon |
909a5f |
|
|
Pierre-Yves Chibon |
1b7aad |
DOMAIN_EMAIL_NOTIFICATIONS
|
|
Pierre-Yves Chibon |
1b7aad |
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
Pierre-Yves Chibon |
1b7aad |
|
|
Pierre-Yves Chibon |
1b7aad |
This setting allows to specify the domain used by this pagure instance
|
|
Pierre-Yves Chibon |
1b7aad |
when sending emails (notifications). More precisely, this setting is used
|
|
Pierre-Yves Chibon |
1b7aad |
when building the ``msg-id`` header of the emails sent.
|
|
Pierre-Yves Chibon |
1b7aad |
|
|
Pierre-Yves Chibon |
1b7aad |
Defaults to: ``pagure.org``
|
|
Pierre-Yves Chibon |
1b7aad |
|
|
Pierre-Yves Chibon |
1b7aad |
|
|
Pierre-Yves Chibon |
f17ee3 |
Configure Gitolite
|
|
Pierre-Yves Chibon |
f17ee3 |
------------------
|
|
Pierre-Yves Chibon |
f17ee3 |
|
|
Pierre-Yves Chibon |
f17ee3 |
Pagure uses `gitolite <http://gitolite.com/>`_ as an authorization layer.
|
|
Pierre-Yves Chibon |
f17ee3 |
Gitolite relies on `SSH <https://en.wikipedia.org/wiki/Secure_Shell>`_ for
|
|
Pierre-Yves Chibon |
f17ee3 |
the authentication. In other words, SSH let you in and gitolite check if you
|
|
Pierre-Yves Chibon |
f17ee3 |
are allowed to do what you are trying to do once you are inside.
|
|
Pierre-Yves Chibon |
f17ee3 |
|
|
Pierre-Yves Chibon |
f17ee3 |
|
|
Pierre-Yves Chibon |
f17ee3 |
GITOLITE_HOME
|
|
Pierre-Yves Chibon |
f17ee3 |
~~~~~~~~~~~~~
|
|
Pierre-Yves Chibon |
f17ee3 |
|
|
Pierre-Yves Chibon |
f17ee3 |
This configuration key should point to the home of the user under which
|
|
Pierre-Yves Chibon |
f17ee3 |
gitolite is ran.
|
|
Pierre-Yves Chibon |
f17ee3 |
|
|
Pierre-Yves Chibon |
f17ee3 |
|
|
Pierre-Yves Chibon |
f17ee3 |
GITOLITE_VERSION
|
|
Pierre-Yves Chibon |
f17ee3 |
~~~~~~~~~~~~~~~~
|
|
Pierre-Yves Chibon |
f17ee3 |
|
|
Pierre-Yves Chibon |
f17ee3 |
This configuration key allows to specify which version of gitolite you are
|
|
Pierre-Yves Chibon |
f17ee3 |
using, it can be either ``2`` or ``3``.
|
|
Pierre-Yves Chibon |
f17ee3 |
|
|
Pierre-Yves Chibon |
f17ee3 |
Defaults to: ``3``.
|
|
Pierre-Yves Chibon |
f17ee3 |
|
|
Pierre-Yves Chibon |
f17ee3 |
|
|
Pierre-Yves Chibon |
f17ee3 |
GITOLITE_KEYDIR
|
|
Pierre-Yves Chibon |
f17ee3 |
~~~~~~~~~~~~~~~
|
|
Pierre-Yves Chibon |
f17ee3 |
|
|
Pierre-Yves Chibon |
f17ee3 |
This configuration key points to the folder where gitolite stores and accesses
|
|
Pierre-Yves Chibon |
f17ee3 |
the public SSH keys of all the user have access to the server.
|
|
Pierre-Yves Chibon |
f17ee3 |
|
|
Pierre-Yves Chibon |
f17ee3 |
Since pagure is the user interface, it is pagure that writes down the files
|
|
Pierre-Yves Chibon |
f17ee3 |
in this directory effectively setting up the users to be able to use gitolite.
|
|
Pierre-Yves Chibon |
f17ee3 |
|
|
Pierre-Yves Chibon |
f17ee3 |
|
|
Pierre-Yves Chibon |
f17ee3 |
GL_RC
|
|
Pierre-Yves Chibon |
f17ee3 |
~~~~~
|
|
Pierre-Yves Chibon |
f17ee3 |
|
|
Pierre-Yves Chibon |
f17ee3 |
This configuration key must point to the file ``gitolite.rc`` used by gitolite
|
|
Pierre-Yves Chibon |
f17ee3 |
to record who has access to what (ie: who has access to which repo/branch).
|
|
Pierre-Yves Chibon |
f17ee3 |
|
|
Pierre-Yves Chibon |
f17ee3 |
|
|
Pierre-Yves Chibon |
f17ee3 |
GL_BINDIR
|
|
Pierre-Yves Chibon |
f17ee3 |
~~~~~~~~~
|
|
Pierre-Yves Chibon |
f17ee3 |
|
|
Pierre-Yves Chibon |
f17ee3 |
This configuration key indicates the folder in which the gitolite tools can
|
|
Pierre-Yves Chibon |
f17ee3 |
be found. It can be as simple as ``/usr/bin/`` if the tools have been installed
|
|
Pierre-Yves Chibon |
f17ee3 |
using a package manager or something like ``/opt/bin/`` for a more custom
|
|
Pierre-Yves Chibon |
f17ee3 |
install.
|
|
Pierre-Yves Chibon |
a9a543 |
|
|
Pierre-Yves Chibon |
a9a543 |
|
|
Pierre-Yves Chibon |
a9a543 |
Optional options
|
|
Pierre-Yves Chibon |
a9a543 |
----------------
|
|
Pierre-Yves Chibon |
a9a543 |
|
|
Pierre-Yves Chibon |
a9a543 |
SSH_KEYS
|
|
Pierre-Yves Chibon |
a9a543 |
~~~~~~~~
|
|
Pierre-Yves Chibon |
a9a543 |
|
|
Pierre-Yves Chibon |
a9a543 |
It is a good pratice to publish the fingerprint and public SSH key of a
|
|
Pierre-Yves Chibon |
a9a543 |
server you provide access to.
|
|
Pierre-Yves Chibon |
a9a543 |
Pagure offers the possibility to expose this information based on the values
|
|
Pierre-Yves Chibon |
a9a543 |
set in the configuration file, in the ``SSH_KEYS`` configuration key.
|
|
Pierre-Yves Chibon |
a9a543 |
|
|
Pierre-Yves Chibon |
a9a543 |
See the `SSH hostkeys/Fingerprints page on pagure.io <https://pagure.io/ssh_info>`_.
|
|
Pierre-Yves Chibon |
a9a543 |
|
|
Pierre-Yves Chibon |
a9a543 |
.. warning: The format is important
|
|
Pierre-Yves Chibon |
a9a543 |
|
|
Pierre-Yves Chibon |
a9a543 |
SSH_KEYS = {'RSA': {'fingerprint': '<foo>', 'pubkey': '<bar>'}}
|
|
Pierre-Yves Chibon |
a9a543 |
|
|
Pierre-Yves Chibon |
a9a543 |
Where `<foo>` and `<bar>` must be replaced by your values.
|