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. Scala单例对象、伴生对象实战详解

    1.Scala单例对象 Scala单例对象是十分重要的,没有像在Java一样,有静态类.静态成员.静态方法,但是Scala提供了object对象,这个object对象类似于Java的静态类,它的成员. ...

  2. MarkWord

    MarkWord - 可发布博客的 Markdown编辑器 代码开源 1 /// <summary> 2 /// 同步呈现 3 /// </summary> 4 /// < ...

  3. VMware ESXI4.1 常用命令

    一. VMware ESX Command 1. # vmware –v  (查看esx版本) 2. # esxcfg-info -a(查看显示ESX硬件,内核,存储,网络等信息) # esxcfg- ...

  4. MySQL read_only选项的作用

    1作用: 从字面意思上看就可以知道这个是把mysql设置为只读,但是这个只读只是针对一般用户而言的,对于root这种用super权限的用户read_only是没有用的. 2设置方式: set glob ...

  5. centos 6.7 perl 5.22 安装DBD 需要使用老的perl版本

    zjzc01:/usr/bin# mv perl.bak perlold zjzc01:/usr/bin# cd zjzc01:/root# cd DBD-Oracle-1.36 zjzc01:/ro ...

  6. Pascal 线段树 lazy-tag 模板

    先说下我的代码风格(很丑,勿喷) maxn表示最大空间的四倍 tree数组表示求和的线段树 delta表示增减的增量标记 sign表示覆盖的标记 delta,sign实际上都是lazy标志 pushd ...

  7. spring mvc 使用jsr-303进行表单验证的方法介绍

    源代码来源:http://howtodoinjava.com/spring/spring-mvc/spring-bean-validation-example-with-jsr-303-annotat ...

  8. append与after

    apend与apendTo就如同after与insertAfter,表达意思相同,表达不同.A.after(B)=B.insertAfter(A).apend在元素里面添加,after在元素外面添加. ...

  9. deque双向队列(转)

    deque双向队列是一种双向开口的连续线性空间,可以高效的在头尾两端插入和删除元素,deque在接口上和vector非常相似,下面列出deque的常用成员函数:   deque的实现比较复杂,内部会维 ...

  10. 【翻译】在Ext JS 5种使用ViewControllers

    原文:Using ViewControllers in Ext JS 5 简单介绍 在Ext JS 5中,在应用程序架构方面提供了一些令人兴奋的改进,如加入了ViewModels.MVVM以及view ...