gitbutlerapp/gitbutler · info

For WSL2 projects, install the Linux version of GitButler…

Error message

For WSL2 projects, install the Linux version of GitButler inside of your WSL2 distro.

What it means

validateProjectPath in the desktop app's projectsService detects a Windows WSL2 UNC path (\\wsl.localhost\...) and surfaces an info toast advising the user to install the Linux build of GitButler inside the WSL2 distro instead of adding the path from the Windows side. The Windows desktop app cannot manage repos living inside a WSL2 filesystem over the UNC share.

Solutions

  1. Install the Linux version of GitButler inside the WSL2 distro and add the project there (e.g. the CLI/TUI or Linux desktop build).
  2. Alternatively clone the repository onto a Windows-native path (e.g. C:\dev\repo) if you want to use the Windows app.
  3. Avoid accessing the repo through \\wsl.localhost in Windows tooling - git performance and locking are unreliable across that boundary.

Example fix

// before (Windows app)
addProject("\\\\wsl.localhost\\Ubuntu\\home\\me\\repo")
// after (inside WSL2)
$ gitbutler-cli add /home/me/repo   // Linux build inside the distro
Defensive patterns

Strategy: validation

Validate before calling

function isWslPath(path: string): boolean {
  return /^\\\\wsl(\.localhost|\$)\\/i.test(path);
}
if (isWslPath(candidatePath)) {
  // route to the Linux GitButler inside the distro instead
}

Type guard

const isWslUncPath = (p: string): p is `\\\\wsl.localhost\\${string}` =>
  /^\\\\wsl\.localhost\\/i.test(p);

Prevention

When it happens

Trigger: Calling validateProjectPath (via getValidPath, e.g. the Add Project dialog) with a path matching /^\\\\wsl.localhost/i, such as \\wsl.localhost\Ubuntu\home\user\repo.

Common situations: Windows users who cloned a repo inside WSL2 and try to add it to the Windows GitButler app; mixed Windows/WSL2 development setups; docs/forum-recommended flows that expose WSL paths via Explorer.

Understand the failure class

Background: "unsupported platform" / "not supported on this platform" errors: what they mean and how to fix them — this error's family across 47 libraries.

Related errors


AI-assisted analysis of gitbutlerapp/gitbutler@58e5313667 (2026-09-18). Data as JSON: /api/errors/ae92faa14a6b4602. Report an issue: GitHub.

Appendix: source

Thrown at apps/desktop/src/lib/project/projectsService.ts:175

		}
	}

	async getValidPath(): Promise<string | undefined> {
		const path = await this.promptForDirectory();
		if (!path) return undefined;
		if (!this.validateProjectPath(path)) return undefined;
		return path;
	}

	validateProjectPath(path: string) {
		// These two paths represent unsupported-configuration guidance, not
		// runtime errors. Surface them as info toasts so they don't pollute
		// error telemetry — they previously accounted for 53 + many events
		// of noisy toast:show_error captures.
		if (/^\\\\wsl.localhost/i.test(path)) {
			const message =
				"For WSL2 projects, install the Linux version of GitButler inside of your WSL2 distro.";
			console.warn(message);
			showToast({
				style: "info",
				title: "Use the Linux version of GitButler",
				message,
			});

			return false;
		}

		if (/^\\\\/i.test(path)) {
			const message =
				"Using git across a network is not recommended. Either clone " +
				"the repo locally, or use the NET USE command to map a " +
				"network drive.";
			console.warn(message);
			showToast({
				style: "info",
				title: "UNC paths are not directly supported",

View on GitHub (pinned to 58e5313667)