Windows scheduled task to git push to github -
i hope add windows scheduled task git push github every night. have cmd file. when run cmd file on windows command prompt, works fine. when run via windows scheduled task. it's stuck forever. status "running". , log can see started git bash shell. idea?
echo git push > i:\gitpush echo 'pushing' >>log1 c:\windows\syswow64\cmd.exe /c ""c:\program files (x86)\git\bin\sh.exe" --login i:\gitpush" >>log1 2>>error echo 'done pushing' >>log1 del i:\gitpush
here log output:
'pushing' welcome git (version 1.7.4-preview20110204) run 'git git' display index. run 'git <command>' display specific commands.
then did experiment rename gitpush script wrong file name. , exited error "no such file or directory", expected. shows gitpush script passing in correctly bash reason it's stuck.
the reason have go through git bash shell because don't know how setup public key in windows command line shell without using git bash shell.
thanks!
i don't know how setup public key in windows command line shell
public/private keys work in dos shell, provided define %home%
environment variable (referencing parent directory of .ssh
)
the trick windows scheduled task make sure:
- who running task (the "system account"? or actual user?)
displaying "env
" can debugging issue. - where run: if git push depends on current path push current repo, need task runs supposed to.
Comments
Post a Comment