Unable to Authenticate Cody in WSL2 – “Not Logged In” Error
Hello everyone,
I’m trying to use Cody in WSL2 (Windows Subsystem for Linux), but I keep getting a “Not logged in” message when running cody chat. Here’s what I’ve tried so far:
Ran cody auth login --web
The command either doesn’t open a browser automatically, or when I log in, nothing changes in the WSL2 environment.
Checked cody auth whoami
It shows no active account.
Generated a fresh access token on Sourcegraph and attempted to log in again.
Still no success; Cody continues to say I’m not logged in.
Checked WSL2 DNS/Network
I updated /etc/resolv.conf with reliable DNS servers, and I can ping external sites, so basic networking seems fine.
Restarted WSL2
Ran wsl --shutdown in Windows PowerShell, reopened my WSL2 shell, and retried. The same authentication error remains.
Has anyone else experienced this? I’d appreciate any advice on diagnosing the issue or any specific settings to configure. I’m using the latest version of Cody in WSL2 on Windows 10/11 (include version if known).
Thank you!