cli-dont-duplicate-authconfig
authorArnaud Rebillout <arnaud.rebillout@collabora.com>
Tue, 12 Nov 2019 01:18:22 +0000 (01:18 +0000)
committerDmitry Smirnov <onlyjob@debian.org>
Tue, 12 Nov 2019 01:18:22 +0000 (01:18 +0000)
~~~~ 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 <arnaud.rebillout@collabora.com>
Gbp-Pq: Name cli-dont-duplicate-authconfig.patch

cli/cli/config/types/authconfig.go

index 056af6b842595184bc61e858ac57883b39aaf522..b5656267f0f1ee5cc846085035febac71a549bd5 100644 (file)
@@ -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