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)
| 370 | /// All messages point at registering an identity, since that is the single |
| 371 | /// command that establishes a usable credential for a remote. |
| 372 | fn message(&self) -> String { |
| 373 | match self { |
| 374 | CredentialIssue::NoIdentity => format!( |
| 375 | "Not authenticated for {REMEDY_PREFIX}: could not determine an \ |
| 376 | identity from the remote URL, no --identity was given, and no \ |
| 377 | default identity is set. Pass --identity <NAME> (see \ |
| 378 | `atomic identity list`) or set a default with \ |
| 379 | `atomic identity new <name> --set-default`. {REMEDY_SUFFIX}" |
| 380 | ), |
| 381 | CredentialIssue::ExplicitIdentityNotFound { name } => format!( |
| 382 | "Not authenticated for {REMEDY_PREFIX}: --identity '{name}' does \ |
| 383 | not match any identity on this machine (see `atomic identity \ |
| 384 | list`). {REMEDY_SUFFIX}" |
| 385 | ), |
| 386 | CredentialIssue::KeypairUnavailable { name } => format!( |
| 387 | "Not authenticated for {REMEDY_PREFIX}: could not load the signing \ |
| 388 | key for identity '{name}'. {REMEDY_SUFFIX}" |
| 389 | ), |
| 390 | } |
| 391 | } |
| 392 | } |
| 393 | |
| 394 | const REMEDY_PREFIX: &str = "this remote"; |
no outgoing calls