Docker Login报错panic: runtime error: invalid memory address or nil pointer dereference

执行:

$ docker login

时报错:

$ docker login
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x55fe0d1ac406]

goroutine 1 [running]:
github.com/docker/cli/cli/command.ConfigureAuth(0x55fe0ebeee80, 0xc0003b1930, 0x0, 0x0, 0x0, 0x0, 0x0, 0x55fe0eb5e201, 0xc000087e50, 0xc00057f968)
        /go/src/github.com/docker/cli/cli/command/registry.go:128 +0x46
github.com/docker/cli/cli/command/registry.runLogin(0x55fe0ebeee80, 0xc0003b1930, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
        /go/src/github.com/docker/cli/cli/command/registry/login.go:123 +0x223
github.com/docker/cli/cli/command/registry.NewLoginCommand.func1(0xc0003ce840, 0x55fe0fbf95c8, 0x0, 0x0, 0x0, 0x0)
        /go/src/github.com/docker/cli/cli/command/registry/login.go:45 +0xcc
github.com/docker/cli/vendor/github.com/spf13/cobra.(*Command).execute(0xc0003ce840, 0xc0003d2530, 0x0, 0x0, 0xc0003ce840, 0xc0003d2530)
        /go/src/github.com/docker/cli/vendor/github.com/spf13/cobra/command.go:850 +0x462
github.com/docker/cli/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc000405b80, 0xc0003d2530, 0x1, 0x1)
        /go/src/github.com/docker/cli/vendor/github.com/spf13/cobra/command.go:958 +0x34b
github.com/docker/cli/vendor/github.com/spf13/cobra.(*Command).Execute(...)
        /go/src/github.com/docker/cli/vendor/github.com/spf13/cobra/command.go:895
main.runDocker(0xc0003b1930, 0x55fe0eb60f80, 0xc000010020)
        /go/src/github.com/docker/cli/cmd/docker/docker.go:287 +0x1d3
main.main()
        /go/src/github.com/docker/cli/cmd/docker/docker.go:298 +0xf3

权限不足,使用sudo执行即可:

$ sudo docker login

你可能感兴趣的:(Docker Login报错panic: runtime error: invalid memory address or nil pointer dereference)