Using SVN to create repository and Rights management under Linux

Source: Internet
Author: User
Tags readable svn svn client

How the SVN server on Linux is used in conjunction with local computer clients

First, the creation of this version of the library and access to permissions on Linux

1.SVN Create Warehouse

Syntax: Svnadmin create/directory

2. Modify the configuration file to increase user passwd (password)

Vim passwd after entering the file and adding user and password (will be used when checking out locally)

3. Modify the SVN startup key parameter svnserve.conf

Command: Vim svnserve.conf

The configuration item is divided into the following 5 items:

Anon-access controls the permissions of non-authenticated users to access the repository. The values range from "write", "read" and "none".
That is, "write" is readable and writable, "read" is read-only and "none" means no access.
Default value: Read
Auth-access Controls access to the repository for authentication users. The values range from "write", "read" and "none".
That is, "write" is readable and writable, "read" is read-only and "none" means no access.
Default value: Write


PASSWORD-DB Specifies the user name password file name. File location is relative conf unless absolute path is specified
The relative path of the directory.
Default value: passwd

AUTHZ-DB Specifies the permission profile file name through which path-based access control can be implemented.
The file location is relative to the relative path of the Conf directory unless you specify an absolute path.
Default value: Authz

realm Specifies the authentication domain for the repository, which is the name of the authentication domain that is prompted at logon. If two versions of the repository
Authentication domain is the same, it is recommended to use the same user name password data file.

4. Configure User Rights Authz

Command: Vim Authz

Attention:
* The user name that appears in the permissions profile must already be defined in the user profile.
* Changes to the permissions profile take effect immediately and do not have to restart SVN.
User group format:
[Groups]
< user group name > = < user 1>,< user 2>
Of these, 1 user groups can contain 1 or more users, separated by commas between users.
Repository directory format:
[< Repository >:/project/catalog]
@< user Group Name > = < permissions >
< user name > = < permissions >
Where the box number can be written in several ways:

/, which indicates the root directory and the following. The root directory is specified at svnserve startup and we specify/opt/svndata. This means that the permissions are set for all repositories.
repos1:/, which indicates that permissions are set on version library 1
Repos2:/occi, which indicates that permissions are set on the OCCI project in version Library 2
REPOS2:/OCCI/AAA, which represents the AAA directory setting permissions on the OCCI project in version Library 2
A permission principal can be a user group, user, or *, and the user group is preceded by @,* to represent all users. Permissions can be W, R, WR, and NULL, and NULL indicates no permissions.

5. Start the service

Syntax: svnserve-d-R SVN repository directory
svnserve -d -r /home/svnrepo/myproject/

Second, create a new directory locally, and then right-click Check Out (Checkout). The premise is that Windows has an SVN client installed

Example: Iot2

 点击OK,就会提示需要输入用户和密码,直接输入刚刚在vim passwd设置的。
成功后目录会有个绿色的小勾

三、进入服务器中,你想将本地的文件夹检出的位置。例如:cd /var/www/
输入命令:svn co svn://119.23.79.11/iot svn co svn://119.23.79.11/iot --username 用户名 --password 密码 回车

It will be checked out to the directory/var/www/iot.

You can then write the code locally and submit it to the server. SVN up in the/var/www/iot directory

SOURCE Reference: 49362197

 

Using SVN to create repository and Rights management under Linux

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.