Add User Authentication:
Before determining the permission Control for access users, you must plan whether to perform uniform authentication for all projects in the entire resource library or a single project, that is to say, we mentioned the problem of using svnparentpath or svnpath.
The simplest authentication method is to use the basic HTTP authentication mechanism, which authenticates the access user through the user name and password. We can directly set it through the support provided by Apache. Apache provides an htpasswd tool to manage user names and passwords. Next we will use this tool to add two users.
In the command line window, go to the directory where Apache is located and execute the following command
Note: Create the user xrinehart
Input: htpasswd-C f: \ subversionfiles \ svn_auth_passwd xrinehart
Creates a passwd file using the-C parameter.
Output:
New Password :*****
Re-type new password :*****
Adding password for user xrinehart
When creating a user, the-C parameter is not used, but the-M parameter is used, because the fileSvn_auth_passwdCreated.
Open the svn_auth_passwd file, and the password is encrypted using MD5, and the contents encrypted by the same password are different.
Next, we must tell the Apache server how to use the passwd file, open httpd. conf, find the location where the location configuration we just added, and modify it as follows:
#
# SVN
#
Dav SVN
Svnparentpath "F:/subversionfiles"
# How to authenticate a user
Authtype basic
Authname "Subversion repository"
Authuserfile "F:/subversionfiles/svn_auth_passwd"
# Only Authenticated Users may access the Repository
Require valid-user
Restart the Apache HTTP Server and open http: // localhost: 8080/SVN/test in the browser. You will see the login request dialog box. Enter the username and password you just set.
In this way, the integration of Apache and SVN is basically achieved.
Related Articles: SVN for apache2 (2)