"Server certificate verification failed..." on servers with bad certificates

David Wolever avatarDavid Wolever created an issue

When connecting dealing with an HTTPS server (svn+https) that doesn't have a "good" certificate, the Subversion bindings will throw an exception:

svn.core.SubversionException: ("OPTIONS of 'https://example.com/': Server certificate verification failed: certificate issued for a different hostname, issuer is not trusted (https://example.com/)", 175002)

And there isn't any obvious (ie, listed in `hg help clone` or found on Google) way to override this.

Workaround: when you check out the repository with SVN, it will ask you if you want to trust the certificate:

$ svn co https://example.com/ Error validating server certificate for 'https://example.com':
(R)eject, accept (t)emporarily or accept (p)ermanently? p

Permanently accept the certificate, then hgsubversion will have no problem talking to the remote server

Comments (5)

  1. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.