GetAuthConfig returns the AuthConfig for a Docker registry from the Docker credential helper
(ctx context.Context, registryURL string, checkCredentialsStore bool)
| 23 | |
| 24 | // GetAuthConfig returns the AuthConfig for a Docker registry from the Docker credential helper |
| 25 | func (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 |
| 35 | func (c *client) Login(ctx context.Context, registryURL, user, password string, checkCredentialsStore, saveAuthConfig, relogin bool) (*dockerregistry.AuthConfig, error) { |