Code Monkey home page Code Monkey logo

wsl-ssh-agent's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wsl-ssh-agent's Issues

SSH agent forwarding to WSL2

Hello @rupor-github ,

I am partially able to use the OpenSSH key (created in Windows) inside my WSL2 (Ubuntu 22.04). I have below setup:

  1. Using Windows 11 (OS build 22621.1702) with OpenSSH enabled and running without any issues and WSL2 with Ubuntu 22.04
  2. In WSL2 copied the wsl-ssh-agent-relay file to ${HOME}/.local/bin/ and added below lines to ~/.bashrc as mentioned in the README
${HOME}/.local/bin/wsl-ssh-agent-relay start
export SSH_AUTH_SOCK=${HOME}/.ssh/wsl-ssh-agent.sock
  1. Also copied npiperelay.exe from wsl-ssh-agent.zip to /mnt/c/Users/<USER>
  2. Shutdown WSL2 and restarted it. And tried to clone to Git repo (key is already added to Git). But this didn't work. I don't have wsl-ssh-agent.sock file in ${HOME}/.ssh/ but only agent.sock.
  3. ssh-add -L didn't return any keys and complained Error connecting to agent: No such file or directory. I don't know why above solution didn't work for me (please let me know if I have missed any steps)

I came across issue Error connecting to agent: No such file or directory and edited ~/.bashrc to include

export SSH_AUTH_SOCK=$HOME/.ssh/agent.sock
ss -a | grep -q $SSH_AUTH_SOCK
if [ $? -ne 0   ]; then
    rm -f $SSH_AUTH_SOCK
    ( setsid socat UNIX-LISTEN:$SSH_AUTH_SOCK,fork EXEC:"/mnt/c/test/npiperelay.exe -ei -s //./pipe/openssh-ssh-agent",nofork & ) >/dev/null 2>&1
fi

And restarted the WSL2. Now, the keys are loaded by ssh-add - L. I have similar results in WSL2 and Powershell. Also, cloning from Git works fine.
But when I try to ssh to a server (key is added to ~/.ssh/authorized_keys) I get error ssh: Could not resolve hostname example.com: Name or service not known
This works fine from Powershell.
I checked the DNS in WSL2 and it seems fine. nslookup could return the IP address.

Could you please let me know what could be the issue and how can I resolve it?

P.S: Please let me know if any info is missing here

Thanks in advance

Crash during system booting

I add this program as a autorun item into my windows. I found that wsl-ssh-agent sometimes crashes during autorun.

What may possibly lead to this crash?
Launch command: "C:\Data\Program\wsl-ssh-agent-gui.exe" -setenv -envname=WSL_AUTH_SOCK

It is compatible with gpg-connect-agent?

I run source ~/.bashrc containing:

SSHDIR="${HOME}/.ssh"
WINWSLDIR="/mnt/c/WSL"
NPIPERELAY="${WINWSLDIR}/bin/npiperelay.exe"

SSH_AUTH_SOCK="${SSHDIR}/ssh-agent.sock"

ss -a | grep -q $SSH_AUTH_SOCK
if [ $? -ne 0 ]; then
    rm -f $SSH_AUTH_SOCK
    ( setsid socat UNIX-LISTEN:$SSH_AUTH_SOCK,fork EXEC:"${NPIPERELAY} -ei -s //./pipe/openssh-ssh-agent",nofork & )
fi

then ssh-add -l:

2020/05/28 20:15:21 open //./pipe/openssh-ssh-agent: The system cannot find the file specified.
error fetching identities: communication with agent failed

Feature request: disable clipboard server?

Could we have a way to disable the clipboard functionality? From quick code inspection it seems to do nothing unless ~/.gclpr exists, but I'd be more comfortable (from a security paranoia standpoint) knowing that it was explicitly disabled.

Delay in minutes before systray icon appears after startup of the agent - and vice-versa

After starting wsl-ssh-agent.exe there is a long delay (in minutes) before systray icon appears.
That also means that the socket is not working until the icon appears. The background agent process itself starts right away.

I am testing whether it works or not simply by executing the below command:

ssh-add - < /mnt/c/Users/Romas/.ssh/id_rsa

And until the systray icon appears I am getting error of

Error connecting to agent: No such file or directory

