Everything has been working fine for several months until a few hours ago. Here are the logs:
2022-09-26T16:41:41Z #6 FROM docker.io/private/app-common:latest
2022-09-26T16:41:41Z #6 resolve docker.io/private/app-common:latest 0.0s done
2022-09-26T16:41:41Z #6 ERROR: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed
2022-09-26T16:41:41Z #7 [internal] load build context
2022-09-26T16:41:41Z #7 transferring context: 482.35kB 0.0s done
2022-09-26T16:41:41Z #7 CANCELED
2022-09-26T16:41:41Z > FROM docker.io/private/app-common:latest:
2022-09-26T16:41:41Z ERROR: failed to solve: failed to load cache key: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed
2022-09-26T16:41:41Z Build failed using Buildkit (1)
docker.io/private/app-common:latest is a private repo within the same organization. I wonder why authorization fails all of a sudden considering that it worked for quite some time until now (as you can see in the screenshot).
I have rebuilt one of my automated builds to see if it works. It worked. I also checked that message about dockercfg, because I remembered I have met a similar message before but in my case it was “will be removed” not “has been removed”.
When I first recognized something was wrong with the virtual machine versions, I reported it on GitHub
It looks like docker in your VM has changed somehow, but the configuration file is still there.
Please, report it as a bug in the hub-feedback repository
I tried to search for similar isues, but before you open the issue, do the same. Maybe you find something that I could not. There was an issue long time ago in 2016
but the message “has been removed” is suspicious.
I also checked the status page of the Docker services, and I don’t see any known issue there
I am subscribed to that page to get notification when something happens, but I didn’t get anything recently.
Thank you for your reply! I managed to get the autobuilds working again by explicitly creating an access token and inside hooks/pre_build doing a docker login that uses the access token. The private docker image I’m pulling from and hosted in the same organization is found now and the pulling error is gone.
I think there was an update today on docker hub because the build logs look different from 12+ hours ago and now, e.g. each line is timestamped.
Here is my solution:
Create an access token:
Go to Docker Hub (Account Settings → Security) and create a new access token. Put the access token in a file e.g. hooks/token
Make a pre_build hook where you authenticate first:
Here are the contents of my hooks/pre_build file:
We’ve changed our setup to have images built from github using github actions and local github runners. That way, you can use secrets in github to hold the personal access token and you don’t need to manually use “Docker login” as there are github actions for that purpose. We then push the resulting image to docker hub, rendering it merely as a registry. I hope this bug gets resolved quickly. For now, we didn’t get any response on our supportrequest yet.