Saturday, August 27, 2011

How to ignore self-signed ssl certificate verification in maven svn scm


I was trying to prepare a release for a maven project with the command
mvn release:prepare but the maven scm plugin could not commit the updated pom file because the certificate is self-signed.
 
My setup is Window 7, Collabnet SVN Client 1.6.6, Maven 2.2.1 but the solution is not specific to Windows or collabnet svn client.


...
[INFO] Checking in modified POMs...
[INFO] Executing: cmd.exe /X /C "svn --non-interactive commit --file C:\Users\myname\AppData\Local\Temp\maven-scm-1429998188.commit --targets C:\Users\myname\AppData\Local\Temp\maven-scm-1933937231031554007-targets"
[INFO] Working directory: G:\Projects\my-project\
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Unable to commit files
Provider message:
The svn command failed.
Command output:
svn: Commit failed (details follow):
svn: OPTIONS of 'https://svn.mysite.com/my-project/trunk/': Server certificate verification failed: issuer is not trusted (https://svn.mysite.com)
...

...read on to see how to get around this problem...