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

docker pull was failed due to "unauthorized: authentication required" #484

Closed
sho-suzuki opened this issue Oct 19, 2017 · 5 comments

Comments

Projects
None yet
3 participants
@sho-suzuki
Copy link

commented Oct 19, 2017

Hi all!

What docker image you are using?

jupyter/all-spark-notebook

What complete docker command do you run to launch the container (omitting sensitive values)?

docker-compose build spark

What do you expect to happen?

pull the image successfully

What actually happens?
my docker-compose.yml as follows

version: '2'
services:
  spark:
    build:
      context: $HOME/dockerfile/spark
      dockerfile: Dockerfile

and command log as follows

docker-compose build spark                                                                                                  
Building spark
Step 1 : FROM jupyter/all-spark-notebook
Trying to pull repository docker.io/jupyter/all-spark-notebook ...
latest: Pulling from docker.io/jupyter/all-spark-notebook
e0a742c2abfd: Pulling fs layer
486cb8339a27: Pulling fs layer
dc6f0d824617: Pulling fs layer
4f7a5649a30e: Pulling fs layer
672363445ad2: Pulling fs layer
b337aaee648d: Pulling fs layer
7f77b4eaa7ff: Pulling fs layer
94e7bffb8046: Pulling fs layer
fa9465212800: Pulling fs layer
79c35484f704: Pulling fs layer
f1756f88332d: Pull complete
e73fef5319c1: Pull complete
f2b4c0f13054: Pull complete
43e4c086805d: Pull complete
5f7d70e73b03: Pull complete
99d4c9a9ea34: Pull complete
f5264c92b99b: Pull complete
5639430738aa: Pull complete
cc5642c54c68: Downloading [======>                                            ] 100.6 MB/778.4 MB
5107f0cbc5e4: Download complete
2847cfad3893: Downloading [=======>                                           ] 63.78 MB/404.6 MB
7b8f9e71437d: Download complete
c70afe92455c: Download complete
cad7770f6c87: Download complete
4a33d6e054a0: Downloading
a227293ed9ac: Waiting
f7690bf06175: Waiting
8838d3da1a80: Waiting
1a4186556ecc: Waiting
09f2d9a8a3ba: Waiting
ed25ef62a9dd: Waiting
ERROR: Service 'spark' failed to build: unauthorized: authentication required

so I deleted the existing spark image and none image
and then, i tryed again, but it fails.

How to solve it?

@parente

This comment has been minimized.

Copy link
Member

commented Oct 21, 2017

This is usually a problem with authenticating or proxying to Docker Hub. See #364 and #357 for past examples and some guidance.

@parente

This comment has been minimized.

Copy link
Member

commented Nov 11, 2017

Closing this issue. It's not an issue with the images or anything we can control.

@parente parente closed this Nov 11, 2017

@sho-suzuki

This comment has been minimized.

Copy link
Author

commented Dec 6, 2017

@parente thanks!
my problem was caused by the host clock.
I fixed the host clock like sudo date -s "28 NOV 2013 hh:mm:ss" and retry it, and then, it was succeed.
ref: moby/moby#2645

@parente

This comment has been minimized.

Copy link
Member

commented Dec 6, 2017

That's good to know. Thanks for sharing the problem and fix.

@souravpatnaik

This comment has been minimized.

Copy link

commented Feb 1, 2018

Solution :

[root@xx ~]# docker pull hello-world
Using default tag: latest
Pulling repository docker.io/library/hello-world
Error while pulling image: Get https://index.docker.io/v1/repositories/library/hello-world/images: authenticationrequired

earlier i have set docker proxy in file /etc/systemd/system/docker.service.d/https-proxy.conf
#[Service]
#Environment="HTTPS_PROXY=http://xxx:8080/"

then i commented this, and sys-reloaded
#sudo systemctl daemon-reload
#sudo systemctl restart docker

then i tried to pull hello-world and i got it.
or
try with correct username, pswd, proxy address...

sometime docker works with proxy also without proxy :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.