-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--trusted-host in requirements.txt is ignored #3799
Comments
I am also having this issue. Based on a quick scan of pip source, I do not believe It appears (again, quick scan) that on the command line The fact that pip uses two different mechanisms for the same option is disturbing. |
trusted-host options is for command-line or pip.conf only. It has no business being allowed in requirements.txt as that defeats the purpose of protecting your deployment/build etc. |
If you are worried about security then |
Malicious |
This seems to still be an issue for me with Pip 9.0.1. Are there any thoughts about what the correct behavior should be? For me the behavior that occurs when |
Out of the two current behaviours, I'm not sure which one is better. I guess that discussion is something we can defer until someone actually has the interest to opens a PR for this. For that reason, I've labelled this issue as an "deferred till PR". This label is essentially for indicating that further discussion related to this issue should be deferred until someone comes around to make a PR. This does not mean that the said PR would be accepted - it has not been determined the change would be useful to pip and that decision has been deferred until the PR is made. |
I posted PR #6603 for this. I implemented the PR so that |
FYI, in my implementation of this in PR #6603, I added an INFO log message whenever a |
pip bug Joe found an open bug indicating pip doesn't recognize the trusted host option in requirements files (pypa/pip#3799) so add the option to the pip command in the Makefile when necessary. This includes restoring the insecure (i.e., -k) curl check.
According to the release notes and the old issue #2822, trusted-host should work in a requirements.txt file, but it has no effect. I can't find it documented but since it doesn't generate a warning, I assume it's still supported.
This is the requirements.txt file:
It does not work unless I give the trusted-host option on the command-line:
The text was updated successfully, but these errors were encountered: