According to official document, svn+ssh is supposed to be somehow faster than apache+dav_svn, however based on my setup, it's slower.



# install subversion if missing

sudo apt-get install subversion



# add a system user for all incoming ssh connections

useradd -m svnuser



# create the SVN repository

 sudo svnadmin create /var/svn/repoOne

 sudo chown -R svnuser repoOne

 svnuser will be essentially the account to interact with svnserve, so need to grant it all the relevant permissions to the repositories.



# Create Keys using ssh-keygen and append pub key to authorized_keys of the user above



ssh-keygen -b 1024 -t dsa -N passphrase -f keyfile



cat keyfile.pub >> /home/svnuser/.ssh/authorized_keys



# download the key to local(say windows), convert the private key using putty for later tortoisesvn client to use.

# or can create locally first using puttygen and then upload it server and do the attach of pub key, both ways works(make sure delete the first line and last line in the pub key if generated using puttygen)



# edit the command in authorized_keys



vi /home/svnuser/.ssh/authorized_keys

## find the line whose pub key is specically for svn access, update it as below for example:

command="/usr/bin/svnserve -t -r /var/svn --tunnel-user=userOneWhoDoesCheckIn" ssh-rsa [pub key] [optional comment]

## note:

1. userOneWhoDoesCheckIn is the user who will appear on the svn audit info, but actually it delegates operation to svnuser.

2. command here can be complex, e.g. you might want to specify some additional options here:

no-port-forwarding,no-agent-forwarding,no-X11-forwarding, no-pty



# download pageant.exe from putty official website if missing.

# add the private key into pageant.exe(client authentication depends on it, so it needs to be running before any client svn access)

# note: if you had previously specified a password for the ssh key, then here you will be prompted to input the same pwd here when adding.



# put below link into tortoisesvn

svn+ssh://svnuser@serverIPAddress/repoOne

the first time you will be prompted to cache the pub key, choose yes, so you won't be any more.

Reference:

http://svnbook.red-bean.com/en/1.5/svn-book.html#svn.serverconfig.choosing.svn-ssh

http://tortoisesvn.net/ssh_howto.html

svn+ssh的更多相关文章

  1. svn+ssh方式svn服务器和客户端的配置[转载]

    本文摘自:http://hi.baidu.com/farmerluo/item/e7d9d72d098afc0a42634abb 我们最近一个项目用的那几台服务器都是客户给的,但是管理非常严格,只给我 ...

  2. tortoiseSVN svn+ssh

    2015年6月28日 11:45:10 星期日 今天实验用小海龟svn客户端的svn+ssh协议去链接版本库, 期望会快一点儿 首先在设置里 记着将连接ssh用的用户名和密码一块儿写到输入框中: -l ...

  3. 在Ubuntu6.06 在搭建SVN服务器及在windows建立svn+ssh客户端 (续)

    接上篇.本篇主要介绍windows下建立svn+ssh客户端. 9.在windows下安装svn客户端,则需安装“TortoiseSVN”.“Puttygen”和“Pageant”    9.1.下载 ...

  4. TortoiseSVN使用svn+ssh协议连接服务器时重复提示输入密码

    当使用svn+ssh协议连接svn服务器时,ssh会提示请求认证,由于不是svn客户端程序来完成ssh的认证,所以不会缓存密码. 而svn客户端通常会建立多个版本库的连接,当密码没有缓存的时候,就会重 ...

  5. 基于svn+ssh:访问svn的部署以及客户端配置

    1.安装ssh sudo apt-get install ssh 2.安装subversion sudo apt-get install subversion 3.为参与项目开发的成员建立用户帐户 s ...

  6. 在Ubuntu6.06 在搭建SVN服务器及在windows建立svn+ssh客户端

    部门现在使用的Linux系统是Ubuntu6.06,内核版本为2.6.15-57-386.由于系统比较老,所有用网上介绍的方法搭建SVN服务器经常出错,所以参考文章[1],将自己的搭建过程记录下. 1 ...

  7. SVNKit支持SSH连接

    SVNKit这个开源工具,用于Java语言访问SVN库,咋看的时候很方便,其实坑特别多.我在这里只想跟大家说一句,如果你还没有用过,请不要在生产环境使用这个东西了,兼容性问题搞死你(替换方案是直接用s ...

  8. [No000094]SVN学习笔记4-版本库概念与部分日常操作

    基本概念 版本库 Subversion 使用集中的数据库,它包含了所有的版本控制文件及其完整历史.这个数据库就是版本库.版本库通常位于运行 Subversion 服务器的文件服务器上,向 Subver ...

  9. Linux SVN 命令详解

    1.将文件checkout到本地目录 svn checkout path(path是服务器上的目录)   例如:svn checkout svn://192.168.1.1/pro/domain    ...

随机推荐

  1. the C programming language 阅读笔记2

    1. 指针 1.1 自增符的使用 ++*p;//p指向的内容加一 (*p)++; //p指向的内容加一 *p++;//p本身自增 *++p; //p本身自增 因为诸如*和++这样的一元运算符在表达式求 ...

  2. MySql: Column 'XXXX' in field list is ambiguous 错误

    [Err] 1052 - Column 'XXXX' in field list is ambiguous 例如: SELECT id, a.name, price, `describe`, scho ...

  3. TraceView简单使用方法

    一.TraceView简介 TraceView是AndroidSDK里面自带的工具,用于对Android的应用程序以及Framework层的代码进行性能分析. TraceView是图形化的工具,最终它 ...

  4. linux安装php遇到的问题

    第一个问题:configure: error: libjpeg.(a|so) not found 很多人都纳闷儿了,我都安装了的,为什么就找不到呢?找不到其实就应试想到它的搜索位置里面是没有的,要不然 ...

  5. saiku安装方法总结

    最近研究pentaho和saiku,在网上搜集了一些安装和配置的方法,亲测有效,在这分享总结一下方便日后使用. Saiku主要提供两种安装方式,独立运行和集成在Pentaho BI平台上,本文会简单介 ...

  6. (十一年)unity4.6得知Ugui中国文献-------参考-UGUI Visual Components

     大家好,我是太阳广东. 转载请注明出处:http://write.blog.csdn.net/postedit/38922399 更全的内容请看我的游戏蛮牛地址:http://www.unity ...

  7. C++中#include的工作原理

    大多数人可能对“#include”比较熟悉,因为我们写C/C++程序的时候都会写的字符串之一,但是它是具体怎么工作的?或者它的原理是什么呢? 可能不太熟悉,也有可能没有去关心过.我们只关心程序能否正确 ...

  8. spring mvc 非注解形式

    目录(?)[+] webxml配置文件 注如果使用注解可以加上-- servlet上下文配置文件 test-servletxml 实体类Empjava StartController控制器 控制器Em ...

  9. 搭建Hadoop集群 (三)

    通过 搭建Hadoop集群 (二), 我们已经可以顺利运行自带的wordcount程序. 下面学习如何创建自己的Java应用, 放到Hadoop集群上运行, 并且可以通过debug来调试. 有多少种D ...

  10. 【LeetCode题意分析&解答】40. Combination Sum II

    Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in ...