gitlab集成ldap认证

 

官网文档地址:https://docs.gitlab.com/13.10/ee/administration/auth/ldap/index.html

 

在gitlab集成ldap配置时候,ldap里面要有gitlab的用户,邮箱必须两边要一致,至此在gitlab中的配置是:

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: '10.20.X.124'
     port: 8088
     uid: 'uid'
     bind_dn: 'cn=admin,dc=lionbridgecapital,dc=com'
     password: 'admin123'
     encryption: 'plain' # "start_tls" or "simple_tls" or "plain"
     verify_certificates: flase
     timeout: 10
     active_directory: true
     allow_username_or_email_login: false
     lowercase_usernames: false
     block_auto_created_users: false
     base: 'dc=lionbridgecapital,dc=com'
     user_filter: ''

最后的效果是这样:


版权声明:本文为chenyu19891124原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。