You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For scripting purposes it is useful to have a test to verify if you are logged in to a container registry. I believe this is the intended use of podman login --get-login $REGISTRY_URL. It would seem like the get-login command only returns the username used when you last logged in to a registry, without checking if the login is still valid.
My context:
AWS Elastic container registry, should apply to any login method where credentials are regularly rotated.
I log in to my container registry using:
aws ecr get-login-password --region $REGION | podman login --username AWS --password-stdin $REGISTRY_URL
The login is valid for 12 hours. After 12 hours I am no longer able to pull images from the registry.
podman login --get-login $REGISTRY_URL still returns AWS and exit code 0 after the credentials have timed out.
I would expect the command to return Error: not logged into $REGISTRY_URL and exit code > 0.
I am not sure if this should be a bug report or a feature request, as I am not fully aware what the podman login --get-login option aims to achieve. From the documentation it should "Return the current login user for the registry". One could argue that there is no logged in user for the registry if the login has expired.
Suggest potential solution
No response
Have you considered any alternatives?
No response
Additional context
No response
The text was updated successfully, but these errors were encountered:
Feature request description
For scripting purposes it is useful to have a test to verify if you are logged in to a container registry. I believe this is the intended use of podman login --get-login $REGISTRY_URL. It would seem like the get-login command only returns the username used when you last logged in to a registry, without checking if the login is still valid.
My context:
AWS Elastic container registry, should apply to any login method where credentials are regularly rotated.
I log in to my container registry using:
aws ecr get-login-password --region $REGION | podman login --username AWS --password-stdin $REGISTRY_URL
The login is valid for 12 hours. After 12 hours I am no longer able to pull images from the registry.
podman login --get-login $REGISTRY_URL still returns AWS and exit code 0 after the credentials have timed out.
I would expect the command to return Error: not logged into $REGISTRY_URL and exit code > 0.
I am not sure if this should be a bug report or a feature request, as I am not fully aware what the podman login --get-login option aims to achieve. From the documentation it should "Return the current login user for the registry". One could argue that there is no logged in user for the registry if the login has expired.
Suggest potential solution
No response
Have you considered any alternatives?
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: