Yandex Cloud
Search
Contact UsGet started
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • AI for business
    • Business tools
  • 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
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
© 2025 Direct Cursus Technology L.L.C.
Yandex Cloud Registry
  • Getting started
    • All guides
    • Creating a registry
        • Setting up NuGet
  • Access management
  • Pricing policy
  • Audit Trails events
  1. Step-by-step guides
  2. Managing artifacts
  3. NuGet artifact
  4. Setting up NuGet

Setting up NuGet

Written by
Yandex Cloud
Updated at September 10, 2025
  1. Set up the NuGet configuration file:

    dotnet CLI
    NuGet CLI
    Manually

    To edit the NuGet configuration file using the dotnet CLI, run this command:

    dotnet nuget add source "https://registry.yandexcloud.net/nuget/v3/<registry_ID>/index.json" \
      -n "cloud-registry" \
      -u %REGISTRY_USERNAME% \
      -p %REGISTRY_PASSWORD% \
      --store-password-in-clear-text --protocol-version 3
    

    To edit the NuGet configuration file using the NuGet CLI, run the nuget.exe file with the following parameters:

    nuget sources add -Name "cloud-registry" \
      -Source "https://registry.yandexcloud.net/nuget/v3/<registry_ID>/index.json" \
      -Username "%REGISTRY_USERNAME%" \
      -Password "%REGISTRY_PASSWORD%" \
      -StorePasswordInClearText -ProtocolVersion 3
    
    1. Open the NuGet configuration file:

      Note

      When using the dotnet CLI, the configuration file is located at ~/.nuget/NuGet/NuGet.Config, while for the NuGet CLI, at ~/.config/NuGet/NuGet.Config.

    2. Update the configuration in the file as follows:

      <?xml version="1.0" encoding="utf-8"?>
      <configuration>
        <packageSources>
          <add key="cloud-registry" value="https://registry.yandexcloud.net/nuget/v3/<registry_ID>/index.json" protocolVersion="3" />
        </packageSources>
      
        <packageSourceCredentials>
          <cloud-registry>
            <add key="Username" value="%REGISTRY_USERNAME%" />
            <add key="ClearTextPassword" value="%REGISTRY_PASSWORD%" />
          </cloud-registry>
        </packageSourceCredentials>
      </configuration>
      
  2. Depending on the authentication method:

    IAM token
    OAuth token
    1. Get an IAM token for the Yandex account or service account you are going to use for authentication.

    2. Create environment variables named REGISTRY_USERNAME and REGISTRY_PASSWORD containing data for IAM token authentication:

      export REGISTRY_USERNAME="iam"
      export REGISTRY_PASSWORD="<IAM_token>"
      

      Where <IAM_token> is the IAM token you got earlier.

    1. Get an OAuth token for the Yandex account you are going to use for authentication.

    2. Create environment variables named REGISTRY_USERNAME and REGISTRY_PASSWORD containing data for OAuth token authentication:

      export REGISTRY_USERNAME="oauth"
      export REGISTRY_PASSWORD="<OAuth_token>"
      

      Where <OAuth_token> is the OAuth token you got earlier.

Was the article helpful?

Previous
Setting up npm
Next
Setting up PyPI
© 2025 Direct Cursus Technology L.L.C.