SVN eclipse/svnserve.conf:12:option expected

Source: Internet
Author: User
Tags addgroup auth

Often when a novice configures a svnserve-based subversion server,
This error occurs when the client accesses the Subversion repository:

Svnserve.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, such as
# # # This file controls the configuration of the Svnserve daemon, if you
# # # Use the IT to allow access to this repository. (If you are only allow
# # # access through http:and/or file:urls, then this file is
# # # irrelevant.)

# # # Visit http://subversion.tigris.org/for more information.

[General]
# # # These options control access to the repository for unauthenticated
# # # and Authenticated users. Valid values are "write", "read",
# # # and "None". The sample settings below is the defaults.
Anon-access = Read

auth-access = Write

Like in the above configuration file, Anon-access is the top line, no problem, and auth-access there is a front space, will cause this error.
To avoid this error, you should remove these lines before the #, but also to remove the preceding space, this, in Zheng Nova's earlier article "Subversion Road-to achieve granular access control of the directory" mentioned.








How to solve the problem of authentication failed in building SVN under Linux

My system for Ubuntu server 12.04 (in fact, as long as the Linux kernel, the building steps are similar, at most, there is apt-get yum or source installation differences, this is not to worry about it) (all the following installation steps are best under root authority)

1. Enter sudo apt-get install subversion directly in the terminal and select Install

2. (optional) See Version command Svnserve--version. If the following image appears, the installation is successful

650) this.width=650; "alt=" svn version information "src=" http://img1.51cto.com/attachment/201207/094935574.jpg "border=" 0 " height= "Width="/>

3. Add SVN Admin user and Subversion group (this step is important, otherwise it will cause authentication error)

sudo adduser svnuser (add Svnuser user)

sudo addgroup subversion (add Subversion Group)

sudo addgroup svnuser Subversion

4. Start creating a project directory

sudo mkdir/home/svn (svn here is the repository directory file, and all operations are under/HOME/SVN

Cd/home/svn

mkdir One (here is a repository file, the file name can be arbitrarily taken)

Chown-r Root:subverison One

Chmod-r G+rws One

5. Create the SVN file repository, which is the one file directory created above

Svnadmin Create/home/svn/one

To this step, the installation is basically complete and the configuration is started.

6. The Conf folder can be seen in the/home/svn/one file directory for Authz, passwd, conf in the folder svnserve.conf settings, svnserve.conf mainly set the overall security policy, passwd set the user name and password, Authz is to set the specific user what permissions.

7. Access Rights settings

(1) Edit the svnserve.conf file and edit the svnserve.conf file.

Anon-access: The permissions for anonymous users can be read,write and none, and the default value is read. Do not allow anonymous user access: Anon-access = None

Auth-access: Authentication user's permission, can be read,write and none, default value of write.

PASSWORD-DB: The path of the password database, remove the front #

AUTHZ-DB: The path of the authentication rule library, minus the # in front.

Note: The lines of these configuration items are shelf, otherwise they will be error-aware. After you modify the configuration, you need to restart SVN to take effect.
(2) Edit the passwd file, add the user name and password (example below)

This is the password file for each user, relatively simple, that is, "User name = password", using the plaintext. such as Allen=1 (the password in Apache mode is changed by encryption)

[Users]
Allen = 1
Ellen = 1
Test = 1

(3) Edit the Authz file, configure user access rights (example below)

1. [Groups] section: For ease of management, you can put some users into a group inside, such as: Owner=allen,ellen

2. Groups the sections below indicates that the authentication rules for a directory, such as the section of the authentication rule for the root directory, are [/]. Set up single-user authentication rules when a user is on one line, such as:

[/]

ALLEN=RW #allen对根目录的权限为rw

Ellen=r #ellen对根目录的权限为r

If you use group, you need to add @ before the group name, such as

@owner =RW #group owner is RW, equivalent to the two words above

At startup, if booting from/home/svn/one/is the one directory, set the permissions as above with the one directory as root.

If you start from/home/svn/, each repository root is your own starting directory. You can set Astar permissions as above, or you can use the following methods:

[one:/]

@owner =RW

In short, the root directory (/) of each repository is its own starting directory; [repos:/] This approach applies only to multi-warehouse situations; [/] is suitable for single warehouses and single warehouses. For more information on single and multi-warehouse issues, see http://http://bbs.iusesvn.com/thread-157-1-1.html

8. Start SVN service svnserve-d-r-t/HOME/SVN

Description Description:
-d means svnserver runs in daemon process mode

-T means running in thread mode for increased efficiency
-r Specifies the root location of the file system (the repository's root directory) so that the client can access the repository without entering the full path. such as: svn://your Ip/one

This time SVN is installed.

Then install the client Tortoise SVN in the window below, and maybe here's why the client wants to install under Windows, because after all, a lot of the programmer's debugging code is under Windows, and looking at the code is handy under Windows.

9. This time can be used in the client with the user name and password login, here everyone will.

This is the time to enter the password when you are likely to encounter authentication failed tips. As shown in the following:

650) this.width=650; "src=" Http://img1.51cto.com/attachment/201207/103532732.jpg "alt=" Authentication failed Information " border= "0"/>

, and I've been having a problem for a long time.

The problem was later discovered because all lines in the passwd file cannot have spaces in front of them, and if there are spaces, the error is indicated.

In short, everyone in the configuration process must pay attention to Authz passwd svnserve.conf file All lines of the front can not have spaces; note build SVN management users and groups, and note the configuration of single-warehouse and multi-warehouse permissions and their access path issues.

In this way, you can basically enjoy the svn journey in a normal way.





























SVN eclipse/svnserve.conf:12:option expected

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.