How to manage multiple projects on CentOS SVN server

How to manage multiple projects on CentOS SVN server

One demand

Generally speaking, a company has multiple projects. After setting up the SVN server, it is necessary to use SVN to ensure that developers who are not in a project cannot access the code in other projects.

Assumptions:

There are 3 projects: project1, project2, project3

There are 6 developers: eg1, eg2, eg3, eg4, eg5, eg6

eg1 and eg2 can only access project1;

eg3 and eg4 can only access project2;

eg5 and eg6 can only access project3;

Second, the realization

In the repository root path: assuming it is /home/svnroot

cd /home/svnroot

// Create three code repositories

svnadmin create project1
svnadmin create project2
svnadmin create project3

//Copy the two permission configuration files to the repository root path to manage all code repositories in a unified manner

cd /projcet1/conf
cp authz passwd /home/svnroot

// Open the configuration file

vim svnserve.conf

Modify it as follows:

anon-access = none # Disable anonymous access
auth-access = write
password-db = /home/svn/passwd #Use the password file uniformly
authz-db = /home/svn/authz
realm = project1 #Authority domain name, very important, write your project name

Modify project2's svnserve.conf separately, same as above, the last line is written

anon-access = none # Disable anonymous access
auth-access = write
password-db = /home/svn/passwd #Use the password file uniformly
authz-db = /home/svn/authz
realm = project2 #Authority domain name, very important, write your project name

Modify project3's svnserve.conf separately, same as above, the last line is written

anon-access = none # Disable anonymous access
auth-access = write
password-db = /home/svn/passwd #Use the password file uniformly
authz-db = /home/svn/authz
realm = project3 #Authority domain name, very important, write your project name

Modify two permission management files:

cd /home/svnroot
vim passwd

// Username = Password

[users]
eg1 = 123456
eg2 = 123456
eg3 = 123456
eg4 = 123456
eg5 = 123456
eg6 = 123456
vim authz
[groups] # Grouping
admin = eg1,eg2
guest = eg3,eg4
guset1 = eg5,eg6

[/] # Administrators have all read and write permissions
@admin = rw
* =

[project1:/] # Access control for project 1, guest1 and 2 cannot access
@admin = rw
or
eg1 = rw
eg2 = rw

[project2:/]
@guest = rw
or
eg3 = rw
eg4 = rw

[project3:/]
@guest1 = rw
or
eg5 = rw
eg6 = rw

Three restarts

svnserve -d -r /home/svnroot

// Stop command

killall svnserve

Four practical tests

Each group member can only access their own projects and has no permission to view other people's projects.

Only administrators can view all projects

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • SVN server is installed on centos7 system platform
  • Building SVN server and MySQL under centos
  • SVN Server Installation Tutorial in CentOS 7.0
  • Ideas for building SVN server in Linux (centos7)
  • Detailed explanation of the entire process of CentOS SVN server construction and automatic deployment
  • Detailed steps to build an SVN server under CentOS
  • How to build SVN server under Linux (centos)

<<:  js to implement add and delete table operations

>>:  Introduction to HTML page source code layout_Powernode Java Academy

Recommend

XHTML Web Page Tutorial

This article is mainly to let beginners understan...

Installation and configuration of mysql 8.0.15 under Centos7

This article shares with you the installation and...

Solution to the Chinese garbled characters problem in MySQL under Ubuntu

Find the problem I have been learning Django rece...

Detailed explanation of the solution for migrating antd+react projects to vite

Antd+react+webpack is often the standard combinat...

The whole process of installing and configuring Harbor1.7 on CentOS7.5

1. Download the required packages wget -P /usr/lo...

Java example code to generate random characters

Sample code: import java.util.Random; import java...

Alibaba Cloud Server Ubuntu Configuration Tutorial

Since Alibaba Cloud's import of custom Ubuntu...

Nine advanced methods for deduplicating JS arrays (proven and effective)

Preface The general methods are not listed here, ...

css3 animation ball rolling js control animation pause

CSS3 can create animations, which can replace man...

js canvas realizes circular water animation

This article example shares the specific code of ...

Linux RabbitMQ cluster construction process diagram

1. Overall steps At the beginning, we introduced ...

Nested display implementation of vue router-view

Table of contents 1. Routing Configuration 2. Vue...

JS implements random generation of verification code

This article example shares the specific code of ...