Skip to content

Commit 73df4fb

Browse files
committed
Use git command to fetch repositories instead of libgit2 for robust SSH support
1 parent d07b587 commit 73df4fb

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

crates/uv-git/src/git.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1057,7 +1057,11 @@ fn fetch_with_cli(
10571057
.env_remove("GIT_OBJECT_DIRECTORY")
10581058
.env_remove("GIT_ALTERNATE_OBJECT_DIRECTORIES")
10591059
.cwd(repo.path());
1060-
cmd.exec()?;
1060+
1061+
// We capture the output to avoid streaming it to the user's console during clones.
1062+
// The required `on...line` callbacks currently do nothing.
1063+
// The output appears to be included in error messages by default.
1064+
cmd.exec_with_streaming(&mut |_| Ok(()), &mut |_| Ok(()), true)?;
10611065
Ok(())
10621066
}
10631067

crates/uv-git/src/source.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ impl GitSource {
3333
Self {
3434
git,
3535
client: Client::new(),
36-
strategy: FetchStrategy::Libgit2,
36+
strategy: FetchStrategy::Cli,
3737
cache: cache.into(),
3838
reporter: None,
3939
}

0 commit comments

Comments
 (0)