设为首页 收藏本站
查看: 840|回复: 0

[经验分享] centos下访问windows subversion (http、https)

[复制链接]

尚未签到

发表于 2018-6-22 15:56:21 | 显示全部楼层 |阅读模式
  [需要的安装包下载](http://pan.baidu.com/s/1qWNhAqS)
  在用CentOS默认的svn客户端工具访问Windows下搭建的subversion时会提示如下错误:
  [kuring@localhost 桌面]$ svn checkout https://192.168.100.100/svn/test
  svn:方法 OPTIONS 失败于 “https://192.168.100.100/svn/test: SSL handshake failed:SSL 错误:Key usage violation in certificate has been detected. (https://192.168.100.100)
  通过执行如下命令可以看到svn是支持https协议的:
  [kuring@localhost ~]$ svn --version
  svn,版本 1.6.11 (r934486)
  编译于 Apr 11 2013,16:13:51
  版权所有 (C) 2000-2009 CollabNet。
  Subversion 是开放源代码软件,请参阅 http://subversion.tigris.org/ 站点。
  此产品包含由 CollabNet(http://www.Collab.Net/) 开发的软件。
  可使用以下的版本库访问模块:
  * ra_neon : 通过 WebDAV 协议使用 neon 访问版本库的模块。
  - 处理“http”方案
  - 处理“https”方案
  * ra_svn : 使用 svn 网络协议访问版本库的模块。  - 使用 Cyrus SASL 认证
  - 处理“svn”方案
  * ra_local : 访问本地磁盘的版本库模块。
  - 处理“file”方案
  ```
  这是由于svn客户端在https协议中使用了GnuTLS库造成的,将其更改为使用openssl库即可。通过执行如下命令可以查看svn使用的库:
  [kuring@localhost bin]$ ldd svn | grep ssl
  [kuring@localhost bin]$ ldd svn | grep tls
  libgnutls.so.26 => /usr/lib64/libgnutls.so.26 (0x00007f33004ad000)
  -------
  下面选择重新编译的方式来安装svn。
  # 删除subversion
  执行:`yum remove subversion`
  # 检查openssl安装情况
  这里已经安装:
  [kuring@localhost tmp]$ rpm -qa | grep openssl
  openssl-1.0.1e-15.el6.x86_64
  openssl-devel-1.0.1e-15.el6.x86_64
  # 安装neon
  这里选择的安装版本为0.29.6,subversion对neon的版本有要求。如果不是subversion的版本,在执行subversion下的configure文件时并不会报错
  [kuring@localhost software]$ tar zvxf neon-0.29.6.tar.gz
  [kuring@localhost software]$ cd neon-0.29.6
  ./configure --with-ssl=openssl
  make
  make install
  # 安装apr
  tar zvxf apr-1.5.0.tar.gz
  cd apr-1.5.0
  ./configure
  make
  make install
  # 安装apr-util
  tar zvxf apr-util-1.5.3.tar.gz
  cd apr-util-1.5.3
  ./configure --with-apr=/usr/local/apr
  make
  make install
  # 下载sqllite
  unzip sqlite-amalgamation-3080401.zip
  mv sqlite-amalgamation-3080401 sqlite-amalgamation
  mv sqlite-amalgamation subversion-1.7.16/// 将其复制到subversion源码目录下
  # 安装subversion
  tar zvxf subversion-1.7.16.tar.gz
  ./configure --with-ssl --with-neon=/usr/local --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr
  make
  make install
  然后再执行`svn --version`命令可以看到已经包含了https协议。
  # 参考资料
  [SSLhandshake failed: SSL error: Key usage violation in certificate has been detected CentOS](http://itekblog.com/key-usage-violation-in-certificate-has-been-detected-centos/)
  SVN1.8.9版本支持http和https
  操作系统:Centos6.3
  SVN版本:1.8.9
  昨天编译安装的svn是成功了,在eclipse中是可以用了...不过今天在linux上执行 svn checkout http://.... 命令时候报错了...
  svn: E170000: Unrecognized URL scheme for
  又重新 svn --version
  svn, version 1.8.9 (r1591380)
  compiled Jun  7 2014, 06:14:20 on x86_64-unknown-linux-gnu
  Copyright (C) 2014 The Apache Software Foundation.
  This software consists of contributions made by many people;
  see the NOTICE file for more information.
  Subversion is open source software, see http://subversion.apache.org/
  The following repository access (RA) modules are available:
  * ra_svn : Module for accessing a repository using the svn network protocol.
  - handles 'svn' scheme
  * ra_local : Module for accessing a repository on local disk.
  - handles 'file' scheme
  发现 dev 模块根本没加载进来.....
  在svn1.8版本之前按照原来的安装方法是可以加载到dav的模块,但是,1.8版本以后,需要serf软件包支持访问 http 协议的版本库,不然就会报错.   serf需要用scons来编译安装,所以先安装下scons
  wgethttp://downloads.sourceforge.net/project/scons/scons/2.3.0/scons-2.3.0-1.noarch.rpm?r=http%3A%2F%2Fwww.scons.org%2F&ts=1387258358&use_mirror=softlayer-ams
  rpm -ivh scons-2.3.0-1.noarch.rpm
  下载,编译安装scons
  wget https://serf.googlecode.com/files/serf-1.3.3.tar.bz2
  scons PREFIX=/home/rely/serf APR=/home/rely/apr APU=/home/rely/apr-util OPENSSL=/usr/bin
  tar -jxvf serf-1.3.3.tar.bz2
  cd serf-1.3.3
  scons install
  重新编译svn 加上 --with-serf=/home/rely/serf
  ./configure--prefix=/home/svn/server --with-apxs=/home/apache/bin/apxs --with-apr=/home/rely/apr/bin/apr-1-config --with-apr-util=/home/rely/apr-util/bin/apu-1-config --without-berkeley-db --with-openssl --enable-maintainer-mode --with-sqlite=/home/sqlite --with-zlib=/home/rely/zlib --with-serf=/home/rely/serf
  再加一步,把serf源码包里的 libserf-1.so.1 复制到svn的安装目录下的lib目录,否则会报错
  svn: error while loading shared libraries: libserf-1.so.1: cannot open shared object file: No such file or directory
  cp libserf-1.so.1 /home/svn/server/lib
  svn --version 看下信息
  svn, version 1.8.9 (r1591380)
  compiled Jun  8 2014, 01:20:36 on x86_64-unknown-linux-gnu
  Copyright (C) 2014 The Apache Software Foundation.
  This software consists of contributions made by many people;
  see the NOTICE file for more information.
  Subversion is open source software, see http://subversion.apache.org/
  The following repository access (RA) modules are available:
  * ra_svn : Module for accessing a repository using the svn network protocol.
  - handles 'svn' scheme
  * ra_local : Module for accessing a repository on local disk.
  - handles 'file' scheme
  * ra_serf : Module for accessing a repository via WebDAV protocol using serf.
  - using serf 1.3.3
  - handles 'http' scheme
  - handles 'https' scheme

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-529121-1-1.html 上篇帖子: windows,linux鼠标共享synergys-sys 下篇帖子: android/iphone/windows/linux声波通讯库
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表