gitbutlerapp/gitbutler · info

For WSL2 projects, install the Linux version of GitButler in

Error message

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

What it means

validateProjectPath rejects Windows paths under \\wsl.localhost (access to the WSL2 VM filesystem over the 9P bridge). Git and file-watching through that bridge are slow and inotify events do not propagate, so the Windows build declines the project: console.warn plus an info toast advising the Linux build inside the distro, and the function returns false so the project is not added.

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

Solutions

  1. Install the GitButler Linux build inside the WSL2 distro and open the project there
  2. Or move the repository to the Windows filesystem (for example C:\\dev\\repo) and add it in the Windows app
  3. Do not attempt to bypass the check — watcher correctness is the reason it exists
Defensive patterns

Strategy: validation

Validate before calling

function isWslUncPath(path: string): boolean {
	return /^\\\\wsl.localhost/i.test(path);
}
// run before opening a folder picker or adding a project

Prevention

When it happens

Trigger: Adding or validating a project whose path matches /^\\\\wsl.localhost/i in the Windows desktop app (apps/desktop/src/lib/project/projectsService.ts:175), for example \\wsl.localhost\\Ubuntu\\home\\user\\repo.

Common situations: Developers keeping repos inside WSL2 while opening the Windows app; VS Code WSL workflows pasting \\wsl.localhost paths into dialogs.

Related errors


AI-assisted analysis of gitbutlerapp/gitbutler@caf1f223d3 (2026-08-20). Data as JSON: /api/errors/ae92faa14a6b4602. Report an issue: GitHub.