gitbutlerapp/gitbutler · info

Using git across a network is not recommended. Either clone

Error 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.

What it means

The second validation in validateProjectPath: any remaining UNC path (\\server\\share style) is rejected because git operations over SMB or other network shares are slow and their locking semantics are unreliable. The user gets an info toast suggesting cloning locally or mapping the drive with NET USE, and the function returns false so the project is not added.

Source

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

		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",
				message,
			});

			return false;
		}

		return true;
	}

	getLastOpenedProject() {
		return get(this.persistedId);
	}

	setLastOpenedProject(projectId: string) {
		this.persistedId.set(projectId);

View on GitHub (pinned to caf1f223d3)

Solutions

  1. Clone the repository to a local disk and add the local copy instead
  2. Or map the share to a drive letter (NET USE X: \\server\\share) and add X:\\repos\\project — the drive-letter path passes the UNC check, though performance caveats remain
  3. Accept that network-hosted repos generally do not fit this workflow
Defensive patterns

Strategy: validation

Validate before calling

function isUncPath(path: string): boolean {
	return /^\\\\/i.test(path) && !/^\\\\wsl.localhost/i.test(path);
}

Prevention

When it happens

Trigger: Adding a project whose path starts with two backslashes but is not a WSL path — for example \\fileserver\\repos\\project or \\nas\\code — hitting the /^\\\\/i branch at apps/desktop/src/lib/project/projectsService.ts:190.

Common situations: Corporate file shares; NAS-hosted repositories; users pointing GitButler at a network home directory.

Related errors


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