genuinetools / img

Standalone, daemon-less, unprivileged Dockerfile and OCI compatible container image builder.
https://blog.jessfraz.com/post/building-container-images-securely-on-kubernetes/
MIT License
3.9k stars 231 forks source link

Intermittent "authorization failed" messages #304

Open yangm97 opened 4 years ago

yangm97 commented 4 years ago

I couldn't find a solid reproduction for this, but there appears to be some correlation to the amount of concurrent build jobs running for the same project on CI but for different branches (for instance, when renovates does its usual spam push).

The full message is:

Error: failed to solve: failed to load cache: failed to copy: httpReaderSeeker: failed open: server message: invalid_token: authorization failed

The img command used:

img build \
        --platform="linux/arm/v7" \
        --cache-from "${CI_REGISTRY_IMAGE}/${CI_JOB_NAME}:master" \
        --cache-from "${CI_REGISTRY_IMAGE}/${CI_JOB_NAME}:${CI_COMMIT_REF_SLUG}" \
        --output type=image,name="${CI_REGISTRY_IMAGE}/${CI_JOB_NAME}:${CI_COMMIT_REF_SLUG}",push=true \
        "services/${CI_JOB_NAME}"

I've seem this happening on r.j3ss.co/img:v0.5.8 and r.j3ss.co/img:v0.5.10.

issue-label-bot[bot] commented 4 years ago

Issue Label Bot is not confident enough to auto-label this issue. See dashboard for more details.

smothiki commented 3 years ago

I'm also seeing the same issue. Any idea why this might be happening?