Skip to content

Commit

Permalink
fix: ssh keyscan hint output (#1490)
Browse files Browse the repository at this point in the history
  • Loading branch information
echoboomer authored Apr 21, 2023
1 parent e26ab42 commit 42cd5bd
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions cmd/aws/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@ func createAws(cmd *cobra.Command, args []string) error {
case "github":
key, err := internalssh.GetHostKey("github.com")
if err != nil {
return fmt.Errorf("known_hosts file does not exist - please run `ssh-keyscan -H github.com >> ~/.ssh/known_hosts` to remedy")
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 -H gitlab.com >> ~/.ssh/known_hosts` to remedy")
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())
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/civo/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ func createCivo(cmd *cobra.Command, args []string) error {
case "github":
key, err := internalssh.GetHostKey("github.com")
if err != nil {
return fmt.Errorf("known_hosts file does not exist - please run `ssh-keyscan -H github.com >> ~/.ssh/known_hosts` to remedy")
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 -H gitlab.com >> ~/.ssh/known_hosts` to remedy")
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())
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/digitalocean/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ func createDigitalocean(cmd *cobra.Command, args []string) error {
case "github":
key, err := internalssh.GetHostKey("github.com")
if err != nil {
return fmt.Errorf("known_hosts file does not exist - please run `ssh-keyscan -H github.com >> ~/.ssh/known_hosts` to remedy")
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 -H gitlab.com >> ~/.ssh/known_hosts` to remedy")
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())
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/k3d/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@ func runK3d(cmd *cobra.Command, args []string) error {
case "github":
key, err := internalssh.GetHostKey("github.com")
if err != nil {
return fmt.Errorf("known_hosts file does not exist - please run `ssh-keyscan -H github.com >> ~/.ssh/known_hosts` to remedy")
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 -H gitlab.com >> ~/.ssh/known_hosts` to remedy")
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())
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/vultr/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ func createVultr(cmd *cobra.Command, args []string) error {
case "github":
key, err := internalssh.GetHostKey("github.com")
if err != nil {
return fmt.Errorf("known_hosts file does not exist - please run `ssh-keyscan -H github.com >> ~/.ssh/known_hosts` to remedy")
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 -H gitlab.com >> ~/.ssh/known_hosts` to remedy")
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())
}
Expand Down

0 comments on commit 42cd5bd

Please sign in to comment.