{"record":{"id":"46a0ad10b6211bb4","repo":"gitbutlerapp/gitbutler","slug":"using-git-across-a-network-is-not-recommended-eit","errorCode":null,"errorMessage":"Using git across a network is not recommended. Either clone the repo locally, or use the NET USE command to map a network drive.","messagePattern":"Using git across a network is not recommended\\. Either clone the repo locally, or use the NET USE command to map a network drive\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"info","filePath":"apps/desktop/src/lib/project/projectsService.ts","lineNumber":190,"sourceCode":"\t\tif (/^\\\\\\\\wsl.localhost/i.test(path)) {\n\t\t\tconst message =\n\t\t\t\t\"For WSL2 projects, install the Linux version of GitButler inside of your WSL2 distro.\";\n\t\t\tconsole.warn(message);\n\t\t\tshowToast({\n\t\t\t\tstyle: \"info\",\n\t\t\t\ttitle: \"Use the Linux version of GitButler\",\n\t\t\t\tmessage,\n\t\t\t});\n\n\t\t\treturn false;\n\t\t}\n\n\t\tif (/^\\\\\\\\/i.test(path)) {\n\t\t\tconst message =\n\t\t\t\t\"Using git across a network is not recommended. Either clone \" +\n\t\t\t\t\"the repo locally, or use the NET USE command to map a \" +\n\t\t\t\t\"network drive.\";\n\t\t\tconsole.warn(message);\n\t\t\tshowToast({\n\t\t\t\tstyle: \"info\",\n\t\t\t\ttitle: \"UNC paths are not directly supported\",\n\t\t\t\tmessage,\n\t\t\t});\n\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tgetLastOpenedProject() {\n\t\treturn get(this.persistedId);\n\t}\n\n\tsetLastOpenedProject(projectId: string) {\n\t\tthis.persistedId.set(projectId);","sourceCodeStart":172,"sourceCodeEnd":208,"githubUrl":"https://github.com/gitbutlerapp/gitbutler/blob/caf1f223d3cfb94488c9198ad34487c6006c648f/apps/desktop/src/lib/project/projectsService.ts#L172-L208","documentation":"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.","triggerScenarios":"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.","commonSituations":"Corporate file shares; NAS-hosted repositories; users pointing GitButler at a network home directory.","solutions":["Clone the repository to a local disk and add the local copy instead","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","Accept that network-hosted repos generally do not fit this workflow"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"function isUncPath(path: string): boolean {\n\treturn /^\\\\\\\\/i.test(path) && !/^\\\\\\\\wsl.localhost/i.test(path);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Filter network roots in the folder picker","Guide users toward local clones during onboarding","Order the checks WSL first (it is a UNC subset), then generic UNC"],"tags":["typescript","windows","unc","network-path","validation"],"backgroundTag":"unc-network-path","analyzedSha":"caf1f223d3cfb94488c9198ad34487c6006c648f","analyzedAt":"2026-08-20T07:55:40.983Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}