ok/jj
1
0
Fork 0
forked from mirrors/jj
jj/lib
Martin von Zweigbergk c752b43db1 git: only try to use ssh-agent once per connection
As reported in #1970, SSH authentication would sometimes run into a
loop where it repeatedly tries to use ssh-agent for authentication
without making progess. The problem can be reproduced by simply
removing `$SSH_AUTH_KEY` from your environment (and not having a Git
credentials helper configured, I think).

This seems to be a bug introduced by b104f8e154c21. That commit meant
to make it so we attempt to use ssh-agent and fall back to using
(password-less) keys after that. The problem is that
`git2::Cred::ssh_key_from_agent()` just returns an object that will be
used later for looking up the credentials from ssh-agent, so the call
will not fail because ssh-agent is not reachable.

This commit attempts to fix the problem by having the credentials
callback attempt to use ssh-agent only once.
2023-08-08 07:41:13 +00:00
..
benches cargo: rename crates from jujutsu/jujutsu-lib to jj-cli/jj-lib 2023-07-09 06:40:43 +02:00
gen-protos cargo: unify a lot of crate metadata in the workspace 2023-08-06 16:44:33 -05:00
src git: only try to use ssh-agent once per connection 2023-08-08 07:41:13 +00:00
tests conflicts: move Merge<T> to merge module 2023-08-06 22:08:09 +00:00
testutils cargo: unify a lot of crate metadata in the workspace 2023-08-06 16:44:33 -05:00
Cargo.toml cargo: unify a lot of crate metadata in the workspace 2023-08-06 16:44:33 -05:00