title: Git push over SSH by CMD file on Win 8
body: <p>I need to create a .cmd file that pushes my repository to remote. However, .cmd files are open in standard command line and if I run "git push" in it, I guess standard HTTP authentication is used - I'm not asked for passphrase for my ssh key file and the authentication of course fails.
  Pushing works fine in Git shell (Powershell configured for git from "Github for Windows"), however, how can I create clickable shortcut in Windows which runs a command in this shell?
  I tried</p>
  
  <pre><code>C:\Users\Richard\AppData\Local\GitHub\GitHub.appref-ms --open-shell "push.cmd"
  </code></pre>
  
  <p>which did not work.</p>
  
  <p>Also, I tried to run the .cmd file in normal shell adding</p>
  
  <pre><code>@setlocal
  @set PLINK_PROTOCOL=ssh
  git push
  </code></pre>
  
  <p>as advised here:
  <a href="https://stackoverflow.com/questions/11229619/running-a-batch-file-in-git-shell">Running a batch file in git shell</a>
  but it made no difference - no query for my ssh key, authentication fails.</p>
  
  <p>Can you help me make one of the two solutions working? Thanks.</p>