You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
WSL --install fails with "Forbidden (403)." #40285
Be on a network connection where there is a TLS inspection proxy (MITM) using its own CA certificate to sign server certificates for TLS connections. For example, use Cloudflare WARP in "Gateway with WARP" mode with TLS inspection on, but it is not limited to that.
Add the CA certificate to the certmgr "Trusted Root Certification Authorities", enable it for all purposes.
Run wsl --install in an administrator PowerShell window.
Expected Behavior
wsl --install should be able to download and install whatever it needs.
Alternatively, it should output some details so that we can see what URL is failing, and whether it is due to an untrusted TLS certificate issue, or the URL is being blocked.
I think it is network related because when I change a network, it writes a message about downloading something. However, I need more details from the failure to troubleshoot what is going wrong on this network.
Feng Wang (@chemwolf6922) Thank you very much for that info, I just took a pcap and confirmed that I see an TLS connection being setup to api.github.com. So the underlying issue here is hitting the GitHub REST API rate limit for unauthenticated requests (60 requests per hour per IP address).
I suppose there is no workaround for the GitHub REST API rate limit and we should do the manual steps for older versions of WSL? Or is there any other alternative for newer versions of Windows/WSL that support wsl --install?
Reacted by Simon Golms, Jan Bessler, Tennyleaz and Mr Beedell, Roke Julian Lockhart
Requests with API token have greater speed limit. What about providing a commandline argument --gh-token <token> for advanced users to fill in their own token (possibly with gh auth) ?
The same 403 hits wsl --update on machines that already have WSL, which goes through WSL's own code rather than the inbox installer: GetLatestGitHubRelease in src/windows/common/wslutil.cpp requests https://api.github.com/repos/Microsoft/WSL/releases/latest with nothing but a User-Agent header, so it shares the 60/hour unauthenticated limit with everything else on the IP. On GitHub-hosted CI runners that limit is routinely used up; wsl --update failed this way on a windows-2025 runner for us today, with Wsl/UpdatePackage/HTTP_E_STATUS_FORBIDDEN.
There's currently no way to authenticate that request: no flag, no environment variable, no setting (the only override is a machine-wide registry value for the URL itself). +1 to the --gh-token idea above. Honoring GH_TOKEN / GITHUB_TOKEN when set, as gh and most GitHub tooling do, would cover CI without a new flag. Saying "GitHub API rate limit exceeded" in the error, rather than a bare Forbidden (403)., would also have saved some digging.
Another occurrence is reported from a Windows CI runner in this job: wsl --update returns HTTP 403, but the command output does not explain the cause. GitHub unauthenticated API rate limiting is a plausible explanation, but this is not confirmed by the output; other sources of 403 (such as a proxy or access policy) are also possible. Please make the error identify the failing request and distinguish rate-limit responses from other forbidden responses, where possible.
If the github releases had stable file names, you could use the latest release in the url to get the latest release w/out needing to use the API (and thus risk rate limiting)
But this doesn't work because the release process puts a version number in the filename - wsl.3.0.5.0.x64.msi, so you're back to the problem of needing to know the latest version number.
Reproduced on WSL 3.0.5 with GITHUB_TOKEN present in the Windows process environment. Both wsl --update and wsl --update --web-download returned Wsl/UpdatePackage/HTTP_E_STATUS_FORBIDDEN. A GET to the same release endpoint using WSL’s wsl-install User-Agent returned API rate limit exceeded, with X-RateLimit-Remaining: 0 and X-RateLimit-Limit: 60. Supporting GITHUB_TOKEN for release metadata requests to api.github.com would help users who share an outbound IP.
Activity
github-actions commentedon Apr 23, 2026
Diagnostic information
chemwolf6922 commentedon Apr 24, 2026
Hi Chiang Fong Lee (@cflee) , the code producing this error is in the windows code base, not in the wsl repo.
According to the log and the windows code. It's most likely failing to access https://api.github.com/repos/Microsoft/WSL/releases/latest.
If you have admin access to the proxy you setup. It might be easier to identify the requests there.
cflee commentedon Apr 24, 2026
Feng Wang (@chemwolf6922) Thank you very much for that info, I just took a pcap and confirmed that I see an TLS connection being setup to
api.github.com. So the underlying issue here is hitting the GitHub REST API rate limit for unauthenticated requests (60 requests per hour per IP address).Perhaps this is a scenario that should go into the installation troubleshooting docs.
I suppose there is no workaround for the GitHub REST API rate limit and we should do the manual steps for older versions of WSL? Or is there any other alternative for newer versions of Windows/WSL that support
wsl --install?cflee commentedon Apr 24, 2026
I could not follow the manual steps as installing the WSL2 Linux kernel package always fails due to the "Error: This update only applies to machines with the Windows Subsystem for Linux." error.
What worked was going to https://github.com/microsoft/WSL/releases/latest to get the URL for the MSI and downloading and installing it. I'm not sure what else
wsl --installdoes but I did do the rest of the steps from the manual steps guide.Thanks for the information that helped to unblock this!
burningtnt commentedon Jun 23, 2026
Requests with API token have greater speed limit. What about providing a commandline argument
--gh-token <token>for advanced users to fill in their own token (possibly withgh auth) ?Tosan7 commentedon Sep 10, 2026
Incase you're trying to install a distro and it didn't work, a fix that worked for me is here
https://learn.microsoft.com/en-us/answers/questions/4064931/wsl-not-installing-ubuntu
regulad commentedon Oct 21, 2026
The same 403 hits
wsl --updateon machines that already have WSL, which goes through WSL's own code rather than the inbox installer:GetLatestGitHubReleaseinsrc/windows/common/wslutil.cpprequestshttps://api.github.com/repos/Microsoft/WSL/releases/latestwith nothing but aUser-Agentheader, so it shares the 60/hour unauthenticated limit with everything else on the IP. On GitHub-hosted CI runners that limit is routinely used up;wsl --updatefailed this way on awindows-2025runner for us today, withWsl/UpdatePackage/HTTP_E_STATUS_FORBIDDEN.There's currently no way to authenticate that request: no flag, no environment variable, no setting (the only override is a machine-wide registry value for the URL itself). +1 to the
--gh-tokenidea above. HonoringGH_TOKEN/GITHUB_TOKENwhen set, asghand most GitHub tooling do, would cover CI without a new flag. Saying "GitHub API rate limit exceeded" in the error, rather than a bareForbidden (403)., would also have saved some digging.This comment was drafted by AI (Claude Opus 5.5).
afscrome commentedon Nov 1, 2026
Another occurrence is reported from a Windows CI runner in this job:
wsl --updatereturns HTTP 403, but the command output does not explain the cause. GitHub unauthenticated API rate limiting is a plausible explanation, but this is not confirmed by the output; other sources of 403 (such as a proxy or access policy) are also possible. Please make the error identify the failing request and distinguish rate-limit responses from other forbidden responses, where possible.afscrome commentedon Nov 19, 2026
If the github releases had stable file names, you could use the
latestrelease in the url to get the latest release w/out needing to use the API (and thus risk rate limiting)https://github.com/microsoft/WSL/releases/download/latest/wsl.x64.msi
But this doesn't work because the release process puts a version number in the filename -
wsl.3.0.5.0.x64.msi, so you're back to the problem of needing to know the latest version number.yuwenlong commentedon Nov 25, 2026
Reproduced on WSL 3.0.5 with
GITHUB_TOKENpresent in the Windows process environment. Bothwsl --updateandwsl --update --web-downloadreturnedWsl/UpdatePackage/HTTP_E_STATUS_FORBIDDEN. A GET to the same release endpoint using WSL’swsl-installUser-Agent returnedAPI rate limit exceeded, withX-RateLimit-Remaining: 0andX-RateLimit-Limit: 60. SupportingGITHUB_TOKENfor release metadata requests toapi.github.comwould help users who share an outbound IP.