pub fn find_identity(
config: &GitwayConfig,
) -> Result<IdentityResolution, GitwayError>Expand description
Searches for an identity key according to FR-9 priority order.
Returns IdentityResolution::Encrypted rather than prompting for a
passphrase; the caller is responsible for prompting and calling
load_encrypted_key with the result.
SSH agent fallback is handled separately by connect_agent and
[GitwaySession::authenticate_with_agent]; this function covers only
file-based identities.
ยงErrors
Returns an error only for unexpected failures (permission denied, corrupt key data, etc.). A missing or encrypted key is not an error at this stage.