Skip to content

Commit

Permalink
need to add this back
Browse files Browse the repository at this point in the history
  • Loading branch information
jarededwards committed Mar 5, 2024
1 parent 38307bf commit 8ef8926
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 36 deletions.
34 changes: 16 additions & 18 deletions cmd/aws/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down Expand Up @@ -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")

Expand Down
34 changes: 16 additions & 18 deletions cmd/civo/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down Expand Up @@ -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")

Expand Down

0 comments on commit 8ef8926

Please sign in to comment.