:wave: Hello everyone. Iā€™m interested in using Pan...
# general
šŸ‘‹ Hello everyone. Iā€™m interested in using Pants to install packages from a private Python package index hosted by Azure Artifacts. The recommended solution is to install a plugin for keyring so that pip can use it to discover the credentials: https://pip.pypa.io/en/stable/topics/authentication/#keyring-support. In this case, keyring, artifacts-keyring (the plugin) and pip would all be installed in the same virtualenv so pip can find the plugin. Is this possible to do with Pants?
Hi! Interesting use case. Let me think about this for a second.
Which version of Pants are you on?
Pants invokes Pip via Pex, and both Pex and the underlying Pip are strongly sandboxed, for secure and repeatable builds. So I don't see an easy way to do this without some code changes.
You can set
Copy code
indexes.add = ["https://<your-feed-name>:<your-PAT-key>@pkgs.dev.azure.com/<your-organization-name>/<your-project-name>/_packaging/<your-feed-name>/pypi/simple/"]
see here for details
But obviously this is not great because it exposes your Personal Access Token
But, you can set this in your private
So that should work as a workaround
And if you can open a feature request issue at https://github.com/pantsbuild/pants/issues/new/choose for the better solution of supporting keyring, that would be awesome
Thanks for the quick reply! I am using Pants 2.10. I will open a feature request.
Great! Let us know if that workaround works for you until we can figure this out
@average-balloon-31442 can you see this thread?
šŸ‘ 1