registryauth

package
v0.109.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildFailureHint

func BuildFailureHint(cfg *configfile.ConfigFile, imageRefs []string, failure error) string

BuildFailureHint returns user-facing guidance for registry auth failures. It returns an empty string for non-auth-related errors.

func IsAuthRelatedError

func IsAuthRelatedError(err error) bool

IsAuthRelatedError reports whether the provided error looks like a registry-authorization/authentication failure.

func ValidateDockerConfig added in v0.109.0

func ValidateDockerConfig(cfg *configfile.ConfigFile) error

ValidateDockerConfig verifies if the docker config file is readable for the current user in the container. It checks the path specified by the DOCKER_CONFIG environment variable or defaults to ~/.docker/config.json. Returns an error if the config file exists but is not readable or contains invalid content. Also checks for missing credential helper binaries configured in the docker config.

func WrapLookupError

func WrapLookupError(cfg *configfile.ConfigFile, imageRef string, lookupErr error) error

WrapLookupError wraps Docker auth token lookup failures with actionable hints for private-registry setups.

Types

type MissingHelper added in v0.109.0

type MissingHelper struct {
	// Helper is the short helper name (e.g. "osxkeychain").
	Helper string
	// Binary is the expected binary name (e.g. "docker-credential-osxkeychain").
	Binary string
	// Registries lists the config entries that rely on this helper.
	// The sentinel value "all" indicates the global CredentialsStore.
	Registries []string
}

MissingHelper describes a credential helper binary that is configured in the docker config but absent from the container's PATH.

func MissingConfiguredCredentialHelpers added in v0.109.0

func MissingConfiguredCredentialHelpers(cfg *configfile.ConfigFile) []MissingHelper

MissingConfiguredCredentialHelpers returns details about credential helper binaries that are explicitly configured in cfg but absent from PATH. It covers both the global CredentialsStore and every per-registry helper. Returns nil when all configured helpers are present or none are configured.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL