At 05:20 PM 4/4/2007 +0200, Jan-Wijbrand Kolman wrote:
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.
Is the download link a *relative* URL, or absolute? If it's absolute, the credentials won't be there.
Is the download link a *relative* URL, or absolute? If it's absolute, the credentials won't be there.
They were absolute URLs. I just tried with relative URLs and they *do* indeed inherit the credentials supplied for the package index URL. So, thanks for the hint! A remark, from, say, a usability standpoint: The fact that you need to have relative URLs in order to inherit the credentials was not clear to me from your pervious post to this thread. There you explain as long as host and scheme are identical, the credentials should work. And well, for relative URLs this is automatically true of course :-) End users like me, would actually expect the described behaviour as this is how e.g. web browsers handle these types of authentication. So, this needs either a very clear explanation somewhere, or maybe a little bit of work on easy_install, in order to "cache" the credentials on a host/scheme basis. Anyway, thanks again! kind regards, jw -- Jan-Wijbrand Kolman
participants (2)
-
Jan-Wijbrand Kolman
-
Phillip J. Eby