【发布时间】:2013-06-17 04:28:07
【问题描述】:
我使用 SharpSVN 并将一个文件夹添加到 subversion。然后我尝试提交它,我得到了这个异常:
SharpSvn.SvnRepositoryIOException: OPTIONS of 'https://sth.com/svn/blah/Documents': Server certificate verification failed: certificate has expired, certificate issued for a different hostname, issuer is not trusted
据我所见: Server certificate verification failed
..似乎我必须使用--trust-server-cert 选项,但我在SvnCommitArgs 的参数中看不到这一点。
另外,我发现了这个: How do I use a custom Certificate Authority in SharpSvn without installing the certificate
..我在哪里看到这个:
client.Configuration.SetOption(...)
但我不知道我必须提供哪些设置才能使其顺利提交。
有没有人做过类似的事情?
编辑: 我也试过这样做:
client.Authentication.SslServerTrustHandlers += new EventHandler<SharpSvn.Security.SvnSslServerTrustEventArgs>(Authentication_SslServerTrustHandlers);
void Authentication_SslServerTrustHandlers(object sender, SharpSvn.Security.SvnSslServerTrustEventArgs e)
{
// Accept ceritificate here?
}
但我不明白我必须在处理程序内部做什么才能接受证书... :(
【问题讨论】:
标签: c# certificate commit sharpsvn