Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Required to login to pull public images? #1103

Closed
magick93 opened this issue Jul 19, 2017 · 26 comments
Closed

Required to login to pull public images? #1103

magick93 opened this issue Jul 19, 2017 · 26 comments
Labels

Comments

@magick93
Copy link

Why is it that I am required to login to pull a public image, for example:

docker pull  wodby/drupal-php:7.1-2.4.4

Please login prior to pull:
Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https://hub.docker.com to create one.

I have never had to do this before.

@Johannestegner
Copy link

I started seeing this a couple of days ago too, but not for all images, and just for some tags on some images.

For example, I could use FROM alpine:latest in a Dockerfile but not FROM alpine:3.6.
Is this intended (I mean that we have to be logged in to pull) or is this a bug?

@v9Chris
Copy link

v9Chris commented Jul 26, 2017

Had a similar issue halfway through today (pulled several times fine and then all of a sudden...)

Step 1/15 : FROM ubuntu:16.04
ERROR: Service 'wagtail' failed to build: Get https://registry-1.docker.io/v2/library/ubuntu/manifests/16.04: unauthorized: incorrect username or password

I had to docker login to get it to work, never had to login for any repo in the past and not sure why this happened halfway through multiple clean builds.

@MatMaul
Copy link

MatMaul commented Aug 2, 2017

Same here. This is really annoying, especially with skopeo which just get stuck in this case.
My public image is matmaul/kubernetes-kubelet:test.
One of the problematic layer is 8b56dcf16c5ac86dc93a383f5613d6557415639104ae3d01fc00fb3226125a68 for example.

@marcusmartins
Copy link

Hi - to help us troubleshoot, can you share your Docker version?

@MatMaul
Copy link

MatMaul commented Aug 2, 2017

It was with skopeo and it got stuck on this layer. I saw a 401 in debug mode.
Last skopeo version of f25.
And now of course I can't reproduce. Perhaps some eventual-consistency issues in the ACLs of the layers ?
I'll try to have a more comprehensive test case tomorrow by pushing and trying right after.

Thanks for the feedback.

@ericcurtin
Copy link

Just got this same issue:

>docker pull curtine/sxx:centos6

Please login prior to pull:
Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https://hub.docker.com to create one.
Username (curtine): ^C
> docker version
Client:
 Version:      17.05.0-ce
 API version:  1.29
 Go version:   go1.7.5
 Git commit:   89658be
 Built:        Thu May  4 22:10:54 2017
 OS/Arch:      linux/amd64

Server:
 Version:      17.05.0-ce
 API version:  1.29 (minimum version 1.12)
 Go version:   go1.7.5
 Git commit:   89658be
 Built:        Thu May  4 22:10:54 2017
 OS/Arch:      linux/amd64
 Experimental: false

@ericcurtin
Copy link

I have to login for every pull at the moment for some reason?

It seemed to start when I changed my dockerhub password..

@artischocke
Copy link

Same

Client:
 Version:	17.12.0-ce
 API version:	1.35
 Go version:	go1.9.2
 Git commit:	c97c6d6
 Built:	Wed Dec 27 20:11:19 2017
 OS/Arch:	linux/amd64

Server:
 Engine:
  Version:	17.12.0-ce
  API version:	1.35 (minimum version 1.12)
  Go version:	go1.9.2
  Git commit:	c97c6d6
  Built:	Wed Dec 27 20:09:53 2017
  OS/Arch:	linux/amd64
  Experimental:	false

@ericcurtin
Copy link

A docker login fixes it... But wonder why you have to login to pull public images

@adewes
Copy link

adewes commented May 10, 2018

For me the problem was that I had an (apparently expired) authentication token in my ~/.docker/config.json file, which the daemon then tried to use to pull the image from Dockerhub. Deleting the file resolved the problem. If you have the same problem try removing the file.

@ericcurtin
Copy link

ericcurtin commented May 11, 2018

@adewes thanks for the info, I suspect that's what happens in my case the authentication token was not longer valid.

I apologize for repetition but why do you need a valid auth token to pull a public image that does not require authentication?

@adewes
Copy link

adewes commented May 11, 2018

@ericcurtin you don't need a valid auth token to pull a public image, but if the Docker client finds an auth token it will probably use it to pull images as I think it can't distinguish between a public and a non-public image on Dockerhub based on the image name/path alone.

You could configure the Docker client to not automatically use a credential from your home directory (https://docs.docker.com/engine/reference/commandline/login/#privileged-user-requirement), by default it seems that it will always use it though when available.

@nixbytes
Copy link

nixbytes commented Jul 7, 2018

just curious why do docker need login and account info? is this required for CE edition or open source project?

@kurtfm
Copy link

kurtfm commented Sep 21, 2018

A quick way to remove the old credential is to run docker logout .. if you really need to you can run docker login after that.

@luthor112
Copy link

luthor112 commented Nov 12, 2018

The same problem still occurs in November 2018 on version 18.09.0.

Edit: Configuring a proxy for the Docker daemon solved the issue for me, as stated at community.ubnt.com.

@vinchauhan
Copy link

vinchauhan commented Nov 25, 2018

Changed the password for docker hub but the cli still cant access the public images. I tried restarting docker app on windows but still no luck. I new password works on docker hub but not on

docker login

Frustrating...!

@vinchauhan
Copy link

Changed the password for docker hub but the cli still cant access the public images. I tried restarting docker app on windows but still no luck. I new password works on docker hub but not on

docker login

Frustrating...!

It worked later when I used docker id as username and not email

@DMCHatRally
Copy link

Whether or not logged in, it won't let me pull a public Python image.

@vinchauhan
Copy link

@DMCHatRally try login with docker username and not email

@JoshBowdenConcepts
Copy link

I am running into the same issue.

@brandonfl
Copy link

brandonfl commented May 19, 2019

Same here

Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https://hub.docker.com to create one.

On a pull of a public image ...

@punkosu
Copy link

punkosu commented Oct 7, 2019

I just noticed that if I use "centos7" I get the login error, but "centos:7" works fine. Just in case someone else runs into this same issue.

@divadsn
Copy link

divadsn commented Oct 13, 2020

As this issue still is open (although a solution has been posted, thank you @adewes), could I suggest adding a fallback, so public images can still be pulled even with an expired auth token?

@github-actions
Copy link

github-actions bot commented Jun 2, 2021

We are clearing up our old issues and your ticket has been open for 6 months with no activity. Remove stale label or comment or this will be closed in 15 days.

@github-actions github-actions bot added the Stale label Jun 2, 2021
@AlbertoMQ
Copy link

This is still an issue

@ericcurtin
Copy link

I've since moved to podman and quay.io, having great joy! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests