Skip to content

Commit 1893eaa

Browse files
authored
Add Windows troubleshooting for SSH agent conflicts
Add guidance for resolving passphrase prompts caused by Git for Windows using a different SSH client than the Windows ssh-agent.
1 parent 8db8d94 commit 1893eaa

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

content/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,18 @@ Before adding a new SSH key to the ssh-agent to manage your keys, you should hav
162162
```powershell
163163
ssh-add c:/Users/YOU/.ssh/id_ed25519
164164
```
165+
> [!TIP]
166+
> **Troubleshooting SSH agent conflicts in Windows**
167+
>
168+
> In Windows environments, the native Windows OpenSSH implementation and the one included with Git for Windows (based on MSYS2/Bash) can coexist.
169+
>
170+
> If you configure and save your passphrases in the Windows agent using PowerShell, Git may still prompt you for your passphrase during operations like `git push`. This can happen when Git for Windows uses its bundled `ssh.exe` (from MSYS2) instead of the Windows system OpenSSH client, and therefore can't talk to the Windows `ssh-agent` service.
171+
>
172+
> To ensure Git uses the agent where you've stored your credentials, force Git to use the system's SSH binary by running:
173+
>
174+
> ```powershell
175+
> git config --global core.sshCommand "C:/Windows/System32/OpenSSH/ssh.exe"
176+
> ```
165177

166178
{% data reusables.ssh.add-public-key-to-github %}
167179

0 commit comments

Comments
 (0)