views:

255

answers:

3

As the title says, does pip support http authentication, like easy_install does?

If not, are there any (better) alternatives to running a private package repository? I see pip can access source repositories (git,svn etc.), but can version requirements be used with this?

+2  A: 

pip uses urllib2.urlopen() to fetch files. urllib2.urlopen() supports HTTP authentication, but pip doesn't appear to install the HTTPBasicAuthHandler when it builds its opener. Adding such support would be trivial; you could either parse the URL for user:password or accept the same information as command line parameters. feedparser supports both methods by subclassing urllib2.HTTPDigestAuthHandler.

lt_kije
+1  A: 

Currently simply pip does not support authentication.

But the main author of pip thinks that feature is desirable so probably it will appear in the medium future. There is also an item in the PIP trac containing a patch to enable http auth.

mdorseif
+1  A: 

FYI, it's currently being worked on in the http_auth_index branch which will allow the use of basic auth for custom indexes.

jezdez