Linux下svn不能连接上Windows服务器

Linux下svn不能连接上Windows服务器:SSL handshake failed: SSL 错误:在证书中检测到违规的密钥用法。

之前已经在Windows 2003上用visualSVN配置好了SVN服务器,并且在Windows虚拟机的客户端可以正常使用。

但是,今天在Ubuntu 11.10上尝试运行svn,就装了一个subversion.但是使用时报了类似下面的错:

svn: 方法 OPTIONS 失败于 “https://1.0.0.2:8443/svn/xxx”: SSL handshake failed: SSL 错误:在证书中检测到违规的密钥用法。 (https://1.0.0.2:8443)

上网找了一个英文的网页,解决了该问题。现在记录下来。

错误原因是Windows使用的证书Linux不能识别。

改正方法是:修改服务器上visualsvn使用的证书为第三方产生的证书,以便windows和linux都能识别。

过程

Add the following registry value to the Windows registry:(我的是32位)

for 32-bit system:(运行regedit->找到下面的注册表项->增加一个dword类型的值)

[HKEY_LOCAL_MACHINE\SOFTWARE\VisualSVN\VisualSVN Server] "CreateGnuTLSCompatibleCertificate"=dword:00000001

for 64-bit system:

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\VisualSVN\VisualSVN Server] "CreateGnuTLSCompatibleCertificate"=dword:00000001 Start VisualSVN Server Manager.(打开virsualSVN server) Go to Action | Properties | Certificate. Click Change certificate... and follow the wizard instructions to generate a new self-signed certificate.

再次执行svn,会提示证书生成者不受信赖的警告,选择永久接受即可。

这样问题就解决了。

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/b2e88ea6aa281d1e11e7cad96fa34f8b.html