Hi all,
Just installed GitLab, as I’d like to move away from hosting on GitHub and DockerHub. Loving it so far, and got all my repos pulled in perfectly, worked super easily.
Struggling a bit with the built in container registry however, as I can’t see to connect to it either locally or remotely.
Setup:
User --> Cloudflare --> Traefik Reverse Proxy --> Dedicated VM running GitLab Omnibus
Debian 10 VM (dedicated) that's only available on a local IP
GitLab omnibus installed directly (not containerised)
Running the following command:
docker login -u user registry.example.com
Brings a certificate error:
Error response from daemon: Get https://registry.example.com/v2/: Get https://192.168.11.28/jwt/auth?account=tom&client_id=docker&offline_token=true&service=container_registry: x509: cannot validate certificate for 192.168.11.28 because it doesn't contain any IP SANs
registry settings in gitlab.rb:
registry_external_url 'https://registry.example.com:5050'
### Settings used by GitLab application
gitlab_rails['registry_enabled'] = true
gitlab_rails['registry_host'] = "registry.example.com"
gitlab_rails['registry_port'] = "5000"
gitlab_rails['registry_path'] = "/var/opt/gitlab/gitlab-rails/shared/registry"
registry_nginx settings in gitlab.rb:
registry_nginx['enable'] = true
registry_nginx['proxy_set_headers'] = {
"Host" => "$http_host",
"X-Real-IP" => "$remote_addr",
"X-Forwarded-For" => "$proxy_add_x_forwarded_for",
"X-Forwarded-Proto" => "https",
"X-Forwarded-Ssl" => "on"
}
# When the registry is automatically enabled using the same domain as `external_url`,
# it listens on this port
registry_nginx['listen_port'] = 5050
registry_nginx['ssl_certificate'] = "/etc/gitlab/ssl/cert.name.doesn't.match.URL.pem"
registry_nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/key.name.doesn't.match.URL.key"
Any help would be greatly appreciated as I’ve searched and searched, messed around with loads of stuff and I’m completely stumped at this point.