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 ...

Get GitLab Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.