diff --git a/Cargo.lock b/Cargo.lock index f73e70088b..f0de567b91 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2386,7 +2386,6 @@ source = "git+https://github.com/bnjmnt4n/git2-rs.git?rev=8614b5d#8614b5de5245b0 dependencies = [ "cc", "libc", - "libssh2-sys", "libz-sys", "openssl-sys", "pkg-config", @@ -2403,20 +2402,6 @@ dependencies = [ "redox_syscall", ] -[[package]] -name = "libssh2-sys" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dc8a030b787e2119a731f1951d6a773e2280c660f8ec4b0f5e1505a386e71ee" -dependencies = [ - "cc", - "libc", - "libz-sys", - "openssl-sys", - "pkg-config", - "vcpkg", -] - [[package]] name = "libz-ng-sys" version = "1.1.16" diff --git a/Cargo.toml b/Cargo.toml index 67166beab1..880f89676e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -46,7 +46,9 @@ dirs = "5.0.1" dunce = "1.0.5" either = "1.13.0" futures = "0.3.31" -git2 = { git = "https://github.com/bnjmnt4n/git2-rs.git", rev = "8614b5d", features = [ +git2 = { git = "https://github.com/bnjmnt4n/git2-rs.git", rev = "8614b5d", default-features = false, features = [ + "https", + "ssh-openssh", # Do *not* disable this feature even if you'd like dynamic linking. Instead, # set the environment variable `LIBGIT2_NO_VENDOR=1` if dynamic linking must # be used (this will override the Cargo feature), and allow static linking diff --git a/cli/src/git_util.rs b/cli/src/git_util.rs index dfa58f032d..3dd170643b 100644 --- a/cli/src/git_util.rs +++ b/cli/src/git_util.rs @@ -64,8 +64,8 @@ pub fn map_git_error(err: git2::Error) -> CommandError { successfully load certificates. Try setting it to the path of a directory that \ contains a `.ssh` directory." } else { - "Jujutsu uses libssh2, which doesn't respect ~/.ssh/config. Does `ssh -F \ - /dev/null` to the host work?" + "There was an error creating an SSH connection. Does `ssh -F /dev/null` to the \ + host work?" }; user_error_with_hint(err, hint) diff --git a/flake.nix b/flake.nix index f4298f0df0..0b5afcda24 100644 --- a/flake.nix +++ b/flake.nix @@ -64,7 +64,7 @@ [ openssl libgit2 - libssh2 + openssh ] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security @@ -79,7 +79,6 @@ ]; env = { - LIBSSH2_SYS_USE_PKG_CONFIG = "1"; RUST_BACKTRACE = 1; }; in {