Mac lion svnserver setup notes

Source: Internet
Author: User

Good:

Http://2015.iteye.com/blog/1212802

Mac comes with SVN server and client, so we don't need to download it again.

The configuration steps are listed below:

1: create a directory on your Mac as the workspace of the svn server in the future.

For example, you have created a directory named "svnroot" (many people want to know the complete directory path, right-click "svnroot --" and choose "--" to view details, for example: (Note "location: /WF ))

Then your local full path is/WF/svnroot

2: Go to svnroot and check that the folder should be empty now. Create a repository directory below.

3: run the black shell terminal to specify the repository created in 2 as the version library directory of the svn server.

Run the following command:

Svnadmin create/WF/svnroot/Repository

Then you should be able to see some newly generated files in Repository:

4: modify the configuration file in the repository/conf directory. There are three files: authz, passwd, and svnserve. conf.

4.1: After authz is modified, it should be as follows:

### This file is an example authorization file for svnserve.
### Its format is identical to that of mod_authz_svn authorization
### Files.
### As shown below each section defines authorizations for the path and
### (Optional) repository specified by the section name.
### The authorizations follow. An authorization line can refer:
###-A single user,
###-A group of users defined in a special [groups] section,
###-An alias defined in a special [aliases] section,
###-All authenticated users, using the '$ authenticated' token,
###-Only anonymous users, using the '$ anonymous' token,
###-Anyone, using the '*' wildcard.
###
### A match can be inverted by prefixing the rule '~ '. Rules can
### Grant read ('R') Access, read-write ('rw ') access, or no access
###('').

[Aliases]
# Joe =/C = xz/ST = dessert/L = snake city/o = snake oil, Ltd./ou = Research Institute/CN = Joe average

[Groups]
Monsters_group = wanfan
[/]
Wangfan = RW
* =

# [/Foo/bar]
# Harry = RW
# & Joe = r
# * =

# [Repository:/Baz/fuz]
# @ Harry_and_sally = RW
# * = R

4.2 After passwd is modified, it should be as follows:

### This file is an example password file for svnserve.
### Its format is similar to that of svnserve. conf. As shown in
### Example below it contains one section labeled [users].
### The name and password for each user follow, one account per line.

[Users]
Wangfan = 1234567890

4.3 After svnserve. conf is modified, it should be as follows: ### this file controls the configuration of the svnserve daemon, if you
### Use it to allow access to this repository. (If you only allow
### Access through http: and/or file: URLs, then this file is
### Irrelevant .)

### Visit http://subversion.tigris.org/for more information.

[General]
### These options control access to the repository for Unauthenticated
### And authenticated users. Valid values are "write", "read ",
### And "NONE". The sample settings below are the defaults.
Anon-access = read
Auth-access = write
### The password-DB option controls the location of the password
### Database file. Unless you specify a path starting with /,
### The file's location is relative to the directory containing
### This configuration file.
### If SASL is enabled (see below), this file will not be used.
### Uncomment the line below to use the default password file.
Password-DB = passwd
### The authz-DB option controls the location of the authorization
### Rules for path-Based Access Control. Unless you specify a path
### Starting with A/, the file's location is relative to
### Directory containing this file. If you don't specify
### Authz-DB, no path-based access control is done.
### Uncomment the line below to use the default authorization file.
Authz-DB = authz
### This option specifies the authentication realm of the repository.
### If two repositories have the same authentication realm, They shocould
### Have the same password database, and vice versa. The default realm
### Is repository's UUID.
# Realm = my first Repository

[SASL]
### This option specifies whether you want to use the Cyrus SASL
### Library for authentication. Default is false.
### This section will be ignored if svnserve is not built with cyrus
### SASL support; to check, run 'svnserve -- version' and look for a line
### Reading 'cyrus SASL authentication is available .'
# Use-sasl = true
### These options specify the desired strength of the Security Layer
### That you want SASL to provide. 0 means no encryption, 1 means
### Integrity-checking only, values larger than 1 are correlated
### To the cipher key length for encryption (e.g. 128 means 128-bit
### Encryption). The values below are the defaults.
# Min-encryption = 0
# Max-encryption = 2565: Start the svn server and enter the following command: svnserve-d-r/WF/svnroot/Repository. If no prompt is displayed, the startup is successful. 6: Create an empty directory on your Mac as your submit directory: (the key is local access) information such as: (wangfanapi is the source code directory)

7: import the directories created in 6 to the version management repository.
The shell command is as follows:
SVN import/WF/svnroot/temps/wangfanapi/SVN: // localhost/SVN/Repository/wangfanapi -- username wangfan -- password 1234567890-M "init import"

If you can see what it looks like in Step 7 above .. The adding XXX in front of each row seems to be adding local files to the version management system.

8: Check out the project: (in the bash window, go to any directory and run the following command to check out the imported project in the last 7 minutes)
SVN checkout SVN: // localhost/SVN/Repository/wangfanapi -- username = wangfan -- Password = 1234567890

// ----------------------------------------------------- Postscript -------------------------------
If problem a encounters a prompt ************, the data is malformed... Something related to javahl.
Answer: uninstalls the entire ecllipse and reinstalls ADT and subclipse.
(Note that subclipse uses 1.6 because subversion1.8 needs to be matched with javahl1.7. I don't know whether the automatically updated content meets the conditions.
For more information about collocation, see: http://subclipse.tigris.org/wiki/JavaHL
)
ADT update address: https://dl-ssl.google.com/android/eclipse
Subversion 1.6 Update address: http://subclipse.tigris.org/update_1.6.x

Problem B:
Not authorized to open root of edit operation
Http://www.blogjava.net/zhouf/articles/251635.html

Version 1.5.2 is installed in subversion, and version 1.5.1 is installed in SVN. You can normally access the version library through turtles, however, the "not authorized to open root of edit operation" error occurred when checking out. After searching online, the solution version is as follows:
The impact of the Anon-access attribute on Directory Permissions
If you want to open your code library to everyone, you will be given the anonymous access permission and add a line in the svnserve. conf file: "Anon-access = read ". However, for some directories, you do not want others to see them, so for those special directories, you are in authz. configure the conf file, add authorized users, and add the "* =" mark. You think everything is okay, but you find that the special directory cannot be accessed, the message "not authorized to open root of edit operation" or "unauthorized root opening for editing" is always displayed ". You repeatedly check the user name and password you configured to confirm that everything is correct and the problem persists.
It turns out that subversion has a small bug. When "Anon-access = read" and a directory is marked with "* =", the above problem will occur. This bug still exists in the latest version (v1.4 ).
However, I have not set the "* =" access method. The user name, password, and directory access are all set correctly. After you change anon-access = read to Anon-access = none, you will find that you can access it normally.

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.