fix: improve permission denied message
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
@ -75,6 +75,8 @@ func Fatal(hostname string, err error) error {
|
|||||||
return fmt.Errorf("could not resolve hostname for %s", hostname)
|
return fmt.Errorf("could not resolve hostname for %s", hostname)
|
||||||
} else if strings.Contains(out, "Connection timed out") {
|
} else if strings.Contains(out, "Connection timed out") {
|
||||||
return fmt.Errorf("connection timed out for %s", hostname)
|
return fmt.Errorf("connection timed out for %s", hostname)
|
||||||
|
} else if strings.Contains(out, "Permission denied") {
|
||||||
|
return fmt.Errorf("ssh auth: permission denied for %s", hostname)
|
||||||
} else {
|
} else {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user