From d41c3a8c059d19ae72d29a2f9b842fa04889103d Mon Sep 17 00:00:00 2001 From: Kjeld Schouten Date: Fri, 8 Nov 2024 21:25:13 +0100 Subject: [PATCH] fix(clustertool): ensure github known hosts are always pointing towards github --- clustertool/pkg/fluxhandler/sshsecretgen.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clustertool/pkg/fluxhandler/sshsecretgen.go b/clustertool/pkg/fluxhandler/sshsecretgen.go index 4cc61ee81b0..83feac3f656 100644 --- a/clustertool/pkg/fluxhandler/sshsecretgen.go +++ b/clustertool/pkg/fluxhandler/sshsecretgen.go @@ -176,7 +176,7 @@ func publicKeyToOpenSSH(pub *ecdsa.PublicKey) (string, error) { // getKnownHostsEntry generates the known_hosts entry for the given URL func getKnownHostsEntry(url string) string { - if url == "github.com" { + if strings.Contains(url, "github.com") { return getGithubKnownHostsEntry() } return generateKnownHostsEntry(url)