Possible to prompt for username and password instead of hardcoding in pip.ini file?

Viewed 127

My org has an instance of Artifactory where Python packages are to be installed from. I need to point pip to our internal Artifactory endpoint so I can develop locally with packages installed from here.

After some research, I found I needed to:

  1. Create a pip.ini file in one of the locations shown after running pip config -v list
  2. To this new pip.ini file, add:
[global]
index-url = https://<USERNAME>:<PASSWORD>@artifactory.mycompany.com/artifactory/api/pypi/python/simple

How do I keep my Username and Password out of the URL above?

I'd rather be prompted or some other method than storing this info in plaintext in a config file.

0 Answers
Related