Skip to main content
Manage authentication credentials for package channels.

Usage

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.
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.

Examples

Login to Prefix.dev

Authenticate with Prefix.dev using an interactive prompt:
You’ll be prompted for your authentication token.

Login with token

Provide the token directly:

Login with username/password

Use basic authentication:

Login to Anaconda.org

Authenticate with Anaconda.org:

Logout

Remove stored credentials:

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

Get your token from: https://prefix.dev/settings/tokens
Get your token from: https://anaconda.org/settings/tokens
Supports token-based authentication.
Works with any conda-compatible channel that requires authentication.

Usage with Commands

Once authenticated, credentials are automatically used:

Environment Variables

path
Override the default credentials file location.

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: