MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / message

Method message

atomic-remote/src/auth/mod.rs:508–527  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

506 /// All messages point at registering an identity, since that is the single
507 /// command that establishes a usable credential for a remote.
508 fn message(&self) -> String {
509 match self {
510 CredentialIssue::NoIdentity => format!(
511 "Not authenticated for {REMEDY_PREFIX}: could not determine an \
512 identity from the remote URL, no --identity was given, and no \
513 default identity is set. Pass --identity <NAME> (see \
514 `atomic identity list`) or set a default with \
515 `atomic identity new <name> --set-default`. {REMEDY_SUFFIX}"
516 ),
517 CredentialIssue::ExplicitIdentityNotFound { name } => format!(
518 "Not authenticated for {REMEDY_PREFIX}: --identity '{name}' does \
519 not match any identity on this machine (see `atomic identity \
520 list`). {REMEDY_SUFFIX}"
521 ),
522 CredentialIssue::KeypairUnavailable { name } => format!(
523 "Not authenticated for {REMEDY_PREFIX}: could not load the signing \
524 key for identity '{name}'. {REMEDY_SUFFIX}"
525 ),
526 }
527 }
528}
529
530const REMEDY_PREFIX: &str = "this remote";

Calls

no outgoing calls

Tested by 1