Replies: 1 comment 1 reply
-
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have seen several bash scripts that test authentication to a registry ahead of launching into larger build processes. The idea is to fail fast with a friendly error if it appears that authentication will not work later on. Example:
An implementation like this assumes that
podman
will always use${XDG_RUNTIME_DIR}/containers/auth.json
. There are plenty of nuances to podman and skopeo's default behavior! (Eg.REGISTRY_AUTH_FILE
always takes precedence, or several CI or containerized environments never setXDG_RUNTIME_DIR
, etc.)What if there was a simple
podman has-login registry.redhat.io
or something to test that our credential exists in whatever auth JSON podman would normally use? And print a friendly error to the user with a non-zero exit code?Beta Was this translation helpful? Give feedback.
All reactions