Skip to content

Commit 35e82eb

Browse files
committed
Auto merge of #10248 - ehuss:windows-ssh-agent, r=Eh2406
Update docs for windows ssh-agent. This updates the documentation for SSH authentication using Windows and ssh-agent. Per #10237 and rust-lang/rust#92374, Cargo now supports ssh-agent on Windows. I'm about 80% sure this information is correct based on my reading of the code and testing. The ssh-agent that is part of mingw (or git-for-windows) uses emulated sockets, which are not compatible with traditional Windows-style named pipes.
2 parents 68ea4c0 + 6c69afa commit 35e82eb

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

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

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,14 @@ username/password.
4141
SSH authentication requires `ssh-agent` to be running to acquire the SSH key.
4242
Make sure the appropriate environment variables are set up (`SSH_AUTH_SOCK` on
4343
most Unix-like systems), and that the correct keys are added (with `ssh-add`).
44-
Windows uses Pageant for SSH authentication.
44+
45+
Windows can use Pageant (part of [PuTTY]) or `ssh-agent`.
46+
To use `ssh-agent`, Cargo needs to use the OpenSSH that is distributed as part
47+
of Windows, as Cargo does not support the simulated Unix-domain sockets used
48+
by MinGW or Cygwin.
49+
More information about installing with Windows can be found at the [Microsoft
50+
installation documentation] and the page on [key management] has instructions
51+
on how to start `ssh-agent` and to add keys.
4552

4653
> **Note:** Cargo does not support git's shorthand SSH URLs like
4754
> `[email protected]:user/repo.git`. Use a full SSH URL like
@@ -54,3 +61,6 @@ Windows uses Pageant for SSH authentication.
5461
[`credential.helper`]: https://git-scm.com/book/en/v2/Git-Tools-Credential-Storage
5562
[`net.git-fetch-with-cli`]: ../reference/config.md#netgit-fetch-with-cli
5663
[GCM]: https://github.com/microsoft/Git-Credential-Manager-Core/
64+
[PuTTY]: https://www.chiark.greenend.org.uk/~sgtatham/putty/
65+
[Microsoft installation documentation]: https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse
66+
[key management]: https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_keymanagement

0 commit comments

Comments
 (0)