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

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -