-
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
Specifying multiple extra-index-url results in "No matching distribution found" for one of the packages #9557
Comments
I'm having exactly the same problem trying to install packages from two Gitlab registries in different projecs. If I use the same personal access token in each URL the installation completes as expected. However, using different, project-level access tokens results in the same error described above. From the logs it appears that the credentials are only taken from whichever index URL is specified first. |
It would be nice if you could provide an environment for reproduction. |
Thanks for the quick response. Sorry, I should have included my env in the first place - I'm running in a docker container using the official
|
Sorry, I was referring to the GitLab registry packages you were installing when facing this issue. If the packages are private, please create some public stubs that produce the same symptom. |
I set up a couple of repos that I think should reproduce the issue - I would have liked to create the access tokens as well but unfortunately I do not have a paid Gitlab account so it is not available to me. The projects are
And the requirements file that would fail when calling
|
Hmm, unfortunately (?) an auth-less repo seems to work for me.
Does this work for you? If it does, the auth part is probably the problem and we’ll need some more digging… |
Yeah it is specifically a problem with the auth. I ran into the issue at work where we are using project access tokens. With these you get a different token for each project. I think the issue is likely to be related to having two different tokens for the same domain, because when using a personal access token (which gives me access to both projects with one token) everything installs correctly, similarly to what you saw above without any auth. Project level access tokens are a paid feature on Gitlab but I do not have a paid account, so unfortunately I can't create an environment to reproduce it in. |
Does this work if you specify the options from the command line, or is it specific to the requirements file? |
Hmm, #3931 seems related (if this happens both when the |
Oh great, yes it's working as expected on Will wait for the next release then - thanks for your help 🙌 |
With latest releases out, does it mean it can be closed ? |
I think so! |
Environment
Description
I am unable to install packages from multiple private pypi repos. Each private repo only provides a single package. In the example requirements.txt file below I have two
--extra-index-url
definitions and two private packages. Dependant on the order of those lines one of the two private packages will fail to resolve.Expected behavior
pip should find the repo that contains the package requested and install it.
How to Reproduce
pip install -r requirements.txt
or the equivalentpip install
command.Could not find a version that satisfies the requirement wegift-package-b==0.0.1
If I remove lines 1 and 3 or 2 and 4 the install works as expected. If I reorder lines 1 and 2 I get the same error but for package a.
Output
pip install -vvv -r requirements.txt
If I reorder the
--extra-index-url
lines I get this instead. It fails to resolvewegift-package-a
insteadThe text was updated successfully, but these errors were encountered: