question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pip 7.0.1: you should use "--trusted-host". Hey, no such option "--trusted-host"!

See original GitHub issue
$ cat req.txt 
--extra-index-url http://pip.mycompany.com/simple 
mylib
myanotherlib

$ pip install -r req.txt
Collecting mylib (from -r req.txt (line 2))
.../urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  The repository located at pip.mycompany.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS it is recommended to use HTTPS instead, otherwise you may silence this warning and allow it anyways with '--trusted-host pip.mycompany.com'.
  Could not find a version that satisfies the requirement mylib (from -r req.txt (line 2)) (from versions: )
No matching distribution found for mylib (from -r req.txt (line 2))

$ cat req1.txt 
--extra-index-url http://pip.mycompany.com/simple 
--trusted-host pip.mycompany.com
mylib
myanotherlib

$ pip install -r req1.txt 
Usage: pip [options]

pip: error: no such option: --trusted-host
$ 

I know that i can run pip install -r file.txt --trusted-host=mycompany.com but I configure my servers with Chef, not running pip directly.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:23 (4 by maintainers)

github_iconTop GitHub Comments

18reactions
hzbdcommented, Dec 19, 2015
cat ~/.pip/pip.conf
[global]
index-url = http://mirrors.aliyun.com/pypi/simple/

[install]
trusted-host=mirrors.aliyun.com

this should be feasible.

7reactions
smiracommented, May 30, 2015

I believe --trusted-host should go to pip.conf or to command line. It should not be part of requirements.txt.

Read more comments on GitHub >

github_iconTop Results From Across the Web

pip 7.0.1: you should use "--trusted-host". Hey, no such option "
pip 7.0.1 : you should use "--trusted-host". Hey, no such option "--trusted-host"!
Read more >
Get error when installing packages with requirements.txt
Description of problem: error message "no such option: --trusted-host" when installing packages with requirements.txt - python-2.x ...
Read more >
Configuring trusted-host for setuptools - python - Stack Overflow
setuptools uses easy_install under the hood, and easy_install doesn't have such option. See python setup.py easy_install --help.
Read more >
Changelog - pip documentation v21.1.dev0
To keep the previous behavior, users should use the new --exclude option. (#4256) ... Fix not sending client certificates when using --trusted-host ....
Read more >
VMware Trust Authority and Entrust KeyControl
Configure the Trusted Key Provider for Trusted Hosts . ... To use vSphere Trust Authority, your vSphere environment must meet these.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found