ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Shea <>
Subject Re: HTTP basic auth repositories
Date Mon, 29 Mar 2010 23:03:22 GMT
So apparently the "realm" parameter that I decided wasn't important 
actually was very important. It's working now. =)

Mike Shea.

> Hi folks,
> I am looking for some information about retrieving dependencies from 
> an HTTP Ivy repository, using Basic Auth, from an Ant build.
> I am using ivy-2.1.0.
> So far, I have been unable to actually retrieve any dependencies, 
> because I can't authenticate. At least, that's what I infer from all 
> the error messages I get that say:
> CLIENT ERROR: Authorization Required url=[...]
> The HTTP response code for [...] did not indicate 
> a success. See log for more detail.
> I have commons-httpclient-3.1.jar on the path that I used when I 
> created the ivy taskdefs, so I don't think that's the problem:
> <taskdef resource="org/apache/ivy/ant/antlib.xml" 
> uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path" />
> ... "ivy.lib.path" contains commons-httpclient-3.1.jar.
> The information on the website is confusing. This link ( 
> <>) 
> indicates that the username and password should be defined on the 
> ivy:configure element, but then only gives an example which uses 
> <credentials> sub-elements. When I actually try to use <credentials> 
> as a sub-element of ivy:configure, my build blows up (apparently this 
> is not legal). There's also the "ivy:settings" element, which does 
> seem to support the <credentials> sub-element, but which I am still 
> unable to convince to work (as in, download my dependencies - at least 
> it doesn't make the build fail when I call it, though).
> Debugging is tricky; all I ever see is that error message telling me 
> that authorization is required.
> I've also found another posting that indcates that you can do the 
> credential stuff in ivysettings.xml instead of in Ant: 
> ... I haven't yet been able to get this method to work either.
> Oh, I've been leaving the "realm" to use for authentication out of all 
> my configurations, since I don't think I'm using one.
> Anybody have some pointers for me?
> Thanks!
> Mike Shea.

View raw message