Docker login failed on Windows 403 Forbidden Error

There are lot of github discussions on docker login issue on windows 403 forbidden error.

Initially I was getting this error when trying to login:

[code type=codetype] $ docker login –username= –email= https://index.docker.io/v1/r [/code]

Error response from daemon: unexpected status code[403]: <html><body><h1>403 Forbidden </h1>

I was able to successfully login with the below command just using “docker login”

  $docker login docker-403-forbidden-error

then give user and password, login was successful but

After lot of google search, I found this solution.

Open the config json file: C:\Users\Username\.docker\config.json

It will look like this:


[code type=codetype]{
“auths”: {
“https://index.docker.io/v1/”: {
“auth”: “<hash value>”,
“email”: “<email-address>”
}
}
} [/code]

Change it to:

[code type=codetype]
{
“auths”: {
“https://index.docker.io/v1/”: {
“auth”: “<hash value>”,
“email”: “<email-d>”
},
“https://registry-win-tp3.docker.io/v1/”: {
“auth”: “<hash value>”,
“email”: “<email-address>”
}
}
} [/code]

and then try again:
[code type=codetype] $ docker push username/image-name [/code]

To know more about one of the hot Devops tool Docker and tutorial to install it from scratch, follow tutorial here: