Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am running the following command:

svn info --non-interactive --trust-server-cert --no-auth-cache --xml "https://ommited/svn/YAMS"

Unfortunately, I am getting the following error:

?xml version="1.0" encoding="UTF-8"?>
svn: E175002: Unable to connect to a repository at URL 'https://ommited/svn/YAMS'
svn: E175002: OPTIONS of 'https://ommited/svn/YAMS': Server certificat
e verification failed: certificate issued for a different hostname, issuer is no
t trusted (https://ommited)

I thought if I put --non-interactive --trust-server-cert, it would ignore the self signed certificate problem. Am I doing something wrong here?

share|improve this question

Your hostname does not match. Re-issue your certificate with correct hostname.

One of the odds in svn cmd is that --trust-server-cert will trust any CA, however it still checks for valid hostname and if cert is expired.

So use correct hostname to solve your problem.

And yes, this does not make sense :-)

See here for more information from svn mailinglist

share|improve this answer
It's odd - better to just disable SSL. Beter yet to actually use a cert that you trust and makes sense for the URL. – Ram Jun 19 '12 at 17:58
Using a self-signed cert (even with the wrong host name) still provides a good measure of security by making sure that no one is sniffing your data while using Starbucks public Wifi. Obviously a proper cert from a trusted authority is better to prevent man-in-the-middle attacks, but if your choices are SSL with an untrusted cert or plain-text, the untrusted cert is better than no SSL. – Johnny Apr 6 '13 at 21:37

run the following php code, to accept the certificate, very much like when you'll do manually, using command line (where you press 'p' to accept the certificate permanently):

header('Content-Type: text/plain; charset=UTF-8');
print( shell_exec('echo p | svn log --limit 4 c:/work/trunk  2>&1') );

run it once, the cert. will be accepted, and now - run it 'as usual' (no need echo p anymore)

header('Content-Type: text/plain; charset=UTF-8');
print( shell_exec('svn log --limit 4 c:/work/trunk  2>&1') );

Note the 2>&1 at the end. I recommend add it too. this way you can see the err-output (if having any).

credit goes to subversion-when-trust-server-cert-isnt-enough

share|improve this answer
Use yes p or yes t on Unix. – 0xC0000022L Jul 21 '15 at 16:19

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.