GitHub Copilot Chat dont work after I installed WSL #185855
Replies: 2 comments 1 reply
-
|
Hi @yolandadeb! 👋 This "Fetch failed" error specifically inside WSL (while working fine on Windows) is almost always a networking or proxy issue where the WSL instance cannot reach GitHub's authentication servers appropriately. Here are the steps to fix the connection between VS Code Remote (WSL) and Copilot: 1. Check DNS in WSL cat /etc/resolv.confIf it's empty or failing, try forcing Google's DNS temporarily: echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.confThen restart VS Code and try again. 2. Proxy / VPN / Zscaler Try adding this to your VS Code {
"http.proxySupport": "off",
"github.copilot.advanced": {
"debug.overrideProxyUrl": false
}
}3. Re-install the Server Component
|
Beta Was this translation helpful? Give feedback.
-
1) Reinstall Copilot Chat inside WSLCopilot Chat has two parts: UI (Windows) and Server (WSL). While connected to WSL in VS Code:
If it’s only enabled locally, Chat will fail with 2) Re-authenticate GitHub from WSLWSL has its own GitHub auth context. In VS Code (connected to WSL):
This fixes many 3) Fix WSL DNS correctly (recommended)Temporary DNS hacks work, but this is the proper fix. On Windows (PowerShell as Admin): wsl --shutdownInside WSL: sudo tee /etc/wsl.conf <<EOF
[network]
generateResolvConf = false
EOF
sudo rm /etc/resolv.conf
echo -e "nameserver 1.1.1.1\nnameserver 8.8.8.8" | sudo tee /etc/resolv.confRestart VS Code and reconnect to WSL. 4) Corporate proxy / VPN / Zscaler usersThis is a very common cause of In WSL VS Code settings: {
"http.proxySupport": "off",
"github.copilot.advanced": {
"debug.overrideProxyUrl": false
}
}Also verify outbound HTTPS works inside WSL: curl https://api.github.comIf this fails, Copilot Chat cannot work. 5) Force a clean rebuild of the WSL serverwsl --shutdownReopen VS Code and reconnect to WSL. The remote server will reinstall automatically. Why this happensCopilot Chat = Windows UI + WSL server + GitHub auth + outbound HTTPS. TL;DR
This resolves the issue in most WSL setups. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Question
Copilot Feature Area
VS Code
Body
Extension is enabled on 'WSL: Ubuntu-24.04' it shows Uncaught Errors (2) fetch failed, fetch failed
Chat took too long to get ready. Please ensure you are signed in to GitHub and that the extension GitHub.copilot-chat is installed and enabled.
for the past 6 month havent had any issues. it started 2 days ago.
Error.
Chat took too long to get ready. Please ensure you are signed in to GitHub and that the extension GitHub.copilot-chat is installed and enabled.
if i create other project, without WSL extention, it works 100%
Beta Was this translation helpful? Give feedback.
All reactions