Server SSL certificate verification failed

Jenkins – Solving SSL Certificate issue with SVN

While setting up a DevOps framework for .NET, I had encountered the following error:

svn: E170013: Commit failed (details follow):
svn: E170013: Unable to connect to a repository at URL 'https://10.0.0.4/svn/Trunk_Yasir/Version'
svn: E230001: Server SSL certificate verification failed: certificate issued for a different hostname, issuer is not trusted
Server SSL certificate verification failed
Server SSL certificate verification failed

The hint is given in the error itself – certificate issued for a different hostname

Cause

I had used ip address in the repo url in Jenkins instead of hostname. This caused a hostname mismatch which in turn caused the above errors.

Solution:

Make sure that you know the Hostname of your svn server for e.g. svn.company.net and its Ip address for e.g. 10.0.0.4

Add an entry in your host file

10.0.0.4 svn.company.net

When using the SVN plugin in your build step, make sure that your Repo url is in the following format:

https://svn.company.net instead of https://10.0.0.4

Fixing svn: E170013: Unable to connect to a repository at URL
Fixing svn: E170013: Unable to connect to a repository at URL

Executing commands such as svn.exe commit filename -m “message” will not throw SSL errors. Happy Jenkins’ing!