Customize the gitolite configuration

Pagure provides a mechanism to allow customizing the creation and compilation of the configuration file of gitolite.

To customize the gitolite configuration file, we invite you to look at the sources of the module pagure.lib.git_auth.

As you can see it defines the following class:

class GitAuthHelper(object):

    __metaclass__ = abc.ABCMeta

    def generate_acls():

    def remove_acls(self, session, project):

This will be the class you will have to inherit from in order to inject your own code. You will then declare an entry point in your following this template:

my_git_auth = my_pagure.my_module:MyGitAuthTestHelper

Then you can adjust pagure’s configuration file to say:

GITOLITE_BACKEND = 'my_git_auth'