Skip to content

Commit

Permalink
Merge pull request #585 from thockin/v3_known_hosts_not_dev_null
Browse files Browse the repository at this point in the history
v3: Don't set known_hosts to /dev/null
  • Loading branch information
k8s-ci-robot authored Jul 14, 2022
2 parents d01fc42 + e0b39d2 commit 025a1c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/git-sync/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -1137,7 +1137,7 @@ func setupGitSSH(setupKnownHosts bool) error {
}
err = os.Setenv("GIT_SSH_COMMAND", fmt.Sprintf("ssh -o UserKnownHostsFile=%s -i %s", pathToSSHKnownHosts, pathToSSHSecret))
} else {
err = os.Setenv("GIT_SSH_COMMAND", fmt.Sprintf("ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i %s", pathToSSHSecret))
err = os.Setenv("GIT_SSH_COMMAND", fmt.Sprintf("ssh -o StrictHostKeyChecking=no -i %s", pathToSSHSecret))
}

// set env variable GIT_SSH_COMMAND to force git use customized ssh command
Expand Down

0 comments on commit 025a1c0

Please sign in to comment.