-
-
Save NoMan2000/b16265c7399c3a3e1ba2 to your computer and use it in GitHub Desktop.
Setting up automatic php git pulls
This file contains 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 characters
sudo mkdir -m 0700 /var/www/.ssh | |
sudo chown -R ubuntu:www-data /var/www/.ssh | |
# one problem here is I do not know who the exec command is executing as. | |
sudo -u ubuntu ssh-keygen (empty passphrase) | |
sudo -u ubuntu ssh -T [email protected] | |
# this adds git to the recognized list of /var/www/.ssh/known_hosts | |
# paste public key into repo manager | |
cd (git repo) | |
sudo -u apache git pull origin branch | |
sudo chown ubuntu:www-data /var/lib/apache2/fastcgi -R | |
sudo chown ubuntu:www-data /var/lock/apache2 | |
sudo chown ubuntu:www-data -R /var/log/apache2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment