container icon indicating copy to clipboard operation
container copied to clipboard

[Request]: Improve the error message for a wrong or expired ghcr.io token and ask for a new token

Open dkovba opened this issue 1 year ago • 1 comments

Feature or enhancement request details

  1. Simulate an expired ghcr.io token by modifying it in the Keychain (see https://github.com/apple/container/issues/182).
  2. Run a command that's using the token.

Results:

Error: unknown: "HTTP request to https://ghcr.io/token?client_id=containerization-registry-client&service=ghcr.io&scope=repository:user/image:pull failed with response: 403 Forbidden"

It's not immediately clear from the message that a user had to regenerate the token. Container also didn't ask for the updated token.

Code of Conduct

  • [x] I agree to follow this project's Code of Conduct

dkovba avatar Jun 13 '25 01:06 dkovba

This has been fixed with the latest release

➜ container i pull myregistry.azurecr.io/big
Error: internalError: "HTTP request to https://myregistry.azurecr.io/v2/big/manifests/latest failed with response: 401 Unauthorized. Reason: Access denied or wrong credentials. No credentials found for host myregistry.azurecr.io"

adityaramani avatar Jun 28 '25 05:06 adityaramani