incus 6.15 - Authentication support for OCI registries

I tried using the new Incus 6.15 feature (Authentication support for OCI registries) with Docker Hub using docker-credential-pass, but it didn’t work.

Incus remote add docker https://docker.io --protocol=oci --credentials-helper=docker-credential-pass

incus image info docker:nginx

Error: Error: Failed to run: docker-credential-pass get: exit status 1

Add-on:
Command: docker-credential-pass version
Result: docker-credential-pass (GitHub - docker/docker-credential-helpers: Programs to keep Docker login credentials safe by storing in platform keystores) v0.9.3

What happens when you do: echo https://docker.io | docker-credential-pass get

echo https://docker.io | docker-credential-pass get
exit status 2: gpg: public key decryption failed: No such file or directory
gpg: decryption failed: No such file or directory

Okay, so looks like docker-credential-pass isn’t working correctly on your system.
Once you sort that out, Incus should be able to use it.

Other’s should be aware that “https://docker.io” is not universal. You can see what your credential helper is aware of with:

$ docker-credential-secretservice list | jq -r 'to_entries[] | "(.key): (.value)"'
ghcr.io: rsyring
https://index.docker.io/v1/: rsyring

For the record: There is authentication support for OCI registers

However it is not always succesfull, example given: OCI from hub.docker.com