-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Docker APIv2 build endpoint bug with X-Registry-Config #11235
Comments
/kind bug |
/cc @vrothberg |
to reproduce run
Where |
@saschagrunert @mtrmac PTAL |
@matejvasek would it be possible to get the output of podman/vendor/github.com/containers/image/v5/pkg/docker/config/config.go Line 749 in 8c228bd
|
That’s almost certainly Line 265 in edf9ec3
Hum… Looking at that package, arguably containers/image#588 (turning c/image/pkg/docker/config into a broad API exposing much of the parsers/formatters, independently from c/image uses) has a point, even if the price might be not something we have been ready to pay. At a very quick glance, is it possible that But it does seem to me, after a somewhat slower skim, that Copy&pasting the key normalization into (I guess the first step should be to consciously decide whether those HTTP headers are expected to support the new repo-scoped credentials. Is this compatibility only, or used for new callers as well?) |
I am facing this problem with podman 3.3.0 (1629488174) on macos but not with the same version on fedora. Sounds like critical to me... I tried pulling from both docker.io and quay.io and I get the same kind of failure from both. |
@ssbarnea as a workaround you try changing |
@saschagrunert PTAL |
@matejvasek Can you please be a little bit more explicit? I checked and there is no registry configured inside |
I think that auth.json is stored somewhere in |
@ssbarnea Something like |
On macos there is no $XDG_RUNTIME_DIR but on remote host (using the same user has podman remote connection use), I did:
So there is no I also did the same on my macos box and the file was created at My macos containers.conf file looks like:
|
Mabybe it stores you credentials in some docker credentials helper (secure store) not plaintext in json file. |
|
|
I managed to sort the problem locally by altering
What i had to do was to remove all keys under auths that contained a full url, something like |
Thanks. This is exactly it. |
So, we should not call If just the path via Lines 262 to 267 in 4207d95
|
c/image does allow URLs in config files; it rejects them in the I don’t think c/image should just relax the |
/assign |
Started to experiment with a possible fix in #11430, let's see how that works. |
Recent changes in c/image caused the `SetAuthentication` API to be more restrictive in terms of validating the `key` (`server`) input. To ensure that manually modified or entries in `~/.docker/config.json` still work, we now strip the leading `http[s]://` prefix. Fixes containers#11235 Signed-off-by: Sascha Grunert <[email protected]>
Recent changes in c/image caused the `SetAuthentication` API to be more restrictive in terms of validating the `key` (`server`) input. To ensure that manually modified or entries in `~/.docker/config.json` still work, we now strip the leading `http[s]://` prefix. Fixes containers#11235 Signed-off-by: Sascha Grunert <[email protected]>
Compat build endpoint is not working if user config file
~/.docker/config
contains server key likehttps://index.docker.io/v1/
.It fails with message:
This bug was introduced in #11028.
The text was updated successfully, but these errors were encountered: