Introduce SSH support thru ssh-agent#177
Open
moo1210 wants to merge 2 commits intoUpliftGames:mainfrom
Open
Conversation
OverHash
reviewed
Oct 4, 2023
|
|
||
| move |url, username, allowed_types| { | ||
| if allowed_types.contains(CredentialType::SSH_KEY) { | ||
| let username = username.unwrap(); |
There was a problem hiding this comment.
We probably shouldn't unwrap here, but rather return some sort of error.
Author
There was a problem hiding this comment.
Cargo's implementation doesn't, having a comment saying it doesn't get called if there is no username as the reasoning. So, I just followed Cargo's implementation since that's what all of Wally's was based on, to begin with.
https://github.com/rust-lang/cargo/blob/79b397d72c557eb6444a2ba0dc00a211a226a35a/src/cargo/sources/git/utils.rs#L637-L646
|
Looks like rust-lang/git2-rs#935 (merged into git2 |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Currently, Wally doesn't support ssh-agent for authentication, so SSH Git URLs aren't really usable. Additionally, git2 has a bug on the current version that Wally was using that would cause an
error loading known_hosts: ; class=Ssh (23)on Windows, so I also bumped that to a newer version.