[Distutils] HTTP authentication support

Jan-Wijbrand Kolman janwijbrand at gmail.com
Wed Apr 4 17:20:47 CEST 2007


> The patch is minor enough that I added it to 0.6; it only affects URLs that
> would have caused today's easy_install to crash with an httplib.InvalidURL
> error, anyway.
>
> The easiest way to use it is to use a -f or dependency_links URL that
> points to a page with links to the actual downloads.  As long as they are
> the same scheme and host, they'll inherit the credentials from the original
> URL.

Trying this now, using setuptools-0.6c6dev_r54241, but I must be doing
something wrong here, because I cannot get it to work.

What I do is:

   easy_install -f \
   https://user:secret@myhost.com/trac/wiki/PackageIndex SomePackage

This index page requires authentication and easy_install can indeed
read the index page with the supplied credentials. It finds the
correct download URL too, i.e.:

  https://myhost.com/svn/somepackage#egg=SomePackage

It was my understanding that easy_install would reuse the credentials
as specified for the index page URL, since both host and scheme are
identical for the download and index page URLs. However downloading
fails, with a 401 Authorization Required error.

As I said, it could very well be I'm doing something wrong here. Any
hint is highly appreciated.

kind regards,
jw

-- 
Jan-Wijbrand Kolman


More information about the Distutils-SIG mailing list