Docker Community Forums

Share and learn in the Docker community.

Can't login to docker hub by command

can’t login to my docker account via command

i keep getting this

[root@server ~]# docker login
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: (username)
Password:
Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
[root@server ~]#

version
Cent OS 7
docker version
Client: Docker Engine - Community
Version: 19.03.13
API version: 1.40
Go version: go1.13.15
Git commit: 4484c46d9d
Built: Wed Sep 16 17:03:45 2020
OS/Arch: linux/amd64
Experimental: false

Server: Docker Engine - Community
Engine:
Version: 19.03.13
API version: 1.40 (minimum version 1.12)
Go version: go1.13.15
Git commit: 4484c46d9d
Built: Wed Sep 16 17:02:21 2020
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.3.7
GitCommit: 8fba4e9a7d01810a393d5d25a3621dc101981175
runc:
Version: 1.0.0-rc10
GitCommit: dc9208a3303feef5b3839f4323d9beb36df0a9dd
docker-init:
Version: 0.18.0
GitCommit: fec3683

anyone have any ideas still can’t get this to work…???

I had a similar problem.

# docker login -u jesdynf -p <wrong password>
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
Error response from daemon: Get https://registry-1.docker.io/v2/: unauthorized: incorrect username or password

Asher@DESKTOP-O955E5R E:\Repositories\openemr-devops\docker\openemr\6.0.0
# docker login -u jesdynf -p <right password>
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

Apparently the issue was that I had to log into Docker Desktop through the GUI – once I did so I was able to push images. All attempts to log in via the CLI failed as described. Dunno if this is relevant but it’s all I’ve got.

I have a similar issue when trying to login from AWS