Skip to content

Using multiple PIP indexes on the same hostname with different credentials does not work #10902

Open
@roman-kouzmenko

Description

@roman-kouzmenko

Description

I have a need to simultaneously access two PIP indexes from the same hostname (pkgs.dev.azure.com) but using different credentials.

When configuring it like this:

PIP_INDEX_URL=https://build:[email protected]/feed1
PIP_EXTRA_INDEX_URL=https://build:[email protected]/feed2

pip seems to try credentials for feed2 for both feed1 and feed2 failing my builds.

I've worked around this for now by setting the same credentials for both feeds.

Expected behavior

feed1 credentials are used with feed1 and feed2 credentials are used with feed2

pip version

21.1.3

Python version

3.9

OS

linux

How to Reproduce

  1. Create two Azure feeds in different organizations, for example pkgs.dev.azure.com/org1/_packaging/org-feed/pypi/simple and pkgs.dev.azure.com/org2/_packaging/org-feed/pypi/simple
  2. Upload package1 to feed1, package2 to feed2
  3. Generate different personal access tokens PAT1 and PAT2 for the two feeds
  4. Set environment variables ``IP_INDEX_URL=https://build:[email protected]/org1/_packaging/org-feed/pypi/simple` and PIP_EXTRA_INDEX_URL=https://build:[email protected]/org2/_packaging/org-feed/pypi/simple
  5. Run pip install package1 package2

Output

pip interactively prompts for username breaking the build instead of installing the two packages.

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions