master TOC | chapter TOC | support
[Please NOTE: this is all about user groups, not repo groups]
[WARNING: the earlier method of doing this has been discontinued; please see the commit message for details]
Gitolite now allows usergroup information to be stored outside its own config file. We'll see "why" first, then the "how".
Large sites often have LDAP servers that already contain user and group information, including group membership details. Such sites may prefer that gitolite just pick up that info instead of having to redundantly put it in gitolite's config file.
Consider this example config for one repo:
repo foo
RW+ = @lead_devs
RW = @devs
R = @interns
Normally, you would also need to specify:
@lead_devs = dilbert alice
@devs = wally
@interns = ashok
However, if the corporate LDAP server already tags these people correctly, and if there is some way of getting that information out at run time, that would be cool.
All you need is a script that, given a username, queries your LDAP or similar server, and returns a space-separated list of all the groups she is a member of. If an invalid user name is sent in, or the user is valid but is not part of any groups, it should print nothing.
This script will probably be specific to your site. (See contrib/ldap for some example scripts that were contributed by the Nokia MeeGo team.)
Then set the $GL_GET_MEMBERSHIPS_PGM variable in the rc file to the full
path of this program, set $GL_BIG_CONFIG to 1, and that will be that.