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)
| 123 | /// All messages point at registering an identity, since that is the single |
| 124 | /// command that establishes a usable credential for a remote. |
| 125 | fn message(&self) -> String { |
| 126 | match self { |
| 127 | CredentialIssue::NoIdentityInUrl => format!( |
| 128 | "Not authenticated for {REMEDY_PREFIX}: could not determine an \ |
| 129 | identity from the remote URL. {REMEDY_SUFFIX}" |
| 130 | ), |
| 131 | CredentialIssue::IdentityNotFound { name } => format!( |
| 132 | "Not authenticated for {REMEDY_PREFIX}: identity '{name}' is not \ |
| 133 | registered on this machine. {REMEDY_SUFFIX}" |
| 134 | ), |
| 135 | CredentialIssue::KeypairUnavailable { name } => format!( |
| 136 | "Not authenticated for {REMEDY_PREFIX}: could not load the signing \ |
| 137 | key for identity '{name}'. {REMEDY_SUFFIX}" |
| 138 | ), |
| 139 | } |
| 140 | } |
| 141 | } |
| 142 | |
| 143 | const REMEDY_PREFIX: &str = "this remote"; |
no outgoing calls