Q:

how to perform git push using crontab

I'm using crontab for synchronizing git repositories. I was able to do operations like git add and commit, but can't perform git push to origin, since every git push asks for a password.
How can I connect to the server using git push using cron?

A:

You can use git over different transport methods.
It is common to access a remote git repository over a ssh connection.
And with ssh you can configure public-key-authentication, which is password-less (when your private-key has no password set).
It is recommended to generate new ssh-key-pairs for different remote destinations - and depending on if you need password-less access or not you can decide whether to protect the private-key with a password or not (the password would only be used to locally decrypt the private-key during authentication).
See for example the ssh-notes of the github team.

