Docker Community Forums

Share and learn in the Docker community.

Docker registry login fails with error "certificate signed by unknown authority"

I am using Gitlab for CI/CD pipleline solution

As part of this, I would like to use the docker registry to build/upload/manage images. However, when I try to login to the registry its giving above error message. Tried various feedback from forums but to no avail. I have run out of ideas :frowning:

Version details

Client:
Version: 19.03.11
API version: 1.40
Go version: go1.13.12
Git commit: dd360c7
Built: Mon Jun 8 20:23:26 2020
OS/Arch: linux/amd64
Experimental: false

Server:
Engine:
Version: 19.03.11
API version: 1.40 (minimum version 1.12)
Go version: go1.13.12
Git commit: 77e06fd
Built: Mon Jun 8 20:24:59 2020
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: v1.2.13
GitCommit: 7ad184331fa3e55e52b890ea95e65ba581ae3429
runc:
Version: 1.0.0-rc10
GitCommit:
docker-init:
Version: 0.18.0
GitCommit: fec3683

Daemon config file
{ "tlscert": "/etc/docker/certs.d/gitlab.local.io:5050/gitlab.local.io.pem", "tlskey": "/etc/docker/certs.d/gitlab.local.io:5050/gitlab.local.io.key", "debug": true, "log-level": "debug", "log-driver": "syslog", "storage-driver": "overlay2" }

Login error
docker -D --tlsverify --tlscert gitlab.local.io.cert login -u gitlab-ci-token -p XXXXXXXXXXX https://gitlab.local.io:5050 WARNING! Using --password via the CLI is insecure. Use --password-stdin. DEBU[0000] FIXME: Got an status-code for which error does not match any expected type!!!: -1 module=api status_code=-1 Warning: failed to get default registry endpoint from daemon (Cannot connect to the Docker daemon at tcp://localhost:2376. Is the docker daemon running?). Using system default: https://index.docker.io/v1/ DEBU[0000] FIXME: Got an status-code for which error does not match any expected type!!!: -1 module=api status_code=-1 DEBU[0000] hostDir: /etc/docker/certs.d/gitlab.local.io:5050 DEBU[0000] attempting v2 login to registry endpoint https://gitlab.local.io:5050/v2/ INFO[0000] Error logging in to v2 endpoint, trying next endpoint: Get https://gitlab.local.io:5050/v2/: x509: certificate signed by unknown authority Get https://gitlab.local.io:5050/v2/: x509: certificate signed by unknown authority

Thanks in advance