GitLab Container Registry: errors: denied: requested access to the resource is denied [...] error parsing HTTP 401 response body


  • QA Engineer

    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).



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




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2