Can't paste SSH password into Git? #21447

Closed
opened 2026-01-31 07:44:53 +00:00 by claunia · 3 comments
Owner

Originally created by @PC-Admin on GitHub (Mar 28, 2024).

Windows Terminal version

1.20.10822.0

Windows build number

10.0.19045.0

Other Software

PS C:\Users\col592\Repos> ssh -V
OpenSSH_for_Windows_9.5p1, LibreSSL 3.8.2

PS C:\Users\col592\Repos> git --version
git version 2.44.0.windows.1

Steps to reproduce

  1. Install Windows Terminal (1.19.10573.0) or the latest preview of Windows Terminal. (1.20.10822.0) Both are effected.

  2. Install Git.

  3. Using Powershell in Windows Terminal, try to git clone a repository:

PS C:\Users\col592\Repos> git clone ssh://git@bitbucket.company.org.au:7999/aos/project-ansible.git
Cloning into 'project-ansible'...
Enter passphrase for key '/c/Users/col592/.ssh/mike_ed25519':
Enter passphrase for key '/c/Users/col592/.ssh/mike_ed25519':
Enter passphrase for key '/c/Users/col592/.ssh/mike_ed25519':
git@bitbucket.company.org.au: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
  1. Sit there trying to use Ctrl+V, Ctrl+Shift+V and Right click, watch it fail consistently to read your SSH keys password.

Expected Behavior

To be able to simply enter a password into this prompt and have a git clone command actually work.

It does work inside the integrated terminal in Visual Studio:

PS C:\Users\col592\Repos> git clone ssh://git@bitbucket.pawsey.org.au:7999/aos/project-ansible.git
Cloning into 'project-ansible'...
Enter passphrase for key '/c/Users/col592/.ssh/mike_ed25519': 
warning: You appear to have cloned an empty repository.

It also works fine on a remote Ubuntu 22 machine that's being SSH'd to via Powershell/Windows Terminal:

mcollins1@maas-rackd-01:~/repos$ git clone ssh://git@bitbucket.pawsey.org.au:7999/aos/project-ansible.git
Cloning into 'project-ansible'...
warning: You appear to have cloned an empty repository.

Actual Behavior

See Step 3, there's no way to get it going...

I figured maybe I could use WSL to get around this, but I experience a very similar error when trying to configure SSH agent:

mcollins1@wsl:~$ ssh-add ~/.ssh/mike_ed25519
Enter passphrase for /home/mcollins1/.ssh/mike_ed25519:
Bad passphrase, try again for /home/mcollins1/.ssh/mike_ed25519:
Bad passphrase, try again for /home/mcollins1/.ssh/mike_ed25519:
Bad passphrase, try again for /home/mcollins1/.ssh/mike_ed25519:
Bad passphrase, try again for /home/mcollins1/.ssh/mike_ed25519:
Bad passphrase, try again for /home/mcollins1/.ssh/mike_ed25519:
Bad passphrase, try again for /home/mcollins1/.ssh/mike_ed25519:
Bad passphrase, try again for /home/mcollins1/.ssh/mike_ed25519:

Desperate for a fix, this stuff is so reliable and easy on Ubuntu but I'm stuck with a Windows machine for now... :S

