mirror of
https://github.com/docker/cli.git
synced 2026-09-28 02:06:53 -04:00
Merge pull request #31057 from krasi-georgiev/30779-fix-client-login-credentials-save-domain
fix incorect login client credential save when the registry is the default docker registry
Upstream-commit: 4031d93f61
Component: cli
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
|||||||
|
|
||||||
"github.com/docker/docker/cli"
|
"github.com/docker/docker/cli"
|
||||||
"github.com/docker/docker/cli/command"
|
"github.com/docker/docker/cli/command"
|
||||||
|
"github.com/docker/docker/registry"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -54,7 +55,7 @@ func runLogin(dockerCli *command.DockerCli, opts loginOptions) error {
|
|||||||
serverAddress string
|
serverAddress string
|
||||||
authServer = command.ElectAuthServer(ctx, dockerCli)
|
authServer = command.ElectAuthServer(ctx, dockerCli)
|
||||||
)
|
)
|
||||||
if opts.serverAddress != "" {
|
if opts.serverAddress != "" && opts.serverAddress != registry.DefaultNamespace {
|
||||||
serverAddress = opts.serverAddress
|
serverAddress = opts.serverAddress
|
||||||
} else {
|
} else {
|
||||||
serverAddress = authServer
|
serverAddress = authServer
|
||||||
|
|||||||
Reference in New Issue
Block a user