gitlab配置ldap

使用gitlab 配置ldap

配置文件路径
/etc/gitlab/gitlab.rb

文件中配置的ldap 配置示例:

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: '172.1.1.1'
port: 389
uid: 'mail'
bind_dn: 'cn=ldapadm,dc=yangqianguan,dc=com'
password: '*****'
encryption: 'plain' # "start_tls" or "simple_tls" or "plain"
verify_certificates: false
active_directory: false
allow_username_or_email_login: false
block_auto_created_users: false
base: 'dc=yangqianguan,dc=com'
user_filter: ''
EOS
有个坑:
如果需要邮箱登录的话,设置 allow_username_or_email_login 该字段为 false ,配置uid: 'mail'。
If you are using "uid: 'userPrincipalName'" on ActiveDirectory you need to
disable this setting, because the userPrincipalName contains an '@'. allow_username_or_email_login: false
重新加载配置指令

sudo gitlab-ctl reconfigure

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容