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.

Support (or don't support) including a port number in --trusted-host

See original GitHub issue

What’s the problem this feature will solve? Refer to #6705 for HTTP indexes, --trusted-host option should be sans-port, if you give a port part then it aborts:

$ pip install -i http://localtest.me:5000 urllib3 --trusted-host localtest.me:5000
Looking in indexes: http://localtest.me:5000
Collecting urllib3
  The repository located at localtest.me is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with '--trusted-host localtest.me'.
  Could not find a version that satisfies the requirement urllib3 (from versions: )
No matching distribution found for urllib3

While for HTTPS indexes, --trusted-host should carry the port. (Now a fix is landed on master to support both, with port and without port).

Describe the solution you’d like Pip should handle trusted-host correctly, whether the host has a port part or not. with --trusted-host example.org you trust all the subpaths and wildcard ports on the same host. with --trusted-host example.org:8080 you only trust requests to 8080 port.

Alternative Solutions

Additional context

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
frostmingcommented, Aug 23, 2019

@cjerdonek I have created a PR #6909 together with some test cases to illustrate the changes.

1reaction
frostmingcommented, Aug 23, 2019

@cjerdonek Great, I will take a look when I get a chance.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Trusted Host settings | Installing Drupal
Help improve this page · Log in, click Edit, and edit this page · Log in, click Discuss, update the Page status value,...
Read more >
Service overview and network port requirements for Windows
A roadmap of ports, protocols, and services that are required by Microsoft client and server operating systems, server-based applications, ...
Read more >
Port numbers, URLs, and IP addresses | Deep Security
Deep Security default port numbers, URLs, IP addresses, and protocols are listed in the sections below. If a port, URL or IP address...
Read more >
If your computer doesn't recognize your iPhone or iPad
Don't connect to a USB hub, display, or other device. If that doesn't help, disconnect your device and all other USB devices and...
Read more >
Powershell remoting with ip-address as target - Stack Overflow
For more information, see the about_Remote_Troubleshooting Help topic. Edit3: I know about the trusted-hosts setting of WSMan, but that doesn't ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

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