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
{{ message }}
Repository navigation
hosts.toml file resolution does not seem to account for default port being ommitted #3047
nerdctl login https://foo:443
vs. nerdctl login https://foo
If the hosts.toml path contains the port, the second one will fail.
On the other hand, if it does not, the first one will fail.
Responsibility for walking the host dir is in dockerconfigresolver.go (NewHostOptions > HostDir()).
This does not try to be smart wrt what the host contains (port or no port).
We should patch this so:
if scheme is https, passing :443 or not passing it should work
all of this should work with hosts.toml files path containing the port or not
Steps to reproduce the issue
See description
Describe the results you received and expected
Fail / not fail.
What version of nerdctl are you using?
1.7.6
Are you using a variant of nerdctl? (e.g., Rancher Desktop)
changed the title [-]hosts.toml file resolution does not account for default port being ommitted.Login against an https server with a custom certificate and default port will fail dependent on whether the port is specified and how the hosts.toml is configured [/-][+]hosts.toml file resolution does not account for default port being ommitted.[/+]on May 31, 2024
changed the title [-]hosts.toml file resolution does not account for default port being ommitted.[/-][+]hosts.toml file resolution does not account for default port being ommitted[/+]on May 31, 2024
changed the title [-]hosts.toml file resolution does not account for default port being ommitted[/-][+]hosts.toml file resolution does not seem to account for default port being ommitted[/+]on May 31, 2024
What's the behavior in docker? e.g., if you docker login https://foo:443, can you docker pull an image from https://foo (and vice versa)?
What's the behavior in docker? e.g., if you docker login https://foo:443, can you docker pull an image from https://foo (and vice versa)?
Docker does not support hosts.toml, so, it does not seem like the above would matter here?
Anyhow, here is a tentative proposal to clarify behavior wrt --insecure-registry, hosts.toml, and credentials: #3417
Activity
[-]hosts.toml file resolution does not account for default port being ommitted.Login against an https server with a custom certificate and default port will fail dependent on whether the port is specified and how the hosts.toml is configured [/-][+]hosts.toml file resolution does not account for default port being ommitted.[/+][-]hosts.toml file resolution does not account for default port being ommitted.[/-][+]hosts.toml file resolution does not account for default port being ommitted[/+][-]hosts.toml file resolution does not account for default port being ommitted[/-][+]hosts.toml file resolution does not seem to account for default port being ommitted[/+]Zheaoli commentedon Jun 7, 2024
Seems we need rework the whole login and auth part = =
apostasie commentedon Jun 7, 2024
Yes, that is what I am thinking.
I am on it.
Will start with revamping testing.
Hostsstore resolution cleanup
Hostsstore resolution cleanup
Hostsstore resolution cleanup
djdongjin commentedon Sep 10, 2024
What's the behavior in docker? e.g., if you
docker login https://foo:443, can youdocker pullan image fromhttps://foo(and vice versa)?apostasie commentedon Sep 10, 2024
Docker does not support hosts.toml, so, it does not seem like the above would matter here?
Anyhow, here is a tentative proposal to clarify behavior wrt --insecure-registry, hosts.toml, and credentials:
#3417
fix(exportimage): bypass nerdctl hosts.toml for login/push on mirror …
fix(resource-manager/exportimage): bypass containerd hosts.toml for n…
fix(exportimage): bypass nerdctl hosts.toml for login/push on mirror …
fix(resource-manager/exportimage): bypass containerd hosts.toml for n…