Failed with status: 401 Unauthorized

I was getting the sam:
Error response from daemon: login attempt to https://registry-1.docker.io/v2/ failed with status: 401 Unauthorized

Problem was Proxy environment

I asked Proxy admin to excempt from SSL interception the following:

https for site *.docker.io (I identifiet these 2 in network trace, but possibly there are others: auth.docker.io, registry-1.docker.io)

After implementing this change 'docker login succeeds