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
Use pip install through private repostiory protected by .htaccess ? #51
Comments
pip supports basic auth via its URLOpener, Just use a URL like http://username:password@server/whatever/
|
With 0.8.1 pip version I can do :
I don't know if this feature is documented or not. I'll look that as soon as. Regards, Stephane
|
Jannis, I tried as you said but it didn't works for me when using HTTPS. Can someone confirm it for me? Is it a known bug? Thanks! :-)
|
I can confirm it doesn't work with https. I get the following error:
packages/pip-0.6.3-py2.6.egg/pip/basecommand.py", line 115, in main
packages/pip-0.6.3-py2.6.egg/pip/commands/install.py", line 155, in run
bundle=self.bundle)
packages/pip-0.6.3-py2.6.egg/pip/req.py", line 823, in install_files
packages/pip-0.6.3-py2.6.egg/pip/index.py", line 55, in find_requirement
packages/pip-0.6.3-py2.6.egg/pip/index.py", line 282, in _get_page
packages/pip-0.6.3-py2.6.egg/pip/index.py", line 363, in get_page
|
Newer versions of pip seem to throw the following error when using a username
packages/pip-0.8.1-py2.6.egg/pip/index.py", line 241, in _get_queued_page
packages/pip-0.8.1-py2.6.egg/pip/index.py", line 326, in _get_page
packages/pip-0.8.1-py2.6.egg/pip/index.py", line 424, in get_page
packages/pip-0.8.1-py2.6.egg/pip/index.py", line 486, in _get_content_type
packages/pip-0.8.1-py2.6.egg/pip/download.py", line 88, in call
packages/pip-0.8.1-py2.6.egg/pip/download.py", line 107, in get_response
The problem occurs when pip tries to do a head request on the archive file but The url passed to self.get_response() is a urllib2.Request object but
|
Looks like this is fixed, I have a private index under HTTPS + basic auth and it just works with Can anybody confirm this and close the issue? |
Just added a pull request (#786) linked to this topic. |
@brutasse I can confirm. Close this? |
1.5.6 still has the issue. |
Can we confirm exactly the issue now being talked about? |
Sorry. Works for me. My mistake :-D
|
Still necessary put the username and password in the URL? |
Is it supported in |
I use private PyPI index and run installation like this: and then it works, but asks for username and password interactively. It's not a case when this script ran outside the shell with CLI. Please confirm if it's linked to the issue discussed here or suggest if I should create another issue, or please point out the solution. |
@vladignatyev I just ran into the same problem you mentioned, of it asking for user/password interactively. I narrowed down the problem to having a symbol in the password that needs url-encoding. If I don't url-encode the password, the URL can't be parsed. If I do url-encode the password, I think pip isn't url-decoding it before attempting to authenticate. |
I have this issue too with pip 7.1.2. There's a symbol in the password that needs url-encoding, pip fails to authenticate (gets a 401 response) and prompts for username/password interactively. It then works fine if I enter the user/pass interactively. Like @bcbrown I suspect it's not url-decoding the password. |
PLEASE FIX THIS ASAP PIP 8.1.2 |
Just ran into this using |
Parsing the username/password from the URL only works when the port is specified. This queries for username/password: |
This works with pip 18.1 but broken in latest version (19.1), Confirmed after reverting back to 18.1 it works. |
@olt I had the same issue using pip 19.1.1 and managed to get it working by putting the port as you suggested. Pretty obscure workaround, I wish I could upvote your answer more. |
Hi,
I would like protected a private Python Index repository with ".htaccess" file.
When I use
pip
to install some package from this repository, I've this error :How can I use login/password parameters with pip ?
Pip don't support this feature ? If not it's planned ?
Regards,
Stephane
The text was updated successfully, but these errors were encountered: