Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to mvn release:prepare, server certificate has failed verification

I'm trying to run an mvn release:prepare release:perform on a project, which has previously worked on a number of occassions without problems, however I'm seeing the following output:

[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 45.937s
[INFO] Finished at: Thu Aug 23 15:06:01 BST 2012
[INFO] Final Memory: 5M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.2.1:prepare (default-cli) on project my-project: Unable to tag SCM
[ERROR] Provider message:
[ERROR] The svn tag command failed.
[ERROR] Command output:
[ERROR] svn: OPTIONS of 'https://<svn url here>': Server certificate verification failed: certificate has expired, issuer is not trusted (https://<svn url here>)

I have included the following in ~/.scm/svn-settings.xml as advised here

<svn-settings>
  <trustServerCert>true</trustServerCert>
</svn-settings>

This then includes the --trust-server-cert command line option for the svn tag.

This behaviour happens on both a Mac and a Windows machine, both running maven 3.0.4.

Any pointers on how I could resolve this? Is it the server certificate that needs re-issuing?

Thanks

like image 604
Jimmy Avatar asked Nov 13 '22 23:11

Jimmy


1 Answers

I've just seen and resolved this problem on my own setup. I'm running the version 1.478 of Jenkins on a centos environment connected to two build servers also running on centos.

I have the same version of maven-release-plugin and had added the .scm/svn-settings.xml file to attempt a fix, to no effect.

I resolved the issue by logging on to each build server and manually checking out the code (and testing a manual commit from the build machine) when I was logged in as the same user that jenkins uses. This forced me to accept the certificate on the server. Once I'd done this, I confirmed the issue had gone away.

like image 67
DJB Avatar answered May 11 '23 05:05

DJB