Docker login fails

I wanted to push an image, so docker told me I had to log in first.
Tried it, but failed.
I can log in at hub.docker.com and here at forums.docker.com just fine with my credentials. But when I use the same ID and password with “docker login”, the error below is shown.

On Ubuntu 16.04 64bit. Pulling images works fine by the way.

Is this a known error? What can I do?
Thanks!

box:~$ 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:
Password:
Error response from daemon: Get https://registry-1.docker.io/v2/: unauthorized: incorrect username or password

box:~$ docker version
Client:
Version: 1.12.5
API version: 1.24
Go version: go1.6.4
Git commit: 7392c3b
Built: Fri Dec 16 02:30:42 2016
OS/Arch: linux/amd64

Server:
Version: 1.12.5
API version: 1.24
Go version: go1.6.4
Git commit: 7392c3b
Built: Fri Dec 16 02:30:42 2016
OS/Arch: linux/amd64

exact same issue for me.

I even don’t want to push, I’m trying to check my config.

Did you find a solution ?

I am encountering the same issue after install docker on my mac.

macOS High Sierra
Client:
Version: 18.03.1-ce
API version: 1.37
Go version: go1.9.5
Git commit: 9ee9f40
Built: Thu Apr 26 07:13:02 2018
OS/Arch: darwin/amd64
Experimental: false
Orchestrator: swarm

Server:
Engine:
Version: 18.03.1-ce
API version: 1.37 (minimum version 1.12)
Go version: go1.9.5
Git commit: 9ee9f40
Built: Thu Apr 26 07:22:38 2018
OS/Arch: linux/amd64
Experimental: true

For docker login you should use your username instead of email (as for web site): https://github.com/docker/hub-feedback/issues/935#issuecomment-300361781

I had a similar issue. By running the following the issue was resolved:

sudo add-apt-repository \

“deb [arch=amd64] Index of linux/ubuntu/
$(lsb_release -cs)
stable”