-
-
Save cdiaz/7c8f6516dc6d75fde3ed25dab088f16a to your computer and use it in GitHub Desktop.
Revisions
-
yosukehasumi revised this gist
Mar 6, 2017 . 1 changed file with 5 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -61,6 +61,11 @@ Add git-auto-deploy user to the www-data group usermod -a -G www-data git-auto-deploy ``` For some reason I'm not so good with permission stuff and the above command doesn't work the way i expect, my solution is to change the ownership of the entire html directory ``` chown -R git-auto-deploy:git-auto-deploy /var/www/html ``` You may need to make sure that the repo IP fingerprint has been added to the ~/.ssh/known_hosts file and copy this to the git-auto-deploy/.ssh/known_hosts file ``` ssh-keyscan -H -t rsa gitlab.pen.org >> ~/.ssh/known_hosts -
yosukehasumi revised this gist
Mar 6, 2017 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -93,5 +93,9 @@ git remote add origin [email protected]:user/repo.git git fetch origin ``` To see git-auto-deploy logs you can watch the log file: ``` tail -f /var/log/git-auto-deploy.log ``` -
yosukehasumi revised this gist
Mar 6, 2017 . 1 changed file with 16 additions and 13 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -61,18 +61,6 @@ Add git-auto-deploy user to the www-data group usermod -a -G www-data git-auto-deploy ``` You may need to make sure that the repo IP fingerprint has been added to the ~/.ssh/known_hosts file and copy this to the git-auto-deploy/.ssh/known_hosts file ``` ssh-keyscan -H -t rsa gitlab.pen.org >> ~/.ssh/known_hosts @@ -91,4 +79,19 @@ service git-auto-deploy status For Digital ocean you may have to open up the 8001 port ``` sudo ufw allow 8001/tcp ``` Install git ``` sudo apt-get install git ``` You may need to verify the authenticity (fingerprint) of the git repo. In my case this was a Digital Ocean git repo so I ssh'd into my `/var/www/html` directory and ran ``` git init git remote add origin [email protected]:user/repo.git git fetch origin ``` -
yosukehasumi revised this gist
Mar 1, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -90,5 +90,5 @@ service git-auto-deploy status For Digital ocean you may have to open up the 8001 port ``` sudo ufw allow 8001/tcp ``` -
yosukehasumi revised this gist
Mar 1, 2017 . 1 changed file with 5 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -86,4 +86,9 @@ Start and check your git-auto-deploy server by running ``` service git-auto-deploy start service git-auto-deploy status ``` For Digital ocean you may have to open up the 8001 port ``` sudo ufw allow 8866/tcp ``` -
yosukehasumi revised this gist
Mar 1, 2017 . 1 changed file with 7 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -73,6 +73,13 @@ git remote add origin [email protected]:user/repo.git git fetch origin ``` You may need to make sure that the repo IP fingerprint has been added to the ~/.ssh/known_hosts file and copy this to the git-auto-deploy/.ssh/known_hosts file ``` ssh-keyscan -H -t rsa gitlab.pen.org >> ~/.ssh/known_hosts cp ~/.ssh/known_hosts /etc/git-auto-deploy/.ssh/ chown git-auto-deploy:git-auto-deploy /etc/git-auto-deploy/.ssh/known_hosts ``` Next make sure you add your public key from `/root/.ssh/id_rsa.pub` to gitlab and add a webhook that triggers the "push" event to http://mydomain.com:8001 Start and check your git-auto-deploy server by running -
yosukehasumi revised this gist
Feb 28, 2017 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -21,9 +21,9 @@ sudo apt-get install git-auto-deploy Modify /etc/git-auto-deploy.conf.json ``` { "pid-file": "/etc/git-auto-deploy/.gitautodeploy.pid", "http-host": "0.0.0.0", "http-port": 8001, "repositories": [ { "url": "[email protected]:user/repo.git", -
yosukehasumi revised this gist
Oct 26, 2016 . 1 changed file with 8 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -71,4 +71,12 @@ You may need to verify the authenticity (fingerprint) of the git repo. In my cas git init git remote add origin [email protected]:user/repo.git git fetch origin ``` Next make sure you add your public key from `/root/.ssh/id_rsa.pub` to gitlab and add a webhook that triggers the "push" event to http://mydomain.com:8001 Start and check your git-auto-deploy server by running ``` service git-auto-deploy start service git-auto-deploy status ``` -
yosukehasumi revised this gist
Sep 8, 2016 . 1 changed file with 8 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -26,7 +26,7 @@ Modify /etc/git-auto-deploy.conf.json "port": 8001, "repositories": [ { "url": "git@gitlab.example.com:user/repo.git", "branch": "master", "remote": "origin", "path": "/var/www/html", @@ -65,3 +65,10 @@ Install git ``` sudo apt-get install git ``` You may need to verify the authenticity (fingerprint) of the git repo. In my case this was a Digital Ocean git repo so I ssh'd into my `/var/www/html` directory and ran ``` git init git remote add origin [email protected]:user/repo.git git fetch origin ``` -
yosukehasumi revised this gist
Sep 8, 2016 . 1 changed file with 27 additions and 9 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,14 +1,22 @@ Install software-properties-common ``` sudo apt-get install software-properties-common ``` Add Repo ``` sudo add-apt-repository ppa:olipo186/git-auto-deploy ``` Update apt-get ``` sudo apt-get update ``` Install git-auto-deploy ``` sudo apt-get install git-auto-deploy ``` Modify /etc/git-auto-deploy.conf.json ``` @@ -34,16 +42,26 @@ Modify /etc/git-auto-deploy.conf.json ``` Generate key ``` cd /root/.ssh/; ssh-keygen -t rsa; ``` copy key to git-auto-deploy ``` sudo cp /root/.ssh/id_rsa /etc/git-auto-deploy/.ssh/ ``` change permissions for script to git-auto-deploy user ``` sudo chown -R git-auto-deploy:git-auto-deploy /etc/git-auto-deploy ``` Add git-auto-deploy user to the www-data group ``` usermod -a -G www-data git-auto-deploy ``` Install git ``` sudo apt-get install git ``` -
yosukehasumi revised this gist
Sep 8, 2016 . 1 changed file with 8 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,11 +1,15 @@ Install software-properties-common `sudo apt-get install software-properties-common` Add Repo `sudo add-apt-repository ppa:olipo186/git-auto-deploy` Update apt-get `sudo apt-get update` Install git-auto-deploy `sudo apt-get install git-auto-deploy` Modify /etc/git-auto-deploy.conf.json ``` { @@ -31,11 +35,15 @@ Modify /etc/git-auto-deploy.conf.json Generate key `cd /root/.ssh/; ssh-keygen -t rsa;` copy key to git-auto-deploy `sudo cp /root/.ssh/id_rsa /etc/git-auto-deploy/.ssh/` change permissions for script to git-auto-deploy user `sudo chown -R git-auto-deploy:git-auto-deploy /etc/git-auto-deploy` Add git-auto-deploy user to the www-data group `usermod -a -G www-data git-auto-deploy` Install git `sudo apt-get install git` -
yosukehasumi revised this gist
Sep 8, 2016 . 1 changed file with 9 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,12 +1,12 @@ Install software-properties-common `sudo apt-get install software-properties-common` Add Repo `sudo add-apt-repository ppa:olipo186/git-auto-deploy` Update apt-get `sudo apt-get update` Install git-auto-deploy `sudo apt-get install git-auto-deploy` Modify /etc/git-auto-deploy.conf.json ``` { "pidfilepath": "/etc/git-auto-deploy/.gitautodeploy.pid", @@ -29,10 +29,13 @@ Modify /etc/git-auto-deploy.conf.json } ``` Generate key `cd /root/.ssh/; ssh-keygen -t rsa;` copy key to git-auto-deploy `sudo cp /root/.ssh/id_rsa /etc/git-auto-deploy/.ssh/` change permissions for script to git-auto-deploy user `sudo chown -R git-auto-deploy:git-auto-deploy /etc/git-auto-deploy` Add git-auto-deploy user to the www-data group `usermod -a -G www-data git-auto-deploy` Install git `sudo apt-get install git` -
yosukehasumi revised this gist
Sep 8, 2016 . 1 changed file with 12 additions and 9 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,11 +1,13 @@ `sudo apt-get install software-properties-common` `sudo add-apt-repository ppa:olipo186/git-auto-deploy` `sudo apt-get update` `sudo apt-get install git-auto-deploy` Modify /etc/git-auto-deploy.conf.json ``` { "pidfilepath": "/etc/git-auto-deploy/.gitautodeploy.pid", "host": "0.0.0.0", @@ -25,11 +27,12 @@ Modify /etc/git-auto-deploy.conf.json } ] } ``` `cd /root/.ssh/; ssh-keygen -t rsa;` `sudo cp /root/.ssh/id_rsa /etc/git-auto-deploy/.ssh/` `sudo chown -R git-auto-deploy:git-auto-deploy /etc/git-auto-deploy` `usermod -a -G www-data git-auto-deploy` `sudo apt-get install git` -
yosukehasumi created this gist
Sep 8, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,35 @@ sudo apt-get install software-properties-common sudo add-apt-repository ppa:olipo186/git-auto-deploy sudo apt-get update sudo apt-get install git-auto-deploy Modify /etc/git-auto-deploy.conf.json { "pidfilepath": "/etc/git-auto-deploy/.gitautodeploy.pid", "host": "0.0.0.0", "port": 8001, "repositories": [ { "url": "[email protected]:penamerica/pen-dot-org-wp.git", "branch": "master", "remote": "origin", "path": "/var/www/html", "filters": [ { "object_kind": "push", "ref": "refs/heads/master" } ] } ] } cd /root/.ssh/; ssh-keygen -t rsa; sudo cp /root/.ssh/id_rsa /etc/git-auto-deploy/.ssh/ sudo chown -R git-auto-deploy:git-auto-deploy /etc/git-auto-deploy usermod -a -G www-data git-auto-deploy sudo apt-get install git