Skip to content

Commit

Permalink
Add support for loading plaintext passwords from credential helper. Ref
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Oct 27, 2022
1 parent 78f2de2 commit 1f0e9a2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/src/git.rs
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,12 @@ fn create_remote_callbacks(progress_cb: Option<&mut dyn FnMut(&Progress)>) -> Re
}
}
}
if allowed_types.contains(git2::CredentialType::USER_PASS_PLAINTEXT) {
let Ok(config) = git2::Config::open_default();
if let Ok(cred) = git2::Cred::credential_helper(config, _url) {
return cred;
}
}
git2::Cred::default()
});
callbacks
Expand Down

0 comments on commit 1f0e9a2

Please sign in to comment.