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

Installing from private repository using --extra-index-url results in a prompt for user credentials #6820

Closed
alegonz opened this issue Jul 31, 2019 · 5 comments
Labels
auto-locked Outdated issues that have been locked by automation resolution: duplicate Duplicate of an existing issue/PR type: bug A confirmed bug or unintended behavior

Comments

@alegonz
Copy link

alegonz commented Jul 31, 2019

Environment

  • pip version: 19.2 and over
  • Python version: 3.7.2
  • OS: Debian 9

Description

pip install results in a prompt for user credentials when specifying a private repository with --extra-index-url and a URL that includes a read token.

Issues #3931 and #6775 are possibly related.

Expected behavior

The URL with the read token should suffice to download and install packages from the private repository.

How to Reproduce

The commands below were executed in a docker container using the python:3.7.2-stretch image.

$ docker run -it python:3.7.2-stretch /bin/bash
  1. With version 19.2.1, trying to install from a private repository (in this case, packagecloud) using the --extra-index-url option and a URL with a read token (actual repo details were redacted) results in a prompt for user credentials.
$ pip --version
pip 19.2.1 from /usr/local/lib/python3.7/site-packages/pip (python 3.7)
$ pip install --extra-index-url=https://*MY-TOKEN*@packagecloud.io/myuser/myrepo/pypi/simple mypackage
Looking in indexes: https://pypi.org/simple, https://*MY-TOKEN*@packagecloud.io/myuser/myrepo/pypi/simple
Collecting mypackage
User for packagecloud.io:
  1. Downgrading pip to 19.1.1 solves the issue:
$ pip install pip==19.1.1
Collecting pip==19.1.1
  Downloading https://files.pythonhosted.org/packages/5c/e0/be401c003291b56efc55aeba6a80ab790d3d4cece2778288d65323009420/pip-19.1.1-py2.py3-none-any.whl (1.4MB)
     |████████████████████████████████| 1.4MB 4.5MB/s 
Installing collected packages: pip
  Found existing installation: pip 19.2.1
    Uninstalling pip-19.2.1:
      Successfully uninstalled pip-19.2.1
Successfully installed pip-19.1.1
$ pip install --extra-index-url=https://*MY-TOKEN*@packagecloud.io/myuser/myrepo/pypi/simple mypackage
Looking in indexes: https://pypi.org/simple, https://*MY-TOKEN*@packagecloud.io/myuser/myrepo/pypi/simple
Collecting mypackage
  Downloading https://packagecloud.io/myuser/myrepo/pypi/packages/mypackage-0.1.0-py2.py3-none-any.whl (80kB)
     |████████████████████████████████| 81kB 7.0MB/s 
Installing collected packages: mypackage
Successfully installed mypackage-0.1.0
WARNING: You are using pip version 19.1.1, however version 19.2.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
@triage-new-issues triage-new-issues bot added the S: needs triage Issues/PRs that need to be triaged label Jul 31, 2019
@cjerdonek
Copy link
Member

Does it work if you put a colon after the token?

@chrahunt chrahunt added S: awaiting response Waiting for a response/more information type: bug A confirmed bug or unintended behavior labels Jul 31, 2019
@triage-new-issues triage-new-issues bot removed the S: needs triage Issues/PRs that need to be triaged label Jul 31, 2019
@alegonz
Copy link
Author

alegonz commented Jul 31, 2019

Does it work if you put a colon after the token?

It does! 🎉
19.1.1: works with or without colon.
19.2.1: works with colon, does not without.

@no-response no-response bot removed the S: awaiting response Waiting for a response/more information label Jul 31, 2019
@cjerdonek
Copy link
Member

This is the same as #6796.

@cjerdonek cjerdonek added the resolution: duplicate Duplicate of an existing issue/PR label Jul 31, 2019
@pradyunsg
Copy link
Member

Duplicate of #6796

@pradyunsg pradyunsg marked this as a duplicate of #6796 Jul 31, 2019
@alegonz
Copy link
Author

alegonz commented Jul 31, 2019

@cjerdonek @pradyunsg
Thank you!

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Aug 30, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Aug 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation resolution: duplicate Duplicate of an existing issue/PR type: bug A confirmed bug or unintended behavior
Projects
None yet
Development

No branches or pull requests

4 participants