svn co 与ssl
默认情况下, yum安装的svn用的是GnuTLS, 而不是ssl, 导致checkout https协议打包的svn repo的时候会报错。
解决方法是用openssl重新编译安装svn。注意ssl版本,避免ssl漏洞引发的问题。
下载svn源码,地址:https://subversion.apache.org/download.cgi
http://mirrors.hust.edu.cn/apache/subversion/subversion-1.9.2.tar.bz2
查看安装说明:http://svn.apache.org/repos/asf/subversion/trunk/INSTALL
* Apache Serf (OPTIONAL for client) The Apache Serf library allows the Subversion client to send HTTP requests. This is necessary if you want your client to access a repository served by the Apache HTTP server. There is an alternate 'svnserve' server as well, though, and clients automatically know how to speak the svnserve protocol. Thus it's not strictly necessary for your client to be able to speak HTTP... though we still recommend that your client be built to speak both HTTP and svnserve protocols. * OpenSSL (OPTIONAL for client and server) OpenSSL enables your client to access SSL-encrypted https:// URLs (using Apache Serf) in addition to unencrypted http:// URLs. To use SSL with Subversion's WebDAV server, Apache needs to be compiled with OpenSSL as well.
要svn客户端能够访问http协议的repo,需要安装apache serf和Openssl。
必要库的安装
1. apr (http://apr.apache.org/download.cgi)
wget http://apache.fayea.com//apr/apr-1.5.2.tar.gz tar -xvf apr-1.5.2.tar.gz cd apr-1.5.2 ./configure make make install
2. Zlib
似乎默认自带
3. autoconf >= 2.5.9
yum install autoconf.noarch
4 libtool >= 1.4
自带
5. Apache Serf library >= 1.3.4
下载serf:https://github.com/TommyU/serf
先要下载scons,只有这个才能编译serf,
sudo wget http://prdownloads.sourceforge.net/scons/scons-local-2.3.0.tar.gz
解压,建立软链接
sudo ln -s /home/ywt/software/svn/scons/scons.py /usr/bin/scons
安装serf
无法安装,不知到APU什么鬼东西,找半天也没找到。中断。
=============峰回路转===========
几经周折,得知安装1.6.16以上版本的svn可以解决问题,于是这样折腾了一把,搞定(参考:http://tecadmin.net/install-subversion-1-8-on-centos-rhel/#)
新建文件/etc/yum.repos.d/wandisco-svn.repo, 内容如下:
[WandiscoSVN] name=Wandisco SVN Repo baseurl=http://opensource.wandisco.com/centos/6/svn-1.8/RPMS/$basearch/ enabled=1 gpgcheck=0
yum clean all
yum install subversion
尝试了下 checkout http开头的svn,通过。
======备注=======、
此外,对于喜欢折腾的朋友,下面链接可能有帮助:
http://blog.cwill-dev.com/2012/03/28/error-on-svn-checkout-ssl-handshake-failed-ssl-error-key-usage-violation-in-certificate-has-been-detected/
http://www.linuxquestions.org/questions/linux-server-73/error-on-svn-checkout-ssl-handshake-failed-ssl-error-key-usage-violation-in-certif-942294/