• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

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

Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 5856
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

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 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.
Vinod Borole
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a ton Peter Johnson for you response. It really helps!
If you open the box, you will find Heisenberg strangling Shrodenger's cat. And waving this tiny ad:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic