HorusKol
HorusKol

Reputation: 8706

How to get Jenkins to authenticate to SVN server?

Over the weekend, I did a package update of Jenkins on my Ubuntu server to 1.614 and also updated various plugins, including the Subversion plugin to 2.5

Now, my jobs are failing to build as soon as Jenkins tries to checkout a new project - even when starting from a completely fresh checkout. I've also noticed that I am getting the same error in the job configuration:

ERROR: Failed to check out svn+ssh://svn/repos/eProductCreator-2/trunk
   org.tmatesoft.svn.core.SVNCancelException: svn: E200015: authentication cancelled
   at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.cancel(SVNErrorManager.java:37)

I've found one recent bug listed at https://issues.jenkins-ci.org/browse/JENKINS-27084 - and after a bit more investigation, I added -Dsvnkit.http.methods=Basic,NTLM,Negotiate,Digest to the JAVA_ARGS and JENKINS_ARGS variables defined in /etc/default/jenkins. I stopped and started the Jenkins service. This did not fix the problem.

More investigation turned up this question and blog post. A bit more reading, and I tried to delete the directory at /var/lib/jenkins/.subversion. The directory is simply recreated again by Jenkins when I try to configure the job again, and the various auth/svn.* directories are all empty. I used chown and chmod to make the auth directory and its subdirectories read-only to root, and made them immutable. I am still getting the error.

This is a major issue - none of our jobs are getting built, and it is interfering with our QA process.

Is there anything else I could to fix this?

Upvotes: 3

Views: 4369

Answers (1)

HorusKol
HorusKol

Reputation: 8706

After posting, I tried downgrading the plugin for a second time (the first time didn't seem to take).

What I did differently after the second downgrade, I opened the failing job's configuration and, in addition to the authentication cancelled message next to the SVN repository configuration input, it was asking me to add credentials. I added the credentials, and the job is checking out correctly.

Still - would be nice to get it working in the newer plugin.

Upvotes: 1

Related Questions