From 496e956383bcba927a5efd2973b5eb4e144b7f19 Mon Sep 17 00:00:00 2001 From: Arnaud Rebillout Date: Tue, 12 Nov 2019 01:18:22 +0000 Subject: [PATCH] cli-dont-duplicate-authconfig ~~~~ gitlab-runner src/gitlab.com/gitlab-org/gitlab-runner/helpers/docker/auth_config.go:102:22: cannot use config.AuthConfigs (type map[string]"github.com/docker/cli/cli/config/types".AuthConfig] as type map[string]"github.com/docker/docker/api/types".AuthConfig] in argument to addAll src/gitlab.com/gitlab-org/gitlab-runner/helpers/docker/auth_config.go:130:2: cannot use newAuths (type map[string]"github.com/docker/cli/cli/config/types".AuthConfig] as type map[string]"github.com/docker/docker/api/types".AuthConfig] in return argument src/gitlab.com/gitlab-org/gitlab-runner/helpers/docker/auth_config.go:144:26: cannot use newAuths (type "github.com/docker/cli/cli/config/types".AuthConfig) ~~~~ ~~~~ nomad src/github.com/hashicorp/nomad/drivers/docker/utils.go:118:57: cannot use cfile.AuthConfigs (type map[string]"github.com/docker/cli/cli/config/types".AuthConfig] as type map[string]"github.com/docker/docker/api/types".AuthConfig] in argument to "github.com/docker/docker/registry".ResolveAuthConfig ~~~~ Please update this patch when upstream provides a fix. Signed-off-by: Arnaud Rebillout Gbp-Pq: Name cli-dont-duplicate-authconfig.patch --- cli/cli/config/types/authconfig.go | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/cli/cli/config/types/authconfig.go b/cli/cli/config/types/authconfig.go index 056af6b8..b5656267 100644 --- a/cli/cli/config/types/authconfig.go +++ b/cli/cli/config/types/authconfig.go @@ -1,22 +1,7 @@ package types -// AuthConfig contains authorization information for connecting to a Registry -type AuthConfig struct { - Username string `json:"username,omitempty"` - Password string `json:"password,omitempty"` - Auth string `json:"auth,omitempty"` +import ( + "github.com/docker/docker/api/types" +) - // Email is an optional value associated with the username. - // This field is deprecated and will be removed in a later - // version of docker. - Email string `json:"email,omitempty"` - - ServerAddress string `json:"serveraddress,omitempty"` - - // IdentityToken is used to authenticate the user and get - // an access token for the registry. - IdentityToken string `json:"identitytoken,omitempty"` - - // RegistryToken is a bearer token to be sent to a registry - RegistryToken string `json:"registrytoken,omitempty"` -} +type AuthConfig = types.AuthConfig -- 2.30.2