Originally created by @PC-Admin on GitHub (Mar 28, 2024). ### Windows Terminal version 1.20.10822.0 ### Windows build number 10.0.19045.0 ### Other Software PS C:\Users\col592\Repos> ssh -V OpenSSH_for_Windows_9.5p1, LibreSSL 3.8.2 PS C:\Users\col592\Repos> git --version git version 2.44.0.windows.1 ### Steps to reproduce 1) Install Windows Terminal (1.19.10573.0) or the latest preview of Windows Terminal. (1.20.10822.0) Both are effected. 2) Install Git. 3) Using Powershell in Windows Terminal, try to git clone a repository: ``` PS C:\Users\col592\Repos> git clone ssh://git@bitbucket.company.org.au:7999/aos/project-ansible.git Cloning into 'project-ansible'... Enter passphrase for key '/c/Users/col592/.ssh/mike_ed25519': Enter passphrase for key '/c/Users/col592/.ssh/mike_ed25519': Enter passphrase for key '/c/Users/col592/.ssh/mike_ed25519': git@bitbucket.company.org.au: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. ``` 4) Sit there trying to use Ctrl+V, Ctrl+Shift+V and Right click, watch it fail consistently to read your SSH keys password. ### Expected Behavior To be able to simply enter a password into this prompt and have a git clone command actually work. It does work inside the integrated terminal in Visual Studio: ``` PS C:\Users\col592\Repos> git clone ssh://git@bitbucket.pawsey.org.au:7999/aos/project-ansible.git Cloning into 'project-ansible'... Enter passphrase for key '/c/Users/col592/.ssh/mike_ed25519': warning: You appear to have cloned an empty repository. ``` It also works fine on a remote Ubuntu 22 machine that's being SSH'd to via Powershell/Windows Terminal: ``` mcollins1@maas-rackd-01:~/repos$ git clone ssh://git@bitbucket.pawsey.org.au:7999/aos/project-ansible.git Cloning into 'project-ansible'... warning: You appear to have cloned an empty repository. ``` ### Actual Behavior See Step 3, there's no way to get it going... I figured maybe I could use WSL to get around this, but I experience a very similar error when trying to configure SSH agent: ``` mcollins1@wsl:~$ ssh-add ~/.ssh/mike_ed25519 Enter passphrase for /home/mcollins1/.ssh/mike_ed25519: Bad passphrase, try again for /home/mcollins1/.ssh/mike_ed25519: Bad passphrase, try again for /home/mcollins1/.ssh/mike_ed25519: Bad passphrase, try again for /home/mcollins1/.ssh/mike_ed25519: Bad passphrase, try again for /home/mcollins1/.ssh/mike_ed25519: Bad passphrase, try again for /home/mcollins1/.ssh/mike_ed25519: Bad passphrase, try again for /home/mcollins1/.ssh/mike_ed25519: Bad passphrase, try again for /home/mcollins1/.ssh/mike_ed25519: ``` Desperate for a fix, this stuff is so reliable and easy on Ubuntu but I'm stuck with a Windows machine for now... :S
claunia added the Needs-TriageIssue-BugNeeds-Attention labels 2026-01-31 07:44:54 +00:00
Author
Owner

@github-actions[bot] commented on GitHub (Mar 28, 2024):

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@github-actions[bot] commented on GitHub (Mar 28, 2024): Hi I'm an AI powered bot that finds similar issues based off the issue title. Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you! ### Closed similar issues: - [WT and git bash ssh-add not accepting passphrase (#7067)](https://github.com/microsoft/terminal/issues/7067), similarity score: 0.81 - [[ISSUE WITH WSL NOT WINDOWS TERMINAL] Pasting from clipboard broken when running ssh-add.exe 2> /dev/null (#14790)](https://github.com/microsoft/terminal/issues/14790), similarity score: 0.79 - [Cannot type in terminal when asked about authentication when cloning git repo (#13772)](https://github.com/microsoft/terminal/issues/13772), similarity score: 0.78 - [Cannot paste text into `git` input (#3533)](https://github.com/microsoft/terminal/issues/3533), similarity score: 0.77 > Note: You can give me feedback by thumbs upping or thumbs downing this comment.
Author
Owner

@zadjii-msft commented on GitHub (Mar 29, 2024):

From another thread:

Can you reproduce this using a test key with a fake password (because I'm going to ask you to capture an input log, and I don't want your actual password!), would you mind generating an input log/?

generating an input log
  • Set the following values at the top level of Terminal settings
"debugFeatures": true,
  • Open a new tab in Terminal while holding down Left Alt and Right Alt
    • When you do this, you should get two panes, one of which contains VT sequences. Like this:

image

  • Repro the issue
  • Copy/paste the log out of the right pane, and perhaps include a screenshot (because copying it will strip the coloring)
@zadjii-msft commented on GitHub (Mar 29, 2024): From another thread: Can you reproduce this using a test key with a fake password (because I'm going to ask you to capture an input log, and I don't want your actual password!), would you mind generating an input log/? <details> <summary>generating an input log</summary> * Set the following values at the top level of Terminal settings ``` "debugFeatures": true, ``` * Open a new tab in Terminal while holding down <kbd>Left Alt</kbd> **and** <kbd>Right Alt</kbd> * When you do this, you should get two panes, one of which contains VT sequences. Like this: ![image](https://user-images.githubusercontent.com/189190/88598033-5bbd8f00-d01d-11ea-8e34-a8ad26cb10f1.png) * Repro the issue * Copy/paste the log out of the right pane, and perhaps include a screenshot (because copying it will strip the coloring) </details>
Author
Owner

@PC-Admin commented on GitHub (Apr 2, 2024):

Scratch that, despite using a password manager my SSH keys password has somehow changed...

@PC-Admin commented on GitHub (Apr 2, 2024): Scratch that, despite using a password manager my SSH keys password has somehow changed...
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#21447