How to config pip.ini asking for credentials?

Viewed 378

I'm distribute python 3.9.7 and pip 21.2.3 in my department over chocolatey as upgrade to python 3.6.3 for windows. Pip shall get packages from our own artifactory (jfrog) repo. In a previous version my %appdata%\pip\pip.ini file looked like this:

[global]
index-url = https:\\<username>@<artifactoryserver>/<piprepo>

As the password is missing, the previous version of pip asked for the credentials, when some tried to install a python plugin, but with pip 21.2.3 it says immediately wrong credentials. Because of security reasons, it is not allowed to store a apikey for artifactory readable in pip.ini in my department.

Do you have an idea to configure pip 21.2.3 asking for credentials in windows when installing a python plugin from an own pip-repository?

1 Answers

It's a bug which has been fixed in PIP 21.3. Check the release notes:

https://pip.pypa.io/en/stable/news/

Fix the auth credential cache to allow for the case in which the index url contains the username, but the password comes from an external source, such as keyring. (#10269)

If possible upgrade to the latest PIP version 21.3.1 and see if it helps.

Related