I'm trying to run a git push
from cron. When I do the command interactively on the shell it's going through fine. When running the command from my user's crontab, cron delivers the error message
Permission denied (publickey).
I presume it hasn't to do with finding or reading my ~/.ssh/id_rsa, as I can cat the file from cron alright. UID and EUID are set fine in the cron job. - Any ideas?
UPDATE
I got it working when supplying the environment key SSH_AUTH_SOCK to my cron job, but I'm concerned that this is only valid as long as I'm logged in. I'm looking for a solution that works independent of interactive logins.