Received unexpected EOF while logging in using docker login

I am behind a corporate proxy and I did

sudo docker login

Provided an username $oauthtoken
When i copied the Token

I get the error “Error response from daemon: Get unexpected EOF”

I manually typed the password, but still I get the response. Please let me know what could be done.

I have set the proxy in the docker daemon.