Skip to content

Commit f460ac2

Browse files
committed
add documentation that SSH markers aren't supported
Cargo doesn't support the `@cert-authority` or `@revoked` markers in SSH Known Hosts files. The lines are silently ignored. If a user is depending on these lines to connect to a Git server via SSH, then their command line Git client will work, but Cargo will fail with an error that the host key doesn't match. This change adds a note explaining that Cargo doesn't support these markers and suggests that the user change their cargo configuration to fetch with the CLI client instead. Refs: rust-lang#11577
1 parent 7b4737f commit f460ac2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/doc/src/appendix/git-authentication.md

+5
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,11 @@ publish their fingerprints on the web; for example GitHub posts theirs at
8181
Cargo comes with the host keys for [github.com](https://github.com) built-in.
8282
If those ever change, you can add the new keys to the config or known_hosts file.
8383

84+
> **Note:** Cargo doesn't support the `@cert-authority` or `@revoked`
85+
> markers in `known_hosts` files. To make use of this functionality, use
86+
> [`net.git-fetch-with-cli`]. This is also a good tip if Cargo's SSH client
87+
> isn't behaving the way you expect it to.
88+
8489
[`credential.helper`]: https://git-scm.com/book/en/v2/Git-Tools-Credential-Storage
8590
[`net.git-fetch-with-cli`]: ../reference/config.md#netgit-fetch-with-cli
8691
[`net.ssh.known-hosts`]: ../reference/config.md#netsshknown-hosts

0 commit comments

Comments
 (0)