GoogleCloudPlatform / GoogleCloudPlatform/artifact-registry-python-tools

Document the required username

Open
#48 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
23
Forks
11
PR merge metrics
No merged PRs in 30d

Description

When using keyring as a library this package's plugin returns the correct username (i.e: `oauth2accesstoken`), however when using keyring as a CLI tool that value is not printed. I'm guessing that that's just how keyring's CLI works and I'm not suggesting that that's something this project try to change (at least it doesn't feel like a short term or easy solution).

What would be good however is if this project documented the username which is required to be used with the credential which is printed out.

It seems that any username can be specified as the input, which is partly why this can be confusing -- there's nothing to warn the user that they're using the wrong username.

I hit this while trying to use pip's "subprocess" keyring provider (recently added in https://github.com/pypa/pip/pull/11589; documented at https://pip.pypa.io/en/stable/topics/authentication/#using-keyring-as-a-command-line-application), which calls keyring as a CLI. In such cases neither pip nor keyring can know the right username upfront (since they don't know which backend will provide the credential).

It would be great if this project could document that `oauth2accesstoken` is the right username to use when e.g: constructing urls to GCP hosted PyPI instances so that users who want to use pip & keyring in this way can more easily do so.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.