Error logging in to account via command

Error response from daemon: Get “”: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

Hello @maiconandreis

it seems like a network issue, if you’re in a restricted environment, check the connection by curl this should give you a result like the below:

{"errors":[{"code":"UNAUTHORIZED","message":"authentication required","detail":null}]}

“This is just a troubleshooting step to check the connection, I knew you are trying to use docker login command”

Also, I asked The ChatGPT, and provides me with the troubleshooting steps below:

Here are some steps you can try to resolve the issue:

  • Check your network connection: Make sure your computer is connected to the internet and that there are no issues with your network configuration. Try pinging a website or running a speed test to verify that your internet connection is working properly.

  • Restart Docker daemon: Try restarting the Docker daemon to see if that resolves the issue. You can do this by running the following command in a terminal: sudo systemctl restart docker

  • Increase timeout settings: If the issue persists, you can try increasing the timeout settings for Docker. You can do this by adding the following configuration to your /etc/docker/daemon.json file:

    “max-concurrent-downloads”: 6,
    “max-concurrent-uploads”: 6,
    “max-download-attempts”: 10,
    “debug”: true,
    “log-driver”: “json-file”,
    “log-opts”: {
    “max-size”: “100m”

    After making the changes, restart the Docker daemon and try pulling the image again.

  • Use a different Docker registry: If you’re still having issues, try using a different Docker registry to pull the image. You can find a list of public Docker registries here: HTTP API V2 | Docker Documentation

I hope this helps you resolve the issue.

Mohamed El Eraky

Olá Mohamed
então, eu consigo baixar imagens roda tudo certo… só não consigo fazer o login para que eu possa publicar minha imagem no dockerhub.

realizei os passos acima mas, não tive sucesso!

Please write in English, or use a service like Google Translate to translate the content into English before posting. While at it, please also translate the title of your topic, so others can understand it.

Hello Mohamed
So, I can download images runs all right… I just can’t log in so I can publish my image to DockerHub.

I performed the above steps but was unsuccessful!

I decided to perform some steps: I ran this command: → sudo service docker status to check, but I did not accomplish anything… → sudo update-alternatives --config iptables here yes, I changed the option = 1 - I typed 1 and enter restarted the computer

I went back to the terminal, went back in… sudo docker login, where he asked for my wsl user password and then my dockerhub user and password. Login Succeeded