Configure SVN server under Mac

Source: Internet
Author: User
Tags aliases

The Mac comes with the SVN server and the client, so it can be used with a simple configuration.

1. Create SVN repository

Shell Code
    1. Svnadmin Create /users/qiruihua/svnserver/ Repository

2, configure SVN user rights/users/qiruihua/svnserver/repository/conf/directory exists 3 files: Authz, passwd, svnserve.conf

Authz, the contents are as follows:

Mac code
  1. # # # This file is a example authorization file for Svnserve.
    # # # Its format was identical to that of MOD_AUTHZ_SVN authorization
    # # files.
    # # as shown below each of defines authorizations for the path and
    # # # (optional) repository specified by the section name.
    # # # The authorizations follow. An authorization line can refer to:
    # # #-a single user,
    # # #-a group of users defined in a special [groups] sections,
    # # #-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 is inverted by prefixing the rule with ' ~ '. 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]
    # harry_and_sally = harry,sally
    # Harry_sally_and_joe = Harry,sally,&joe


    # [/foo/bar]
    # Harry = RW
    # &joe = R
    # * =


    # [Repository:/baz/fuz]
    # @harry_and_sally = RW
    # * = R

passwd, the contents are as follows:

Mac code
    1. # # # This file is a example password file for Svnserve.
      # # # Its format was similar to that of svnserve.conf. As shown in the
      # # # example below it contains one section labelled [Users].
      # # # The name and password for each user follow, one account per line.


      [Users]
      Qiruihua=123

Svnserve.conf, the contents are as follows:

Mac code
  1. # # # This file controls the configuration of the Svnserve daemon, if you
    # # # Use the IT to allow access to this repository. (If you are only allow
    # # # access through http:and/or file:urls, then this file is
    # # # irrelevant.)


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


    [General]
    # # # The Anon-access and Auth-access options control access to the
    # # repository for unauthenticated (a.k.a. anonymous) Users and
    # # # Authenticated Users, respectively.
    # # # Valid values are "write", "read", and "none".
    # # # Setting the value to "none" prohibits both reading and writing;
    # # # "read" allows read-only access, and "write" allows complete
    # # # Read/write access to the repository.
    # # # The sample settings below is the defaults and specify that anonymous
    # # # users has read-only access to the repository, while authenticated
    # # # users has read and write access to the repository.
    # anon-access = Read
    # auth-access = Write
    # # # The PASSWORD-DB option controls the location of the password
    # # Database file. Unless specify a path starting with A/,
    # # # The file ' s location was relative to the directory containing
    # # # This configuration file.
    # # If SASL is enabled (see below), the This file won't 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 was relative to the
    # # # directory containing this file. If you don ' t specify an
    # # # 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 repositories have the same authentication realm, they should
    # # # has the same password database, and vice versa. The default Realm
    # # is repository ' s UUID.
    # realm = My First Repository
    # # # The Force-username-case option causes Svnserve to Case-normalize
    # # # Usernames before comparing them against the authorization rules in the
    # # # AUTHZ-DB file configured above. Valid values is "upper" (to upper-
    # # # case the usernames), ' lower ' (to lowercase the usernames), and
    # # # "None" (to compare usernames as-is without case conversion, which
    # # is the default behavior).
    # force-username-case = None


    [SASL]
    # # # This option specifies whether your want to use the Cyrus SASL
    # # # Library for authentication. Default is false.
    # # # This section would be a ignored if svnserve is not a 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's want SASL to provide. 0 means no encryption, 1 means
    # # integrity-checking only, values larger than 1 is correlated
    # # to the effective key length for encryption (e.g. means 128-bit
    # # # Encryption). The values below is the defaults.
    # min-encryption = 0
    # max-encryption = 256

3. Start the server

Mac code
    1. svnserve-d-r/users/qiruihua/svnserver/repository

Without any hint, the boot was successful.

4. Import the project into the SVN repository

Mac code
    1. SVN import/users/qiruihua/projects/demo/svn://localhost/svn/repository/demo--username Qiruihua--password 123 -M "Initial import"

5. Check out the project

Mac code
    1. SVN checkout svn://127.0. 0.1/svn/repository/demo--username=qiruihua--password=123

Configure SVN server under Mac

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.