dots.v2.registry.dockerCredentials.get()
Generated on 27 Oct 2026
from DoTs version
v1.21.0
deprecated
Usage
client.v2.registry.dockerCredentials.get(requestConfiguration?: RequestConfiguration<DockerCredentialsRequestBuilderGetQueryParameters>): Promise<undefined | Docker_credentials>Description
Note: This endpoint is deprecated. Please use the /v2/registries endpoint instead.
In order to access your container registry with the Docker client or from a
Kubernetes cluster, you will need to configure authentication. The necessary
JSON configuration can be retrieved by sending a GET request to
/v2/registry/docker-credentials.
The response will be in the format of a Docker config.json file. To use the
config in your Kubernetes cluster, create a Secret with:
kubectl create secret generic docr \
--from-file=.dockerconfigjson=config.json \
--type=kubernetes.io/dockerconfigjson
By default, the returned credentials have read-only access to your registry
and cannot be used to push images. This is appropriate for most Kubernetes
clusters. To retrieve read/write credentials, suitable for use with the Docker
client or in a CI system, read_write may be provided as query parameter. For
example: /v2/registry/docker-credentials?read_write=true
By default, the returned credentials will not expire. To retrieve credentials
with an expiry set, expiry_seconds may be provided as a query parameter. For
example: /v2/registry/docker-credentials?expiry_seconds=3600 will return
credentials that expire after one hour.
Parameters
expirySecondsinteger optionalExample:
3600The duration in seconds that the returned registry credentials will be valid. If not set or 0, the credentials will not expire.
readWriteboolean optionalExample:
trueBy default, the registry credentials allow for read-only access. Set this query parameter to
trueto obtain read-write credentials.
Request Sample
Response Example
More Information
See /v2/registry/docker-credentials in the API reference for additional detail on responses, headers, parameters, and more.