-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
not passed to pip
when installing from a lockfile
#2979
Comments
I believe db5a862 by @techalchemy (or some change around that, 7429881 / 683df2f) introduced this. This section: Lines 749 to 761 in ddb40ec
Ends up calling It also seems to correctly parse the Currently |
Thanks for catching this. Is this before the bug fix release goes out! Note that there was another issue on the topic already so it’s helpful to find the actual cause. I think you’re spot on, we just need to actually do something with the correctly parsed trusted host. There is some redundant code there as well, but I’m not confident enough to remove it just now We have had an endless stream of issues around sources so I’m anxious to have this sorted. |
We can sort this in a slightly hacky way by just passing I don't think this is the best long term solution, but if it sounds OK I could try and prepare a PR? |
- Fix marker cleaning - Fixes #2979 Signed-off-by: Dan Ryan <[email protected]>
- Fix marker cleaning - Fixes #2979 Signed-off-by: Dan Ryan <[email protected]>
Is there a way to |
Hello. It is seems to me that this bug is back again. I am trying ty install a package from my private repo:
but got this output (
Installation via pip directly succeeds. It is frustrating that solution provided by the error output is the thing which is not working. Edit: Using a current version of pipenv:
|
@KrobotP It is plausible that something broke when the new version of pip was vendor'd in. This issue report is ancient, can you do some more digging and open a new report? The last version to have the prior pip was |
Ah actually @KrobotP I think you are running into index restricted packages security enhancement. There are some other closed issue reports that talk more in depth about how to handle the case of multiple indexes. EDIT: Like this one: #5053 |
@matteius thank you for fast reaction. I have inspected the issue and tryied
the package is then installed successfuly (also with dependencies), but pipenv fails with another error:
|
One more update: I read the https://pipenv.pypa.io/en/latest/advanced/#specifying-package-indexes (refered from the issue above) and after modyfying 'my_package' dependency in Pipfile with 'index' option:
However, (kind of 'fun fact') this also worked, when I mystakenly run |
I have tried this also on the actual version (2022.6.7). While setting 'index' option for the package does not work, it works to leave only my private repo as a single source within the Pipfile. What confuses me is that I dont have other dependecies and subdependencies mirrored in my private repo. As I understand this https://pipenv.pypa.io/en/latest/advanced/#specifying-package-indexes it should not work without dependencies from public pypi mirrored to my private one but it does. |
@KrobotP I think it wasn't until the
Because of that you either have to make your default index be the private index, or you have to specify also the other package in the private repo in the Pipfile as well for the purpose of specifying the index. For example:
This will marry up the version requirements that the resolver determines with the requirement that
Does your Pipfile still have the pypi source in it? If so, is it the default or secondary source? I am not sure but if you could open a new ticket about this with an example case that we can explore in more detail that would be helpful. It might just be that you have pypi defined and resolution is allowing it to be found at pypi ... not sure without a specific example. Preferably a new ticket so we can track it and not ping the old thread participants of this closed issue
Could you perhaps file a separate new ticket about this with some details of how to reproduce? That seems like something we should look into. |
No. Things start to work after I deleted pypi source (so only one source in my Pipfile is my private repo).
Ok. I will make some more experiments and create some extract some minimalistic case (probably during next week). Thanks for your help so far. |
Issue description
On the latest pipenv release, running
pipenv install
does not pass--trusted-host
topip
.Running
pipenv install xyz
does.Expected result
--trusted-host
is passed topip
.Actual result
And:
Steps to replicate
Have a
Pipfile
like this:Notice how the argument is not passed to pip when calling
pipenv install
.The text was updated successfully, but these errors were encountered: