image

One solution to frequent ‘unauthorized: authentication required’ errors when pulling Docker images

The problem looked like this:

[root@ci1 ~]# docker image pull wzkres/centos-ci-gcc:centos-7-cross-arm64
centos-7-cross-arm64: Pulling from wzkres/centos-ci-gcc
2d473b07cdd5: Already exists 
9d26d6802cad: Pull complete 
90f6d29b7c1a: Pull complete 
7bfff1b24796: Pull complete 
80b3d4546432: Pull complete 
c3a37398e8b3: Pull complete 
3ba42b3a770d: Pull complete 
85b3405c69c4: Downloading 
2ad9c2d42a3d: Waiting 
5f1b06925eb4: Waiting 
4f4fb700ef54: Waiting 
57c257cf6173: Waiting 
787f48d693d2: Waiting 
9f1677804e77: Waiting 
c13fd6dc43b4: Waiting 
80bd40938514: Waiting 
56ba96a89fa8: Waiting 
unauthorized: authentication required

When pulling public images from hub.docker.com, this error occurred randomly but very frequently, making it almost impossible to download larger images. At first I thought it was a network issue, tried different proxies and mirrors, but nothing helped. Since the error mentioned 'authentication', I suspected Docker Hub login problems and tried docker login -u xxxx, but that did not solve it.

Continue reading…