Docker Desktop Login

I am unable to get Docker desktop to log into my account. It’s just a personal account but when I try to sign in it takes me to the website ( where I sign in ), then it opens the application back up and says that it is “Processing login data…” , then after a minute or two it says “You are signed out.” I have deleted the application and AppData regarding Docker and tried all over again. Using Windows 11. Am I missing something? Any ideas? If I try to login via CLI it says “Waiting for authentication in the browser…” and brings up the same screen.

If you use the command line, try it in powershell or CMD if it doesn’t work from a WSL distro. Or sometimes there could be issues with Docker Hub, but I didn’t hear about that today.

You can try the troubleshooting guide as a first step to ru some diagnostics and check the logs

Okay, for instance here’s what I get with Powershell. I was able to get logged in on the browser no problem. “Waiting for authentication in the browser…
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)”

When trying to use CLI login like “docker login -u {username}” I get “Error response from daemon: Get “https://registry-1.docker.io/v2/”: context deadline exceeded”

There are no firewall or dns issues hindering me either

docker pull hello-world
Using default tag: latest
Error response from daemon: failed to resolve reference docker.io/library/hello-world:latest: failed to do request: Head https://registry-1.docker.io/v2/library/hello-world/manifests/latest: writing response to registry-1.docker.io:443: connecting to : dial tcp : connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

Network related things could be caused by anything. For instance, we had people in the past that modifed their host’s host file entries so a different ip was resolved, or had tls inspection or a http proxy enforced in their company network.

This command should work in a Windows PowerShell Terminal on your host:

$hostname = "registry-1.docker.io"
$port = 443

# Create a TCP client and connect
$tcpClient = New-Object System.Net.Sockets.TcpClient
$tcpClient.Connect($hostname, $port)

# Create an SSL stream
$sslStream = New-Object System.Net.Security.SslStream($tcpClient.GetStream(), $false, ({$true}))
$sslStream.AuthenticateAsClient($hostname)

# Retrieve certificates
$sslStream.RemoteCertificate | Format-List *

# Close connection
$sslStream.Close()
$tcpClient.Close()

The output should look like this:

Handle  : 1924032897888
Issuer  : CN=Amazon RSA 2048 M02, O=Amazon, C=US
Subject : CN=*.docker.com

Next thing to try is how it behaves from inside the Docker Engine environment.
Run this command in a Windows PowerShell Terminal on your host:

docker run -it --rm --privileged --pid=host justincormack/nsenter1

The terminal prompt should change to sh-5.2#. Execute following command there:

openssl s_client -showcerts -connect registry-1.docker.io:443 </dev/null

Everything works as expected until I try to run that docker image at which point I get the same error as mentioned above

Oh my gosh I FINALLY figured it out. A while back I had configured a proxy for my computer. However, it was completely disabled everywhere. It was disabled in “Proxy settings” and in LAN settings in control panel. For some reason, it was holding onto the proxy even though it was completely disabled everywhere and there were no environment variables set related to the proxy. I had to go into control panel and LAN settings and enable the proxy and delete out any IP and then disable again. I don’t know if I have some sort of file corruption on the computer or if there is some issue but once I did this, everything started working for me

1 Like