Yesterday morning just studied a will SVN, afternoon colleagues to use, after the completion of the building to the user to verify the synchronization of data. But the configuration process encountered a problem, now solved, summed up.
First, the correct configuration file is posted, as follows:
Create a version library
Svnadmin Create/var/svn/web_project
The conf in the web_project directory has three files:svnserve.conf,passwd , Authz , modify
You can delete the default svnserve.conf file directly, and then use the following configuration:
# VI Svnserve.conf
[General]
Anon-access = None
auth-access = Write
Password-db = passwd
Authz-db = Authz
Realm = Web_project
Description
Anon-access = none # does not allow anonymous user access
auth-access = Write # Authenticated users can read and write
password-db = passwd # user save file
authz-db = Authz # Rights Management file
Realm = web_project# warehouse name
Set up user accounts. You can delete the default passwd file directly, and then use the following configuration:
# VI passwd
[Users]
Linzuxin = Linzuxin
Description
[Users] # is a must, mark for user Configuration start
Linzuxin = linzuxin # linzuxin is the user name, linzuxin is the password. Note that the plaintext password
In the future, so the warehouse users are here to record it. As for that user, allow access to that repository, which is restricted in rights management.
Set user permissions. You can delete the default authz file directly, and then use the following configuration:
# VI Authz
[Groups]
DevOps = Linzuxin
[/]
@devops = RW
Description
DevOps = Linzuxin #devops is a group name,linzuxin is a user name, which is grouped into this group and can have multiple users separated by commas
@devops = rw # indicates that the devops Group has read and write access to all directories
Problems encountered during the debugging process
1. This error occurs when the client accesses the Subversion repository:
SVN Serve.conf:12:option expected
Why does this error occur because the configuration file with the preceding space is not recognized when Subversion reads the configuration file svnserve.conf
2, service can not start or start the service, cannot find the service
Can ' t connect to host IP
Resolution: Close the win Firewall, see if the port is enabled, the general firewall off the service can be started.
View Port: Netstat-ano,svn port is 3690
3.URL ' svn://172.16.0.118/web_project' doesn ' t exist
Workaround: The repository is empty and some files or directories are added.
4. Access to Repository path error
If a specific repository of publications is specified when the service is started by the Svnserve command, client access can be accessed directly using relative paths if the server side uses svnserve-d-r/var/svn/ after the service is started, the client still uses SVN co svn://172.16.0.118/var/svn/web_project/mine, the system will prompt svn:no repository found, Note The repository was not found and the correct way to do this is SVN co svn://172.16.0.118/web_project/mine
SVN user authentication, error tuning