Skip to content
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

Pip not using ~/.pip/pip.conf when extra-index is used in requirements.txt #9744

Open
1 task done
dwbconsultingllc opened this issue Mar 29, 2021 · 2 comments
Open
1 task done
Labels
S: needs triage Issues/PRs that need to be triaged type: bug A confirmed bug or unintended behavior

Comments

@dwbconsultingllc
Copy link

dwbconsultingllc commented Mar 29, 2021

pip version

20.3 -> latest

Python version

3.7.0

OS

Ubuntu

Additional information

No response

Description

When authenticating against an external pypi server using a requirements.txt pip no longer uses the credentials supplied in the ~/.pip/pip.conf.

Expected behavior

Pip should use the credentials from the ~/.pip/pip.conf file to pull the packages from the pypi server.

How to Reproduce

## This works.

pip install pip==20.2.4
pip install -r requirements.txt
Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://pypi.org/simple, https://pkgs.dev.azure.com/XXX/global/_packaging/XXX/pypi/simple
Processing /home/vscode/.cache/pip/wheels/b6/e7/c9/0ee4aa11b8e4f2ca2af7b60be08647fb445b2dcfd4b5f3cee2/aioboto3-8.2.1-py2.py3-none-any.whl
Processing /home/vscode/.cache/pip/wheels/46/68/d3/17aa556cbd8f8a68e1792b30fe634f2b2dfedc0cb47897ce94/aiobotocore-1.2.1-py3-none-any.whl
Collecting aiohttp==3.7.4.post0
  Using cached aiohttp-3.7.4.post0-cp37-cp37m-manylinux2014_x86_64.whl (1.3 MB)
Collecting aioitertools==0.7.1
  Using cached aioitertools-0.7.1-py3-none-any.whl (20 kB)
.....

## This no longer works using pip >=20.3

pip install pip --upgrade
pip install -r requirements.txt
Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://pypi.org/simple, https://pkgs.dev.azure.com/XXX/global/_packaging/XXX/pypi/simple
User for pkgs.dev.azure.com:   <<  ## Just hangs here Waiting for user input.

Output

requirements.txt

-i https://pypi.org/simple
--extra-index-url https://pkgs.dev.azure.com/XXX/global/_packaging/XXX/pypi/simple
aioboto3==8.2.1
...

Code of Conduct

  • I agree to follow the PSF Code of Conduct
@dwbconsultingllc dwbconsultingllc added S: needs triage Issues/PRs that need to be triaged type: bug A confirmed bug or unintended behavior labels Mar 29, 2021
@pradyunsg
Copy link
Member

How are the credentials declared in ~/.pip/pip.conf?

@dwbconsultingllc
Copy link
Author

How are the credentials declared in ~/.pip/pip.conf?

Hi

With Azure Devops we use a Personal Access Token, below is my pip.conf.

[global]                                                                                                                                                                  
extra-index-url=https://:<PERSONAL ACCESS TOKEN>@pkgs.dev.azure.com/XXX/global/_packaging/XXX/pypi/simple/        

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S: needs triage Issues/PRs that need to be triaged type: bug A confirmed bug or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants