Cannot install custom modern WSL2 distro that is hosted remotetly
@OneBlue is already working on this.
Since Mar 28, 2025.
- Dominant language
- C++
- Stars
- 33.7k
- Forks
- 1.8k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 116
Description
Hi all,
I am going to register a modern WSL2 distribution with respect to following [guide](https://learn.microsoft.com/en-us/windows/wsl/build-custom-distro#adding-your-distro-to-wsl---install-for-your-enterprise-or-group):
The local use case where the Url parameter will be resolved as a local path works fine:
`Url = "file://$TarPath"`
However, I want to set the `Url` parameter to a URL that points to the remote location of the TAR-archive. The download of the distribution fails (in my case due to 401):
```powershell
PS C:\Users\MyUser> wsl -l -o
Below is a list of valid distributions that can be installed.
Run the installation using the command wsl.exe --install .
NAME FRIENDLY NAME
MyDistro-v1 MyDistro-24.04 (v1)
PS C:\Users\MyUser> wsl --install MyDistro-v1
Downloading: MyDistro-24.04 (v1)
Not authorized (401).
Error code: Wsl/InstallDistro/0x80190191
```
My question:
**How can I configure wsl.exe to download the TAR-archive with existing credentials? Or do it need to provide some kind of environment variables**
Best Valentin
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.