Skip to content

git crontab pull⚓︎


Crontab⚓︎

There are better ways, but in a pinch this will work. Create a read-only ssh key in the repo, a new user who has access to only the cloned repo, and setup crontab for that user.

Text Only
1
2
# 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