Skip to content

Add flag to force pip to always fetch password from keyring #10269

@rittneje

Description

@rittneje

What's the problem this feature will solve?

I am trying to fetch modules from a private server. In order to avoid storing this password in filesystem or environment, I have added it to keyring instead. I have also set https://[email protected] as global.index-url in my pip.conf.

Based upon the verbose logs from pip install, it seems that pip will first do the request without a password, get a 401, and then fetch the password from keyring.

Describe the solution you'd like

There should be a way to force pip to always fetch the password from keyring in the first place. This would prevent it from spamming the server with unauthenticated requests.

Alternative Solutions

I don't want to put the password in plaintext in my pip.conf or environment variables, so I'm not aware of any alternative solution.

Additional context

n/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions