From 8ef89260a40992832b680f19da903553df5572c7 Mon Sep 17 00:00:00 2001 From: Jared Edwards Date: Mon, 4 Mar 2024 21:39:07 -0700 Subject: [PATCH] need to add this back --- cmd/aws/create.go | 34 ++++++++++++++++------------------ cmd/civo/create.go | 34 ++++++++++++++++------------------ 2 files changed, 32 insertions(+), 36 deletions(-) diff --git a/cmd/aws/create.go b/cmd/aws/create.go index 2d53f4cd9..d34e0875d 100644 --- a/cmd/aws/create.go +++ b/cmd/aws/create.go @@ -20,8 +20,6 @@ import ( "github.com/kubefirst/kubefirst/internal/utilities" "github.com/kubefirst/runtime/pkg" awsinternal "github.com/kubefirst/runtime/pkg/aws" - internalssh "github.com/kubefirst/runtime/pkg/ssh" - "github.com/rs/zerolog/log" "github.com/spf13/cobra" "github.com/spf13/viper" ) @@ -133,22 +131,22 @@ func ValidateProvidedFlags(gitProvider string) error { } } - switch gitProvider { - case "github": - key, err := internalssh.GetHostKey("github.com") - if err != nil { - return fmt.Errorf("known_hosts file does not exist - please run `ssh-keyscan github.com >> ~/.ssh/known_hosts` to remedy") - } else { - log.Info().Msgf("%s %s\n", "github.com", key.Type()) - } - case "gitlab": - key, err := internalssh.GetHostKey("gitlab.com") - if err != nil { - return fmt.Errorf("known_hosts file does not exist - please run `ssh-keyscan gitlab.com >> ~/.ssh/known_hosts` to remedy") - } else { - log.Info().Msgf("%s %s\n", "gitlab.com", key.Type()) - } - } + // switch gitProvider { + // case "github": + // key, err := internalssh.GetHostKey("github.com") + // if err != nil { + // return fmt.Errorf("known_hosts file does not exist - please run `ssh-keyscan github.com >> ~/.ssh/known_hosts` to remedy") + // } else { + // log.Info().Msgf("%s %s\n", "github.com", key.Type()) + // } + // case "gitlab": + // key, err := internalssh.GetHostKey("gitlab.com") + // if err != nil { + // return fmt.Errorf("known_hosts file does not exist - please run `ssh-keyscan gitlab.com >> ~/.ssh/known_hosts` to remedy") + // } else { + // log.Info().Msgf("%s %s\n", "gitlab.com", key.Type()) + // } + // } progress.CompleteStep("Validate provided flags") diff --git a/cmd/civo/create.go b/cmd/civo/create.go index 53864b535..38ab0a6a2 100644 --- a/cmd/civo/create.go +++ b/cmd/civo/create.go @@ -18,8 +18,6 @@ import ( "github.com/kubefirst/kubefirst/internal/provision" "github.com/kubefirst/kubefirst/internal/utilities" "github.com/kubefirst/runtime/pkg" - internalssh "github.com/kubefirst/runtime/pkg/ssh" - "github.com/rs/zerolog/log" "github.com/spf13/cobra" "github.com/spf13/viper" ) @@ -108,22 +106,22 @@ func ValidateProvidedFlags(gitProvider string) error { } } - switch gitProvider { - case "github": - key, err := internalssh.GetHostKey("github.com") - if err != nil { - return fmt.Errorf("known_hosts file does not exist - please run `ssh-keyscan github.com >> ~/.ssh/known_hosts` to remedy") - } else { - log.Info().Msgf("%s %s\n", "github.com", key.Type()) - } - case "gitlab": - key, err := internalssh.GetHostKey("gitlab.com") - if err != nil { - return fmt.Errorf("known_hosts file does not exist - please run `ssh-keyscan gitlab.com >> ~/.ssh/known_hosts` to remedy") - } else { - log.Info().Msgf("%s %s\n", "gitlab.com", key.Type()) - } - } + // switch gitProvider { + // case "github": + // key, err := internalssh.GetHostKey("github.com") + // if err != nil { + // return fmt.Errorf("known_hosts file does not exist - please run `ssh-keyscan github.com >> ~/.ssh/known_hosts` to remedy") + // } else { + // log.Info().Msgf("%s %s\n", "github.com", key.Type()) + // } + // case "gitlab": + // key, err := internalssh.GetHostKey("gitlab.com") + // if err != nil { + // return fmt.Errorf("known_hosts file does not exist - please run `ssh-keyscan gitlab.com >> ~/.ssh/known_hosts` to remedy") + // } else { + // log.Info().Msgf("%s %s\n", "gitlab.com", key.Type()) + // } + // } progress.CompleteStep("Validate provided flags")