Book Image

GitLab Cookbook

By : Jeroen van Baarsen
Book Image

GitLab Cookbook

By: Jeroen van Baarsen

Overview of this book

Table of Contents (16 chapters)
GitLab Cookbook
About the Author
About the Reviewers

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:

  1. Log in via SSH to your GitLab server.

  2. Go to the directory with the gitlab.yml configuration file:

    $ cd /home/git/gitlab/config/
  3. Open the gitlab.yml file and find the ldap section.

  4. Change enabled: false to enabled: true.

  5. 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 the bind_dn values. They need to be in a format that LDAP understands. For example, if your domain is, the value needs to be 'DC=ldap,DC=jvanbaarsen,DC=com'. If you don't use a subdomain and your domain is, the value would...