Once agent systray icon appears, WSL's ssh-add command works as expected and asks for key password input.

Also, exiting via windows systray icon menu keeps wsl-ssh-agent-gui.exe process running for minutes.

I am on Windows 10 Pro v1909, WSL starting the tool with the below args:
wsl-ssh-agent-gui.exe -setenv -envname=WSL_AUTH_SOCK -socket e:\ssh-agent.sock

[Question] `npiperelay.exe` build

The releases of this project come with the npiperelay.exe binary already included, which is very helpful.
Should this be the same npiperelay.exe as from the upstream npiperelay repository,
or were adjustments necessary to make it work more smoothly?

Environment variable not being set

Running version 1.4 on 64-bit Windows 10 Pro Version 1909 OS Build 18363.535 and WSL version 1. The environment variable is not exported to WSL. I have tried using -setenv on its own and in combination with -envname to set a variable name. I have also tried both combinations with and without specifically specifying a socket path using -socket.

Pass name of process?

Would it be possible to pass the name of the process requesting the keys?
Currently npiperelay is shown in the tray by KeeAgent plugin/KeePass.
It would be nice if the underlying process is shown, e.g. ssh or sftp.

`-setenv` by default

Please enable this option by default. Currently the variable SSH_AUTH_SOCK (or its override) is not present within the WSL environment without setting the option. From what I understand however this is the intended purpose of wsl-ssh-agent-gui.exe. IMO having an option -nosetenv is more reasonable, if needed at all.

Issues using WSL2 with Ubuntu 22.04

Hi,

I am using WSL1 with wsl-ssh-agent-gui which works just fine.
Now I am trying to use WSL2 but it doesn't work (so I have both instances WSL1 and WSL2 and Ubuntu 22.04)
Using it for authentication to git (BitBucket)
WSL2 is configured to use the workaround with the content in ~/.bashrc

export SSH_AUTH_SOCK=$HOME/.ssh/agent.sock
ss -a | grep -q $SSH_AUTH_SOCK
if [ $? -ne 0   ]; then
    rm -f $SSH_AUTH_SOCK
    ( setsid socat UNIX-LISTEN:$SSH_AUTH_SOCK,fork EXEC:"/mnt/c/opt/wsl-ssh-agent/npiperelay.exe -ei -s //./pipe/openssh-ssh-agent",nofork & ) >/dev/null 2>&1
fi

Socat seems to start just fine.

In both WSL1 and WSL2 I get:

> ssh-add -l
3072 SHA256:utd25qwhXccvIb17tC8rncoQj********************* [email protected] (RSA)

But in WSL2 I get:

> git clone ssh://[email protected]/ja/repo.git
Cloning into 'repo'...
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Any idea what can be wrong?

Problems with socat/npiperelay when used on WSL1

I'm on W10 19041.207 and using your .bashrc trick for WSL2 gives me:

Cannot open netlink socket: Protocol not supported

There are nine of these lines, and obviously there's no socat to npiperelay.exe link. Any ideas on how I can get around this?

Is this possible with a VM and a samba share?

Pretty much in the heading.

I was about to attempt it but figured I would ask here first. Can this technique be used to share the windows host agent with a Debian 11 vm running on VMWare.

Thanks!

WSL2 npiperelay.exe path length limit

followed the directions for WSL2 and it keeps saying error communicating with agent. the only difference was that my location of the exe was in %localappdata%\Programs\wsl-ssh-agent. moved it to %userprofile%\.wsl and it works fine after restarting WSL2. the path is fully expanded in the .bashrc file i.e. /mnt/c/Users/$USER/AppData/Local/Programs/wsl-ssh-agent vs /mnt/c/Users/$USER/.wsl

Release archive using ZIP instead of 7zip

Hello,

since the release is mainly a Windows application and 7-ZIP is not natively supported on Windows it would be great to offer ZIP download (like the source code release) which is natively supported on Windows.
Otherwise, you first have to download and install external software only to use your software.

Connection refused when connecting through IntelliJ IDEA terminal set as WSL

I have setup wsl-ssh-agent-gui to be started with the -setenv option and in WSL I ensure the SSH_AUTH_SOCK env var is set.

