Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1273412

Summary: pushing the image fails after login to the docker registry
Product: OpenShift Container Platform Reporter: Jaspreet Kaur <jkaur>
Component: DocumentationAssignee: Ashley Hardin <ahardin>
Status: CLOSED CURRENTRELEASE QA Contact: Vikram Goyal <vigoyal>
Severity: low Docs Contact: Vikram Goyal <vigoyal>
Priority: low    
Version: 3.0.0CC: adellape, aos-bugs, jokerman, mmccomas
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-01-19 18:42:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jaspreet Kaur 2015-10-20 12:03:36 UTC
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 -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 -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 18:44:25 UTC
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 18:04:33 UTC
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 18:42:55 UTC
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!