Closed lingdie closed 1 week ago
@fahedouch PTAL
whats the differance betwen these commands? Is this a bug?
I would say yes (because docker works fine in that case).
I do not know why we do this check - maybe there was a security reason to make sure we do not return credentials for a different host.
I would like to rewrite most of our login code (as there are a lot of issues - #3072) but that will take some time.
If @fahedouch knows and can comment on the reason for the acArg / host check, and if we can soften it to maybe the main domain + tld, that could be a fix.
Alternatively, we could match the registry param if *.docker.io
-> replace with index.docker.io
.
acArg vs. host
This is in place to prevent sending credentials to hosts.toml mirrors. Although in that case, it does not make sense (and is also possibly problematic with redirects).
Some discussion on the overall question here: #3265
Description
I tried to use nerdctl to login to docker.io, but got:
however, this works:
whats the differance betwen these commands? Is this a bug?
I need to ues nerdctl sdk to login and push images to registries, what should I do if I don't want to write hard codes for
docker.io
.Steps to reproduce the issue
Describe the results you received and expected
nertctl login docker.io
should works as well.What version of nerdctl are you using?
nerdctl version Client: Version: v1.5.0 OS/Arch: linux/amd64 Git commit: b33a58f288bc42351404a016e694190b897cd252 buildctl: Version:
Server: containerd: Version: v1.7.15 GitCommit: 926c9586fe4a6236699318391cd44976a98e31f1 runc: Version: 1.1.12 GitCommit: v1.1.12-0-g51d5e946
Are you using a variant of nerdctl? (e.g., Rancher Desktop)
None
Host information
No response