Configuring GitLab to use LDAP on a source installation
In this recipe, we will configure your GitLab source installation to use the LDAP server.
How to do it…
We perform the following steps to use LDAP on a source installation:
Log in via SSH to your GitLab server.
Go to the directory with the
gitlab.yml
configuration file:$ cd /home/git/gitlab/config/
Open the
gitlab.yml
file and find theldap
section.Change
enabled: false
toenabled: true
.Change the following information:
host: '_your_ldap_server' port: 636 uid: 'uid' method: 'plain' # "tls" or "ssl" or "plain" bind_dn: 'CN=admin,DC=your,DC=ldap,DC=server' password: '_the_password_of_the_bind_user' base: 'DC=your,DC=ldap,DC=server'
It is important that you keep an eye on the
base
and thebind_dn
values. They need to be in a format that LDAP understands. For example, if your domain isldap.jvanbaarsen.com
, the value needs to be'DC=ldap,DC=jvanbaarsen,DC=com'
. If you don't use a subdomain and your domain isjvanbaarsen.com
, the value would...