Skip to content
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

Since configuring Git to use Windows SSH, SSH commands are broken #5277

Open
1 task done
rhaglennydd opened this issue Nov 25, 2024 · 4 comments
Open
1 task done

Since configuring Git to use Windows SSH, SSH commands are broken #5277

rhaglennydd opened this issue Nov 25, 2024 · 4 comments

Comments

@rhaglennydd
Copy link

  • I was not able to find an open or closed issue matching what I'm seeing

Setup

  • Which version of Git for Windows are you using? Is it 32-bit or 64-bit?
    2.47.1.windows.1, 64-bit
$ git --version --build-options

git version 2.47.1.windows.1
cpu: x86_64
built from commit: 2cd22437f64229935dc564db969cbcbfed5e9045
sizeof-long: 4
sizeof-size_t: 8
shell-path: D:/git-sdk-64-build-installers/usr/bin/sh
feature: fsmonitor--daemon
libcurl: 8.11.0
OpenSSL: OpenSSL 3.2.3 3 Sep 2024
zlib: 1.3.1
  • Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
    Windows 11, 64-bit
$ cmd.exe /c ver

Microsoft Windows [Version 10.0.22631.4460]
  • What options did you set as part of the installation? Or did you choose the
    defaults?
# One of the following:
> type "C:\Program Files\Git\etc\install-options.txt"
> type "C:\Program Files (x86)\Git\etc\install-options.txt"
> type "%USERPROFILE%\AppData\Local\Programs\Git\etc\install-options.txt"
> type "$env:USERPROFILE\AppData\Local\Programs\Git\etc\install-options.txt"
$ cat /etc/install-options.txt

Editor Option: VIM
Custom Editor Path:
Default Branch Option: main
Path Option: CmdTools
SSH Option: ExternalOpenSSH
Tortoise Option: false
CURL Option: OpenSSL
CRLF Option: LFOnly
Bash Terminal Option: MinTTY
Git Pull Behavior Option: Merge
Use Credential Manager: Enabled
Performance Tweaks FSCache: Enabled
Enable Symlinks: Enabled
Enable FSMonitor: Disabled
  • Any other interesting things about your environment that might be related
    to the issue you're seeing?

Details

  • Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other

Windows Terminal

ssh-add
ssh-add -l
  • What did you expect to occur after running these commands?

After running ssh-add, I expected to be prompted for my key password and for it to add my key. After running ssh-add -l, I expected to see my key listed.

  • What actually happened instead?

After running ssh-add and entering my key password, it responds Could not add identity "C:\Users\me/.ssh/id_ed25519": invalid format. After running ssh-add -l, it responds error fetching identities: invalid format. The key files are definitely there. It should be noted that when I run these commands in the Windows Command Prompt they are successful. I confirmed that ssh-add refers to the same program in both environments (i.e., C:\Windows\System32\OpenSSH\ssh-add.exe). The only thing I can think of is that the key was generated before I switched to using Windows SSH.

  • If the problem was occurring with a specific repository, can you provide the
    URL to that repository to help us with testing?
@dscho
Copy link
Member

dscho commented Nov 26, 2024

Maybe the solution is as easy as appending a Line Feed character to that file?

@rhaglennydd
Copy link
Author

Maybe the solution is as easy as appending a Line Feed character to that file?

Tried that, didn't make a difference.

@dscho
Copy link
Member

dscho commented Nov 26, 2024

What does file ~/.ssh/id_ed25519 print? For me, it prints "c/Users/me/.ssh/id_ed25519: OpenSSH private key".

@rhaglennydd
Copy link
Author

Yeah, that's what I get.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants