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

Doesn't work in Win11 #13

Open
nezorflame opened this issue Oct 3, 2021 · 8 comments
Open

Doesn't work in Win11 #13

nezorflame opened this issue Oct 3, 2021 · 8 comments

Comments

@nezorflame
Copy link
Contributor

nezorflame commented Oct 3, 2021

Hi! I'm currently unable to use GPG through the bridge.

Basic install of the script with only -d Ubuntu flag (so GPG was installed by the script), fresh Ubuntu install.

After restarting WSL, I get the next output:

Failed to connect to bus: No such file or directory
mkdir: cannot create directory ‘/run/user/1000’: Permission denied
2021/10/03 23:35:51 socat[70] E bind(5, {AF=1 "/run/user/1000/gnupg/S.gpg-agent"}, 34): No such file or directory
> 

It partially looks like this error which I got during the previous run under Win10.

@lucyllewy
Copy link
Owner

Can you re-run the installation using a fresh copy of the install.ps1 script (I've just pushed some changes)? The files as of now should wait for systemd more reliably so that you aren't logged into the namespace "too early", which is likely the issue here.

There is another issue with the GPG support in that it only works in the first shell you open after restarting the distro. I haven't worked out why it fails on subsequent launches yet.

@nezorflame
Copy link
Contributor Author

Waiting for systemd to finish booting
..
Systemd is ready. Logging in.
Welcome to Ubuntu 20.04 LTS (GNU/Linux 5.10.43.3-microsoft-standard-WSL2 x86_64)

🎉

@nezorflame
Copy link
Contributor Author

nezorflame commented Oct 4, 2021

Right, while this works, actually I have problems with Docker and SSH now.
ssh-agent seems to detect the keys from Windows only on the first session, other sessions give this error:

> ssh-add -l
error fetching identities: communication with agent failed

Docker just doesn't detect that it's running, although integration is enabled in the settings:

> docker version
The command 'docker' could not be found in this WSL 2 distro.
...

Any idea what causes this?

@nezorflame
Copy link
Contributor Author

Quick update - I've reset Ubuntu and tried again on a clean system.
Disabled and enabled Docker WSL integration, returned to WSL - docker works, but ssh-add -l shows the same error.

@nezorflame
Copy link
Contributor Author

nezorflame commented Oct 4, 2021

After shutting down with wsl --shutdown ssh-add -l works again:

Waiting for systemd to finish booting
..
Systemd is ready. Logging in.
> ssh-add -l
*my keys are shown*

Error arrives again after closing the current tab and opening a new one.

As for the Docker - it warns that it was shut down, restarts, but doesn't work with the same not found error.

So yeah, so far it works unreliably.

@lucyllewy
Copy link
Owner

thanks for the updates. I've seen this behaviour of ssh-agent and gpg-agents both failing in subsequent sessions where they work fine in the very first session. I'm unsure what's up but I think it's something to do with the WSL interop feature not allowing cross-session calls - i.e. your second session accessing the socat running under the first session, even if you've closed your first session.

@nezorflame
Copy link
Contributor Author

nezorflame commented Oct 5, 2021

OK, should we create a separate issue for that then? Or just leave it as is here (renaming the title)?

@nezorflame
Copy link
Contributor Author

Anything on this?

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