I hope to add a scheduled Windows task to git push to github every night. I have a CMD file. When I run the cmd file on the windows command line, it works fine. But when I run it through a scheduled Windows task. He is stuck forever. The status is "running." And from the log, I see that he successfully started the git bash shell. Any 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 is the log output:
'pushing' Welcome to Git (version 1.7.4-preview20110204) Run 'git help git' to display the help index. Run 'git help <command>' to display help for specific commands.
Then I did an experiment to rename the gitpush script to the wrong file name. And he immediately came up with the error "There is no such file or directory," which is expected. It shows that the gitpush script goes to bash correctly, but for some reason it is stuck.
I have to go through the git bash shell because I donโt know how to configure the public key on the Windows command line command line without using the git bash shell.
Thanks!
source share