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
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Configuring GitLab to use LDAP on an Omnibus installation


In order to have your GitLab server know about the LDAP server we created in the previous recipe, we need to configure it. In this recipe, I'll show you how to do this. We will be using GitLab Omnibus in this recipe.

How to do it…

We perform the following steps to configure GitLab to use LDAP:

  1. Log in via SSH to your GitLab server.

  2. Go to the GitLab configuration folder:

    $ cd /etc/gitlab/
    
  3. Open the gitlab.rb configuration file and add the following information:

    gitlab_rails['ldap_enabled'] = true
    gitlab_rails['ldap_host'] = 'your_ldap_server'
    gitlab_rails['ldap_port'] = 389
    gitlab_rails['ldap_uid'] = 'uid'
    gitlab_rails['ldap_method'] = 'plain' # 'ssl' or 'plain'
    gitlab_rails['ldap_bind_dn'] = 'CN=admin,DC=your,DC=ldap,DC=server'
    gitlab_rails['ldap_password'] = 'your_ldap_admin_pass'
    gitlab_rails['ldap_allow_username_or_email_login'] = true
    gitlab_rails['ldap_base'] = 'DC=your,DC=ldap,DC=server'

    It is important that you keep an eye on the ldap_base...