Setting up LDAP sign-in
If you have an LDAP directory service such as Active Directory, you can configure GitLab so that your users can sign in with their LDAP credentials. Add the following to /etc/gitlab/gitlab.rb, edited for your server.
For GitLab Community Edition:
以下是我ldap的配置
### LDAP Settings###! Docs: https://docs.gitlab.com/omnibus/settings/ldap.html###! **Be careful not to break the indentation in the ldap_servers block. It is###! in yaml format and the spaces must be retained. Using tabs will not work.**gitlab_rails['ldap_enabled']=truegitlab_rails['prevent_ldap_sign_in']=falsegitlab_rails['ldap_servers']= YAML.load <<-EOSmain:label:'LDAP'host:'192.168.x.x'port:389uid:'cn'encryption:'plain'bind_dn:'cn=admin,dc=xxx,dc=com'password:'xxx'smartcard_auth:falseactive_directory:trueallow_username_or_email_login:truelowercase_usernames:false-
base:'ou=People,dc=xxx,dc=com' user_filter:''EOSgitlab-ctl reconfiguregitlab-ctl restart


