Closed
Description
Description
When installing from an index url containing environment variables for user authentication, pip no longer prompts for credentials in case the environment variables aren't set. This used to work up until v20.3.4.
Note: In our particular use case, packages are located on artifactory which returns 404 rather than 401 in case of incorrect credentials. Keyring is not an option since this needs to work in different environments where no keyring might be available.
Expected behavior
If environment variables needed for user authentication aren't set, pip should prompt for credentials.
pip version
21.1.1
Python version
3.6.9
OS
Ubuntu 18.04 LTS
How to Reproduce
This works for pip version <= 20.3.4:
> echo $USER
> echo $PASSWORD
> pip install -i https://${USER}:${PASSWORD}@my.private.index -r requirements.txt
Looking in indexes: https://:****@my.private.index
User for my.private.index:
Instead now I get this:
> echo $USER
> echo $PASSWORD
> pip install -i https://${USER}:${PASSWORD}@my.private.index -r requirements.txt
Looking in indexes: https://:****@my.private.index
ERROR: Could not find a version that satisfies the requirement XXX
Output
No response
Code of Conduct
- I agree to follow the PSF Code of Conduct.