title: Windows scheduled task to git push to github
body: <p>I hope to add a Windows Scheduled Task to git push to github every night.  I have a CMD file.  When I run the CMD file on the windows command prompt, it works fine.  But when I run it via windows scheduled task.  It's stuck forever.  The status is "running".  And from the log I can see it successfully started the git bash shell.  Any idea?</p>
  
  <pre><code>echo git push &gt; i:\gitpush
  echo 'pushing' &gt;&gt;log1
  C:\WINDOWS\SysWOW64\cmd.exe  /c ""C:\Program Files (x86)\Git\bin\sh.exe" --login i:\gitpush" &gt;&gt;log1 2&gt;&gt;error    
  echo 'done pushing' &gt;&gt;log1
  del i:\gitpush
  </code></pre>
  
  <p>Here is the log output:</p>
  
  <pre><code>'pushing'
  Welcome to Git (version 1.7.4-preview20110204)
  
  
  Run 'git help git' to display the help index.
  Run 'git help &lt;command&gt;' to display help for specific commands.
  </code></pre>
  
  <p>Then I did an experiment to rename gitpush script to a wrong file name.  And it exited immediately with the error "No such file or directory", which is expected.  It shows the gitpush script is passing in correctly to the bash but for some reason it's stuck.  </p>
  
  <p>The reason I have to go through git bash shell is because I don't know how to setup public key in windows command line shell without using git bash shell.</p>
  
  <p>Thanks!</p>