Install subversion in CentOS and use SVN+SSH to access

Source: Internet
Author: User
Tags svn client ssh account ssh server

First, the Subversion transport protocol
Subversion can support several transport protocols for data versioning between the client and the warehouse:
 

Reference

file://Local Data transfer
/HTTP protocol based on Apache (clear text)
https://HTTPS protocol based on APACHE+SSL
svn://Svnserve-based SVN protocol (clear text)
svn+ssh://SSH-based Svnserve protocol


It can be seen that, just like the difference between telnet and ssh, subversion may be transmitted in an encrypted manner.
What kind of encryption should I choose? In theOver herewill tell you the difference between the two ways.

Second, the implementation of SVN over SSH mode
to use the svn+ssh://approach, let's first list some of the pros and cons of this approach:
 

Reference

1, the network protocol is stateful, SVN+SSH is much faster than WebDAV;
2, the method can take advantage of the existing SSH account and user base;
3, only one authentication method can choose, and need users in the same system group, the use of shared SSH key;
4, there is no type of log, or even errors, if used incorrectly, will cause file licensing issues.


In addition, when using this method, the Precautions are:
 

Reference

1, the SVN client when accessing the remote, by default in addition to save the authentication information, but also preserves the protocol type, in order to facilitate the next time you submit a version update without having to define again;
But that said, you can't use svn+ssh://this time, and next time use svn://;
2, the method will be two-way authentication at the same time, one is SSH key authentication, the second is the Svnserve set Access authority authentication, indispensable;
3, the mode is dependent on SSH to initiate a svnserve process, and then terminate the process after the network disconnects, so the remote is not required to start the Svnserve service alone;
4. Therefore, the connection is required to direct the actual physical path to the repository at the far end, rather than the mapping path given by the Svnserve


1. Server Installation

(1) Installing the SSH server and Subversion server

Yum install-y Subversion

(2) Create a login user (must be able to login account, if set to not login, will be error)

Useradd im

passwd im

(3) Create SVN repository

Mkdir/data/svn

Svnadmin CREATE/DATA/SVN

(4) Modify permissions

Chown-r root.im/data/svn/

(5) Modify the configuration file (all in your project directory)

1. Modify the svnserver.conf file

Anon-access = none //unauthenticated user does not have any access rights

auth-access = Write//authenticated user has written permission

AUTHZ-DB = Authz //Authentication file is Authz file in conf directory

Realm =/data/svn///directory where the project is located

2. Modify the Authz file

[/]

Svnserver = RW//read/write

Im =r//Read Only

* =//cannot be used except for the above user or group

(6) Access (service side does not need to start)

SVN co svn+ssh://[email protected]/data/svn im

PS: This is the need to enter a password, if you want to avoid the key login, you need to generate a password via Ssh-kengen




This article is from "It worker-small Maple" blog, please be sure to keep this source http://wangfeng7399.blog.51cto.com/3518031/1686162

Install subversion in CentOS and use SVN+SSH to access

Related Article

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.