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:

Select Code
$ docker login --username= --email= https://index.docker.io/v1/r

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:

Select Code
{
"auths": {
"https://index.docker.io/v1/": {
"auth": "<hash value>",
"email": "<email-address>"
}
}
}

Change it to:

Select Code
{
"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>"
}
}
}

and then try again:

Select Code
$ docker push username/image-name

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

One Response to “Docker login failed on Windows 403 Forbidden Error”

Leave a Reply

Your email address will not be published. Required fields are marked *