MCPcopy Index your code
hub / github.com/devspace-sh/devspace / GetAuthConfig

Method GetAuthConfig

pkg/devspace/docker/auth.go:25–32  ·  view source on GitHub ↗

GetAuthConfig returns the AuthConfig for a Docker registry from the Docker credential helper

(ctx context.Context, registryURL string, checkCredentialsStore bool)

Source from the content-addressed store, hash-verified

23
24// GetAuthConfig returns the AuthConfig for a Docker registry from the Docker credential helper
25func (c *client) GetAuthConfig(ctx context.Context, registryURL string, checkCredentialsStore bool) (*dockerregistry.AuthConfig, error) {
26 isDefaultRegistry, serverAddress, err := c.GetRegistryEndpoint(ctx, registryURL)
27 if err != nil {
28 return nil, err
29 }
30
31 return getDefaultAuthConfig(checkCredentialsStore, serverAddress, isDefaultRegistry)
32}
33
34// Login logs the user into docker
35func (c *client) Login(ctx context.Context, registryURL, user, password string, checkCredentialsStore, saveAuthConfig, relogin bool) (*dockerregistry.AuthConfig, error) {

Callers 1

TestGetAuthConfigFunction · 0.95

Calls 2

GetRegistryEndpointMethod · 0.95
getDefaultAuthConfigFunction · 0.85

Tested by 1

TestGetAuthConfigFunction · 0.76