-
Notifications
You must be signed in to change notification settings - Fork 383
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
1 parent
2619200
commit da02eea
Showing
2 changed files
with
13 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters