已经在windows2008上用visualSVN配置好了SVN服务器,而且在windows虚拟机的客户端能够正常使用。linux
可是,今天在centos65上尝试运行svn,就装了一个subversion.可是使用时报了相似下面的错:web
svn: 方法 OPTIONS 失败于 “https://192.168.26.210/svn/xxx”: SSL handshake failed: SSL 错误:在证书中检测到违规的密钥用法。 (https://192.168.26.210)apache
上网找了一个英文的网页,解决了该问题。如今记录下来。vim
原文:http://www.visualsvn.com/support/topic/00056/windows
错误缘由是windows使用的证书linux不能识别。centos
改正方法是:修改服务器上visualsvn使用的证书为第三方产生的证书,以便windows和linux都能识别。服务器
过程:svn
for 32-bit system:(运行regedit->找到下面的注册表项->增长一个dword类型的值)this
[HKEY_LOCAL_MACHINE\SOFTWARE\VisualSVN\VisualSVN Server] "CreateGnuTLSCompatibleCertificate"=dword:00000001
for 64-bit system:.net
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\VisualSVN\VisualSVN Server] "CreateGnuTLSCompatibleCertificate"=dword:00000001
再次执行svn,会提示证书生成者不受信赖的警告,选择永久接受便可。
这样问题就解决了。
说一说产生的缘由:
这是由于virtual svn在生成鉴权数据的时候使用了一个插件,而这个插件是OpenSSL支持的,但GnuTls是不支持的。详细的内容你们仔细看吧。感谢这篇文章的原做者,及散播者
就是svn发布的安装包再也不使用OpenSSL, 采用的GnuTLS。
除了上面这种在服务器上解决外还有其它的方法。
1:
I have came across the solution for this as
sudo mv /usr/lib/libneon-gnutls.so.27 /usr/lib/libneon-gnutls.so.27.old sudo ln -s /usr/lib/libneon.so.27 /usr/lib/libneon-gnutls.so.27
or
sudo apt-get install libneon27 cd /usr/lib sudo rm libneon-gnutls.so.27 sudo ln -s /usr/lib/libneon.so.27 libneon-gnutls.so.27
2:
sudo apt-get remove libneon27
sudo apt-get install libssl0.9.8
dpkg -i libneon27_0.29.3-3_amd64.deb
sudo mv /usr/lib/libneon-gnutls.so.27 /usr/lib/libneon-gnutls.so.27.old
sudo ln -s /usr/lib/libneon.so.27 /usr/lib/libneon-gnutls.so.27
3:
Centos 6.6
一、卸载自带的svn和neon软件包
yum -y remove subversion
yum -y remove neon neon-devel
二、下载svn和neon的源码包
cd /usr/local/src
wget http://www.webdav.org/neon/neon-0.29.0.tar.gz
wget http://mirrors.tuna.tsinghua.edu.cn/apache/apr/apr-1.5.2.tar.gz
wget http://mirrors.tuna.tsinghua.edu ... r-util-1.5.4.tar.gz
wget http://archive.apache.org/dist/subversion/subversion-1.6.6.tar.gz
三、开始解压缩安装
3.一、安装neon
tar zxf neon-0.29.0.tar.gz
cd neon-0.29.0
./configure --prefix=/usr/local/neon --enable-shared --with-ssl=openssl
make && make install
3.二、安装subversion
tar zxf apr-1.5.2.tar.gz
cd apr-1.5.2
./configure --prefix=/usr/local/apr
make && make install
cd ..
tar zxf apr-util-1.5.4.tar.gz
cd apr-util-1.5.4
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
make && make install
cd ..
tar zxf subversion-1.6.6.tar.gz
cd subversion-1.6.6
./configure --prefix=/usr/local/svn --with-neon=/usr/local/neon --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-ssl
make && make install
四、添加svn到环境变量
vim /etc/profile
PATH=$PATH:/usr/local/svn/bin
export PATH
保存退出
source /etc/profile
五、验证
执行命令 svn --version
svn, version 1.6.6 (r40053)
compiled Nov 3 2015, 13:41:17
Copyright (C) 2000-2009 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (http://www.Collab.Net/). The following repository access (RA) modules are available: * ra_neon : Module for accessing a repository via WebDAV protocol using Neon. - handles 'http' scheme - handles 'https' scheme * ra_svn : Module for accessing a repository using the svn network protocol. - with Cyrus SASL authentication - handles 'svn' scheme * ra_local : Module for accessing a repository on local disk. - handles 'file' scheme cd /usr/local/svn/bin/ ldd svn|grep ssl libssl.so.10 => /usr/lib64/libssl.so.10 (0x00007fb33a874000) 这时,再次使用svn co检出代码,发现它会问你:(R)eject, accept (t)emporarily or accept (p)ermanently? 键入p回车,就该输入用户名和密码来认证了。 have a nice day.