diff --git a/images/win/scripts/Installers/Install-Git.ps1 b/images/win/scripts/Installers/Install-Git.ps1 index bec4ec1e0..27a619695 100644 --- a/images/win/scripts/Installers/Install-Git.ps1 +++ b/images/win/scripts/Installers/Install-Git.ps1 @@ -38,8 +38,11 @@ Choco-Install -PackageName hub Add-MachinePathItem "C:\Program Files\Git\bin" -# Add well-known SSH host keys to ssh_known_hosts +if (Test-IsWin16) { + $env:Path += ";$env:ProgramFiles\Git\usr\bin\" +} +# Add well-known SSH host keys to ssh_known_hosts ssh-keyscan -t rsa github.com >> "C:\Program Files\Git\etc\ssh\ssh_known_hosts" ssh-keyscan -t rsa ssh.dev.azure.com >> "C:\Program Files\Git\etc\ssh\ssh_known_hosts"