Configuring a self-signed SSl certificate

The easiest way is not to attempt to set the certificates manually in gitlab.rb, but do this instead:

external_url "https://git.mydomain.ru"
nginx['redirect_http_to_https'] = true
letsencrypt['enable'] = false

assuming that git.mydomain.ru is the name of your server, then do:

mkdir /etc/gitlab/ssl

and in this directory put the SSL certificate and key files, so that they are named the same as your server, so:

git.mydomain.ru.crt
git.mydomain.ru.key

then do:

gitlab-ctl reconfigure

I do this, with self-signed, or even with commercial certificates that I purchased, and it works every time. The key part, is putting the certs in /etc/gitlab.ssl and making sure they are the same name as your server FQDN as the example above.

1 Like