$WEB_PATHecho "pulling source code..."git reset --hard origin/mastergit clean -fgit pullgit checkout masterecho "changing permissions..."chown -R $WEB_USER:$WEB_USERGROUP $WEB_PATHecho "Finished."
You can also run the exec () command to write a PHP program separately.
Is there a problem?Server version: CentOS 6.5PHP version 5.6.15
Reply content:
PHP is used to process requests sent from github. The test is normal. It is always unsuccessful to call a
=' Lovelucydev 'Echo"Start Deployment"Cd$WEB _pathEchogit Reset Span style= "color: #660033;" >--hard origin/master git clean -fgit pullgit checkout Masterecho "Changing permissions ..." Chown -r $WEB _user:$ Web_usergroup $WEB _pathecho "finished."
The next thing to do is to automatically call this script whenever there is a push.Second, the monitoring Web HooksGitHub and GitLab natively support Webhooks settings.The Payl
Release date:Updated on:
Affected Systems:Linux kernel Description:--------------------------------------------------------------------------------Bugtraq id: 64312CVE (CAN) ID: CVE-2013-7026
Linux Kernel is the Kernel of the Linux operating system.
In versions earlier than Linux kernel 3.12.2, ipc/shm. c has multiple competing Condition Vulnerabilities in implementation. This vulnerability can be exploited by local users through special applications, combined with the shmctl IPC_RMID operation
='lovelucydev'echo "Start deployment"cd $WEB_PATHecho "pulling source code..."git reset --hard origin/mastergit clean -fgit pullgit checkout masterecho "changing permissions..."chown -R $WEB_USER:$WEB_USERGROUP $WEB_PATHecho "Finished."
What we need to do below is to automatically call this script whenever there is a push.2. Listening to Web Hooks
Both GitHub and GitLab support Webhooks settings.
Fill in the URL of the server to be deployed on
1. Using the default Git-shell hooks, if you change the post-receive, all the files will be updated all now Ln-s/opt/git/gitlab-shell/hooks/pre-receive Pre-receiveln-s/opt/git/gitlab-shell/hooks/update updatecat Post-receive#!/bin/bashweb_dir=/opt/xx/xx/git-- work-tree= $web _dir checkout-fConcrete summary su-gitcd/opt/git/repositories/xx/xx.gitrm-rf hookscp-r/opt/git/gitlab-shell/hooks./CD hooksrm-rf pre-receive uPdateln-s/opt/git/gitlab-shell/hooks/pre-receive pre-receiveln-s/opt/git/gitlab-sh
including master, you can use the following methods:(1) Git push--all-f (theory possible)(2) Insurance Use the following command: (must be possible)Git Checkout branch NameGit push origin test (local branch): Test (remote branch)If it is not good, be sure to overwrite the words, you can add a-fGit push-f origin test (local branch): Test (remote branch)b) If it is not an empty address, OK is also very simple, first clear the address, and then push.Thi
Strong push, which uses your local code to replace content in your git repository with a strong overlayGit push-fgit fetch--prune #这样就可在本地删除在远程不存在的branchMans Git-fetch--pruneAfter fetching, remove any remote tracking branches which no longer exist on the remote.-T,--tagsThe most of the tags is fetched automatically as branch heads is downloaded, but tags it does notPoint at objects reachable from the branch heads that is being tracked is not being fet
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.