-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Podman auth discards registry path #17816
Comments
@vrothberg @mtrmac PTAL |
Thanks for your report.
Why would these two in particular have different credentials? (Notably
If you are actually concerned about those “other container registries”, please use examples that use those “other registries”, perhaps redacting the name. The Podman does support different credentials for different namespaces of a single registry, but we have to carefully thread the needle between expressing that, and compatibility with other uses, exactly scripts like So, if the parameter starts with a scheme, that’s always interpreted as a “whole-registry” credential. Use |
Thanks for your response! Let me better explain my use case: I have a library which creates containers. When someone wants to pull from a private repository, I look up which creds to send from their auth file, based on the registry they're pulling the image from. For Docker for example, the I am currently looking at adding Podman support to the library. Now, because Podman handles index.docker.io as a special case, and returns an empty string for the I am sure there are plenty of details I am missing, but I am basically unable to swap out Docker for Podman when auth is required for Docker Hub. I have tried to login as you suggested without the scheme to create a namespaced credential, but the special case for docker.io causes issues:
Additionally, Docker does support trailing
|
Thanks. For that use case, there are other things to consider. Notably, https://github.com/containers/image/blob/main/docs/containers-registries.conf.5.md allows the user to transparently re-map a reference to one registry to another, or possibly to multiple ones. IMHO the only practical way[1] to support that in callers of Podman is to hand Podman the full set of credentials (e.g. [1]It’s not really practical for a caller of Podman to somehow parse all the relevant configuration files, merge them correctly, and the like: the configuration semantics can add new features at any time, so any external implementation would only work against a frozen version of Podman. (Alternatively, it could be suggested that Podman should add a
Yes. We have decided to enforce a canonical form for the new (Podman-only) namespaced credentials feature. Use |
A friendly reminder that this issue had no activity for 30 days. |
I’m assuming this works as designed, and it does currently allow making using Podman for this purpose; please reopen if that’s incorrect. |
Issue Description
Podman login is discarding the registry path. E.g logging into
https://index.docker.io/v1/
creates the following auth file:Logging into
https://index.docker.io/v1/
does not update the auth file.This may be an issue for other container registries, e.g
https://example.registries.com/registry1
andhttps://example.registries.com/registry2
will merge to one entry.Steps to reproduce the issue
podman login https://index.docker.io/v1/
podman login https://index.docker.io/v2/
Describe the results you received
Podman rejects the 2nd login which could have different credentials.
Describe the results you expected
Podman stores 2 different entries for each registry, like Docker:
podman info output
Podman in a container
No
Privileged Or Rootless
Rootless
Upstream Latest Release
Yes
Additional environment details
DOCKER_HOST=unix:///run/user/$(id -u)/podman/podman.sock
Additional information
No response
The text was updated successfully, but these errors were encountered: