解決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

相關文章
相關標籤/搜索