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 }}
This repository has been archived by the owner on Mar 22, 2018. It is now read-only.
The “The Registry" chapter seems to assume a registry with no authentication.
With registry.access.redhat.com/openshift3/ose-docker-registry , already the first curl sanity check fails with
< HTTP/1.1 401 Unauthorized
< Content-Type: application/json; charset=utf-8
< Docker-Distribution-Api-Version: registry/2.0
< Www-Authenticate: Basic realm=openshift,error="authorization header with basic token required"
< Date: Mon, 10 Aug 2015 16:35:17 GMT
< Content-Length: 114
<
{"errors":[{"code":"UNAUTHORIZED","message":"access to the requested resource is not authorized","detail":null}]}
which makes sense, because registry.access.redhat.com/openshift3/ose-docker-registry image 1bfb53ecd402 contains
auth:
openshift:
realm: openshift
in /config.yml.
With this registry, a simple “docker push $REGISTRY/openshift/ruby-hello-world” as root does not work. Root / system:admin perhaps has the permissions, but docker authentication needs an openshift OAuth token, and I don’t know how system:admin can get one. (Just adding system:admin to htpasswd won’t work because : is a field separator in htpasswd.)
I had to
oadm policy add-role-to-user admin alice -n openshift
(perhaps “edit” would suffice?)
(su - alice), then (oc whoami -t)
As root, (docker login $REGISTRY) as alice, with the token above as password, and random e-mail
Then the push worked.
The text was updated successfully, but these errors were encountered:
Just want to add a +1 here to include this somewhere in the docs -- I had been trialling atomic registry without auth, and when I was sufficiently sure I was going to stick with it... I added auth, and then.... Didn't have access to push to my registry, so I had to follow the same procedure to give someone admin access e.g.
The “The Registry" chapter seems to assume a registry with no authentication.
With registry.access.redhat.com/openshift3/ose-docker-registry , already the first curl sanity check fails with
which makes sense, because registry.access.redhat.com/openshift3/ose-docker-registry image 1bfb53ecd402 contains
in /config.yml.
With this registry, a simple “docker push $REGISTRY/openshift/ruby-hello-world” as root does not work. Root / system:admin perhaps has the permissions, but docker authentication needs an openshift OAuth token, and I don’t know how system:admin can get one. (Just adding system:admin to htpasswd won’t work because : is a field separator in htpasswd.)
I had to
(perhaps “edit” would suffice?)
The text was updated successfully, but these errors were encountered: