linux svn https检出错误

本文介绍了解决因SSL证书引发的Subversion(SVN)连接问题的方法。提供了两种解决方案:一种是在Linux环境下通过安装特定软件包来解决;另一种是在Windows环境下通过调整VisualSVN Server设置来解决。

[root@localhost]$ svn checkout https://192.168.0.202/svn/WorkingSvn

svn: 方法 OPTIONS 失败于 https://192.168.0.202/svn/WorkingSvn: SSL handshake failed: SSL 错误:Key usage violation in certificate has been detected. ( https://192.168.0.202)


方案一:(Linxu下安装软件包)

下载如下软件:

wgethttp://www.webdav.org/neon/neon-0.29.6.tar.gz

 wgethttp://www.sqlite.org/sqlite-amalgamation-3.6.22.tar.gz

 wgethttp://subversion.tigris.org/downloads/subversion-1.6.9.tar.gz

 wgethttp://mirror.esocc.com/apache//apr/apr-1.5.2.tar.gz

 wget http://mirror.esocc.com/apache//apr/apr-util-1.5.4.tar.gz

第一步:使用命令tar –zxvf 解压指定的文件如下:

[root@localhost home]# tar -zxvfneon-0.29.6.tar.gz

[root@localhost home]# tar -zxvfapr-1.5.2.tar.gz

[root@localhost home]# tar -zxvf apr-util-1.5.4.tar.gz

[root@localhost home]# tar -zxvfsubversion-1.6.9.tar.gz

[root@localhost home]# tar -zxvfsqlite-amalgamation-3.6.22.tar.gz

第二步:对各种文件按如下顺序进行源码安装

源码安装neon

[root@localhost home]# cdneon-0.29.6

[root@localhost neon-0.29.6] ./configure --with-ssl --with-libs=/usr/lib64/openssl/ --prefix=/usr/local/neon(注意:添加 –with-ssl –with-libs,这很重要)

[root@localhost neon-0.29.6] make

         [root@localhost neon-0.29.6] makeinstall;

源码安装apr

[root@localhosthome]# cd apr-1.5.2

[root@localhost apr-1.5.2]  ./configure

[root@localhost apr-1.5.2] make

[root@localhost apr-1.5.2] make install

源码安装apr-util

[root@localhosthome]# cd apr-util-1.5.4

[root@localhost apr-util-1.5.4]    ./configure –with-apr=/usr/local/apr

[root@localhost apr-util-1.5.4]    make

[root@localhost apr-util-1.5.4]    make install

搬移解压之后的Sqlit到Subversion中;

[root@localhosthome] #cd subversion-1.6.9

[root@localhost subversion-1.6.9] mkdir sqlite-amalgamation

[root@localhost subversion-1.6.9] mv ../sqlite-3.6.22/*  ./sqlite-amalgamation/

安装subversion

[root@localhost subversion-1.6.9] ./configure --with-ssl --with-neon=/usr/local/neon --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --prefix=/usr/local/svn

[root@localhost subversion-1.6.9] make

这里可能会出现can not find lexpat的错误,直接find / -name libexpat,找到后发现在/lib64目录里有个libexpat,那么ln -s /lib64/libexpat.so.1.5.1 /usr/lib64/libexpat 再进行make搞定

[root@localhost subversion-1.6.9] make install

完毕之后即可使用svn checkout https://*********/ --username ***命令了

方案二(Windows forLinux)

信息来源:http://www.visualsvn.com/support/topic/00056/

错误原因是windows使用的证书linux不能识别。

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

过程

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

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

o    [HKEY_LOCAL_MACHINE\SOFTWARE\VisualSVN\VisualSVNServer]

o    "CreateGnuTLSCompatibleCertificate"=dword:00000001

     

o   for 64-bit system:

o    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\VisualSVN\VisualSVNServer]

o    "CreateGnuTLSCompatibleCertificate"=dword:00000001

     

2.    Start VisualSVN Server Manager.(打开virsualSVN server)

3.    Go to Action | Properties | Certificate.

4.    Click Change certificate... and follow the wizard instructionsto generate a new self-signed certificate.

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

这样问题就解决了。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值