How to install the SVN (setup-subversion-1.7.7) authentication failure and add the Registration Service

Source: Internet
Author: User

Server installation setup-subversion-1.7.7 installation path: D: \ Subversion

Create the svn directory in the D: \ root directory as the SVN version library directory.

Next, create a project Bobo directory under the D: \ SVN \ directory. Then, right-click the Directory and choose tortoisesvn-> Create a version library here and click "OK" (Note: Do not create a directory structure-reason: I am not familiar with SVN, after testing, if a directory structure is created, three more directories will be created in the project file synchronized to the client: branches, tags, and trunk. Currently, I have not mastered this function. Therefore, to keep the synchronized content clean, do not create a directory structure here .)

Next, enable the server:

Error enabling method:

Svnserve-D-r d: \ SVN \ Bobo

Correct enabling method:

Svnserve-D-r d: \ SVN

As authentication fails, you cannot solve the problem by finding related content online for a long time. Experience has finally solved the problem:

Svnserve. conf content Configuration:

[Plain]
View plaincopy
  1. [General]
  2. Anon-access = read
  3. Auth-access = write
  4. Password-DB = passwd
  5. # Authz-DB = authz
  6. Realm = my first Repository

Note that I have commented # authz-DB = zuthz. If the comment is removed, the authentication fails.

If other files are not moved, you can browse the version library at SVN: // server IP Address/Bobo.

However, it was found that there was no account password, which was not safe.

Content configuration of svnserve. conf Source: SVN authentication failed

Solution:

Passwd file content:

[Plain]
View plaincopy
  1. [Users]
  2. # Harry = harryssecret
  3. # Sally = sallyssecret
  4. Admin = Admin
  5. Test = test

The format is: account = password. One user is a line.

Next, in the content of svnserver. conf:

Change anon-access = read to Anon-access = none.

Summary:

I. Configuration

[Plain]
View plaincopy
  1. [General]
  2. Anon-access = none # Make unauthorized users inaccessible. If the value is read, the unauthorized users are readable. This is why access is allowed without entering the account password.
  3. Auth-access = write # grant the authorized user the write permission
  4. Password-DB = passwd # specify the password file path
  5. # Authz-DB = authz # access control file
  6. Realm = my first Repository

Ii. Instructions

Start the service and run svnserve-d-r SVN service root directory

The svnserve command is used to start the svn service.-D indicates that the command runs in daemon mode and SVN automatically listens on port 3690. 3690 is the default port. You can use "-- listen-Port =" or "-- listen-host =" to specify other ports. The-r option is used to specify the root directory of the svn service, so that you can use the relative path for access without providing the complete path.

Run the following command to check out SVN checkout SVN: // 127.0.0.1/Dir. The IP address needs to be adjusted according to the actual situation. DIR is the version library path. If it is specified at startup, it can be omitted.

The version library information is in the version library folder. to delete a version library, you only need to delete the folder where the version library is located. In addition, work copies are only self-maintained folders, which can be deleted directly in windows without affecting others. Do not use the DELETE command of the version library. Otherwise, the content in the version library will be deleted.

Iii. As I mentioned above, if you remove the # number before authz-DB = zuthz, the authentication will inevitably fail. I want to correct it here. The ignorant are fearless. Passes tests and passes Certification

1. Remove the # number before the above authz-DB = authz.

2. Modify the authz File

[Plain]
View plaincopy
  1. [Aliases]
  2. # Joe =/C = xz/ST = dessert/L = snake city/o = snake oil, Ltd./ou = Research Institute/CN = Joe average
  3. [Groups]
  4. Harry_and_sally = admin, Sally # Here I use grouping. Because it is a team, there are many people
  5. # Harry_sally_and_joe = Harry, Sally, & Joe
  6. # [/Foo/bar]
  7. # Harry = RW
  8. # & Joe = r
  9. # * =
  10. [Bobo:/] # authorize the Bobo Repository
  11. @ Harry_and_sally = RW # R indicates reading W indicates writing
  12. # * = R # * wildcard, indicating all people. If the # sign is removed, it indicates that anyone can access it (read-only access, not writable). Note: after testing, remove, verification is still required.

If you do not use the group method, the configuration is as follows:

[Plain]
View plaincopy
  1. [Aliases]
  2. # Joe =/C = xz/ST = dessert/L = snake city/o = snake oil, Ltd./ou = Research Institute/CN = Joe average
  3. [Groups]
  4. # Harry_and_sally = zm2714, Sally
  5. # Harry_sally_and_joe = Harry, Sally, & Joe
  6. [Bobo:/]
  7. Admin = RW
  8. # & Joe = r
  9. # * = R
  10. # [Bobo:/]
  11. # @ Harry_and_sally = RW
  12. # * = R
Registration Service

Subversion server started as a service

The Subversion server supports Windows and Linux.

In Linux, run the following command to start the service:

Svnserve-d-r/svnroot

-D indicates -- daemon, that is, the command execution window is closed and the Service continues to exist. -R indicates -- root, that is, the root directory of the specified database.

In Windows, you can use the same command, but the service disappears after the CMD window is closed. The solution to this problem was to use SVN Windows Service wrapper to package it as a service before version 1.4. After svn1.4, it can be directly supported to start on the server. The method is to use the service controltool that comes with Windows XP and 2000, and the execution file is SC .exe.

Note: To use the "SC" command, you must install Windows 2000/2003 Resource Kit (Resource Kit). Otherwise, the command is invalid.

Enter the following command in the CMD window:

[Plain]
View plaincopy
  1. SC create svnservice binpath = "D:/program files/subversion/bin/svnserve.exe -- service-R D:/mysvn" displayname = "svnservice" depend = TCPIP start = auto

Binpath specifies the svnserve path and command. Note that the parameters are -- service, not -- daemon.-D,-I,-T, and other parameters cannot be used.

Start = auto indicates that the service is automatically started. Note: there must be no space on the left of the equal sign, and a space on the right.

Displayname = "svnservice" indicates the name of the service to be registered.

After execution, the system returns

[SC] createservice success

Indicates that the service is successfully created.

Start the service command:

[Plain]
View plaincopy
  1. Net start svnservice

Stop Service command:

[Plain]
View plaincopy
  1. Net stop svnservice

Delete service command:

[Plain]
View plaincopy
  1. SC Delete svnservice

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.