Created
July 21, 2024 19:58
-
-
Save 54keesh/ef42c4c5b45ee3cedfbb2425dc7b93d8 to your computer and use it in GitHub Desktop.
git pull via other user in apache/nginx based deployments
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 characters
OPTIONAL | |
ensure pulling is possible via www-data user | |
-> sudo -u www-data git pull | |
if not add it in visudo | |
-> git ALL = (www-data) /usr/bin/git pull | |
add ubuntu to www-data group | |
-> sudo usermod -aG www-data ubuntu | |
ensure ubuntu has write permission to that otherwise | |
-> sudo chmod 755 path/to/directory | |
You are done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment