I can acess harbor in web browser without problem and my certicate is ok but I have error on docker login
Versions:
Please specify the versions of following systems.
sudo amazon-linux-extras enable docker
sudo amazon-linux-extras install docker -y
Additional context:
no error in logs
docker login my.intranet.com
Username: admin
Password: Harbor12345
Error response from daemon: Get https://my.intranet.com/v2/: x509: certificate signed by unknown authority
This means your docker client does not trust the certificate of "my.intranet.com"
You need to put the root cert on the host of the docker client.
More details please refer to:
https://docs.docker.com/engine/security/certificates/
Closing this one out @jcmartins – please don't hesitate to ping us if you have any more questions. Happy to re-open if needed.
@jcmartins
were you able to find a workaround?
I have the same problem.
Does any one know, how this was fixed?
I followed this link: https://docs.docker.com/engine/security/certificates/ but it does not work at all.
Did you try to restart docker.service in client? First of all, install your Harbor private CA certificate in client machine. Then, restart docker in that client machine also. For instance, in Ubuntu 18.04:
scp harborhost:/harbor/cert/path/ca.crt /usr/local/share/ca-certificate/ca.crt
sudo update-ca-certificates
sudo systemctl restart docker.service
I think that harbor document should supplement this in https://goharbor.io/docs/2.0.0/install-config/configure-https/ or https://goharbor.io/docs/2.0.0/install-config/troubleshoot-installation#https.
You can simply solve it when you add to harbor.yml config file before installation in _certificate_ option path to intermediate certificate file which contents server certificate and CA certificate afterwards. After installation this certs are copied somewhere to _
Most helpful comment
@jcmartins
were you able to find a workaround?
I have the same problem.