I am trying to login to a company's private docker repository. When I try to login with:
docker login docker.abc.xyz.net
it returns only this error:
Error response from daemon: Get https://docker.abc.xyz.net/v1/users/: x509:  certificate is valid for *.xyz.net, xyg.net, not docker.abc.xyz.net
We have a ca.cert, which I have put at the following location:
/Users/myName/etc/docker/certs.d/docker.abc.xyz.net/ca.cert
I also tried putting it here:
/private/etc/docker/certs.d/docker.abc.xyz.net/ca.cert
and finally used this command to try to get keychain access for the cert:
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain ca.crt
I even gave full access to the cert to see if that would be picked up. I have tried restarting docker as well, but nothing is accepting my certificate. Does anyone else have any ideas what might be preventing the login attempt on Docker Mac?
--------------
Certificate:
    Data:
        Version: 3 (0x2)
        Serial Number:
            6c:ac:dd:00:bf:96:38:c3
        Signature Algorithm: sha256WithRSAEncryption
        Issuer: CN=ON DWCC Unclass Testing CA-1
        Validity
            Not Before: Jun  6 19:40:49 2016 GMT
            Not After : Jun  6 19:40:49 2018 GMT
        Subject: C=US, O=Navy, OU=ONI, CN=docker.abc.xyz.net
        Subject Public Key Info:
            Public Key Algorithm: rsaEncryption
            RSA Public Key: (2048 bit)
                Modulus (2048 bit):
                Exponent: 65537 (0x10001)
        X509v3 extensions:
            X509v3 Subject Key Identifier: 
            X509v3 Basic Constraints: critical
                CA:FALSE
            X509v3 Authority Key Identifier: 
                keyid:
            X509v3 Key Usage: critical
                Digital Signature, Key Encipherment
            X509v3 Extended Key Usage: 
                TLS Web Server Authentication, TLS Web Client Authentication
            X509v3 Subject Alternative Name: 
                DNS:docker.abc.xyz.net
    Signature Algorithm: sha256WithRSAEncryption