Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins not able to use SVN credentials or download new plugins/new versions

Tags:

jenkins

Can anyone suggest how to fix the two issues?

- Can't upgrade Jenkins and SVN plugin

- Can't connect to svn

I am setting up Jenkins on a Windows 64 bit machine. It's configured to run as a windows service.

We are running this on Windows 7 64 bit OS

Jenkins 1.482

I am able to do an SVN update/checkout from my user account on the machine.

When I attempt to set up a job on jenkins I get the following when trying to add svn credentials

FAILED: org.tmatesoft.svn.core.SVNErrorMessage: svn: OPTIONS /svn/client/trunk failed

More details are:

FAILED: org.tmatesoft.svn.core.SVNErrorMessage: svn: OPTIONS /svn/client/trunk failed

org.tmatesoft.svn.core.SVNException: svn: OPTIONS /svn/client/trunk failed
    at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:298)
    at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:283)
    at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:271)
    at ...

I stopped the service and ran Jenkins from command line and tried the same thing - with the same result.

I am able to connect to the svn server with a tortoise client and via firefox with the same credentials.

In researching the issue I saw a few posts about similar problems and the only one that seems to claim to fix it is rolling back to Jenkins svn plugin version.

I then tried to install the latest jenkins and Plugin for svn. The downloads failed. Aha, I thought - obviously a firewall issue. So I disable the firewall.

Still no good. I can't automatically download or get the new Jenkins or SVN plugin.

like image 731
Tim Avatar asked Sep 27 '12 16:09

Tim


People also ask

How do I add SVN credentials to Jenkins?

Next to the Repository URL text box click the question mark. In that box will be the following text: "click this link and specify different credential". Click on that link to open the Subversion Authentication page. On that page enter the root of the repository URL, enter the login and password to use and click OK.

Can Jenkins pull code from SVN?

Essentially, what you can do is setup a svn commit hook that sends a signal to Jenkins to kick off a build. Jenkins will then (given the right build setup) pull the freshly-committed code and run the build.


3 Answers

Try starting jenkins with this option:

-Dsvnkit.http.sslProtocols="SSLv3"

Or, if Jenkins is starting svn plugin in a separate JVM, try adding the line to wherever the svn plugin run configuration is.

It's a known problem with svnkit, which is used by Jenkins' svn plugin:

http://issues.tmatesoft.com/issue/SVNKIT-176

Also, this answer can be helpful with regards to upgrading your svn plugin.

To change your Windows service commandline:

  1. open a command line window cmd.exe
  2. sc qc "JenkinsSlave" (if that's what your service name is)
  3. select and copy the BINARY_PATH_NAME value
  4. change it, adding -Dsvnkit.http.sslProtocols=""SSLv3"" after the jar path - mind the double quote
  5. sc config "JenkinsSlave" binPath= <paste the changed value copied earlier>

Replace JenkinsSlave with your service name.

like image 59
Adam Adamaszek Avatar answered Nov 15 '22 07:11

Adam Adamaszek


Windows 7 x64 has some automatic firewall settings. You may need to open a firewall port to allow the connection.

You should be able to verify or eliminate this as a cause by trying to run your svn client outside Jenkins.

like image 37
JJ Zabkar Avatar answered Nov 15 '22 07:11

JJ Zabkar


bit late topic, but did you try the following solution?

http://www.daangemist.nl/2014/03/03/jenkins-reports-sslv3-error-on-svn-update

that one worked out for me, in my case I wanted to use -Dsvnkit.http.sslProtocols="TLSv1"

like image 33
ibalosh Avatar answered Nov 15 '22 07:11

ibalosh