Free Hosting Online for WorkStations

< Previous | Contents | Next >

3.3.4. Access via custom protocol (svn://)


Once the Subversion repository is created, you can configure the access control. You can edit the /path/ to/repos/project/conf/svnserve.conf file to configure the access control. For example, to set up authentication, you can uncomment the following lines in the configuration file:


# [general]

# password-db = passwd


After uncommenting the above lines, you can maintain the user list in the passwd file. So, edit the file passwd

in the same directory and add the new user. The syntax is as follows:


username = password


For more details, please refer to the file.


Now, to access Subversion via the svn:// custom protocol, either from the same machine or a different machine, you can run svnserver using svnserve command. The syntax is as follows:


$ svnserve -d --foreground -r /path/to/repos

# -d -- daemon mode

# --foreground -- run in foreground (useful for debugging)

# -r -- root of directory to serve


For more usage details, please refer to:

$ svnserve --help


Once you run this command, Subversion starts listening on default port (3690). To access the project repository, you must run the following command from a terminal prompt:


svn co svn://hostname/project project --username user_name


Based on server configuration, it prompts for password. Once you are authenticated, it checks out the code from Subversion repository. To synchronize the project repository with the local copy, you can run the update sub-command. The syntax of the command, entered at a terminal prompt, is as follows:


cd project_dir ; svn update


For more details about using each Subversion sub-command, you can refer to the manual. For example, to learn more about the co (checkout) command, please run the following command from a terminal prompt:


svn co help


Top OS Cloud Computing at OnWorks: