uv
uv copied to clipboard
No keyring support for authentication
It appears uv does not have support for keyring like pip does.
https://pip.pypa.io/en/stable/topics/authentication/#keyring-support
This seems reasonable. We'll need to find a Rust equivalent to https://pypi.org/project/keyring/
Perhaps https://github.com/hwchen/keyring-rs
keyring is a cli app already. Probably want to add support for existing Python one first to maximize compatibility. Different auth methods need different plugins. AWS, Azure and Google Cloud each have their own plugins to use the more secure auth methods (no username/password).
Then you could migrate to a native only solution.
Agreed that calling the cli is probably easiest. The cli equivalent of what pip is calling in python is really simple: keyring get <url> <username_which_is_often_empty>
Agreed that calling the cli is probably easiest. The cli equivalent of what pip is calling in python is really simple:
keyring get <url> <username_which_is_often_empty>
pip does already actually directly call the CLI tool if keyring isn't installed in the Python environment but is available on PATH or --keyring-provider subprocess is passed - so this behaviour would be consistent.
https://pip.pypa.io/en/stable/topics/authentication/#using-keyring-as-a-command-line-application
Thanks for the details! Much appreciated.
This seems reasonable. We'll need to find a Rust equivalent to https://pypi.org/project/keyring/
Perhaps https://github.com/hwchen/keyring-rs
I'd also discourage this approach. There are many Python plugins to keyring for various cloud hosted private Pypi registries (eg. Google Artifact Registry, Azure DevOps, etc). I imagine these would be incompatible with keyring-rs and so you'd lose a lot of the benefit of the keyring integration unless all of these plugins were also reimplemented.
https://github.com/Microsoft/artifacts-keyring https://github.com/GoogleCloudPlatform/artifact-registry-python-tools
As of #2254 --keyring-provider subprocess is available. It has been tested on at least two Google artifact registry projects (using keyrings.google-artifactregistry-auth plugin) as working.