Securing gitlab url

Install Open SSL Certificate in Gitlab

Install Open SSL Certificate, If you want to secure your Gitlab URL, You will have to use an SSL certificate for securing URL. Here I will use Openssl Certificate for securing my git-lab server URL.

I have already configured Git-lab Server here is the article Install Gitlab

Check Out: Change Gitlab Backup Path Location In Gitlab Server

Let’s Begin

First, we will setup Openssl and install the certificate on the git-lab server.

yum install openssl -y

Now I’m going to create a private key with 2048 bit

openssl genrsa -out abc.key 2048

Create a CSR key using the private key

openssl req -new -key abc.key -out abc.csr

Check Out: How To Reset Gitlab Root Password

Finally, we will create a CRT key

openssl x509 -req -days 365 -in abc.csr -signkey abc.key -out abc.crt

Now you have all the keys for securing the Git-lab URL.

Keys are abc.key, abc.csr & abc.crt

Now create a directory where all the key will be kept.

Copy the keys to the folder SSL.

Check Out: How To Disable Signup Option On Frontend Gitlab Server

Now go the file git-lab file to install the certificate

vim /etc/gitlab/gitlab.rb

Look for Nginx & you will have to enable Nginx here

Default Settings,

Changed to

Add https service in firewall

After these all changes you must have to run the below command to make changes in a file

gitlab-ctl reconfigure

As you can see URL has secured with HTTPS

YouTube Link: Secure Gitlab URL

You’re done

Rate this article

Leave a Reply

avatar
  Subscribe  
Notify of