I wasn't able to get a credentials file working either. I didn't figure out why that was. What I did was just put my credentials at the end of my $HOME/.ivy2/ivysettings.xml file, like so:
<credentials host="maven" username="****" passwd="****" realm="Sonatype Nexus Repository Manager"/>
</ivy-settings>
and that works - although note that you have to tell sbt to use that file, by setting the ivySettings setting in your build file. It's possible that the credentials in .ivy/ivysettings.xml override any credentials file, if you tell sbt to use the ivy settings file, I suppose.
Regards,
Robin
On Sunday, 14 October 2012 21:57:39 UTC+1, Patrick Wendell wrote:
Hi There,
I'm using a credentials file like this in my build:
credentials += Credentials(Path.userHome / ".sbt" / "sonatype.credentials"),
The credentials file itself is setup correctly based on the Sonatype realm:
realm=Sonatype Nexus Repository Manager
user=<username>
password=<password>
I am running sbt 0.11.3-2. When I run "sbt publish" I get several unauthorized errors like this...
I've tested manually PUT'ing these artifacts the given URL using my user/password, and verified that I have access to this URL.
Is there any way to print out more debugging information regarding how Ivy is deciding to authenticate against these servers? Basically, I want to enable further logging for the publish process, most of which it looks like is just delegated to Ivy. It's hard to debug this because I have no idea what Ivy is doing, whether it is deciding to use my credentials, etc.
Of course, any other tips on why this might not be working are also welcome.
- Patrick