-
Notifications
You must be signed in to change notification settings - Fork 7
Description
What is the idea?
Enable conda-pypi to authenticate with private PyPI repositories by integrating with the conda-auth plugin. This would extend the --index functionality from issue #70 to support repositories that require authentication.
Why is this needed?
Many organizations use private PyPI repositories with various authentication providers. Currently, conda-pypi can only access public indices. Also #77 adds anacona-auth support, but that is only for users of anaconda itself.
What should happen?
Users should be able to authenticate with private PyPI indices using the same credential management system as conda channels. The workflow would be:
conda auth login --token <token> test.pypi.org
conda pypi install --index https://test.pypi.org/simple cowsay
Using custom PyPI index: https://test.pypi.org/simple
Authentication via conda-auth is available
Converting PyPI packages to conda format: \ Channels:
- file:///Users/dyeaw/Library/Application%20Support/pypi
- defaults
Platform: osx-arm64
Collecting package metadata (repodata.json): done
Solving environment: done
done
Installing converted packages: \ Channels:
- file:///Users/dyeaw/Library/Application%20Support/pypi
- defaults
Platform: osx-arm64
Collecting package metadata (repodata.json): done
Solving environment: done
\
## Package Plan ##
environment location: /Users/dyeaw/miniconda3/envs/my-env
added / updated specs:
- cowsay
The following packages will be downloaded:
package | build
---------------------------|-----------------
cowsay-6.1.2 | pypi_0 24 KB file:///Users/dyeaw/Library/Application%20Support/pypi
------------------------------------------------------------
Total: 24 KB
The following NEW packages will be INSTALLED:
cowsay pypi/noarch::cowsay-6.1.2-pypi_0
Downloading and Extracting Packages:
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
done
Additional Context
This builds on the --index support from issue #70 and leverages the existing conda-auth plugin infrastructure. When implementing this with #77, both plugins can serve as auth backends that can be selected based on which ones are installed and have tokens for the domain.