Skip to content

WSL --install fails with "Forbidden (403)." #40285

Open

Description

Windows Version

Microsoft Windows [Version 10.0.26200.8246]

WSL Version

0.0.0.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

No response

Distro Version

No response

Other Software

No response

Repro Steps

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.

Actual Behavior

The output is:

Forbidden (403).

Diagnostic Logs

WslLogs-2026-04-23_17-10-16.zip

Activity

  1. github-actions commented on Apr 23, 2026

    @github-actions
    Contributor
    Diagnostic information
    Appx package is not installed
    
  2. chemwolf6922 commented on Apr 24, 2026

    @chemwolf6922
    Contributor

    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.

  3. cflee commented on Apr 24, 2026

    @cflee
    Author

    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?

  4. cflee commented on Apr 24, 2026

    @cflee
    Author

    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 --install does but I did do the rest of the steps from the manual steps guide.

    Thanks for the information that helped to unblock this!

  5. burningtnt commented on Jun 23, 2026

    @burningtnt

    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) ?

  6. Tosan7 commented on Sep 10, 2026

    @Tosan7

    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 --install does but I did do the rest of the steps from the manual steps guide.

    Thanks for the information that helped to unblock this!

    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

  7. regulad commented on Oct 21, 2026

    @regulad

    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.


    This comment was drafted by AI (Claude Opus 5.5).

  8. afscrome commented on Nov 1, 2026

    @afscrome
    Contributor

    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.

  9. afscrome commented on Nov 19, 2026

    @afscrome
    Contributor

    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)

    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.

  10. yuwenlong commented on Nov 25, 2026

    @yuwenlong

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    install

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions