From 058ccea6218e96985b511f50926b5d2456cfa951 Mon Sep 17 00:00:00 2001 From: Tim Hockin Date: Fri, 1 Jul 2022 12:40:44 -0700 Subject: [PATCH] Don't set known_hosts to /dev/null This causes git to log, repeatedly, that it is "adding to known hosts". --- cmd/git-sync/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/git-sync/main.go b/cmd/git-sync/main.go index 143e53f..fb8eda1 100644 --- a/cmd/git-sync/main.go +++ b/cmd/git-sync/main.go @@ -1360,7 +1360,7 @@ func (git *repoSync) SetupGitSSH(setupKnownHosts bool, pathToSSHSecret, pathToSS } 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