Use auth-git2
crate for git authentication.
#40
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
auth-git2
crate supports more methods of authentication.It supports: the ssh agent, the git credential helpers, more standard key locations in
$HOME/.ssh
(not just rsa), the askpass helper and falling back to prompting on the terminal. It can also detect encrypted OpenSSH keys by itself, so the user doesn't have to say--passphrase-needed
.Note that I'm also the author of the
auth-git2
crate. I wrote it last week to be able to use it here :)Additionally, this PR changes path-name expansion to work per path component instead of on the whole path at once. This allows to remove the workaround with string replacement on windows, and it means windows and unix share the same implementation.
The PR also simplifies conversion of parameters to values as a preparation of more enhancements I have planned :)