diff --git a/get_git.go b/get_git.go index db89edef..2313a3fb 100644 --- a/get_git.go +++ b/get_git.go @@ -329,9 +329,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 }