其他分享
首页 > 其他分享> > gitlab 集成openldap

gitlab 集成openldap

作者:互联网

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'] = true
gitlab_rails['prevent_ldap_sign_in'] = false
gitlab_rails['ldap_servers'] = YAML.load <<-EOS
main:
  label: 'LDAP'
  host: '192.168.x.x'
  port: 389
  uid: 'cn'
  encryption: 'plain'
  bind_dn: 'cn=admin,dc=xxx,dc=com'
  password: 'xxx'
  smartcard_auth: false
  active_directory: true
  allow_username_or_email_login: true
  lowercase_usernames: false
  base: 'ou=People,dc=xxx,dc=com'
  user_filter: ''
EOS
gitlab-ctl reconfigure
gitlab-ctl restart

标签:集成,gitlab,rails,sign,openldap,LDAP,ldap,###
来源: https://www.cnblogs.com/rxysg/p/15683567.html