From 690b5e3062e83d71c9a186f0f4febf8da476cc0a Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Mon, 18 Feb 2019 09:55:09 +0100 Subject: [PATCH] internal/build: accept any host key for SFTP This is OK because transport security isn't important for Launchpad uploads. We're using SFTP as a replacement for unencrypted FTP and files we upload are signed using GPG. --- internal/build/util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/build/util.go b/internal/build/util.go index a41ecfbed3..64377e7293 100644 --- a/internal/build/util.go +++ b/internal/build/util.go @@ -182,7 +182,7 @@ func ExpandPackagesNoVendor(patterns []string) []string { // The destination host may be specified either as [user@]host[: or as a URI in // the form sftp://[user@]host[:port]. func UploadSFTP(identityFile, host, dir string, files []string) error { - sftp := exec.Command("sftp") + sftp := exec.Command("sftp", "-o", "StrictHostKeyChecking=no", "-o", "UserKnownHostsFile=/dev/null") sftp.Stdout = nil sftp.Stderr = os.Stderr if identityFile != "" {