gohugoio / hugo

The world’s fastest framework for building websites.
https://gohugo.io
Apache License 2.0
75.06k stars 7.48k forks source link

Cannot pull image from gchr.io in CI #12900

Open Int-Circuit opened 2 days ago

Int-Circuit commented 2 days ago

What version of Hugo are you using (hugo version)?

Hugo  docker image (latest)

Does this issue reproduce with the latest release?

Yes

When using image in gitlab CI, I get the following error: Running with gitlab-runner 17.4.0~pre.110.g27400594 (27400594) on blue-6.saas-linux-small-amd64.runners-manager.gitlab.com/default nN8vMRS9Z, system ID: s_a899fcd611a3 Preparing the "docker+machine" executor 00:04 Using Docker executor with image ghcr.io/gohugoio/hugo:v0.135.0@sha256:6e36fab84c54245037101c3d1a1b5df5307cbad8e83ef8de655901821b9ab55e ... Pulling docker image ghcr.io/gohugoio/hugo:v0.135.0@sha256:6e36fab84c54245037101c3d1a1b5df5307cbad8e83ef8de655901821b9ab55e ... WARNING: Failed to pull image with policy "always": unsupported media type application/vnd.in-toto+json (manager.go:251:0s) ERROR: Job failed: failed to pull image "ghcr.io/gohugoio/hugo:v0.135.0@sha256:6e36fab84c54245037101c3d1a1b5df5307cbad8e83ef8de655901821b9ab55e" with specified policies [always]: unsupported media type application/vnd.in-toto+json (manager.go:251:0s)

My ci.yml file:

variables: HUGO_ENV: production

stages:

test: image: ghcr.io/gohugoio/hugo:v0.135.0@sha256:6e36fab84c54245037101c3d1a1b5df5307cbad8e83ef8de655901821b9ab55e stage: deploy script:

spell: image: python:latest stage: check script:

dvdksn commented 1 day ago

ghcr.io/gohugoio/hugo:v0.135.0@sha256:6e36fab84c54245037101c3d1a1b5df5307cbad8e83ef8de655901821b9ab55e

You are pinning the digest of the provenance attestation manifest. (https://explore.ggcr.dev/?image=ghcr.io/gohugoio/hugo@sha256:6e36fab84c54245037101c3d1a1b5df5307cbad8e83ef8de655901821b9ab55e&mt=application%2Fvnd.oci.image.manifest.v1%2Bjson&size=567)

Use the digest of the image index instead:

ghcr.io/gohugoio/hugo@sha256:5986da875c7058c052f3f1ebd50d477b4119c25ff710efda5c08fd708a2cbd27