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. SQL Server用户自定义类型与统计信息

    用户自定义数据类型不支持统计信息! 所以查询对它的查询会慢一些.

  2. idea破解码

    43B4A73YYJ-eyJsaWNlbnNlSWQiOiI0M0I0QTczWVlKIiwibGljZW5zZWVOYW1lIjoibGFuIHl1IiwiYXNzaWduZWVOYW1lIjoiI ...

  3. #include <thread>

    1 detach 脱离当前主线程,自由执行,乱序; 2 join() 等待模式,执行完再执行下一个 3 std::this_thread::get_id() 获取当前线程编号 4 std::threa ...

  4. C++一维数组和指针的关系总结

    对于数组int a[10]; a表示数组的第一个元素的地址,即&a[0]; 如果使指针p,指向数组的首元素,可以进行操作: int * p=a; 或者 int *p=&a[0]; 那么 ...

  5. Java-----Excel转HTML

    尽管是转别人的(忘了哪转过来的了),但此处标为原创不是为了提高訪问量,也不是为了其它.仅仅是纯粹的认为有实际用途.希望能给很多其它有此需求的人看到并能帮到他们就足够了 所需jar包:jxl.jar p ...

  6. python手记(36)

    #!/usr/bin/env python #-*- coding: utf-8 -*- #code:myhaspl@qq.com import cv2 import numpy as np fn=& ...

  7. 存储过程中调用EXECUTE IMMEDIATE的“权限不足”问题

    使用plsql 动态创建表时,用户需要具有create any table 权限 例如: create or replace procedure create_table_test is tmpstr ...

  8. (转)ios限制控制器旋转

    iOS屏幕旋转控制 iOS屏幕旋转控制(iOS6之后)       iOS6之前,子控制器只要覆盖父类的shouldAutorotateToInterfaceOrientation:方法就能单独控制某 ...

  9. BZOJ 1969: [Ahoi2005]LANE 航线规划( 树链剖分 )

    首先我们要时光倒流, 倒着做, 变成加边操作维护关键边. 先随意搞出一颗树, 树上每条边都是关键边(因为是树, 去掉就不连通了)....然后加边(u, v)时, 路径(u, v)上的所有边都变成非关键 ...

  10. Notepad++使用技法

    Alt+H 隐藏行 Ctrl+Tab  实现在多个打开的窗口间切换 Ctrl+Shift+Q区块注释 Ctrl+K行注释(取消Ctrl+Shift+K) 文件  新建文件 Ctrl+N  打开文件 C ...