一、在配置文件下增加如下内容

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.3.151.13'
     port: 389
     uid: 'sAMAccountName'
     bind_dn: 'cn=ittest,cn=Users,dc=xxx,dc=com'
     method: 'plain' # "tls" or "ssl" or "plain"
     password: 'xxxx'
     active_directory: true
     allow_username_or_email_login: false
     lowercase_usernames: false
     block_auto_created_users: false
     base: 'OU=yyy,DC=xxx,DC=com'
     user_filter: ''
EOS

备注:需运行gti-clt reconfigure git-clt restart 才生效

Jenkins持续集成 之 GitLab使用LDAP登陆_第1张图片