Artifactory registry access - x509: certificate signed by unknown authority

Hello! I am trying to access private container registry but getting following error:

time="2017-10-01T07:24:55.995012105Z" level=warning msg="Error getting v2 registry: Get https://docker.artifactory.abc.net/v2/: x509: certificate signed by unknown authority"

Certificate (ca.crt) is present inside the following path: /etc/docker/certs.d/docker.artifactory.abc.net/

Is above the correct path? Also, does it require any restart?

Perhaps you should try

a) adding the .crt file in /usr/local/share/ca-certificates/
b) running sudo update-ca-certificates (you should see sth like 1 new added in the stdout)

Thanks but i am using RancherOS and i couldn’t find any update-ca-certificates command on the OS.

Did you include the CA cert along with the initial install of RancherOS, or did you add it later? When I install RancherOS, I include it in the cloud-config.yml file. The path you have is correct. If you have added it later, you might try rebooting. I believe the loading of CA certs happens during the boot process.

Sorry guys. This error was coming when i was building Dockerfile for npm and in the build output i was getting that error. The above path which i was using was fine. npm had to be configured with correct SSL path.