x509 certificate signed by unknown authority — docker registry error

You will get to see a lot like this error while working with docker and the VM/Servers that are running behind some proxy or managed by your organization.

Assuming you have the certificate issued by your IT team.

The following steps will help you get rid of this problem :

  1. Convert to .crt openssl x509 -inform DER -in certificate.cer -out certificate.crt
  2. Make extra directory sudo mkdir /usr/share/ca-certificates/extra
  3. Copy certificates over sudo cp certificate.crt /usr/share/ca-certificates/extra/certificate.crt
  4. sudo update-ca-certificates
  5. If not, then you have to do what I did, go to sudo nano /etc/ca-certificates.conf
  6. Scroll down and find your .cer and remove the ! from in front of the file name (update-ca-certificates doc) - if you don't find your certificate run dpkg-reconfigure ca-certificates
  7. Run sudo update-ca-certificates

Also if you are facing an error something like this.

ERROR: toomanyrequests: Too Many Requests.ORYou have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limits. You must authenticate your pull requests.

Also if you are facing an error something like this, then try to log in to your docker account on the machine/Server,

Because according to docker’s latest policy, The rate limits of container image requests per six hours is 100 for anonymous usage, and 200 container image requests per six hours for free Docker accounts. Image requests exceeding these limits will be denied until the six-hour window elapses.

A DevOps who is passionate about Autom@tion.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store