-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Add partial support for SSH known hosts markers #11635
Merged
Merged
Commits on Jan 27, 2023
-
Add partial support for SSH known hosts markers
The SSH `known_hosts` file parsing in Cargo did not previously support markers. Markers are modifiers on the lines (`@cert-authority` and `@revoked`) which denote special behavior for the details on that line. Lines were skipped entirely. This silent skipping of marker lines can be confusing to a user, who sees that their command line Git/SSH client works for some repository, but Cargo reports that no host key is found. This change adds support for the `@revoked` marker. This marker denotes that a key should be rejected outright. It is of limited use without `@cert-authority` marker support. However, if it is present in a user's `known_hosts` file, then Cargo definitely shouldn't accept that key and probably shouldn't suggest that the user add it to their `known_hosts` either. The change also adds support for detecting `@cert-authority` markers in `known_hosts` files. These lines cannot yet be used for host key verification, but if one is found for a matching host, the user will be informed that Cargo doesn't support `@cert-authority` markers in the error message. Additionally, the user will be advised to use the `net.git-fetch-with-cli` config option to use the command line git client for fetching crates from Git. Refs: rust-lang#11577
Configuration menu - View commit details
-
Copy full SHA for fc2cb00 - Browse repository at this point
Copy the full SHA fc2cb00View commit details -
Configuration menu - View commit details
-
Copy full SHA for 605506a - Browse repository at this point
Copy the full SHA 605506aView commit details
Commits on Jan 30, 2023
-
Apply suggestions from code review
Co-authored-by: Eric Huss <eric@huss.org>
Configuration menu - View commit details
-
Copy full SHA for a871a90 - Browse repository at this point
Copy the full SHA a871a90View commit details
Commits on Jan 31, 2023
-
Fix host file checking to not return success until all lines have bee…
…n processed Since a @Revoked line might deny access to a key which would otherwise be accepted, we need to process all lines before we decide that a host key should be accepted.
Configuration menu - View commit details
-
Copy full SHA for 26e08ab - Browse repository at this point
Copy the full SHA 26e08abView commit details -
Merge branch 'ssh-known-hosts-markers' of github.com:hds/cargo into s…
…sh-known-hosts-markers
Configuration menu - View commit details
-
Copy full SHA for 3cecc8e - Browse repository at this point
Copy the full SHA 3cecc8eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7a6ff7f - Browse repository at this point
Copy the full SHA 7a6ff7fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0acf2bf - Browse repository at this point
Copy the full SHA 0acf2bfView commit details
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.