Revert "Return no basic auth creds error when needed"
This reverts commit8777592397
, which turns out to break other test cases/the registry flow. The correct place to handle missing credentials is instead15bf23df09/remotes/docker/authorizer.go (L200)
. Co-authored-by: Djordje Lukic <djordje.lukic@docker.com> Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
This commit is contained in:
parent
c2aa895908
commit
40fde69be9
1 changed files with 1 additions and 6 deletions
|
@ -11,7 +11,6 @@ import (
|
|||
"github.com/containerd/containerd/remotes/docker"
|
||||
"github.com/containerd/containerd/version"
|
||||
"github.com/containerd/log"
|
||||
"github.com/docker/distribution/registry/client/auth"
|
||||
registrytypes "github.com/docker/docker/api/types/registry"
|
||||
"github.com/docker/docker/dockerversion"
|
||||
"github.com/docker/docker/pkg/useragent"
|
||||
|
@ -76,15 +75,11 @@ func authorizerFromAuthConfig(authConfig registrytypes.AuthConfig) docker.Author
|
|||
"host": host,
|
||||
"cfgHost": cfgHost,
|
||||
}).Warn("Host doesn't match")
|
||||
return "", "", auth.ErrNoBasicAuthCredentials
|
||||
return "", "", nil
|
||||
}
|
||||
if authConfig.IdentityToken != "" {
|
||||
return "", authConfig.IdentityToken, nil
|
||||
}
|
||||
|
||||
if authConfig.Username == "" && authConfig.Password == "" {
|
||||
return "", "", auth.ErrNoBasicAuthCredentials
|
||||
}
|
||||
return authConfig.Username, authConfig.Password, nil
|
||||
}))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue