You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by Chris Marks <to...@gmail.com> on 2009/04/10 23:39:34 UTC

Newbie credentials problems

Hi all,
I'm having some issues trying to publish an artifact to a local Artifactory
repository and need a bit of help understanding how to apply credentials for
deployment.  I've set up Artifactory to allow anonymous retrieve, but
requires a user account to deploy an artifact.
The result of my publish target in my ant build script is:
"Access to URL
http://localhost/artifactory/libs-snapshots-local/com/mycompany/sers-client/1.1.0/sers-client-1.1.0.jarwas
refused by the server: Unauthorized"

My settings file looks like:
<ivysettings>
    <settings defaultResolver="mainChain" />
    <include url="${ivy.default.settings.dir}/ivysettings-local.xml" />
    <credentials host="localhost" username="user" passwd="password"/>
    <resolvers>
        <url name="publish_artifactory" m2compatible="true">
            <artifact
                pattern="
http://localhost/artifactory/libs-snapshots-local/[organization]/[module]/[revision]/[artifact]-[revision].[ext]"
/>
        </url>
    </resolvers>
</ivysettings>

The contents of my ant publish target is:

<ivy:publish resolver="publish_artifactory" pubrevision="${project.version}"
update="true">
        <artifacts pattern="${dist.packageDir}/[artifact].[ext]" />
</ivy:publish>

Within Artifactory, it shows the account I'm using has deploy permissions on
the repository.

I'm using Ivy 2.1.0 rc1.  The documentation for the credentials element
doesn't give an example, and all of the general examples don't seem to show
a private repository other than on the local file system.

Thoughts on what I'm doing wrong or need to change?

Thanks in advance,
Topher

Re: Newbie credentials problems

Posted by topher1120 <to...@gmail.com>.
Thanks, 
That helped a lot.  Now I'm getting a different error, but will try to work
through it before I post again.  In case others out there are using
Artifactory, the realm name is "Artifactory Realm".

gudnabrsam wrote:
> 
> 
> When I was trying to figure out how to deploy to Nexus I had to use curl
> to see what was going on.  It turned out I needed to use something like
> <ivy:configure realm="Sonatype Nexus Repository Manager" ...>
> 

-- 
View this message in context: http://www.nabble.com/Newbie-credentials-problems-tp23004456p23017790.html
Sent from the ivy-user mailing list archive at Nabble.com.