snyk-docker-plugin
Version:
Snyk CLI docker plugin
13 lines (12 loc) • 601 B
TypeScript
export interface RegistryCredentials {
username?: string;
password?: string;
}
/**
* Resolves credentials for talking to a registry directly.
* Explicit credentials (flags / SNYK_REGISTRY_* env vars) always win. Otherwise
* we fall back to the credentials `docker login` stored, in Docker's own lookup
* order: credHelpers[host], then credsStore, then auths[host].
* Best-effort: never throws, and returns no credentials when none are found.
*/
export declare function resolveRegistryCredentials(registryHost: string, username?: string, password?: string): Promise<RegistryCredentials>;