Skip to content

Cannot create image stream from private registry with secret? #20084

@funsaized

Description

@funsaized

I am trying to pull from a private docker registry hosted on Microsoft Azure and create an image stream from it. I have created a secret with the credentials I am able to pull from the registry with; however, when I run my oc import-image command it tells me i am unauthorized (see below).. Note: I have also tried with the --insecure flag as well.

Version

oc v3.6.173.0.5
kubernetes v1.6.1+5115d708d7
features: Basic-Auth

Server https://ocp.235-365-38-9b22f2.cor00005.cna.ukcloud.com:8443
openshift v3.7.44
kubernetes v1.7.6+a08f5eeb62

Steps To Reproduce
  1. Create secret
oc create secret docker-registry pull-secret-azure --docker-server=zeusConsentRegistry.azurecr.io --docker-username=myUser --docker-password=myPassword --docker-email=myEmail
oc import-image zeusConsentRegistry.azurecr.io/zeusservice-dev:latest --confirm
Current Result
The import completed with errors.

Name:			zeusservice-dev
Namespace:		dev-environment
Created:		Less than a second ago
Labels:			<none>
Annotations:		openshift.io/image.dockerRepositoryCheck=2018-06-22T20:01:02Z
Docker Pull Spec:	docker-registry.default.svc:5000/dev-environment/zeusservice-dev
Image Lookup:		local=false
Unique Images:		0
Tags:			1

latest
  tagged from zeusConsentRegistry.azurecr.io/zeusservice-dev:latest
    will use insecure HTTPS or HTTP connections

  ! error: Import failed (InternalError): Internal error occurred: Get https://zeusConsentRegistry.azurecr.io/v2/zeusservice-dev/manifests/latest: unauthorized: authentication required
      Less than a second ago

error: tag latest failed: Internal error occurred: Get https://zeusConsentRegistry.azurecr.io/v2/zeusservice-dev/manifests/latest: unauthorized: authentication required
Expected Result

Successful image stream created...

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions