LDAP Authentication With Gitlab Server Using Active Directory

LDAP Authentication With Gitlab Server

LDAP Authentication with GitLab, When you’re worried about the security on the git-lab server. It’s a good idea to authenticate the users using the LDAP server. So, Nobody can log in to your git-lab server until their account exists on the AD server. We can configure the GitLab server with active directory or LDAP on Linux.

Check Out: Install Gitlab

Note: You must have LDAP Server configured and both servers should be communicated to each other.

Gitlab Provides you to Authenticate users with AD Server. Once you did it. You won’t see admin user because by default everyone will be Admin privileges before integrating this with AD. So You will have to make any user to admin by command line.

Check Gitlab Server Status

gitlab-ctl status

Create an Organisational Unit in AD server For Gitlab Server

Under OU IT, I have created a user “git” & “panki” and created a password for both the users.

Check Out: How To Disable Signup On Gitlab

Go the vim /etc/gitlab/gitlab.rb file and look for LDAP

You must have OU, CN, DC, User & password Values to accomplish this work.

As you can see I have these all defined in the below images.

configure gitlab with ldap

Once you are done with these settings then do not forget to run the below command otherwise changes will not be done.

Check OutRedirection HTTP To HTTPS

gitlab-ctl reconfigure

After these configured, You can check your settings are correct with LDAP

gitlab-rake gitlab:ldap:check

You will see the output like this it means your GitLab server is communicating with LDAP Server.

gitlab with active directory

If you do not see any user here it means you need to check your settings again.

Check Out: Check Logs In Git

Go to your Gitlab Server and try to login with an AD user.

ldap with gitlab

Now see I’m able to login with “Panki”  User in GitLab server

YouTube Link: LDAP authentication GITLAB

You’re done gitlab with active directory configure ldap

Share on:

I'm the founder of Curious Viral. I hope this blog will provide you complete information about Linux Technology & I would like to share my technical knowledge with you which I have learned during this period.

Other Posts You May Like...

Leave a comment