You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cannot import an image from internal registry if source and destination projects differ #7985
Cannot import image from internal registry due to:
Reason:"Unauthorized", Message:"you may not have access to the Docker image \"172.30.163.69:5000/extended-test-imagequota-admission-6znr2-shared/src@sha256:bb08da7a0b99af72aebe0ead77009d28771a30dbe4d99f49bf3d29407c72e48f\""
Steps To Reproduce
deploy a registry
create two projects with the same user (e.g. foo and bar)
build an image or manually push it to some image stream in the first project (e.g. foo/randdata@sha256:c8956f7fc18eb5a99a0bbf62c91d90ccd7cf16ec21f15ca901713c04d26)
The import completed successfully.
Name: newis
Created: Less than a second ago
Labels: <none>
Annotations: openshift.io/image.dockerRepositoryCheck=2016-03-14T10:47:27Z
Docker Pull Spec: 172.30.104.152:5000/foo/randdata
Tag Spec Created PullSpec Image
latest 172.30.104.152:5000/foo/randdata@sha256:c8956f7fc18eb5... Less than a second ago import failed: you may not have access to the Docker image "172.30....
! tag is insecure and can be imported over HTTP or self-signed HTTPS
Expected Result
The import completed successfully.
Name: another
Created: Less than a second ago
Labels: <none>
Annotations: openshift.io/image.dockerRepositoryCheck=2016-03-14T10:57:37Z
Docker Pull Spec: 172.30.104.152:5000/foo/randdata
Tag Spec Created PullSpec Image
latest 172.30.104.152:5000/foo/randdata@sha256:c8956f7fc18eb5... ! Less than a second ago <same> <same>
! tag is insecure and can be imported over HTTP or self-signed HTTPS
Additional Information
It's working if the source and destination namespace are the same.
Activity
miminar commentedon Mar 14, 2016
/cc @soltysh
liggitt commentedon Mar 18, 2016
I think you have to grant permissions to the other namespace's service accounts to pull
liggitt commentedon Mar 18, 2016
oc policy-add-role-to-group system:image-puller system:serviceaccounts:bar -n foosoltysh commentedon Mar 18, 2016
Just checked - it works. @miminar mind closing this.
miminar commentedon Mar 18, 2016
Is this really the way how it's supposed to work? It's super confusing. We should at least document it somewhere.
liggitt commentedon Mar 18, 2016
if you want project A to be able to pull from project B's image streams? yes... you need to grant it permission
soltysh commentedon Mar 18, 2016
@miminar your wish is my command openshift/openshift-docs#1765
miminar commentedon Mar 18, 2016
@soltysh you're my hero.