3

I'm new to Openshift and Docker.

I created a new project on Openshift, and a new image stream as well so I can push a docker image I created to the docker repository inside my Openshift project.

After login in with docker to the registry as explained in the Openshift documentation, and getting a Login succeded message, I went ahead to tag my image, and push it to the image stream, only to get a message stating Unauthorized: authentication required.

sudo docker login -u `oc whoami` -p `oc whoami -t` registry.starter-us-east-1.openshift.com

sudo docker tag test:latest registry.starter-us-east-1.openshift.com/rolabot/test

sudo docker push registry.starter-us-east-1.openshift.com/rolabot/test

This last command returns

3ea53db680fc: Pushing [==================================================>]  12.8 kB
54f43adb4662: Pushing 1.536 kB
49907af65b0a: Pushing [==================================================>] 3.072 kB
4589f96366e6: Pushing [==================================================>] 5.632 kB
b97229212d30: Pushing 14.85 kB
cd181336f142: Waiting 
0f5ff0cf6a1c: Waiting 
unauthorized: authentication required
Derek Brown
  • 4,232
  • 4
  • 27
  • 44
ChemiCalChems
  • 612
  • 12
  • 31

1 Answers1

1

To me, it seems like this is an issue with the upstream Docker Registry cache in Origin. This seems to be a known issue in minishift, but the remedies they have found are not possible (as you don't have the necessary permissions) on Openshift Online. I would open a new support ticket with Red Hat, so that they can take a look.

Derek Brown
  • 4,232
  • 4
  • 27
  • 44
  • I hope this is not the case. I'll see if i can ask for support tomorrow, even though I'm a free member, so I don't know how that'll go. I'll make sure to mark this answer as accepted if it comes to that, but I'll wait for more answer in the meanwhile. Thank you very much for your support. – ChemiCalChems Oct 23 '17 at 20:33
  • @ChemiCalChems you can also maybe open an issue on GitHub Issues. They are responsive there as well. – Derek Brown Oct 23 '17 at 22:14
  • 1
    @ChemiCalChems you can try deploying via hub.docker.com as a workaround. It is the main repo and it is free for public repositories. It can automatically do a docker build from GitHub or BitBucket repo. If you don't want it to build your image you can simply push from local by tagging as "username/blah:tag" then push and as long as the "username" matches your account it works. See the first section of this doc for example of pushing a local build https://github.com/simbo1905/cu-final-mssql/blob/master/meetup.md#checkout-and-build-the-code-using-net-core-aka-dotnet – simbo1905 Oct 24 '17 at 07:48
  • @simbo1905 While this workaround is far from optimal, it works! I can now use the image in an app, though I'm having problems with it being deployed, but that has nothing to do with this question. If you are willing to post an answer, I'll mark it as accepted. Thank you very much for your time. – ChemiCalChems Oct 24 '17 at 15:08
  • 1
    @ChemiCalChems your welcome. My answer isn't really a fix so please just vote up my comments and I will get a point or two. – simbo1905 Oct 26 '17 at 19:43