pub fn credential_pair(
path: &Path,
selected: Option<&str>,
) -> Result<(String, String), String>Expand description
Reads one user:token pair from an auth file, for a caller that
needs the credential itself rather than a request carrying it.
The git credential helper is that caller and the only one: git asks for a username and a password on stdout, so the pair cannot be kept inside a request the way every other use here keeps it.
ยงErrors
Returns a description when the file is unreadable, malformed, empty, or holds several credentials with none selected.