Weird predicament I'm in here. I'm trying to run this code in a cronjob:
cd /home/justi180/public_html; git add *; git commit -m "Auto commit"; git push origin master;
When I run the above in a terminal myself it works. When I run it in a cronjob it doesn't work, however. The output of the cronjob when it tries to commit looks like this:
# On branch master
# Changes not staged for commit:
# (use "git add/rm <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: logs/popularity/daily.json
# modified: logs/popularity/monthly.json
# modified: logs/popularity/totals.json
# modified: logs/popularity/visitors.json
# deleted: thisisatest
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
I've additionally confirmed the job is running as my user by sticking a whoami
at the front of the commands. I'm really not sure what to do here; the job is running as the right user and is clearly finding the git
command to run, so my normal cron debugging isn't really taking me anywhere.