-
Notifications
You must be signed in to change notification settings - Fork 783
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
buildah
fails when REGISTRY_AUTH_FILE
doesn't exist
#3259
Comments
I am thinking this is a bug. We should only check for the existence of the authfile if the user specifies it. |
I consider setting the env var as user-specified input (i.e., the counterpart of |
This allows us to have a REGISTRY_AUTH_FILE and only fail when the authfile is specified to be used. If the user specifies it that means he intends to use it. Fixes: containers#3259 Signed-off-by: Daniel J Walsh <[email protected]>
The thing is we do not need to fail until the user actually attempts to use the file, in that case. |
For example the use case that this user was hitting was having it set within a container image, and only used when needed. We would fail all the time. |
This allows us to have a REGISTRY_AUTH_FILE and only fail when the authfile is specified to be used. If the user specifies it that means he intends to use it. Fixes: containers#3259 Signed-off-by: Daniel J Walsh <[email protected]>
I'm having the same issue with
|
and with the workaround I'm getting the other misleading output:
|
Why is this misleading? |
I think the logout error is misleading as it doesn't indicate that the file doesn't exist. From reading the message, I'd think the authfile existed, I just didn't have an entry in the authfile. |
We treat REGISTRY_AUTH_FILE="" the same as we do not being set at all. |
If you are running buildah within a user namespace, without XDG_RUNTIME_DIR being set, we need to make sure buildah login, logout handle XDG_RUNTIME_DIR the same was as buildah push. Running buildah within a container is triggering failures, where buildah login puts the auth.json file in /run/containers/0/auth.json but buildah push looks for it in /tmp/container-user-0/containers/containers/auth.json Fixes: containers#3259 [NO TESTS NEEDED] The existing tests should see if this causes any problems. Signed-off-by: Daniel J Walsh <[email protected]>
If you are running buildah within a user namespace, without XDG_RUNTIME_DIR being set, we need to make sure buildah login, logout handle XDG_RUNTIME_DIR the same was as buildah push. Running buildah within a container is triggering failures, where buildah login puts the auth.json file in /run/containers/0/auth.json but buildah push looks for it in /tmp/container-user-0/containers/containers/auth.json Fixes: containers#3259 [NO TESTS NEEDED] The existing tests should see if this causes any problems. Signed-off-by: Daniel J Walsh <[email protected]>
Hello!
Setting
REGISTRY_AUTH_FILE
to a non-existent file will result inbuildah
failing to operate with public registries:Is this a feature or a bug?
Currently I resolve it with e.g.
env REGISTRY_AUTH_FILE= buildah pull docker.io/library/hello-world
for specific commands. Can't removeREGISTRY_AUTH_FILE
at all because of #3216.Running
1.20.1
from currentquay.io/buildah/stable
image.The text was updated successfully, but these errors were encountered: