If I have GIT_SSH_COMMAND="ssh -o 'StrictHostKeyChecking=no'" and no sshKey query param set, go-getter is not passing the StrictHostKeyChecking=no option when downloading the repo.
Although #300 fixed the case so GIT_SSH_COMMAND isn't set to GIT_SSH_COMMAND=ssh when a sshKey param is not used, it also unset it if it had an existing value. I think if GIT_SSH_COMMAND is already set in the environment then it should be left unchanged.
It looks like v1.7.2 caused a regression. https://github.com/hashicorp/go-getter/pull/300 caused a regression that unsets an existing
GIT_SSH_COMMAND
env variable if it is set.Problem
If I have
GIT_SSH_COMMAND="ssh -o 'StrictHostKeyChecking=no'"
and nosshKey
query param set,go-getter
is not passing theStrictHostKeyChecking=no
option when downloading the repo.Expected
From what I understand from https://github.com/hashicorp/go-getter/issues/299 we want to leave the
GIT_SSH_COMMAND
untouched when ansshKey
param is not set.Although #300 fixed the case so
GIT_SSH_COMMAND
isn't set toGIT_SSH_COMMAND=ssh
when asshKey
param is not used, it also unset it if it had an existing value. I think ifGIT_SSH_COMMAND
is already set in the environment then it should be left unchanged.