git push via cron

As explained here, it can be due to the lack of knowledge from the cron session shell of the ssh agent.
If that is the case (ie if you are using private ssh keys with a passphrase), keychain is the usual solution (as mentioned here).
More details in this example: “Passwordless connections via OpenSSH using public key
authentication, keychain and AgentForward
“.

Leave a Comment