博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
svn+ssh
阅读量:7096 次
发布时间:2019-06-28

本文共 2230 字,大约阅读时间需要 7 分钟。

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

转载地址:http://qjhql.baihongyu.com/

你可能感兴趣的文章
好用的软件推荐
查看>>
python一般简介,安装
查看>>
数据库事务
查看>>
实验三ShellShock 攻击实验
查看>>
AOP简介
查看>>
用户登陆模块的后端实现
查看>>
网关协议学习:CGI、FastCGI、WSGI
查看>>
TCP连接建立与释放
查看>>
mariadb multi-source replication(mariadb多主复制)
查看>>
64位操作系统在DOSBox中进入debug的问题
查看>>
程序设计师真情忏悔录
查看>>
文摘《十四》
查看>>
HTTP 错误 401.1 - 未授权:登录失败
查看>>
jquery的一些select操作小记
查看>>
jquery图片播放插件Fancybox(灯箱)
查看>>
最终大赛作品——VGA简单显示、简单视力检测
查看>>
初遇ACM之A+B问题
查看>>
Kali无法启动、无法安装
查看>>
ArrayList源码分析
查看>>
WiFi无线连接过程中有哪几个主要步骤?
查看>>