Open ebriney opened 6 years ago
Yes this is expected; docker hub authentication uses the username, not email for authentication. This is confusing because the Web interface of Docker Hub does allow logging in with e-mail
Also see https://github.com/docker/hub-feedback/issues/1098#issuecomment-335000876
I suggested to have Docker Hub return an informative error if the provided username contains an @
(e.g. "Please log in using your username, not your e-mail address"), but that's a change that has to be made on Docker Hub (the docker cli cannot assume what an authentication service allows and what not)
So; discussing this: the Docker for Mac UI allows logging in by e-mail, but possibly uses a different authentication mechanism
@nandhini915 @KickingTheTV what are our options here?
But why we don't add --email
in docker login?
Is there a technical reason except that some registries may not support it?
There was an --email
option once, but it was used to automatically create a new account. I don't think Docker Hub takes an e-mail for logging in; it's username
and password
. If a registry supports authentication both through e-mail or username, I think the e-mail address has to be sent as username
and handled by the authentication of the registry
The fact that my CLI currently does this is highly frustrating and confusing... :( It would be immensely helpful if the CLI could at least not suggest my email address, since some sites do use email as usernames. (even though that's a rant I'll omit!)
Username (cycomachead@gmail.com): cycomachead
Password:
Login Succeeded
Unfortunately this is something to be addressed by the registry (Docker Hub), as the cli itself cannot make the assumption of e-mail is supported or not (other registries may support authenticating using e-mail).
I did open an internal ticket for this, to make the registry return a more useful error message
Thanks! To be clear, the specific confusion that I wanted to highlight was that the docker CLI is looking to the Docker app and grabbing my email from there. (It was not suggested when I was not signed into the app.)
Yes, that inconsistency is being looked into by the Desktop team
Reported here by a user in for-mac.
In Docker for desktop we are using the cloud federation authentication api and with this api it is possible to do authentication with email instead of username.
It could be nice to add this in cli too.
Steps to reproduce the issue:
Describe the results you received:
Describe the results you expected:
Additional information you deem important (e.g. issue happens only occasionally):
Output of
docker version
:Output of
docker info
:**Additional environment details (AWS, VirtualBox, physical, etc.): docker for mac