I have created an SSH key (following the official tutorial), added it to GitHub and created a Bash script that commits and pushes a single file to my repository on Github. When I run this script from the command line, everything works fine and the updates are pushed. However, when I set up a job using crontab -e
, the push generates the following error:
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
I have edited the user's crontab (crontab -e
), i.e. I'm NOT using sudo crontab -e
. I'm running Ubuntu 12.04.