Skip to content

Commit

Permalink
git: enable libgit2's OpenSSH feature
Browse files Browse the repository at this point in the history
  • Loading branch information
bnjmnt4n committed Jan 23, 2025
1 parent 7c2fe4c commit e54d2dc
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 20 deletions.
15 changes: 0 additions & 15 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions cli/src/git_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 1 addition & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
[
openssl
libgit2
libssh2
openssh
]
++ lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.Security
Expand All @@ -79,7 +79,6 @@
];

env = {
LIBSSH2_SYS_USE_PKG_CONFIG = "1";
RUST_BACKTRACE = 1;
};
in {
Expand Down

0 comments on commit e54d2dc

Please sign in to comment.