I am trying to set up a simple gitlab with SSL.
I have the following set up in a docker-compose.yaml file:
version: '3.6'
services:
gitlab:
image: 'gitlab/gitlab-ee:16.5.1-ee.0'
restart: always
hostname: 'gitlab.env-pri.com'
container_name: gitlab
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'https://gitlab.env-pri.com:8443'
letsencrypt['enable'] = false
nginx['enable'] = true
nginx['redirect_http_to_https'] = true
nginx['ssl_certificate'] = "/etc/gitlab/ssl/gitlab.env-pri.com.crt"
nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/gitlab.env-pri.com.key"
ports:
- '80:80'
- '2224:22'
- '8443:443'
volumes:
- '$GITLAB_HOME/config:/etc/gitlab'
- '$GITLAB_HOME/logs:/var/log/gitlab'
- '$GITLAB_HOME/data:/var/opt/gitlab'
- '/home/user1/gitlab/certs:/etc/gitlab/ssl:ro'
shm_size: '256m'
networks:
- gitlab
networks:
gitlab:
name: gitlab-network
The certs were created(the .crt file is the concatenation of the server.crt, intermediate and the root crt) and then verified by:
openssl verify -CAfile root.crt -untrusted intermediate.crt gitlab.env-pri.com.crt
openssl rsa -noout -modulus -in gitlab.env-pri.com.key | openssl md5
openssl x509 -noout -modulus -in gitlab.env-pri.com.crt | openssl md5
After running the yaml, I check using curl -kv gitlab.env-pri.com:8443
It fails.
I turn of the firewall and ran it again:
curl -kv https://gitlab.env-pri.com:8443
* Rebuilt URL to: https://gitlab.env-pri.com:8443/
* Trying 10.200.13.53...
* TCP_NODELAY set
* Connected to gitlab.env-pri.com (*.*.*.*) port 8443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to gitlab.env-pri.com:8443
curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to gitlab.env-pri.com:8443
OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to gitlab.env-pri.com:8443
curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to gitlab.env-pri.com:8443
Has anyone come across this or does anyone know a fix?