Pip.conf regardless of the trusted host
I have a file pip.conf
like this:
[global]
trusted-host = <private IP>
extra-index-url = http://<private IP>/pypi
However, when I try to install a package (test package only) from a private pypi repo, I get an error that tells me to add --trusted-host <private IP>
. If I do this, I can successfully install the package, so I know I am pip
reading the file pip.conf
. Why doesn't it support configuration trusted-host
? I have checked three times that the IP addresses match in the config file.
Several blogs and a cursory Google search seem to suggest that this is needed. ( https://pseudoscripter.wordpress.com/2016/05/07/pip-the-repository-located-at-some-ip-is-not-a-trusted-or-secure-host-and-is-being -ignored / )
source to share
Couldn't this be a problem for different pip.conf with different configurations? According to the official docs :
The names and locations of the configuration files vary slightly on different platforms. You can have a configuration for each user, for virtual users, or site-wide (common to all users).
- On Unix, the default config file is $ HOME / .config / pip / pip.conf, which respects the XDG_CONFIG_HOME environment variable.
- There is also a deprecated per-user config file that is also honored and located at $ HOME / .pip / pip.conf on Unix and macOS.
- Inside virtualenv, on Unix and macOS $ VIRTUAL_ENV / pip.conf
- System-wide, on Unix the file can be located at /etc/pip.conf. Alternatively, it can be in the "pip" subpixel of any of the paths specified in the XDG_CONFIG_DIRS environment variable (if it exists), for example /etc/xdg/pip/pip.conf.
source to share