Artifactory authorization

4 messages Options
Embed this post
Permalink
Tanner Perrien

Artifactory authorization

Reply Threaded More More options
Print post
Permalink
I have the "deploy artifacts to maven repository" feature enabled for a project. When I run a build, Hudson does everything fine until it comes to the deployment. I have it set to use Artifactory, and I temporarily turned on full anonymous access to Artifactory just to avoid security issues for the time being. This is what I get back from the console output:

ERROR: Error deploying artifact: Authorization failed: Access denied to: http://192.168.161.128/artifactory/libs-snapshots-local/com/ball/util/general_utilities/1.02/general_utilities-1.02.jar

The ip on that line is localhost. I've tried localhost, and it doesn't change anything. I'm not sure if it's a tomcat/artifactory issue, or if Hudson has an issue. Is anyone else using both Hudson and Artifactory and deploying via the Hudson configuration?

I might as well mention that if I put the same repository url in my POM, I can run "mvn deploy" and it works great! Of course, this doesn't help me since I want it to be automated by Hudson.

Thanks in advance!
Kohsuke Kawaguchi

Re: Artifactory authorization

Reply Threaded More More options
Print post
Permalink
Maven uses ~/.m2/settings.xml to pick up credentials, which is
controlled outside Hudson.

I've been meaning to fix this, so that you can also configure
credentials from Hudson, but that's not implemented yet. Hopefully
there's a bug filed somewhere to track this...

2009/6/11 Tanner Perrien <[hidden email]>:

>
> I have the "deploy artifacts to maven repository" feature enabled for a
> project. When I run a build, Hudson does everything fine until it comes to
> the deployment. I have it set to use Artifactory, and I temporarily turned
> on full anonymous access to Artifactory just to avoid security issues for
> the time being. This is what I get back from the console output:
>
> ERROR: Error deploying artifact: Authorization failed: Access denied to:
> http://192.168.161.128/artifactory/libs-snapshots-local/com/ball/util/general_utilities/1.02/general_utilities-1.02.jar
>
> The ip on that line is localhost. I've tried localhost, and it doesn't
> change anything. I'm not sure if it's a tomcat/artifactory issue, or if
> Hudson has an issue. Is anyone else using both Hudson and Artifactory and
> deploying via the Hudson configuration?
>
> I might as well mention that if I put the same repository url in my POM, I
> can run "mvn deploy" and it works great! Of course, this doesn't help me
> since I want it to be automated by Hudson.
>
> Thanks in advance!
> --
> View this message in context: http://www.nabble.com/Artifactory-authorization-tp23984320p23984320.html
> Sent from the Hudson users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>



--
Kohsuke Kawaguchi

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Tanner Perrien

Re: Artifactory authorization

Reply Threaded More More options
Print post
Permalink
In reply to this post by Tanner Perrien
I understand that the settings.xml file needs to be in ~/.m2/ -- Since Apache Tomcat is running the web app, tomcat6 is the user. So from what I can tell, the proper place to put settings.xml on Ubuntu Server (since I installed Tomcat from a package) is /usr/share/tomcat6/

I also added the "server" definition in the /etc/maven2/settings.xml file, along with the username and password for Artifactory.

Do I need to have a "master" password set up before maven will work right? Currently I do not have this. I have no need for a master password.

Thanks!
Amir RAminfar

Re: Artifactory authorization

Reply Threaded More More options
Print post
Permalink
Was there ever bug logged against this? I too am getting an error when trying to deploy via hudson. but when i use mvn deploy everything works.
Tanner Perrien wrote:
I understand that the settings.xml file needs to be in ~/.m2/ -- Since Apache Tomcat is running the web app, tomcat6 is the user. So from what I can tell, the proper place to put settings.xml on Ubuntu Server (since I installed Tomcat from a package) is /usr/share/tomcat6/

I also added the "server" definition in the /etc/maven2/settings.xml file, along with the username and password for Artifactory.

Do I need to have a "master" password set up before maven will work right? Currently I do not have this. I have no need for a master password.

Thanks!