From 0d070fcefd19809a12f4abdb7cad0aedea57dedf Mon Sep 17 00:00:00 2001 From: John Letey Date: Wed, 5 Jun 2024 19:19:56 +0200 Subject: [PATCH] refactor: ignore host key (#251) --- builder/builder.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/builder/builder.go b/builder/builder.go index 84f16a0..c6b66e9 100644 --- a/builder/builder.go +++ b/builder/builder.go @@ -20,6 +20,7 @@ import ( "github.com/go-git/go-git/v5/plumbing" "github.com/go-git/go-git/v5/plumbing/transport/ssh" "github.com/go-git/go-git/v5/storage/memory" + internalssh "golang.org/x/crypto/ssh" "golang.org/x/mod/modfile" "github.com/strangelove-ventures/heighliner/docker" @@ -192,6 +193,7 @@ func getModFile( if err != nil { return nil, errors.New("failed to generate public key") } + key.HostKeyCallback = internalssh.InsecureIgnoreHostKey() cloneOpts.URL = fmt.Sprintf("git@%s:%s/%s.git", repoHost, organization, repoName) cloneOpts.Auth = key