opened
mbarbero
username_0
Similar to #1143

When exporting cache to quay.io, it fails with 

```error: failed to solve: rpc error: code = Unknown desc = error writing manifest blob: failed commit on ref "sha256:c2aba47e903ef19d459785c7e5750ef7da0f6f86657d9b40c329d5268dfe2185": unexpected status: 401 Unauthorized```

The error is the same with both modes: `mode=max` or `mode=min`

```bash
buildctl" build \
    --progress=plain \
    --frontend=dockerfile.v0 \
    --local context="${context}" \
    --local dockerfile="$(dirname "${dockerfile}")" \
    --opt filename="$(basename "${dockerfile}")" \
    --output "type=image,\"name=${name}\",push=${push}" \
    --export-cache "type=registry,mode=max,ref=${image}:${tag}-buildcache" \
    --import-cache "type=registry,ref=${image}:${tag}-buildcache" \
    "${@}"
```

When I do not `--export-cache`, images are pushed properly to quay.io so the credentials are correct.
Cache can't be exported to Quay.io
issue
created
mbarbero
username_0
I should add that the cache export works OK with the docker.io registry.
comment
created
cpuguy83
username_1
I have not done any real investigation here, but this sounds like quay does not support cache manifests.
You may want to try an inline cache? This may still not work. I know I've had issues with some other registries with it.
comment
created
mbarbero
username_0
Issue is that inline cache does not support max mode, which is a requirement in my case.
comment
created
cpuguy83
username_1
Speaking with someone else, they are having trouble pushing 2 tags... e.g. `-t foo -t bar`, getting the same 401 error.
Maybe it's not even a cache manifest issue, and the 401 is legit... like not authorized to push 2 tags with the same auth token?
comment
created
mbarbero
username_0
I've tried to push 2 tags at the same time with a cache type=local and it works. So the issue is not about quay not supporting pushing 2 tags at once.
comment
created
tonistiigi
username_2
#1550
comment
closed
tonistiigi
username_2
issue
created
mbarbero
username_0
Coming back at this issue as using quay.io may come back as a topic on my side. I tried with latest buildkit (0.8.2), and I still cannot export cache to quay. Both

```
--export-cache "type=registry,mode=max,oci-mediatypes=false,ref=${image}:${tag}-buildcache" \
--export-cache "type=registry,mode=min,oci-mediatypes=false,ref=${image}:${tag}-buildcache" \
comment