Bug 1273412 - pushing the image fails after login to the docker registry
pushing the image fails after login to the docker registry
Status: CLOSED CURRENTRELEASE
Product: OpenShift Container Platform
Classification: Red Hat
Component: Documentation (Show other bugs)
3.0.0
Unspecified Unspecified
low Severity low
: ---
: ---
Assigned To: Ashley Hardin
Vikram Goyal
Vikram Goyal
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-20 08:03 EDT by Jaspreet Kaur
Modified: 2016-01-21 23:40 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-01-19 13:42:55 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jaspreet Kaur 2015-10-20 08:03:36 EDT
Document URL: https://access.redhat.com/documentation/en/openshift-enterprise/version-3.0/installation-and-configuration/#access

Section Number and Name: 2.5.5. Accessing the Registry

Describe the issue: After login to docker registry it fails when pushing the image :

docker login -u adminuser -e adminuser@email.com -p EZj3BAkB1ka5MVwwtATTluJ6-5uZKBiB1e-LeE0wtHQ 172.30.233.178:5000
WARNING: login credentials saved in /root/.docker/config.json
Login Succeeded
[root@opeshift3node1 ~]# docker push 172.30.233.178:5000/openshift/busybox
The push refers to a repository [172.30.233.178:5000/openshift/busybox] (len: 1)
0064fda8c45d: Image push failed

Please login prior to push:
Username (sudhir): adminuser
WARNING: login credentials saved in /root/.docker/config.json
Login Succeeded
The push refers to a repository [172.30.233.178:5000/openshift/busybox] (len: 1)
0064fda8c45d: Image push failed
Error pushing to registry: Authentication is required.


Suggestions for improvement: 

Below steps helped to resolve the issue which are additional :

In order to push images into the OpenShift Docker registry, an account must have the image-builder security role. Add this to your admin user:

   # oadm policy add-role-to-user system:image-builder sudhir

- Next, add the admin (administrative) role to the user in the special “openshift” project. This will allow the admin user to be able to edit the “openshift” project - in this case, to push the Docker images.
 
    # oadm policy add-role-to-user admin sudhir -n openshift

Below steps worked perfectly fine.

 docker login -u adminuser -e adminuser@email.com -p EZj3BAkB1ka5MVwwtATTluJ6-5uZKBiB1e-LeE0wtHQ 172.30.233.178:5000

 docker push 172.30.233.178:5000/openshift/busybox



Additional information:
Comment 3 Ashley Hardin 2016-01-11 13:44:25 EST
Work has started here. See PR for latest comments: https://github.com/openshift/openshift-docs/pull/1402. Still WIP.
Comment 4 openshift-github-bot 2016-01-14 13:04:33 EST
Commits pushed to master at https://github.com/openshift/openshift-docs

https://github.com/openshift/openshift-docs/commit/87e7b0d5ab18fc0a0b489aad0e7cc1e4d9d1e152
Bug 1273412, combined prerequisites for accessing registry

https://github.com/openshift/openshift-docs/commit/15a1d76b3229cadb8472771fb0d4bf8bab33b01d
Merge pull request #1402 from ahardin-rh/access-registry

Bug 1273412, update user requirements for accessing registry
Comment 5 Ashley Hardin 2016-01-19 13:42:55 EST
Updated documentation is here:
https://docs.openshift.com/enterprise/3.1/install_config/install/docker_registry.html#access

I took some frankensteined access resistry/login details out of the Overview statement and streamlined them into a reworked Accessing the Registry Directly section, which now includes subsections. 

Please reopen if there are further issues. Thanks!

Note You need to log in before you can comment on or make changes to this bug.