Gitlab加入LDAP认证 (windows AD)<03>

发布时间 2023-11-04 21:52:34作者: 一毛丶丶

环境信息:

主机名称 IP 角色
AD-Server 192.168.61.237 AD服务器
gitlab 192.168.61.112 AD服务器

[root@gitlab ~]# curl -s https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
[root@gitlab ~]# yum -y install gitlab-ce


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: 'AD认证'
     host: '192.168.61.237'
     port: 389
     uid: 'SamaccountName'
     method: 'plain' # "tls" or "ssl" or "plain"
     bind_dn: 'cn=administrator,cn=Users,dc=iyou,dc=com'
     password: 'Lahmy1c!'
     active_directory: true
     allow_username_or_email_login: true
     block_auto_created_users: false
     base: 'dc=iyou,dc=com'
     user_filter: ''
EOS

重新加载配置

[root@gitlab ~]# gitlab-ctl reconfigure