Files
docker-cli/cli/command
Sebastiaan van Stijn 0e32baf115 cli/command: fix regression in resolving auth from config
This was introduced in 79141ce5eb, which
was reverted in f596202125, 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>
2025-03-26 14:43:57 +01:00
..
2024-07-04 01:35:12 +02:00
2024-11-12 12:38:18 +01:00