pub fn git_ssh_credentials(
_url: &str,
username_from_url: Option<&str>,
allowed_types: CredentialType,
) -> Result<Cred, Error>Expand description
Git credential callback for git2 — handles SSH and HTTPS authentication. Used by sources/, modules/, and daemon/ for all git operations.
Tries in order:
- SSH agent (for SSH URLs)
- SSH key files:
~/.ssh/id_ed25519,~/.ssh/id_rsa(for SSH URLs) - Git credential helper / GIT_ASKPASS (for HTTPS URLs)
- Default system credentials