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
C:\Users\Richard\AppData\Local\GitHub\GitHub.appref-ms --open-shell "push.cmd"
which did not work.
Also, I tried to run the .cmd file in normal shell adding
@setlocal
@set PLINK_PROTOCOL=ssh
git push
as advised here: Running a batch file in git shell but it made no difference - no query for my ssh key, authentication fails.
Can you help me make one of the two solutions working? Thanks.