Skip to content

git⚓︎


Crontab Pulls⚓︎

Probably better ways in most cases, but in a pinch this will work. Create a read-only ssh key on the repo, a new user which has access to only the cloned repo, and setup crontab for that user.

# perform a 'git pull' via read-only ssh key every 12 hours
0 */12 * * *            /bin/bash -c 'cd /opt/cloned_git/ && /bin/git pull -q' > /dev/null