Debian 12 bookworm
Sponsored Link

Subversion : Remote Access to Repositories2023/07/21

 

Access to Repositories from remote Hosts.

[1] Start [svnserve] on a Host that Subversion repository exists.
# create a directory for repositories on any pace you like and start [svnserve]

root@dlp:~#
mkdir /var/svn

root@dlp:~#
svnserve --daemon --pid-file /run/svnserve.pid --root /var/svn
# create a test project

root@dlp:~#
mkdir -p /var/svn/repos/project

root@dlp:~#
svnadmin create /var/svn/repos/project

root@dlp:~#
svn mkdir file:///var/svn/repos/project/trunk -m "create"

root@dlp:~#
svn mkdir file:///var/svn/repos/project/branches -m "create"

root@dlp:~#
svn mkdir file:///var/svn/repos/project/tags -m "create"

[2] Access to existing Subversion repository from another remote Host.
For example, Access to existing [/var/svn/repos/project] repository.
By the way, default access permission is read only, so it's impossible to execute [commit] or others like changing operation. For changing operation from remote Host, it needs to set access permission like the link.
# specify relative path name for SVN URI
# on this example
# SVN Top directory : [/var/svn]
# SVN repository directory : [/var/svn/repos/project]
# relative path : [repos/project]
# SVN URI : [svn://dlp.srv.world/repos/project]

debian@node01:~$
svn list svn://dlp.srv.world/repos/project

branches/
tags/
trunk/

debian@node01:~$
mkdir ./work

debian@node01:~$
svn checkout svn://dlp.srv.world/repos/project ./work

A    work/branches
A    work/tags
A    work/trunk
Checked out revision 3.

debian@node01:~$
ll work

total 12
drwxr-xr-x 2 debian debian 4096 Jul 20 20:00 branches
drwxr-xr-x 2 debian debian 4096 Jul 20 20:00 tags
drwxr-xr-x 2 debian debian 4096 Jul 20 20:00 trunk
[3] It's also possible to access via SSH without running [svnserve] service on Subversion Host.
debian@node01:~$
svn ls svn+ssh://debian@dlp.srv.world/var/svn/repos/project

debian@dlp.srv.world's password:
branches/
tags/
trunk/

debian@node01:~$
mkdir ./work2

debian@node01:~$
svn co svn+ssh://debian@dlp.srv.world/var/svn/repos/project ./work2

debian@dlp.srv.world's password:
A    work2/branches
A    work2/tags
A    work2/trunk
Checked out revision 3.
Matched Content