win11 docker login 异常:panic: assignment to entry in nil map

C:\Users\Administrator>docker login 192.168.0.xxx:xxxx -u username -p password
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
panic: assignment to entry in nil map

goroutine 1 [running]:
github.com/docker/cli/cli/config/credentials.(*fileStore).Store(0xc000606060, {{0x0, 0x0}, {0x0, 0x0}, {0x0, 0x0}, {0x0, 0x0}, {0xc0000400d8, ...}, ...})
        /go/src/github.com/docker/cli/cli/config/credentials/file_store.go:55 +0x49
github.com/docker/cli/cli/config/credentials.(*nativeStore).Store(0xc0004c2060, {{0x0, 0x0}, {0x0, 0x0}, {0x0, 0x0}, {0x0, 0x0}, {0xc0000400d8, ...}, ...})
        /go/src/github.com/docker/cli/cli/config/credentials/native_store.go:95 +0xb5
github.com/docker/cli/cli/command/registry.runLogin({0x1385cd8, 0xc00070e000}, {{0xc0000400d8, 0x12}, {0xc0000380f8, 0x3}, {0xc000038130, 0x9}, 0x0})
        /go/src/github.com/docker/cli/cli/command/registry/login.go:156 +0x55d
github.com/docker/cli/cli/command/registry.NewLoginCommand.func1(0xc000005b00?, {0xc000332dc0?, 0x1?, 0x5?})
        /go/src/github.com/docker/cli/cli/command/registry/login.go:46 +0x72
github.com/docker/cli/vendor/github.com/spf13/cobra.(*Command).execute(0xc000005b00, {0xc00042d450, 0x5, 0x5})
        /go/src/github.com/docker/cli/vendor/github.com/spf13/cobra/command.go:940 +0x862
github.com/docker/cli/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc000004300)
        /go/src/github.com/docker/cli/vendor/github.com/spf13/cobra/command.go:1068 +0x3bd
github.com/docker/cli/vendor/github.com/spf13/cobra.(*Command).Execute(...)
        /go/src/github.com/docker/cli/vendor/github.com/spf13/cobra/command.go:992
main.runDocker(0x0?)
        /go/src/github.com/docker/cli/cmd/docker/docker.go:263 +0x4b7
main.main()
        /go/src/github.com/docker/cli/cmd/docker/docker.go:274 +0x97

上述异常使用win11 docker 登录harbor ,使用docker logout ,然后再登录即可,大概可以解决。

C:\Users\Administrator>docker logout
Removing login credentials for https://index.docker.io/v1/

C:\Users\Administrator>docker login 192.168.0.xxx:xxx -u username -p password
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
Login Succeeded

  • 3
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值