CentOS 6.8 Settings svn hooks sync to web directory

Source: Internet
Author: User

1. Create a project directory in the Web directory
mkdir./opt/wwwroot/Project Name

2. Checking out project files with SVN
SVN checkout svn://localhost:/project name

3. Set up the SVN library hooks to implement synchronous operation
CD./opt/svn/repos/Project name/hooks #进入svn项目钩子管理目录
CP post-commit.tmpl post-commit# copy hook file using Post-commit
chmod 755 post-commit# Grant permission

3. Open the Post-commit file and add the following:
#!/bin/sh
Export Lang=en_us.utf8
Svn_path=/usr/bin/svn
web_path=/opt/wwwroot/Project Name
$SVN _path update $WEB _path--username ' user name '--password ' password '--no-auth-cache #强调username前是--two-, password same

Description
Svn_path: You can use the command to view Whereis SVN

CentOS 6.8 Settings svn hooks sync to web directory

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.