I'm trying to use git push
in a bash script being run by crontab to push a commit to github. At the end of the script I'm doing this:
# script processes some files, then:
git add -A
git commit -a -m "Updated $(date)"
git push origin master
The add and commit work fine (and the push works fine when running the script from the CL, not using cron), but I get errors on the push to github with cron:
git: 'credential-osxkeychain' is not a git command. See 'git --help'.
fatal: could not read Username for 'https://github.com': Device not configured
I've searched through other threads (like this, and this), but it doesn't appear to be an issue with SSH (at least I tried passing SSH_AUTH_SOCK environment variable in the crontab line and that didn't work). Running OSX 10.8.
Any ideas?