Skip to content

Is there a way to install a package that is located at an index-url that uses the keyring authentication method? #1280

Closed Answered by Gitznik
search5 asked this question in Q&A
Discussion options

You must be logged in to vote

I built a small CLI myself and deployed it to GCP.

I was able to install it with pipx via the following command:

pipx install \
    --index-url=https://<gcp-region>-python.pkg.dev/<project>/<registry-name>/simple/ \
    --preinstall=keyrings.google-artifactregistry-auth \
    --pip-args='--extra-index-url https://pypi.org/simple/ --keyring-provider import' \
    <app-name>

Pipx version 1.4.3.

If you get auth errors, you may have to run one of the following commands first (either should work according to the keyring docs):

gcloud auth application-default login
gcloud auth login

Will mark this as accepted answer and close the discussion. Let me know if you have any other questions.

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@search5
Comment options

@Gitznik
Comment options

@Gitznik
Comment options

@Gitznik
Comment options

Answer selected by Gitznik
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
awaiting response Awaiting re-engagement by contributor
3 participants