How do I setup SVN repository security?

By default, all SVN repositories are globally accessible. However, by using the ProjectHut Control Panel you can configure permissions so only authenticated users can access your repository.

First, if you have not already done so, you need to add one or more authenticated users and/or groups so you can assign access rights to them:

How to create Users and Groups:

  1. In the ProjectHut control panel (the admin/ area)  click on the “Users” link.
  2. Click on “Create a new user” and complete the form to create a user and assign a password. Repeat this for each user that you wish to give access to your system.
  3. Optionally you can click on the “Groups” link define one or more groups of users that can share access permissions (e.g. you might choose to have a ‘developers’ group with full read-write permissions, and also a ‘testers’ group that has only read-only permissions).

How to assign Subversion repository permissions:

  1. In the ProjectHut control panel (the admin/ area) click on “Subversion Repositories”.
  2. Click on the “permissions” action for the repository you wish to configure.
  3. To disable access for all unauthenticated users, click on the “edit” action next to the “anonymous” rule on the root ‘/’ path.
  4. Change the access to “denied” and click the update rule.
  5. To enable access to your repository for a user or group  click on the “add” action next to the root ‘/’ path to define a new rule.
  6. Select the user or group in question and choose what level of access you wish to give (either “read/write”  “read only” or “disabled).
  7. Click on “Add Rule” to assign the permission.

If you then attempt to access your subversion repository via a web-browser or a subversion client  you will be prompted for a username and password in order to obtain access.

HINT: By using this configuration screen  you can also assign different permissions to different directory paths within your repository – just use the “Create new rules for path:” box to define a set of rules for a new path.



Leave a Reply