The error plink: unknown option "-o"
indicates that the git ssh command has been set to plink.exe
, but git believes it is interacting with an OpenSSH command.
To fix the error, choose one of the following to set the ssh variant …
- Set the following config in the appropriate (
--global
,--system
or--local
) git config e.g. by issuinggit config --global --edit
:[ssh] variant = plink
- Do it all in one with:
git config --global ssh.variant plink
- If the
ssh.variant
is already explicitly set tossh
, then just removing this hard setting and allowing git to auto-detect may well be enough - e.g.git config --global --unset ssh.variant
- Environment variables override git config, so if the ssh command has been set to plink via environment variable, set the following environment variable (use the same user/system scope as current
GIT_SSH
andGIT_SSH_COMMAND
setting)GIT_SSH_VARIANT=plink
Thanks
Solution found due this StackOverflow response