4

Why am I getting this OCI index found, but Accept header does not support OCI indexes error?

user@disp7456:~$ curl -H "Authorization: Bearer QQ==" https://ghcr.io/v2/homebrew/core/vim/manifests/9.0.1900
{"errors":[{"code":"MANIFEST_UNKNOWN","message":"OCI index found, but Accept header does not support OCI indexes"}]}
user@disp7456:~$ 

I'm attempting to download the manifest from an OCI Container Registry (GitHub Packages).

What does this MANIFEST_UNKNOWN error message mean, and how can I get past it?

1 Answers1

5

You're getting this error message because you forgot to specify the Accept header.

Try this

curl -H "Authorization: Bearer QQ==" -H 'Accept: application/vnd.oci.image.index.v1+json' https://ghcr.io/v2/homebrew/core/vim/manifests/9.0.1900

Adding the -H 'Accept: application/vnd.oci.image.index.v1+json' argument to your curl command should fix the issue.

For more information, see https://tech.michaelaltfield.net/2024/09/03/container-download-curl-wget/