SVN: Difference between revisions
From Leo's Notes
This page was last edited on 19 May 2013, at 06:42.
Created page with " == Backup Repository == svnadmin dump /path/to/repository > backup.dump == Restore Repository == svnadmin create /path/to/repository svnadmin load /path/to/repository < b..." |
No edit summary |
||
| Line 8: | Line 8: | ||
== Setting up svnserve == | == Setting up svnserve == | ||
To set up svnserve under CentOS/ScientificLinux, run: | |||
yum install subversion | yum install subversion | ||
service svnsersve start | service svnsersve start | ||
To configure <code>svnserve</code>, you will need two files in your repository's <code>conf/</code> directory: | |||
<code>svnserve.conf:</code> | |||
<syntaxhighlight lang="text" line start="1" enclose="div"> | |||
[general] | |||
### These options control access to the repository for unauthenticated | |||
### and authenticated users. Valid values are "write", "read", | |||
### and "none". The sample settings below are the defaults. | |||
anon-access = none | |||
auth-access = write | |||
### The password-db option controls the location of the password | |||
### database file. Unless you specify a path starting with a /, | |||
### the file's location is relative to the directory containing | |||
### this configuration file. | |||
### If SASL is enabled (see below), this file will NOT be used. | |||
### Uncomment the line below to use the default password file. | |||
password-db = passwd | |||
### This option specifies the authentication realm of the repository. | |||
### If two repositories have the same authentication realm, they should | |||
### have the same password database, and vice versa. The default realm | |||
### is repository's uuid. | |||
realm = Project Version 1.0 Repository | |||
</syntaxhighlight> | |||
<code>passwd:</code> (as defined above in <code>password-db</code>) | |||
<syntaxhighlight lang="text" line start="1" enclose="div"> | |||
[users] | |||
leo = meinpasswort | |||
</syntaxhighlight> | |||
You can now access your repository at: | |||
svn://server/<path_to_repository> | |||
For example, if my repository was placed in <code>/home/leo/repository/project_v1</code>, you should be able to checkout and commit at: | |||
svn://server/home/leo/repository/project_v1 | |||
If you have defined your <code>svnserve.conf</code> properly, you will be prompted for a username/password. | |||
[[Category:Linux]] | [[Category:Linux]] | ||
[[Category:Todo]] | [[Category:Todo]] | ||
Revision as of 06:42, 19 May 2013
Backup Repository
svnadmin dump /path/to/repository > backup.dump
Restore Repository
svnadmin create /path/to/repository svnadmin load /path/to/repository < backup.dump
Setting up svnserve
To set up svnserve under CentOS/ScientificLinux, run:
yum install subversion service svnsersve start
To configure svnserve, you will need two files in your repository's conf/ directory:
svnserve.conf:
[general]
### These options control access to the repository for unauthenticated
### and authenticated users. Valid values are "write", "read",
### and "none". The sample settings below are the defaults.
anon-access = none
auth-access = write
### The password-db option controls the location of the password
### database file. Unless you specify a path starting with a /,
### the file's location is relative to the directory containing
### this configuration file.
### If SASL is enabled (see below), this file will NOT be used.
### Uncomment the line below to use the default password file.
password-db = passwd
### This option specifies the authentication realm of the repository.
### If two repositories have the same authentication realm, they should
### have the same password database, and vice versa. The default realm
### is repository's uuid.
realm = Project Version 1.0 Repository
passwd: (as defined above in password-db)
[users]
leo = meinpasswort
You can now access your repository at:
svn://server/<path_to_repository>
For example, if my repository was placed in /home/leo/repository/project_v1, you should be able to checkout and commit at:
svn://server/home/leo/repository/project_v1
If you have defined your svnserve.conf properly, you will be prompted for a username/password.