Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip still prompts for username/password even when keyring is configured #12661

Open
1 task done
Time0o opened this issue Apr 29, 2024 · 0 comments
Open
1 task done

pip still prompts for username/password even when keyring is configured #12661

Time0o opened this issue Apr 29, 2024 · 0 comments
Labels
S: needs triage Issues/PRs that need to be triaged type: bug A confirmed bug or unintended behavior

Comments

@Time0o
Copy link

Time0o commented Apr 29, 2024

Description

I'm trying to download a package from a GitLab registry using credentials stored via keyring. I believe I am following the documentation but pip neither uses the keyring credentials nor displays an error and instead just prompts for username/password.

$ which pip
/home/timo/python_venvs/my_venv/bin/pip
$ which keyring
/home/timo/python_venvs/my_venv/bin/keyring
$ echo <MY_TOKEN> | keyring set https://gitlab.com/api/v4/groups/<MY_GROUP_ID>/-/packages/pypi/simple <MY_TOKEN_NAME>
$ pip install --keyring-provider import -i https://gitlab.com/api/v4/groups/<MY_GROUP_ID>/-/packages/pypi/simple <MY_PACKAGE>
User for gitlab.com:
...

Expected behavior

pip uses the credentials stored in keyring.

pip version

24.0

Python version

3.10.12

OS

Ubuntu 22.04.4 LTS

How to Reproduce

  1. Install pip and keyring
  2. Create a GitLab package registry and upload a Python package to it
  3. Create a GitLab access token with read_api rights
  4. Store the token via keyring
  5. Run pip install --keyring-provider import -i https://gitlab.com/api/v4/groups/<MY_GROUP_ID>/-/packages/pypi/simple <MY_PACKAGE>

Output

No response

Code of Conduct

@Time0o Time0o added S: needs triage Issues/PRs that need to be triaged type: bug A confirmed bug or unintended behavior labels Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S: needs triage Issues/PRs that need to be triaged type: bug A confirmed bug or unintended behavior
Projects
None yet
Development

No branches or pull requests

1 participant