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

A brief discussion on the understanding of TypeScript index signatures

Table of contents 1. What is an index signature? ...

Installation, activation and configuration of ModSecurity under Apache

ModSecurity is a powerful packet filtering tool t...

How to remove spaces or specified characters in a string in Shell

There are many methods on the Internet that, alth...

js to realize a simple puzzle game

This article shares the specific code of js to im...

MySql Installer 8.0.18 Visual Installation Tutorial with Pictures and Text

Table of contents 1. MySQL 8.0.18 installation 2....

How to Rename Multiple Files at Once in Linux

Preface In our daily work, we often need to renam...

JavaScript countdown to close ads

Using Javascript to implement countdown to close ...

Realizing tree-shaped secondary tables based on angular

First look at the effect: Code: 1.html <div cl...

Have you really learned MySQL connection query?

1. Inner Join Query Overview Inner join is a very...

How to underline the a tag and change the color before and after clicking

Copy code The code is as follows: a:link { font-s...

How to import CSS styles into HTML external style sheets

The link-in style is to put all the styles in one...

Use js to write a simple snake game

This article shares the specific code of a simple...

Sample code for implementing DIV suspension with pure CSS (fixed position)

The DIV floating effect (fixed position) is imple...