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

validateProjectPath in projectsService detects a generic UNC network path (a path starting with \\\\) and shows an info toast explaining that git over a network share is unsupported/unreliable, recommending a local clone or a mapped network drive (NET USE). It is a pre-emptive advisory, not a hard failure.

Solutions

  1. Clone the repository to a local drive and add the local clone to GitButler.
  2. If the repo must stay on the share, map it to a drive letter first (e.g. `net use Z: \\\\fileserver\\share`) and add Z:\\path\\repo.
  3. Use a version-control workflow (push/pull) instead of pointing git directly at the network share.

Example fix

// before
addProject("\\\\nas\\repos\\my-app")
// after
$ net use Z: \\\\nas\\repos
addProject("Z:\\my-app")   // or clone locally first
Defensive patterns

Strategy: validation

Validate before calling

function isUncPath(path: string): boolean {
  return /^\\\\/i.test(path); // matches both \\server\share and \\wsl.localhost
}
if (isUncPath(candidatePath)) {
  // prompt: clone locally or map a drive letter (NET USE) first
}

Type guard

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

Prevention

When it happens

Trigger: Calling validateProjectPath (via getValidPath) with a UNC path like \\\\fileserver\\share\\repo that does not match the more specific wsl.localhost rule (checked earlier).

Common situations: Corporate environments keeping repos on SMB shares; users adding projects straight from a NAS; paths pasted from Explorer's address bar for network locations.

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/46a0ad10b6211bb4. Report an issue: GitHub.

Appendix: 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 58e5313667)