I have created a shell script file for pushing a git repository automatically every hour using crontab like as follows,
backup.sh
cd /home/user/share/my_project && git commit -a -m "hourli crontab backup 'date'"
cd /home/user/share/my_project && git push origin branch1
send mypassword\r
wait
The issue with this code is, the git is using ssh and every time we run this code using bash ./backup.sh
is asking password in the terminal. Not accepting the password specified in the shell script.