Skip to content

Commit 0e32baf

Browse files
committed
cli/command: fix regression in resolving auth from config
This was introduced in 79141ce, which was reverted in f596202, and re-applied in the previous commit. Before this patch, saving credentials worked correctly; docker login -u thajeztah Password: Login Succeeded cat ~/.docker/config.json { "auths": { "https://index.docker.io/v1/": { "auth": "REDACTED" } } } But when resolving the credentials, the credentials stored would not be found; docker pull -q thajeztah/private-test-image Error response from daemon: pull access denied for thajeztah/private-test-image, repository does not exist or may require 'docker login': denied: requested access to the resource is denied With this patch applied: docker pull -q thajeztah/private-test-image docker.io/thajeztah/private-test-image:latest Thanks to mtrmac (Miloslav Trmač) for spotting this mistake! Suggested-by: Miloslav Trmač <mitr@redhat.com> Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent 9f4165c commit 0e32baf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cli/command/registry.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const (
3131
// a copy of [registry.IndexServer].
3232
//
3333
// [registry.IndexServer]: https://pkg.go.dev/github.com/docker/docker/registry#IndexServer
34-
const authConfigKey = "https:/index.docker.io/v1/"
34+
const authConfigKey = "https://index.docker.io/v1/"
3535

3636
// RegistryAuthenticationPrivilegedFunc returns a RequestPrivilegeFunc from the specified registry index info
3737
// for the given command.

0 commit comments

Comments
 (0)