http://www.cnblogs.com/LittleSix/p/6248257.html

背景:

已经安装好sinopia,配置好本地npm源

 

安装sinopia-ldap:

npm install -g sinopia-ldap

 

配置:

修改sinopia的配置文件config.yaml

修改权限文件相关配置如下:

复制代码
 1 auth:
 2   ldap:
 3     type: ldap
 4     groupNameAttribute: 'cn'
 5     client_options:
 6       url: "ldaps://ldap.example.com"
 7       adminDn: "cn=admin,dc=example,dc=com"
 8       adminPassword: "admin"
 9       searchBase: "ou=People,dc=example,dc=com"
10       searchFilter: "(uid={{username}})"
11       cache: False
12       searchAttributes:
13         - "*"
14         - memberOf
15       tlsOptions:
16         rejectUnauthorized: False
复制代码

重启siniopia即可生效

此时,你可以使用ldap上面的账号密码进行登录、上传包了。

 

参考地址:https://github.com/rlidwka/sinopia-ldap/blob/master/README.md

Leave a Reply

Your email address will not be published. Required fields are marked *