authenticate properly in repo clone

This commit is contained in:
Cyborus 2024-05-18 12:20:30 -04:00
parent b93717a3dc
commit 956415b55b
No known key found for this signature in database

View file

@ -482,14 +482,18 @@ impl RepoCommand {
..
} = *crate::special_render();
let auth = auth_git2::GitAuthenticator::new();
let git_config = git2::Config::open_default()?;
let mut options = git2::FetchOptions::new();
let mut callbacks = git2::RemoteCallbacks::new();
callbacks.credentials(auth.credentials(&git_config));
if colors {
print!("{hide_cursor}");
print!(" Preparing...");
let _ = std::io::stdout().flush();
let mut callbacks = git2::RemoteCallbacks::new();
callbacks.transfer_progress(|progress| {
print!("{clear_line}\r");
if progress.received_objects() == progress.total_objects() {