Render an actionable, accurate error message for this issue. All messages point at registering an identity, since that is the single command that establishes a usable credential for a remote.
(&self)
| 417 | /// All messages point at registering an identity, since that is the single |
| 418 | /// command that establishes a usable credential for a remote. |
| 419 | fn message(&self) -> String { |
| 420 | match self { |
| 421 | CredentialIssue::NoIdentity => format!( |
| 422 | "Not authenticated for {REMEDY_PREFIX}: could not determine an \ |
| 423 | identity from the remote URL, no --identity was given, and no \ |
| 424 | default identity is set. Pass --identity <NAME> (see \ |
| 425 | `atomic identity list`) or set a default with \ |
| 426 | `atomic identity new <name> --set-default`. {REMEDY_SUFFIX}" |
| 427 | ), |
| 428 | CredentialIssue::ExplicitIdentityNotFound { name } => format!( |
| 429 | "Not authenticated for {REMEDY_PREFIX}: --identity '{name}' does \ |
| 430 | not match any identity on this machine (see `atomic identity \ |
| 431 | list`). {REMEDY_SUFFIX}" |
| 432 | ), |
| 433 | CredentialIssue::KeypairUnavailable { name } => format!( |
| 434 | "Not authenticated for {REMEDY_PREFIX}: could not load the signing \ |
| 435 | key for identity '{name}'. {REMEDY_SUFFIX}" |
| 436 | ), |
| 437 | } |
| 438 | } |
| 439 | } |
| 440 | |
| 441 | const REMEDY_PREFIX: &str = "this remote"; |
no outgoing calls