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
Post a Comment