When I try to list my SSH identities on a WSL terminal provided by IntelliJ IDEA (by using the terminal startup command wsl -d Ubuntu I get Error connecting to agent: Connection refused.

When I try the same in a Ubuntu shell (or by manually starting the Ubuntu shell by using wsl -d Ubuntu in cmd) I get my identities listed as expected.

Is there some checking going on about where these connections to the agent are coming from which might prevent connections not originating from the "original WSL shell"?

WSL 2 setup

Hello there, that's not a real issue but a question. I'm really helpless so I need to ask for your help.
Today I decided to update my windows to version 2004 and use WSL 2 to see if the issues I had with the first version are gone.

What were the steps I have did?

  1. Enable OpenSSH in Windows Services
  2. Download WSL 2 Workaround files
  3. Extract downloaded files (C:\Users\$USER\.wsl)
  4. Open KeepassXC (v. 2.6.0)
  5. Settings → SSH Agent
  6. Check following options
    7. Enable SSH Agent integration
    8. Use OpenSSH for Windows instead of pageant
  7. Make a simple test in PowerShell (ssh -T [email protected]) (it works)
  8. Open WSL and add following to .bashrc
export SSH_AUTH_SOCK=$HOME/.ssh/ssh-agent.sock
ss -a | grep -q $SSH_AUTH_SOCK
if [ $? -ne 0   ]; then
            rm -f $SSH_AUTH_SOCK
                ( setsid socat UNIX-LISTEN:$SSH_AUTH_SOCK,fork EXEC:"/mnt/c/Users/$USER/.wsl/npiperelay.exe -ei -s //./pipe/openssh-ssh-agent",nofork & ) >/dev/null 2>&1
fi
  1. Before restarting wsl I have ran following command in PowerShell:
    .\wsl-ssh-agent-gui.exe -socket C:\Users\$USER\.wsl\ssh-agent.soc
  2. Check if the paths are correct
C:\Users\$USER\.wsl\ssh-agent.sock

\\.pipe\openssh-ssh-agent

I thought that the SSH_AUTH_SOCK path may be wrong but even chaning it to the same path as in gui it still does not work. The ssh-agent.sock is being deleted because of the rm -f $SSH_AUTH_SOCK which should be clear.

I really do not know what I am doing wrong, could someone help me and tell me what I am doing wrong?
Thanks in advance.

Harder to setup

As part of the description for this project, it says it aims to be "much easier to use" than the original ssh-agent-wsl. However I found the instructions in ssh-agent-wsl much more simple to follow: there was a 1, 2, 3 process for setting up which didn't require any choices from the user, and it worked perfectly for me.

In wsl-ssh-agent, there are several options to choose from in step 2 of "Usage", and it was very unclear to me which one I should be choosing. After reading them several times I took a stab at the first option, and eventually it worked. It would be really helpful to call this the 'standard' or 'default' option, for people like me who don't have a clue which one to choose.

Gracefully stop wsl-ssh-agent-gui from command line

I'm creating a chocolatey package for wsl-ssh-agent (package source). I want to gracefully stop wsl-ssh-agent-gui process before updating wsl-ssh-agent package.

When I forcibly stop wsl-ssh-agent-gui by powershell Stop-Process cmdlet, socket file and lock file generated by wsl-ssh-agent-gui (like ssh-126447479.sock, wsl-ssh-agent-gui.lock) remain in %TEMP% folder.

Is there a good method to gracefully stop wsl-ssh-agent-gui process from command line (powershell or cmd)?

Why "gpg" in file name?

@rupor-github: In the latest release (v1.5.1) the file name (when ignoring the file extension and format) is now wsl-gpg-agent instead of wsl-ssh-agent. Does this new filename indicate newly added GPG support? Or is this a typo?

SSH_AUTH_SOCK causes ssh-agent stop working on Windows side

Hi,

I'm using wsl-ssh-agent since hours after its first release, great stuff!

At first, I've tried the "-setenv" option and I thought it's very nice, I hadn't have to do anything on WSL side, it's just worked.
Not long after that I've realized that as long as SSH_AUTH_SOCK is set, I cannot use the agent on Windows side.

Windows 10 Pro (18362.356)
OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
wsl-ssh-agent 1.2.1

D:\ssh-add -l
error fetching identities: invalid format

D:\ssh -vvv somewhere
...
debug3: failed to open file:D:/dev/tty error:3
debug1: read_passphrase: can't open /dev/tty: No such file or directory
Enter passphrase for key 'C:\Users\someuser/.ssh/id_something_ed25519':

After unsetting the environment variable at least in current session, it's working as usual.

As a workaround I'm specifying explicitly the path to the socket using "-socket" option, and manually exporting the SSH_AUTH_SOCK variable on WSL side with the corresponding path.

Anyway, it's not really a big issue, I'm just curious: is it happening only on my systems or it's a known limitation (not wsl-ssh-agent's, moreso OpenSSH's in Windows)?

"communication with agent failed" when trying to connect using SSH in Arch (WSL 2)

Hi! Not sure if I should report this issue here, but I figured you might be able to help me further at least.

For some reason wsl-ssh-agent doesn't seem to work (or well, only partially works) under Arch (either installed through https://github.com/nullpo-head/wsl-distrod or https://github.com/yuk7/ArchWSL). If I run ssh-add -l it connects to the ssh-agent just fine and lists my keys, but when I actually try to SSH somewhere it still asks me for my passphrase and I see this in the verbose log:

debug2: get_agent_identities: ssh_agent_bind_hostkey: communication with agent failed
debug1: get_agent_identities: ssh_fetch_identitylist: communication with agent failed

It "just works" in Ubuntu WSL environments (both through Microsoft Store and through https://github.com/nullpo-head/wsl-distrod), but the exact same setup does not seem to work under Arch.

Let me know if you need any more info from me, I'm not sure what exactly I should supply. And apologies if this setup is unsupported, feel free to close the issue if that's the case. I just figured since this doesn't seem to be Distrod or ArchWSL specific but rather distro-specific I might as well start by asking here.

WSL2 won't get keys despite agent has em

Thank you very much for this awesome Project but I'm afraid I need to ask for help:
After fideling with this for some hours, where I wasted the first few as I thought I could simply transfer from WSL1... :-(

When I try to connect to a host like that: "ssh -i .ssh/mykey myhost -vvv" I see this:

debug3: ssh_get_authentication_socket_path: path '/home/mircsicz/.ssh/wsl-ssh-agent.sock'
debug2: get_agent_identities: ssh_agent_bind_hostkey: communication with agent failed
debug1: get_agent_identities: ssh_fetch_identitylist: communication with agent failed

and it asks for the passwd to the key but it's there:

ssh-add -l
4096 SHA256:string mykey (RSA)

I've wsl-ssh-agent-relay in place (~/bin/wsl-ssh-agent-relay) also changed "RELAY_BIN="${HOME}/bin/npiperelay.exe" and an entry in my .bashrc:

${HOME}/bin/wsl-ssh-agent-relay start
export SSH_AUTH_SOCK=${HOME}/.ssh/wsl-ssh-agent.sock

And yes it's def WSL2:

C:\Users\mircsicz>wsl.exe -l --all -v
  NAME          STATE           VERSION
- kali-linux    Running         2

But now I'm totally out of ideas!

Lockfile cannot be created

Hello,

I got the problem that the application wont start for me, except I run it in admin mode. But this is problematic, because then I cannot put it into autostart. I did a bit of debugging and this is the debugview output:

[16160] [wsl-ssh-agent-gui] Windows - CurrentMajorVersionNumber: 10, CurrentBuild: 18363
[16160] [wsl-ssh-agent-gui] Application already running

But the lock-file wasnt there. I then took ProcMon to view File accesses and you can see:

21:16:31,1798246	wsl-ssh-agent.exe	8816	CreateFile	C:\Users\MYUSERNAME\AppData\Local\Temp\wsl-ssh-agent-gui.lock	NAME NOT FOUND	Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
21:16:31,1800598	wsl-ssh-agent.exe	8816	CreateFile	C:\Users\MYUSERNAME\AppData\Local\Temp\wsl-ssh-agent-gui.lock	NAME NOT FOUND	Desired Access: Read Attributes, Synchronize, Disposition: Open, Options: Synchronous IO Non-Alert, Attributes: n/a, ShareMode: None, AllocationSize: n/a
21:16:31,1803939	wsl-ssh-agent.exe	8816	CreateFile	C:\Users\MYUSERNAME\AppData\Local\Temp\wsl-ssh-agent-gui.lock	ACCESS DENIED	Desired Access: Generic Write, Read Attributes, Disposition: Create, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: N, ShareMode: Read, Write, AllocationSize: 0
21:16:31,1807090	wsl-ssh-agent.exe	8816	CreateFile	C:\Users\MYUSERNAME\AppData\Local\Temp\wsl-ssh-agent-gui.lock	NAME NOT FOUND	Desired Access: Read Data/List Directory, Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a

As you can see in Line 3 (Lines 1,2 and 4 are just checks from your application, if the file is already there), it gets AccessDenied on creation of the lockfile. But the permissions are all correct:

PS C:\Users\MYUSERNAME\AppData\Local\Temp> Get-Acl | Format-List


Path   : Microsoft.PowerShell.Core\FileSystem::C:\Users\MYUSERNAME\AppData\Local\Temp
Owner  : MYPC\MYUSERNAME
Group  : NT-AUTORITÄT\SYSTEM
Access : NT-AUTORITÄT\SYSTEM Allow  FullControl
         VORDEFINIERT\Administratoren Allow  FullControl
         MYPC\MYUSERNAME Allow  FullControl
Audit  :
Sddl   : O:S-1-5-21-1011926168-4098507291-4013957409-1000G:SYD:(A;OICIID;FA;;;SY)(A;OICIID;FA;;;BA)(A;OICIID;FA;;;S-1-5
         -21-1011926168-4098507291-4013957409-1000)

The process also runs under the correct user MYUSERNAME.

Sadly I have no idea how to debug this further... Any suggestions?

Hide systray icon

Hey,
Thanks for this great tool!
Is there a way to hide the tray icon? I'd like to have it running in the background at startup without cluttering the taskbar.
Thanks in advance for your answer.

Does this work with putty?

Hi,

I want to use putty as ssh client and windows openssh agent as key agent instead of pageant
from putty, but I found it does not work at all.

After I use windows 10 (1909) ssh-add loading my private key , putty still ask for a password,
seems it doesn't find windows key agent service.

Would this wsl-ssh-agent help ?
thanks.

WSL2 and Windows 11 ssh not working

Hello,
I'm running debian 11 in WSL2 on Windows 11 host,
Every time when i'm trying to use ssh with wsl-ssh-agent i'm getting an error like:
debug1: get_agent_identities: ssh_get_authentication_socket: No such file or directory

This occurs only for ssh commands, ssh-add -L (and -l) works well - it returns all keys available in the agent.
I've already double checked SSH versions:
Debian:

OpenSSH_8.9p1, OpenSSL 1.1.1n  15 Mar 2022

Windows:

OpenSSH_for_Windows_8.9p1, LibreSSL 3.4.3

How to troubleshoot this?

Thank you

'Error connecting to agent' on one PC but working correctly on another with identical setup

I have two PCs, both running Windows 10, both with Ubuntu 20.04 installed in WSL 1. Both PCs start their OpenSSH Authentication service automatically on startup. Additionally on startup both run this program with the command:

"C:\Program Files\WSL SSH Agent\wsl-ssh-agent-gui.exe" -setenv -envname WSL_AUTH_SOCK

Both of them also have the following two environment variables (I'm assuming automatically set by this program), identical, just with a different number in the temporary file name:
image

In WSL I have the following line in .bashrc on both PCs:

export SSH_AUTH_SOCK=$WSL_AUTH_SOCK

and nothing else agent-related in either .bashrc or .profile.

However, upon running Ubuntu, on one PC I can use the Windows SSH agent, and on the other I can't. Any idea what else I could try to get it working on the second PC?

PC 1 (Working)

Powershell (outside WSL):

PS C:\Users\User> ssh-add -L
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGdmx21Jrea+X7XlvqNc49d+M59SXi/Elia0Sm9yJ4F9 User-PC

WSL:

user@User-PC:~/repo$ echo $WSL_AUTH_SOCK
/mnt/c/Users/User/AppData/Local/Temp/ssh-055412939.sock
user@User-PC:~/repo$ ssh-add -L
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGdmx21Jrea+X7XlvqNc49d+M59SXi/Elia0Sm9yJ4F9 User-PC
user@User-PC~/repo$ git pull
Already up to date.

PC 2 (Not working)

Powershell (outside WSL):

PS C:\Users\user> ssh-add -L
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIP69b6DhaQqgKVZWNnhbSbhBXG1OH3yePiAHfdyTU+f1 user@PC

WSL:

user@PC:~/repo$ echo $WSL_AUTH_SOCK
/mnt/c/Users/user/AppData/Local/Temp/ssh-921384019.sock
user@PC:~/repo$ ssh-add -L
Error connecting to agent: No such file or directory
user@PC:~/repo$ git pull
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Chocolatey package possible?

Hey mates!

I've seen there is already an unofficial package for NuGet. Is it possible to also get it for Chocolatey?

I've seen there was someone who tried, but it seems it's not released: #7

Connection might not work after update to Ubuntu 22.04

Dear all,

I recently had to update my Ubuntu to 22.04 due to various reasons. Unfortunately, this broke the ssh-agent interoperability.

After a lot of research, it turned out, that there was a recent change in the agent communication, leading to errors like:

debug1: get_agent_identities: ssh_fetch_identitylist: communication with agent failed

The solution for me was to update my OpenSSH instance. This required disabling the built-in OpenSSH, and install the most recent version from https://github.com/PowerShell/Win32-OpenSSH/releases . After adding this OpenSSH version to the Windows PATH (e.g. by adding %ProgramFiles%\OpenSSH\ ), everything works again as before.

Please note, that I am using WSL2 and npiperelay . But I assume that this will affect wsl-ssh-agent as well.

Best,

Andreas

Following Instruction for npiperelay results in invalid ELF header

I am trying to get pageant working with WSL2 on windows 10 build 1903 - I'm mainly stuck on the part where the SSH agent opens the DLL for pageant to prompt for authentication, my pageant certificate is a dll, and when WSL2 tries to open that, it fails with this message:

dlopen /mnt/c/Program Files/Package/acpkcs211.dll failed: /mnt/c/Program Files/Package/acpkcs211.dll: invalid ELF header

I'm unsure where this is failing, at the Npiperelay, or the ssh agent, so I thought I'd start here. Thanks for the help, and I hope this gets other people to a closer solution.

wsl-ssh-agent-gui.exe complains of lack of ~/.gclpr directory even if gclpr is not being used

Going from wsl-ssh-agent 1.5.2 to 1.6.0, suddenly the presence of gclpr seems to be enforced. With 1.5.2, I can just start it up with my environment and there's no problem. With 1.6.0, I get this error:

image

If I create an empty .gclpr directory, both 1.5.2 and 1.6.0 report the same error (bad permissions on a nonexistent file in that directory), so this appears to be a regression.

How to use correct key when I have multiple for github.com

I use work key and a personal key on github and have my .ssh\config setup on the Windows side as described at https://gist.github.com/oanhnn/80a89405ab9023894df7. I'm sharing keys with WSL2 with the https://github.com/rupor-github/wsl-ssh-agent#wsl-2-compatibility technique.

Things work well on Windows:

> ssh -T [email protected]
Hi jibbers42! You've successfully authenticated, but GitHub does not provide shell access.

> ssh -T [email protected]
Hi work! You've successfully authenticated, but GitHub does not provide shell access.

But on WSL2 it seems to select my work key for personal (github.com) and the work host (github.com-work) doesn't work at all:

$ ssh -T [email protected]
Hi work! You've successfully authenticated, but GitHub does not provide shell access.

$ ssh -T [email protected]
ssh: Could not resolve hostname github.com-work: Name or service not known

My Windows .ssh\config is pretty simple:

> cat .\.ssh\config
Host github.com
   HostName github.com
   IdentityFile ~/.ssh/jibbers42-ed25519
   IdentitiesOnly yes

Host github.com-work
   HostName github.com
   IdentityFile ~/.ssh/work-ed25519
   IdentitiesOnly yes

Any idea how I can get the WSL2 side to select the correct key?

npiperelay.exe doesn't work for WSL 2 starting from Windows 11 22000.318

I was able to use npiperelay to forward ssh agent request until 22000.318. After upgrading, I got error fetching identities: communication with agent failed in the WSL 2.

Didn't get a chance to debug this issue yet but open an issue first to see if anyone else is encountering the same issue. Will try to debug when I get some time.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.