[root@gitlab ~]# vim /etc/gitlab/gitlab.rb
gitlab_rails['ldap_enabled'] = true
###! **remember to close this block with 'EOS' below**
gitlab_rails['ldap_servers'] = YAML.load <<-'EOS'
main: # 'main' is the GitLab 'provider ID' of this LDAP server
label: 'LDAP'
host: '172.17.1.47' #指定ldap服务器地址
port: 389 #指定ldap服务端口
uid: 'sAMAccountName' #指定登录用户名采用ldap的字段名称,可以配置cn,也可以配置uid,都能识别
bind_dn: 'CN=Administrator,CN=Users,DC=LILIAN,DC=COM' #指定ldap服务器的管理员信息即bin_dn(路径一定要写全,可用ldap客户端工具(ldapadmin)查看)
password: 'lilian2018!@#..' #指定ldap服务器的管理员密码
encryption: 'plain' # "start_tls" or "simple_tls" or "plain"
verify_certificates: true
# ca_file: ''
# ssl_version: ''
gitlab配置ldap
最新推荐文章于 2024-04-15 06:22:44 发布