Skip to main content
Manage authentication credentials for package channels.

Usage

pixi auth <COMMAND>

Description

The pixi auth command manages authentication credentials for conda and PyPI package channels. It stores credentials securely and uses them automatically when accessing private channels or uploading packages.
The pixi auth command uses the rattler authentication system. All subcommands and options are provided by rattler.

Subcommands

pixi auth login

Authenticate with a package channel.
pixi auth login [OPTIONS] <HOST>
Arguments:
  • <HOST> - The host to authenticate with (e.g., https://prefix.dev, conda.anaconda.org)
Options:
  • --token <TOKEN> - Provide the authentication token directly
  • --username <USERNAME> - Username for basic authentication
  • --password <PASSWORD> - Password for basic authentication
  • --conda-token <TOKEN> - Conda token for Anaconda.org style authentication

pixi auth logout

Remove stored credentials for a host.
pixi auth logout <HOST>

Examples

Login to Prefix.dev

Authenticate with Prefix.dev using an interactive prompt:
pixi auth login https://prefix.dev
You’ll be prompted for your authentication token.

Login with token

Provide the token directly:
pixi auth login https://prefix.dev --token YOUR_TOKEN_HERE

Login with username/password

Use basic authentication:
pixi auth login https://my-private-channel.com --username myuser --password mypass

Login to Anaconda.org

Authenticate with Anaconda.org:
pixi auth login conda.anaconda.org --conda-token YOUR_ANACONDA_TOKEN

Logout

Remove stored credentials:
pixi auth logout https://prefix.dev

Authentication Storage

Credentials are stored securely in:
  • Linux: ~/.rattler/credentials.json
  • macOS: ~/.rattler/credentials.json
  • Windows: %USERPROFILE%\.rattler\credentials.json
You can override this location using:
  • The RATTLER_AUTH_FILE environment variable
  • The authentication-override-file configuration option

Supported Hosts

pixi auth login https://prefix.dev
Get your token from: https://prefix.dev/settings/tokens
pixi auth login conda.anaconda.org --conda-token TOKEN
Get your token from: https://anaconda.org/settings/tokens
pixi auth login https://my-quetz-instance.com
Supports token-based authentication.
pixi auth login https://my-company.com/conda
Works with any conda-compatible channel that requires authentication.

Usage with Commands

Once authenticated, credentials are automatically used:
# Add package from private channel
pixi auth login https://prefix.dev/my-private-channel
pixi add my-private-package

# Upload packages
pixi auth login https://prefix.dev
pixi upload --url https://prefix.dev/my-channel my-package.conda

Environment Variables

RATTLER_AUTH_FILE
path
Override the default credentials file location.
export RATTLER_AUTH_FILE=/custom/path/credentials.json
pixi auth login https://prefix.dev

Security Best Practices

Never commit credentials or tokens to version control. Use environment variables or secure secret management for CI/CD.
For CI/CD pipelines, use environment variables or secrets management:
# In CI/CD
echo "$AUTH_TOKEN" | pixi auth login https://prefix.dev --token -