diff --git a/get_git.go b/get_git.go index 1b9f4be81..1d6253281 100644 --- a/get_git.go +++ b/get_git.go @@ -266,9 +266,9 @@ func setupGitEnv(cmd *exec.Cmd, sshKeyFile string) { sshKeyFile = strings.Replace(sshKeyFile, `\`, `/`, -1) } sshCmd = append(sshCmd, "-i", sshKeyFile) + env = append(env, strings.Join(sshCmd, " ")) } - env = append(env, strings.Join(sshCmd, " ")) cmd.Env = env }