Very weird let’s say around 1 out of 4 times I get this error message:
build_dev: Error response from daemon: unauthorized: You don't have the needed permissions to perform this operation, and you may have invalid credentials. To authenticate your request, follow the steps in: https://cloud.google.com/container-registry/docs/advanced-authentication
Anyone having this problem or know how to fix?
my drone pipeline:
- name: linting
- flake8 -j4 --ignore W503,E501,E203,W605 $POD
I created the dockerconfigjson secret via:
drone secret add --repository <REPO> --name dockerconfigjson --data @./config.json
and ./config.json is:
"User-Agent": "Docker-Client/18.09.5-ce (linux)"
I noticed you did not create your secrets with
--pull-request which means the secret is not available to pull requests. Have you considered this as a possible root cause for the error?
I have the same issue with GCR repo. It is happening time to time, roughly 50/50. Maybe You have resolved the issue? Please, let to now
@BigVOVA please see the following thread which discusses the root cause and workaround to resolve:
10:33PM - 07 Mar 19 UTC
If the config.json has entries for both gcr.io and https://gcr.io we should prune the file and remove the entry with https....
Thank you! But in my case I have only one
eu.gcr.io entry in config.json:
"auth": "<my key>"
Sorry, I am only aware of three possible root causes for failing to pull an image:
missing or invalid secret
secret not available to pull request events
dockerconfig.json file has multiple gcr entries and one is invalid
I recommend making sure you are running the latest version of Drone server (drone/drone:1.8.0) and the latest version of the Docker runner (drone/drone-runner-docker:1.3.0).