svn+ssh
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的更多相关文章
- svn+ssh方式svn服务器和客户端的配置[转载]
本文摘自:http://hi.baidu.com/farmerluo/item/e7d9d72d098afc0a42634abb 我们最近一个项目用的那几台服务器都是客户给的,但是管理非常严格,只给我 ...
- tortoiseSVN svn+ssh
2015年6月28日 11:45:10 星期日 今天实验用小海龟svn客户端的svn+ssh协议去链接版本库, 期望会快一点儿 首先在设置里 记着将连接ssh用的用户名和密码一块儿写到输入框中: -l ...
- 在Ubuntu6.06 在搭建SVN服务器及在windows建立svn+ssh客户端 (续)
接上篇.本篇主要介绍windows下建立svn+ssh客户端. 9.在windows下安装svn客户端,则需安装“TortoiseSVN”.“Puttygen”和“Pageant” 9.1.下载 ...
- TortoiseSVN使用svn+ssh协议连接服务器时重复提示输入密码
当使用svn+ssh协议连接svn服务器时,ssh会提示请求认证,由于不是svn客户端程序来完成ssh的认证,所以不会缓存密码. 而svn客户端通常会建立多个版本库的连接,当密码没有缓存的时候,就会重 ...
- 基于svn+ssh:访问svn的部署以及客户端配置
1.安装ssh sudo apt-get install ssh 2.安装subversion sudo apt-get install subversion 3.为参与项目开发的成员建立用户帐户 s ...
- 在Ubuntu6.06 在搭建SVN服务器及在windows建立svn+ssh客户端
部门现在使用的Linux系统是Ubuntu6.06,内核版本为2.6.15-57-386.由于系统比较老,所有用网上介绍的方法搭建SVN服务器经常出错,所以参考文章[1],将自己的搭建过程记录下. 1 ...
- SVNKit支持SSH连接
SVNKit这个开源工具,用于Java语言访问SVN库,咋看的时候很方便,其实坑特别多.我在这里只想跟大家说一句,如果你还没有用过,请不要在生产环境使用这个东西了,兼容性问题搞死你(替换方案是直接用s ...
- [No000094]SVN学习笔记4-版本库概念与部分日常操作
基本概念 版本库 Subversion 使用集中的数据库,它包含了所有的版本控制文件及其完整历史.这个数据库就是版本库.版本库通常位于运行 Subversion 服务器的文件服务器上,向 Subver ...
- Linux SVN 命令详解
1.将文件checkout到本地目录 svn checkout path(path是服务器上的目录) 例如:svn checkout svn://192.168.1.1/pro/domain ...
随机推荐
- vb listview 的常用操作
常用操作:获取当前行数和列数: MsgBox "行数:" & ListView1.ListItems.Count & "列数:" & L ...
- U盘装centos7系统过程
1. 使用最新版UltraISO将ISO镜像刻录到U盘 一定要是最新版,试用版都可以,按下图操作: 2. U盘启动电脑进入安装界面 正常情况下你应该会看到下面的这个界面: 选择第一项,然后按TAB键, ...
- Java 拾遗
1.选择表达式中的类型转换 public class Test { public void static main(String args[]){ int i = 5; System.out.prin ...
- SpringMVC 中整合之JSON、XML
每次看到好的博客我就想好好的整理起来,便于后面自己复习,同时也共享给网络上的伙伴们! 博客地址: springMVC整合Jaxb2.xStream: http://www.cnblogs.com/h ...
- C# 常用函数和方法集
1.DateTime 数字型 System.DateTime currentTime=new System.DateTime(); 1.1 取当前年月日时分秒 currentTime=System. ...
- ARM Cortex M3(V7-M架构)硬件启动程序 二
解析 STM32 的启动过程 解析STM32的启动过程 当前的嵌入式应用程序开发过程里,并且C语言成为了绝大部分场合的最佳选择.如此一来main函数似乎成为了理所当然的起点——因为C程序往往从main ...
- 去英国Savile Row 做件私人定制手工西装_GQ男士网
去英国Savile Row 做件私人定制手工西装_GQ男士网 去英国Savile Row 做件私人定制手工西装
- C++_const
//const在C不可以初始化数组 //const在C++可以用来初始化数组 #include <iostream> using namespace std; void main() { ...
- Review1-11
泛型 泛型类 Public 类名 class<T>{} 泛型方法 Public static <T> 返回类型 方法名(<T> t){} 泛型类型必须使用引用类型 ...
- js 使用for循环遍历数组
今天写个无聊的东西!for循环的使用! 例如以下:定义a数组,b为伪数组! var a = [1,2,3,0,5,4]; var b = document.getElementsByTagName(' ...