Pixi supports authentication with various package repositories including prefix.dev, private Quetz instances, anaconda.org, and PyPI registries.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/prefix-dev/pixi/llms.txt
Use this file to discover all available pages before exploring further.
Authentication Methods
Pixi supports multiple authentication methods:- Bearer Token - Used by prefix.dev
- Conda Token - Used by anaconda.org and Quetz
- Basic HTTP Auth - Username and password
- S3 Credentials - For S3-based channels
- Keyring - For PyPI registries
Conda Channel Authentication
Command Syntax
Authentication Examples
S3 authentication also supports AWS’s standard
AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables. See the S3 section for details.Authentication Types Explained
Bearer Token
Standard token authentication used by prefix.dev. The token is sent with every request in theAuthorization header:
Conda Token
Used by anaconda.org and Quetz servers. The token is encoded in the URL:Basic HTTP Authentication
Username and password authentication, commonly used with self-hosted servers:Credential Storage
Platform-Specific Storage
Pixi stores credentials securely using your system’s keychain:Fallback Storage
On servers without keychain support, Pixi stores credentials in an insecure JSON file:Override Authentication Storage
Use theRATTLER_AUTH_FILE environment variable to specify a custom credentials file:
RATTLER_AUTH_FILE takes precedence over the CLI --auth-file argument.Credentials File Format
The JSON file should follow this format:credentials.json
*.prefix.dev) match any subdomain like repo.prefix.dev.
You can also configure the authentication file in the global configuration file.
PyPI Authentication
Pixi supports two methods for PyPI authentication:- Keyring authentication
.netrcfile authentication
Keyring Authentication
Pixi uses the Python keyring library for PyPI authentication.Install with Keyring
.netrc File Authentication
Store PyPI credentials in a.netrc file:
For more details, see the .netrc file format documentation.
Best Practices
Use Secrets Management
Never commit credentials to version control. Use environment variables or CI/CD secrets.
Rotate Credentials
Regularly rotate authentication tokens and passwords for better security.
Minimal Permissions
Use tokens with minimal required permissions for each use case.
Environment-Specific Auth
Use different credentials for development, staging, and production environments.