Docker login to custom Docker registry fails

  docker, docker-image, docker-registry

There’s a custom Docker registry that I’m trying to login in order to upload my Docker image. I’m able to log in to the same custom Docker registry through web UI. But the same fails using docker login command. Let’s take as the custom registry that I’m trying to login to. This is what I’ve tried so far :-

docker login -u demouser

Enter pwd :-

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

Any idea/suggestions on how to login would be useful. Let me know if you need any more info.

Source: StackOverflow