Gitlab-CE Ldap authentication

Published by as_blog_ad on

Gitlab offers the flexibility to manageĀ a large number of user accounts with multiple LDAP services such as Microsoft ACtive directory as well as OpenLDAP,389-ds etc.

In this article, we would demonstrate how to enable LDAP authentication using the 389-ds Directory server with gitlab-ce.


Gitlab’s configuration file is in “etc/gitlab”


edit gitlab.rb.

Go to the last line of the file and add the below content.

Please note YAML file needs to be aligned correctly in order to work. if there are space issues it might not function correctly.

the section main has one space and everything below main has two spaces in each line. EOS does not have any spaces.



Save the file and reconfigure Ldap.

Wait for the reconfiguration to complete.

Now let’s check the Ldap users.

you will see if the server is able to fetch the user details from your LDAP server.


If there are any binding issues you will see error messages like this.

if all goes well it will list all users within the OU People.



Categories: Tutorials