Re: Issues Using Credentials with Ivy Publish

778 views
Skip to first unread message

Robin Green

unread,
Oct 15, 2012, 5:31:21 AM10/15/12
to simple-b...@googlegroups.com
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...

[error] {file:/home/patrick/Documents/spark/}repl/*:publish: java.io.IOException: Access to URL https://oss.sonatype.org/content/repositories/snapshots/org/spark-project/spark-repl_2.9.2/0.5.2-SNAPSHOT/spark-repl_2.9.2-0.5.2-SNAPSHOT.pom was refused by the server: Unauthorized

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

stephanos

unread,
Feb 15, 2013, 12:31:53 PM2/15/13
to simple-b...@googlegroups.com
This is driving me MAD, I got the same issue :(

Works via browser, works via Cyberduck, but not Ivy ... damn.

Erlend Hamnaberg

unread,
Feb 20, 2013, 9:51:21 AM2/20/13
to simple-b...@googlegroups.com
If you are publishing to sonatype, or any other maven repository manager, it may be a good idea to use sbt-aether-publish.


Disclaimer: i'm the author.

--
Erlend


--
You received this message because you are subscribed to the Google Groups "simple-build-tool" group.
To unsubscribe from this group and stop receiving emails from it, send an email to simple-build-t...@googlegroups.com.

To post to this group, send email to simple-b...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

stephanos

unread,
Feb 20, 2013, 9:56:41 AM2/20/13
to simple-b...@googlegroups.com
Thanks, I'll look into it. Does it support WebDAV (related forum topic)?

Erlend Hamnaberg

unread,
Feb 20, 2013, 10:07:22 AM2/20/13
to simple-b...@googlegroups.com
On Wed, Feb 20, 2013 at 3:56 PM, stephanos <stephan...@gmail.com> wrote:
Thanks, I'll look into it. Does it support WebDAV (related forum topic)?


 
Yes, via the  maven Wagon framework.
Reply all
Reply to author
Forward
0 new messages