While pushing the docker image (after successful login) from my host I am getting \"unauthorized: authentication required\".
Details below.
-bash-4.
Same problem here, during pushing image:
unauthorized: authentication required
What I did:
docker login --username=yourhubusername --email=youremail@company.com
Which it printed:
--email is deprecated (but login succeeded still)
Solution: use the latest login syntax.
docker login
It will ask for both username and password interactively. Then the image push just works.
Even after using the new syntax, my ~/.docker/config.json looks like this after logged in:
{
"auths": {
"https://index.docker.io/v1/": {}
},
"credsStore": "osxkeychain"
}
So the credential is in macOS' keychain.