我已使用 Windows Azure (SLAVE) 在新 VM 中设置了 VisualSVN。我已将现有存储库从我们的内部服务器 (MASTER) 手动复制到其中,并且我可以使用 TortoiseSVN 在我的客户端计算机 (CLIENT) 上查看这两个存储库。
从 CLIENT 中,可以使用以下方式访问 MASTER
svn://MASTER/repo....
当使用 SLAVE 访问时
https://SLAVE.cloudapp.net:8443/svn/repo....
我已经更新了内部服务器(主服务器,运行 Collabnet Edge)上的提交后 Hook ,以同步到 Azure 服务器(运行 VisualSVN 的从服务器)。当我第一次使用远程桌面从我们的内部服务器 MASTER 中运行此同步批处理文件时,它提示我出现证书错误“(R)eject、accept (t)emporarily ...etc”,我选择了“p”(永久) 。从此时起,使用远程桌面在 MASTER 上运行时,所有同步操作都可以正常运行。
当从我的客户端计算机 CLIENT 执行提交时,这会照常更新 MASTER 上的存储库,但随后我收到 TortoiseSVN 错误,显示:
Error validating server certificate for
'https://myserver.cloubapp.net:8443'
- This certificate is not issued by a trusted authority....
The certificate hostname does not match...
svnsync:E175002 OPTIONS of
'https://myserver.cloubapp.net:8443/svn/myrepo'
server certificate verification failed: certificate
issued for a different hostname, issuer is not trusted
(https://myserver.cloudapp.net:8443)
我认为当 MASTER 尝试与 SLAVE 上的 VisualSVN 通信时,此错误是 SSL 错误。因此,我使用 VisualSVN 在 MASTER 上导出证书,并将其导入到 CLIENT 中,将其放入“受信任的根证书颁发机构”中,但这并没有阻止错误。
我还尝试添加:
--trust-server-cert --non-interactive
到我的钩子(Hook)中的 svnsync 行,但我仍然得到
....certificate issued for a different hostname, issuer is not trusted ....
我查看了this SO question这看起来可能相关,但我对这个证书的东西很薄弱。有人能指出我正确的方向吗?非常感谢任何帮助。
最佳答案
我正在使用 VisualSVN Server 3.5.4 并发现类似的问题,但对我来说,提交更改时它会在客户端上抛出以下错误
svnsync: E230001: Server SSL certificate verification failed: certificate has expired
我的商业证书已过期。我解决了这个问题
create a new self-signed certificate on SLAVE's VisualSVN Certificate setting
*the Common name must matches your SLAVE domain name
并添加 MASTER
--trust-server-cert --non-interactive
关于svn - Subversion 提交后 Hook SSL 证书错误 'certificate issued for different hostname',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25591174/