为了方便用户统一管理,gitlab通过ldap进行认证。
修改gitlab.rb配置文件。SourceByrd's Weblog-https://note.t4x.org/basic/gitlab-ldap-config/
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
gitlab_rails['ldap_enabled'] = true gitlab_rails['ldap_servers'] = YAML.load <<-'EOS' main: # 'main' is the GitLab 'provider ID' of this LDAP server label: 'LDAP' host: 'x.x.x.x' port: 389 uid: 'cn' bind_dn: 'uid=admin,ou=User,dc=ldap,dc=t4x,dc=org' password: 'admin123' encryption: 'plain' # "start_tls" or "simple_tls" or "plain" verify_certificates: false active_directory: true allow_username_or_email_login: true lowercase_usernames: false block_auto_created_users: false base: 'dc=ldap,dc=t4x,dc=org' user_filter: '' attributes: username: ['uid', 'realName'] email: ['mail', 'email', 'userPrincipalName'] name: 'cn' first_name: 'givenName' last_name: 'sn' EOS |
申明:除非注明Byrd's Blog内容均为原创,未经许可禁止转载!详情请阅读版权申明!