GET /v2/registries/{registry_name}/docker-credentials

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/registries/{registry_name}/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/registries/{registry_name}/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/registries/{registry_name}/docker-credentials?expiry_seconds=3600 will return credentials that expire after one hour.

Servers

Path parameters

Name Type Required Description
registry_name String Yes

The name of a container registry.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.