Skip to main content

resolveCredentials

@webda/oci


Function: resolveCredentials()

resolveCredentials(registry, explicit?, dockerConfig?, helper?): PlainRegistryCredentials | undefined

Defined in: packages/oci/src/auth.ts:163

Find the credentials of a registry

Order: the explicit credentials, the Docker configuration (credHelpers, auths, then credsStore). Without credentials, the registry is used anonymously.

Parameters​

registry​

string

registry from the image reference

explicit?​

Record<string, RegistryCredentials> = {}

credentials per registry from the parameters

dockerConfig?​

any = ...

the Docker configuration, see readDockerConfig

helper?​

(helper, serverUrl) => PlainRegistryCredentials | undefined

credential helper runner, for tests

Returns​

PlainRegistryCredentials | undefined

the credentials with plain values, undefined for anonymous access