Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/21.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在gitolite.conf中配置LDAP组_Git_Ldap_Gitolite - Fatal编程技术网

如何在gitolite.conf中配置LDAP组

如何在gitolite.conf中配置LDAP组,git,ldap,gitolite,Git,Ldap,Gitolite,我已经通过https访问GITOLITE设置了GIT。为了获得授权,我们需要将LDAP组添加到gitolite.conf。我已将ldap脚本附加到.gitolite.rc,它能够获取该用户所属的所有用户组。对于授权,我在gitolite.conf中添加了相应的组,但无法获取gitolite.conf中的组 repo testing RW+ = @testing_ldap_group_rw R = @testing_ldap_group_read 我也在.

我已经通过https访问GITOLITE设置了GIT。为了获得授权,我们需要将LDAP组添加到gitolite.conf。我已将ldap脚本附加到.gitolite.rc,它能够获取该用户所属的所有用户组。对于授权,我在gitolite.conf中添加了相应的组,但无法获取gitolite.conf中的组

repo testing
    RW+      = @testing_ldap_group_rw
    R       =  @testing_ldap_group_read
我也在.gitolite.rc中启用了此功能

GROUPLIST_PGM           =>  '/path/to/ldap-query-groups-script',
我需要做任何其他配置更改吗?

我需要

但该脚本并没有“附加到
.gitolite.rc

它是我的
$PATH
中的一个 在Gitolite文档之后,它会查询LDAP存储,并返回一个以空格分隔的组列表,用户是该组的成员


然后使用
@groupName
符号就可以了:如果用户是LDAP组
groupName
的一部分(
memberOf
),他/她将被允许使用。

您需要配置gitolite(
.gitolite.rc
)并设置为一个程序,在给定用户名的情况下,该程序返回以空格分隔的组列表。该程序由您决定,可以查询任何源,包括但不限于
ldap

您可以查看一个示例
contrib
脚本:

@user2164525好的。我只是直接把它包括进去。