container
container copied to clipboard
[Request]: Improve the error message for a wrong or expired ghcr.io token and ask for a new token
Feature or enhancement request details
- Simulate an expired ghcr.io token by modifying it in the Keychain (see https://github.com/apple/container/issues/182).
- 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
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"