custom_gitolite_conf.rst 1001 B

123456789101112131415161718192021222324252627282930313233343536
  1. .. _custom-gitolite:
  2. Customize the gitolite configuration
  3. ====================================
  4. Pagure provides a mechanism to allow customizing the creation and
  5. compilation of the configuration file of gitolite.
  6. To customize the gitolite configuration file, we invite you to look at the
  7. `sources of the module pagure.lib.git_auth
  8. <https://pagure.io/pagure/blob/master/f/pagure/lib/git_auth.py>`_.
  9. As you can see it defines the following class::
  10. class GitAuthHelper(object):
  11. __metaclass__ = abc.ABCMeta
  12. @staticmethod
  13. @abc.abstractmethod
  14. def generate_acls():
  15. pass
  16. This will be the class you will have to inherit from in order to inject your
  17. own code.
  18. You will then declare an entry point in your `setup.py` following this
  19. template::
  20. entry_points="""
  21. [pagure.git_auth.helpers]
  22. my_git_auth = my_pagure.my_module:MyGitAuthTestHelper
  23. """
  24. Then you can adjust pagure's configuration file to say::
  25. GITOLITE_BACKEND = 'my_git_auth'