0

When I run podman push (the equiv of docker push) to get my image up to GitLab's container registry, I'm getting the following error.

errors: denied: requested access to the resource is denied [...] error parsing HTTP 401 response body: unexpected end of JSON input: ""

You can see it all here,

❯ podman push localhost/acme-web-release registry.gitlab.com/evancarroll/acme-backend
Getting image source signatures
Error: trying to reuse blob sha256:1e05dc5a6784f6e7375fe1f73dc2b02f7d184bc53a0150daf06062dcbfde02d4 at destination: checking whether a blob sha256:1e05dc5a6784f6e7375fe1f73dc2b02f7d184bc53a0150daf06062dcbfde02d4 exists in registry.gitlab.com/evancarroll/acme-backend: errors:
denied: requested access to the resource is denied
error parsing HTTP 401 response body: unexpected end of JSON input: ""

I've confirmed that I've podman login (the podman analog of docker login) with a Personal Access Token that grants write_registry).

Evan Carroll
  • 2,921
  • 6
  • 37
  • 85

2 Answers2

0

A personal access token to push to the registry does not just require write_registry but ALSO read_registry or read_api (more general).

Evan Carroll
  • 2,921
  • 6
  • 37
  • 85
0

firstly, you can just make docker logout registry.gitlab.com, and login again docker login registry.gitlab.com, it's wrong because old token have not access for new registry