Failed to authorize: rpc error: code = Unknown desc = failed to fetch oauth token: unexpected status: 401 Unauthorized

My image build stopped working with the following message today, the only change I made in this commit that is not working, and the previous one that worked fine was a typo. So I didn’t make any changes to how the image will be built.

GoVersion: go1.13.15

Buildkit: Starting build for index.docker. io/<my_company>/sync_lexical_terms:latest…

WARNING: Support for the legacy ~/.dockercfg configuration file and file-format is deprecated and will be removed in an upcoming release

#1 [internal] load build definition from Dockerfile

#1 sha256:2a1f37f83aec8e7daade00932336c319c87584f06b2e10f7e3e36503a4b98a7f

#1 transferring dockerfile: 556B done

#1 DONE 0.1s

#2 [internal] load .dockerignore

#2 sha256:d842ed2e5f942de92f4196bb22b057bec1e3a6c938a4d03050c8d4b9d55e8647

#2 transferring context: 2B 0.0s done

#2 DONE 0.1s

#4 [auth] library/python:pull token for registry-1.docker .io

#4 sha256:e77a6e0df003ec4c6a30b7cf2937c6bec1eeedd6e3b2fadc3dbcb7ac48373d61

#4 DONE 0.0s

#3 [internal] load metadata for docker. io/library/python:3.8.12

#3 sha256:ef3181da7d21e9372332e1cc950cd6b182a3b7d79c423446752ea1fd0e466f47

#3 ERROR: failed to authorize: rpc error: code = Unknown desc = failed to fetch oauth token: unexpected status: 401 Unauthorized


[internal] load metadata for docker. io/library/python:3.8.12:


error: failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0: failed to create LLB definition: failed to authorize: rpc error: code = Unknown desc = failed to fetch oauth token: unexpected status: 401 Unauthorized

Build failed using Buildkit

4 Likes

I’m having the same issue building images, including re-building an image that had previously worked. I sent a support ticket earlier today.

2 Likes

I’m also having the same error, I’m waiting for a solution from support

2 Likes

Similar issue on Docker Hub in the last hour or so:

Cloning into '.'...
Warning: Permanently added the RSA host key for IP address '140.82.114.3' to the list of known hosts.
Switched to a new branch 'develop'
Pulling cache layers for index.docker.io/atomgraph/linkeddatahub:develop...
Push failed. Attempt 2 in 60 seconds.
Done!
Executing build hook...
WARNING: Support for the legacy ~/.dockercfg configuration file and file-format is deprecated and will be removed in an upcoming release
Sending build context to Docker daemon 81.77MB
Step 1/65 : FROM maven:3.6.3-jdk-11 as maven
Head https://registry-1.docker.io/v2/library/maven/manifests/3.6.3-jdk-11: unauthorized: please use personal access token to login when SSO is enforced
build hook failed! (1)
1 Like

I have the same issue. Do we know when would this be fixed? Thanks.

1 Like

any one receive any email from docker hub support? what is the status? I am kind of stuck here. is there a way to contact docker hub support besides email.

Hi,
I am also facing the same issue from morning

I have the same issue, someone know how to solve?

We’re also having the same issue
Also send a support request to docker
hope they fix it soon

Am I the only person that thinks Docker Hub support is terrible?
In the past, I send support requests, and I never received an answer.

2 Likes

Hi,
No my build is not working with the same message erreor.
the build is trigger after push on my bitbucket repo

We are also getting the same error, running dockerfile locally and testing on other servers is working fine, this seems to be a Dockerhub specific issue.

Also happening to me – all day yesterday and today. Has anyone heard anything from Docker about this?

Same here. Stopped working today

Also stopped working for me. 401 error when trying to pull a base image from another public Docker Hub repo

As this is happening to all of us, I guess something has gone wrong with Docker Hub rather than our code.

Same error here when building on DockerHub. Building image locally with same dockerfile works perfectly.

1 Like

also I’m make a local build with success, and I have the problem only inside dockehub

You can use docker push to copy your local image to DockerHub as a workaround:

2 Likes

I agree, this is a workround But I think dockerhub should release the fix in this case

3 Likes

I am having the same issue.

1 Like