Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSH: Use OpenSSH instead of libssh2 for authentication with Git hosts #3191

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 4 additions & 21 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 = { version = "0.19.0", 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/command_error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -605,8 +605,8 @@ jj currently does not support partial clones. To use jj with this repository, tr
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
6 changes: 4 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
[
openssl
libgit2
libssh2
openssh
]
++ lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.Security
Expand All @@ -95,7 +95,6 @@
];

env = {
LIBSSH2_SYS_USE_PKG_CONFIG = "1";
RUST_BACKTRACE = 1;
};
in {
Expand All @@ -118,6 +117,9 @@
];

cargoLock.lockFile = ./Cargo.lock;
cargoLock.outputHashes = {
"git2-0.20.0" = "sha256-38oCCouFCwmfaORKMHKsKslaf7xcqSsrBOFWX9/hwIw=";
};
nativeBuildInputs = nativeBuildInputs ++ [pkgs.installShellFiles];
inherit buildInputs nativeCheckInputs;

Expand Down