Skip to content
This repository has been archived by the owner on Jul 22, 2022. It is now read-only.

Stopped working Pageant query error 'WM_COPYDATA failed' #25

Open
MTRNord opened this issue Aug 22, 2021 · 14 comments
Open

Stopped working Pageant query error 'WM_COPYDATA failed' #25

MTRNord opened this issue Aug 22, 2021 · 14 comments

Comments

@MTRNord
Copy link

MTRNord commented Aug 22, 2021

Describe the bug
The gpg side of things is working fine. however I keep getting ssh-add -L: connection refused.

in the verbose log I am seeing this:

2021/08/22 22:31:19 Starting exe
2021/08/22 22:31:19 Reading length: 1
2021/08/22 22:31:19 Querying pageant
2021/08/22 22:31:19 Pageant query error 'WM_COPYDATA failed'
2021/08/22 22:31:19 io.ReadFull length error 'EOF

To Reproduce
Steps to reproduce the behavior:
Unsure how. I just installed it normally and ran ssh-add -L

Expected behavior
ssh-add -L should show me my key just like the winssh one does

Desktop (please complete the following information):

  • OS: Windows 11
  • WSL2: Ubuntu Community preview with wslg enabled.
@tobiaskohlbau
Copy link
Collaborator

Is your setup to use putty for SSH-Keys?
If yes please see #23 if you're using putty 0.75.

@MTRNord
Copy link
Author

MTRNord commented Aug 23, 2021

Is your setup to use putty for SSH-Keys?
If yes please see #23 if you're using putty 0.75.

No putty isnt used as far as I know. Only Chance would be a long forgoten install. I will double check that.

@MTRNord
Copy link
Author

MTRNord commented Aug 23, 2021

Just checked. Putty is installed but it is 0.74. Would uninstalling it likely do the trick?

@tobiaskohlbau
Copy link
Collaborator

tobiaskohlbau commented Aug 23, 2021

I'm quoting from #24 to confirm another theory of mine:

I'm using the gpg-agent with putty support as well on my Windows 11 machine. Is your machine an updated one or a clean install? Maybe it's only happening if it's a clean install.

I just updated my gpg4win version to confirm it's not a regression by the latest gpg4win version. Did you check that the putty-agent support is still enabled within gpg?

Edit:
I'm currently using the following gpg config.

###+++--- GPGConf ---+++###
enable-ssh-support
enable-putty-support
###+++--- GPGConf ---+++### 10/14/19 18:13:30 W. Europe Daylight Time
# GPGConf edited this configuration file.
# It will disable options before this marked block, but it will
# never change anything below these lines.

@tobiaskohlbau
Copy link
Collaborator

Just checked. Putty is installed but it is 0.74. Would uninstalling it likely do the trick?

Shouldn't make a difference if the pageant is not running. Maybe it's worth uninstalling to confirm it's not causing troubles.

@MTRNord
Copy link
Author

MTRNord commented Aug 23, 2021

My gpg-agent.conf on windows currently looks like this:

enable-ssh-support
enable-putty-support

I also removed putty now. But it seems the issue stays. Even after doing the steps in troubleshooting and restarting wsl2 :)

@MTRNord
Copy link
Author

MTRNord commented Aug 23, 2021

PS: gpg --card-status does show the card just fine on wsl2

@tobiaskohlbau
Copy link
Collaborator

tobiaskohlbau commented Aug 24, 2021

The communication for GPG and SSH is a completely different. GPG is using the named pipe from the GPG-Agent whereas the SSH-Support uses the communication with the window handle from a window called pageant. Putty started to implement a named pipe communication in version 0.75.

Could you tell me if your windows 11 is a clean install or an upgrade?

@MTRNord
Copy link
Author

MTRNord commented Aug 24, 2021

Could you tell me if your windows 11 is a clean install or an upgrade?

It is an upgrade from windows 10.

@tobiaskohlbau
Copy link
Collaborator

Can you extract your gpg4win version? By the looks of your error the wsl2-ssh-pageant utility is unable to send the data to the pageant window handle. The Windows docs state that the only way this can fail is, when the receiver is unable to process the data.

If the receiving application processes this message, it should return TRUE; otherwise, it should return FALSE.

@MTRNord
Copy link
Author

MTRNord commented Aug 24, 2021

Gpg4win version is 3.1.15

@tobiaskohlbau
Copy link
Collaborator

Gpg4win version is 3.1.15

Thanks for the information. I just replaced my gpg version with 3.1.15 and can't reproduce the issue. Can you verify that some windows application using the gpg-ssh-pageant support is working? For e.g. putty itself?

@MTRNord
Copy link
Author

MTRNord commented Aug 25, 2021

Gpg4win version is 3.1.15

Thanks for the information. I just replaced my gpg version with 3.1.15 and can't reproduce the issue. Can you verify that some windows application using the gpg-ssh-pageant support is working? For e.g. putty itself?

Hm how do I test that? :)

@tobiaskohlbau
Copy link
Collaborator

Gpg4win version is 3.1.15

Thanks for the information. I just replaced my gpg version with 3.1.15 and can't reproduce the issue. Can you verify that some windows application using the gpg-ssh-pageant support is working? For e.g. putty itself?

Hm how do I test that? :)

You could use putty or antoher putty compatible app for that. I've always used putty for a simple test case.

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

No branches or pull requests

2 participants