Bug 1273412 - pushing the image fails after login to the docker registry
Summary: pushing the image fails after login to the docker registry
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Documentation
Version: 3.0.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: ---
Assignee: Ashley Hardin
QA Contact: Vikram Goyal
Vikram Goyal
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-10-20 12:03 UTC by Jaspreet Kaur
Modified: 2019-08-15 05:42 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-01-19 18:42:55 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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!


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