Skip to content

Unable to authenticate to custom Anaconda Cloud domains for conda channel access #188

@danyeaw

Description

@danyeaw

I'm trying to use anaconda-auth to authenticate conda to a custom Anaconda Cloud domain (stage.anaconda.com) to access private channels, but I'm encountering 403 authentication errors despite following the configuration steps.

Expected Behavior

I should be able to:

  1. Configure anaconda-auth to use a custom domain (e.g., stage.anaconda.com)
  2. Login using anaconda auth login
  3. Use conda to install packages from authenticated channels on that domain without needing to manually pass tokens via environment variables

Current Behavior

Even after configuration and authentication, conda cannot access the authenticated channel and returns 403 errors.

Steps to Reproduce

  1. Configure ~/.anaconda/config.toml:
default_site = "cloud-staging"

[sites."cloud-staging"]
domain = "stage.anaconda.com"
  1. Configure ~/.condarc:
channels:
  - https://repo-latest.dev-us-east-1.anaconda.cloud/repo/wheels-test
  1. Run anaconda auth login (successfully authenticates)

  2. Attempt to create an environment with a package from the authenticated channel:

ANACONDA_AUTH_DOMAIN=stage.anaconda.com CONDA_TOKEN=$(anaconda auth api-key) conda create -c https://repo-latest.dev-us-east-1.anaconda.cloud/repo/wheels-test/ fastapi -p /tmp/wheels

Result: 403 authentication errors

Issues

  • The authentication setup is overly complex and requires manually passing both ANACONDA_AUTH_DOMAIN and CONDA_TOKEN environment variables
  • Even with these environment variables set, authentication still fails
  • The anaconda auth login command doesn't appear to configure conda to automatically use the credentials for the configured domain
  • There's no clear integration between anaconda-auth configuration and conda's channel authentication

Expected Workflow

The ideal workflow should be:

  1. Configure the auth domain in ~/.anaconda/config.toml
  2. Run anaconda auth login
  3. Add authenticated channels to ~/.condarc
  4. Run conda commands normally - authentication should "just work" without manual token passing

Environment

  • Domain: stage.anaconda.com
  • Channel: https://repo-latest.dev-us-east-1.anaconda.cloud/repo/wheels-test/

Note:
There was a discussion about this in Slack, and @mattkram did debugging on the debug/wheels branch (https://github.com/anaconda/anaconda-auth/tree/debug/wheels), thanks Matt!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions