开发者

Subversion hide repository path

How can I configure the subversion server to hide the full repository path from the outside world?

For example, the repository lives under /home/svn/foob开发者_如何学运维ar/ ... I want to access it via ssh as svn+ssh://user@domain.com/foobar.


Reading carefully through the official SVN documentation I have found that when accessing subversion over svn+ssh -- then a separate svnserve process is spawned for every connection. Thus the trick is to

  1. Rename svnserve to svnserve.bin
  2. Create a file called svnserve
  3. Add the following to its contents

    #!/bin/sh
    exec /usr/bin/svnserve.bin -r /home/svn "$@"
    

Thus the wrapper will be called everytime a server instance is needed. It will in turn init the server with a new root path.

Piece of cake!


Use the --root option:

svnserve --root /home/svn


A blog post today went into some great detail about how to setup SSH access to SVN on a server.

http://blog.tampakrap.gr/subversion-setup-and-gorg/#utm_source=feed&utm_medium=feed&utm_campaign=feed


You can use HTTP(S) protocol instead of SSH. And then, configure Apache with any virtual directory you like.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