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

Issue #97 new
David 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