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

CSS3 gradient background compatibility issues

When we make a gradient background color, we will...

Summary of horizontal scrolling website design

Horizontal scrolling isn’t appropriate in all situ...

Analysis of MySQL example DTID master-slave principle

Table of contents 1. Basic Concepts of GTID 2. GT...

Linux firewall status check method example

How to check the status of Linux firewall 1. Basi...

Steps for Docker to build its own local image repository

1. Environment and preparation 1. Ubuntu 14.04 2....

Running PostgreSQL in Docker and recommending several connection tools

1 Introduction PostgreSQL is a free software obje...

Sharing some wonderful uses of wxs files in WeChat applet

Table of contents Preface application Filters Dra...

About ROS2 installation and docker environment usage

Table of contents Why use Docker? Docker installa...

Vue3.0 implements the magnifying glass effect case study

The effect to be achieved is: fixed zoom in twice...

HTML realizes real-time monitoring function of Hikvision camera

Recently the company has arranged to do some CCFA...

Solution to the ineffective margin of div nested in HTML

Here's a solution to the problem where margin...

JavaScript implements draggable modal box

This article shares the specific code of JavaScri...