git - How can I automatically push changes from a remote repository to Github? -


i have been trying using crontab automatically run bash script pushes changes github. when run script in shell command line, works perfectly. isn´t working crontab.

this crontab file (it executing every 2 minutes because of testing purposes):

*/2 * * * * ./script.sh 

this script:

#!/bin/bash cd /path/to/repo.git git push origin 

because of testing purposes removed passphrase ssh key connection github

try

$ git push -q origin 

that is, assuming git in standard directory. otherwise, add whole path. also, check output in /var/log/syslog.


Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -