Clarify docs example for keyring subprocess auth with Google Artifact Registry #11971
Open
1 task done
Labels
C: keyring
Related to pip's keyring integration
S: needs triage
Issues/PRs that need to be triaged
type: bug
A confirmed bug or unintended behavior
Description
Hi,
thanks for the great additions with keyrings in pip 23.1 :) I discovered that the docs here https://pip.pypa.io/en/stable/topics/authentication/ on auth is missing some vital info for auth with Google Artifact Registry.
Trying to use the new keyring delegation calling with
Does not work
pip install --no-input --keyring-provider=subprocess --index-url=https://us-east4-python.pkg.dev/<project>/<repo>/simple <package_name>
Does work
pip install --no-input --keyring-provider=subprocess --index-url=https://[email protected]/<project>/<repo>/simple <package_name>
It seems the username needs to be
oauth2accesstoken
. It was only obvious after digging deep into the code forkeyrings.google-artifactregistry-auth that this is a hard coded username, and any username provided to the CLI is ignored.
The CLI interface in keyrings could be more obvious and also return the overridden username, but that's not for pip to solve i guess.
Expected behavior
Update docs to state that this username needs to be used for any usage with Google Artifact Registry
pip version
23.1
Python version
3.11
OS
Mac
How to Reproduce
You need a working Google Artifact Registry setup. See description
Output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: