i'm using fourth release candidate of git windows 2.x now, , using git_ssh_command in shell avoid ssh's host verification. in git bash write this:
$ git_ssh_command="ssh -o userknownhostsfile=/dev/null -o stricthostkeychecking=no" git push origin master how can in windows cmd? can't find answers anywhere.
you don't have set environment variable anymore in windows.
with git 2.10+ (q3 2016), have possibility set config git_ssh_command, easier environment variable (and can set globally, or locally specific repo)
see commit 3c8ede3 (26 jun 2016) nguyễn thái ngọc duy (pclouds).
(merged junio c hamano -- gitster -- in commit dc21164, 19 jul 2016)
a new configuration variable
core.sshcommandhas been added specify value git_ssh_command use per repository.
core.sshcommand: if variable set,
git fetch,git pushuse specified command instead ofsshwhen need connect remote system.
command in same formgit_ssh_commandenvironment variable , overridden when environment variable set.
it means git push can be:
cd /path/to/my/repo git config core.sshcommand 'ssh -o userknownhostsfile=/dev/null -o stricthostkeychecking=no' # later on git push origin master
Comments
Post a Comment