Yandex Cloud
Search
Discuss with expertTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
  • Marketplace
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2026 Direct Cursus Technology L.L.C.
Yandex Cloud Registry
  • Getting started
    • All guides
        • Creating a Go module
        • Pulling a Go module to the registry
        • Pushing a Go module from the registry
      • Deleting an artifact from a registry
    • Creating a lifecycle policy
  • Access management
  • Pricing policy
  • Terraform reference
  • Audit Trails events

In this article:

  • Environment setup
  • Adding a Go module to a project
  1. Step-by-step guides
  2. Managing artifacts
  3. Go artifact
  4. Pushing a Go module from the registry

Pulling a Go module from a Cloud Registry

Written by
Yandex Cloud
Updated at July 8, 2026
View in Markdown
  • Environment setup
  • Adding a Go module to a project

To pull a Go module, you need the cloud-registry.artifacts.puller role or higher.

You can pull Go modules using the standard go command: your Cloud Registry operates as a Go proxy and implements Module Proxy Protocol.

Environment setupEnvironment setup

  1. Specify the registry as a proxy for Go modules and disable checksum verification via the public Go checksum database for Go modules within your registry:

    export GOPROXY=https://registry.yandexcloud.net/go/<registry_ID>,https://proxy.golang.org,direct
    export GONOSUMDB=registry.yandexcloud.net/*
    

    Where:

    • GOPROXY: Comma-separated list of Go proxies. The go command searches for a Go module in every source, one by one:
      • https://registry.yandexcloud.net/go/<registry_ID>: Your Cloud Registry.
      • https://proxy.golang.org: Public Go proxy for modules from public repositories.
      • direct: Direct access to a VCS repository, e.g., GitHub, if the Go module was not found in any of the proxies.
    • GONOSUMDB: Path templates of Go modules to skip checksum verification for.
  2. Provide the registry authentication credentials. The go command only supports basic authentication, so we recommend providing the credentials via the ~/.netrc file.

    IAM token
    API key

    Add the following line to the ~/.netrc file:

    machine registry.yandexcloud.net login iam password <IAM_token>
    

    Add the following line to the ~/.netrc file:

    machine registry.yandexcloud.net login api_key password <API_key>
    

    Note

    Read access to the ~/.netrc file must be restricted to its owner. Set the access permissions:

    chmod 600 ~/.netrc
    

Adding a Go module to a projectAdding a Go module to a project

  1. Navigate to the Go project root where the go.mod file resides.

  2. Add the required version of the Go module:

    go get registry.yandexcloud.net/go/<registry_ID>/<module_name>@<version>
    

    For example:

    go get registry.yandexcloud.net/go/e5o6a2blpkb6********/mymodule@v1.0.0
    

    This command will pull the Go module to the local cache and add a corresponding record to go.mod and go.sum:

    go: added registry.yandexcloud.net/go/e5o6a2blpkb6********/mymodule v1.0.0
    
  3. Optionally, if the Go module is already used in your code via the import directive, synchronize go.mod and go.sum:

    go mod tidy
    
  4. Optionally, pull all project dependencies to the local cache without executing a build:

    go mod download
    

Useful linksUseful links

  • Pulling a Go module to the registry
  • Creating a Go module

Was the article helpful?

Previous
Pulling a Go module to the registry
Next
Deleting an artifact from a registry
© 2026 Direct Cursus Technology L.L.C.