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. hdu 4676 Sum Of Gcd 莫队+数论

    题目链接 给n个数, m个询问, 每个询问给出[l, r], 问你对于任意i, j.gcd(a[i], a[j]) L <= i < j <= R的和. 假设两个数的公约数有b1, ...

  2. Autoconf/Automake工具简介

    在linux下编程的时候,有时候工程项目很大,文件比较多,此时需要使用自动创建Makefile文件功能.也就是使用Autoconf/Automake工具自动生成Makefile,为编译程序带来了方便, ...

  3. Java用Dijkstra算法实现地图两点的最短路径查询(Android版)

    地图上实现最短路径的查询,据我了解的,一般用Dijkstra算法和A*算法来实现.由于这是一个课程项目,时间比较急,而且自己不熟悉A*算法,所以参考网上的Dijkstra算法(http://blog. ...

  4. [LeetCode][Python]String to Integer (atoi)

    # -*- coding: utf8 -*-'''__author__ = 'dabay.wang@gmail.com'https://oj.leetcode.com/problems/string- ...

  5. linux系统配置Apache虚拟主机实例

    安装apache,php: yum install httpd php 假设VPS的IP是58.130.17.168,有两个域名指向该IP,分别是domain1.com, domain2.com, 修 ...

  6. c# 搭建服务端 常用的Helper(5)

    常用的Helper 1.byteHelper :对象与byte[]之间的转换 2.ConvertJson:操作json对象 3.EncodingHelper:对象编码 4.ModelConvertHe ...

  7. try,catch捕获错误的用法

    <!DOCTYPE html> <html> <head> <meta charset="utf-8"/> <script&g ...

  8. mac文件权限

    如何设置文件/或文件夹权限为777 进入终端,切换到指定目录,输入以下命令,后面添加你的文件名/目录名$sudo chmod -R 777 (文件名/目录名) 或 $chmod 777 ./test. ...

  9. a中国天气网pi(json格式)

    http://m.weather.com.cn/data/101050101.html 此接口的回报格式例如以下 { "weatherinfo": { "city&quo ...

  10. CodeForces Round #179 (295A) - Greg and Array 一个线段树做两次用

    线段树的区间更新与区间求和...一颗这样的线段树用两次... 先扫描1~k...用线段树统计出每个操作执行的次数... 那么每个操作就变成了 op. l  , op.r , op.c= times* ...