解决ubuntu下svn下载代码出现的SSL error问题

因为习惯问题, 一直在ubuntu 下开发一些程序, 同事都是在window下面, 因此常常会出现一些问题.  最近装了64位ubuntu12.04版本.  sudo apt-get install svn 后, 出现以下的错误. ubuntu

SSL handshake failed: SSL error: Key usage violation in certificate has been 服务器

缘由, 之前查过, 就是svn发布的安装包再也不使用OpenSSL, 采用的GnuTLS. 原文以下: app

 

 

Subversion clients receive the following error message when attempting to connect to VisualSVN Server: dom

svn: OPTIONS of 'https://server.domain.local/svn/repo': SSL handshake failed: SSL error:
Key usage violation in certificate has been detected. (https://server.domain.local)

You may experience the issue if both of the following conditions are met: svn

  • VisualSVN Server has a self-signed certificate applied and
  • Subversion client is built against the GnuTLS library.
Note
NoteGnuTLS library is an alternative to OpenSSL. Most Subversion clients for Windows are built against OpenSSL and are not affected by this issue. While some Subversion packages (available mostly on Linux-based operating systems such as Ubuntu and Debian) are built against GnuTLS and are affected.

 

一种方法是修改svn服务器, 这个对于我怕影响同事开发. ui

另一种方法是, 修改libneon-gnutls 指向一个空的地方. 这个方法很差用, 而且以为也不是一个好的方案. 最后决定换是编译源代码. this

注: 把svn切换到最新的deb地址ppa:dominik-stadler/subversion-1.7, 也出现一样的错误. spa

 

在32bit ubuntu12.04的时候曾经下载了svn1.7.8的代码,  因此也没有下载最新推荐的1.8.1的包. server

 

cd subversion-1.7.8/ blog

依次运行下面的命令

./get-deps.sh

    这个命令是获取一下依赖的第三方的源码.

./configure --prefix=/usr/local/subversion --with-ssl --with-neon

     你能够修改--perfix后面的路径, 后面的参数必定要有--with-ssl

     中间提示出现缺乏一些包, 根据提示安装就能够了

make

sudo make install

 

最后说明一下的是, 安装的程序在 /usr/local/subversion目录下面, 把 PATH环境变量里面加入 /usr/local/subversion/bin. 搞定

 

运行svn --version 

是1.7.8 

同一文章:  

http://lazy-luo.iteye.com/blog/1926391

相关文章
相关标签/搜索