Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
    • Yandex Cloud Partner program
  • Blog
  • Pricing
  • Documentation
© 2025 Direct Cursus Technology L.L.C.
Yandex Cloud Registry
  • Getting started
    • All guides
    • Creating a registry
        • Installing and configuring Docker
        • Authentication in Cloud Registry
        • Creating a Docker image
        • Pushing a Docker image to a registry
        • Pulling a Docker image from a registry
  • Access management
  • Pricing policy
  • CLI reference
  • Audit Trails events

In this article:

  • Authentication methods
  • Authenticating as a user
  1. Step-by-step guides
  2. Managing artifacts
  3. Docker image
  4. Authentication in Cloud Registry

Authentication in Cloud Registry

Written by
Yandex Cloud
Updated at January 22, 2025
  • Authentication methods
  • Authenticating as a user

Before you start using Cloud Registry, you need to configure Docker and get authenticated to use the appropriate interface:

  • In the management console, the minimum required role for a folder is viewer.
  • In the Docker CLI or Yandex Managed Service for Kubernetes, the minimum required role for a registry is cloud-registry.artifacts.puller.

Assign the required role to the Yandex Cloud user. Read about authentication methods and choose the appropriate one.

For more information about roles, see Access management in Yandex Cloud Registry.

Authentication methodsAuthentication methods

You can authenticate:

  • As a user:
    • Using an OAuth token (with a 12-month lifetime).
    • Using an IAM token (with a 12 hours lifetime or less).

Authenticating as a userAuthenticating as a user

Using an OAuth token
Using an IAM token

Note

An OAuth token lives 12 months. After that, you need to get a new one and get authenticated again.

  1. If you do not have Docker yet, install it.

  2. If you do not have an OAuth token yet, get one by following this link.

  3. Run the following command:

    echo <OAuth_token>|docker login \
      --username oauth \
      --password-stdin \
     registry.yandexcloud.net
    

    Where:

    • <OAuth_token>: Body of the previously obtained OAuth token.
    • --username: Token type. oauth means that an OAuth token is used for authentication.
    • registry.yandexcloud.net: The endpoint that Docker will access when working with the image registry. If it not specified, the request will be sent to Docker Hub as the default service.

Note

The IAM token has a short lifetime: no more than 12 hours. This makes it a good method for applications that automatically request an IAM token.

  1. If you do not have Docker yet, install it.

  2. Get an IAM token.

  3. Run the following command:

    echo <IAM_token>|docker login \
      --username iam \
      --password-stdin \
      registry.yandexcloud.net
    

    Where:

    • <OAuth>: Body of the previously obtained IAM token.
    • --username: Token type. iam means that an IAM token is used for authentication.
    • registry.yandexcloud.net: The endpoint that Docker will access when working with the image registry. If it not specified, the request will be sent to Docker Hub as the default service.

When running the command, you may get this error message: docker login is not supported with yc credential helper. In such a case, disable the Docker credential helper.

Was the article helpful?

Previous
Installing and configuring Docker
Next
Creating a Docker image
© 2025 Direct Cursus Technology L.L.C.