oc import-image returns with x509 certificate error in OCP 4

Solution Verified - Updated -

Issue

  • When running # oc import-image image-name--confirm I get this error message:
error: tag latest failed: Internal error occurred: Get https://registry-1.docker.io/v2/: x509: certificate is valid for *x.y.z.org, not registry-1.docker.io

Environment

  • Red Hat OpenShift Container Platform 4.2

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In