MAC OS configure svn server

If the MAC has XCode installed, it already comes with SVN, so just use it directly

1. Create svn repository

Open a system terminal and change to the user directory: cd   

2. Configure svn user permissions.

There are three files in the cd ~/svn/conf/ directory: authz, passwd, svnserve.conf

(1) Configure svnserve.conf

put the inside

#anon-access = read
#auth-access = write
#password-db = passwd
#authz-db = authz

Remove the # sign in front of the four lines, and then change anon-access = read to anon-access = none, which prohibits anonymous access

PS: It should be noted here that there is a space after the # sign, you have to remove this space and put the text on top, otherwise there will be errors

(2) Configure passwd

There are users and passwords stored in it. There are examples. Just add users and passwords according to its format.

chensl=111111

 

(3) Configure authz

[groups] is followed by the user group settings, you can add the users you set in passwd to different user groups, then you can set different permissions for different user groups, so as to avoid the trouble of multi-user setup, multiple users Separate with , number. can be done according to its example

[groups]

mygroup = chensl

After that, you can set permissions for different version libraries. There is an example below. You can write it according to its writing method. If you need to set all version libraries, you can use [/]. Such as:

[/]

@ mygroup = rw

PS: Use the @ symbol before the user group. If it is a user, just write the user name directly. rw stands for read-write, obviously read-only is r

3. Start the SVN service

svnserve -d -r ~/svn Note that the path must be the SVN directory, not the directory of one of the version libraries, otherwise, it can start normally, but there is a problem with the access

If there is no output, the startup is successful

4. Start and stop the service/restart

Delete the process directly, killall -9 svnserve, and then start the service.

5. Test

可以通过eclipse等工具的svn连接,share project等

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326295001&siteId=291194637