aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark ""Reason: Auth cancel" while uploading war onto remote server via jenkins and maven" Watch ""Reason: Auth cancel" while uploading war onto remote server via jenkins and maven" New topic
Author

"Reason: Auth cancel" while uploading war onto remote server via jenkins and maven

Vinod Borole
Greenhorn

Joined: Feb 25, 2009
Posts: 26
Hello,

My maven project requires that the WAR produced is to be uploaded to a remote server on some location (/var/www). Following is my pom.xml content


Along with this i have configured the settings.xml from maven as follows


I execute my pom.xml via Eclipse with the maven command


With eclipse everything works perfectly fine! However when i run the same thing through jenkins i get following exception


I have configured jenkins "Access control - Security Realm" to use "Unix user/group database" which means i can login to jenkins server with the same credentials as my unix box.

Further what i have done is i have modified the password of the user "jenkins" which gets created as a default user when you install jenkins, i have tried logged in this user and running the build still i have the same problem as it happens with the root user.

I am using apache-maven-3.0.4, Jenkins ver. 1.455, CentOs 6.2, Java6, Eclipse Indigo
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5843
    
    7

Aren't security issues fun? Essentially, you are suffering from a variation of the double-hop problem - the credentials you use to log into Jenkins aren't the same as what can be used by Jenkins to gain access to 10.0.3.141.

You will have to get the build running manually on the Jenkins build machine while logged in as the same account that is running Jenkins. This means that that account must be configure with the proper credentials to access the 10.0.3.141. Only then will the build work from Jenkins.

It appears you are using scp to do the transfer. I suggest manually running an scp (again, while logged into the build slave using the account under which Jenkins is running) and getting that running (do not, when ssh asks for your credentials, switch user ids - you must log in as the account running Jenkins). Once that is done, try the build (from that same command prompt) and see if that works.

JBoss In Action
Vinod Borole
Greenhorn

Joined: Feb 25, 2009
Posts: 26
Thanks a ton Peter Johnson for you response. It really helps!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: "Reason: Auth cancel" while uploading war onto remote server via jenkins and maven