{"record":{"id":"c1b5c7fe611d464f","repo":"CoplayDev/unity-mcp","slug":"repo-url-is-not-a-recognized-github-repository-url","errorCode":null,"errorMessage":"Repo URL is not a recognized GitHub repository URL: {repoUrl}","messagePattern":"Repo URL is not a recognized GitHub repository URL: (.+?)","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"MCPForUnity/Editor/Setup/SkillSyncService.cs","lineNumber":71,"sourceCode":"                    };\n                }\n                catch (Exception ex)\n                {\n                    EditorApplication.delayCall += () =>\n                    {\n                        onComplete?.Invoke(new SyncResult { Success = false, Error = ex.Message });\n                    };\n                }\n            });\n        }\n\n        private static SyncResult RunSync(string repoUrl, string installDir, string branch, string lastSyncedCommit, Action<string> log)\n        {\n            log?.Invoke(\"=== Sync Start ===\");\n\n            if (!TryParseGitHubRepository(repoUrl, out var repoInfo))\n            {\n                throw new InvalidOperationException($\"Repo URL is not a recognized GitHub repository URL: {repoUrl}\");\n            }\n\n            log?.Invoke($\"Target repository: {repoInfo.Owner}/{repoInfo.Repo}@{branch}\");\n            var snapshot = FetchRemoteSnapshot(repoInfo, branch, SkillSubdir, log);\n            var installPath = ResolveAndValidateInstallPath(installDir);\n\n            if (!Directory.Exists(installPath))\n            {\n                Directory.CreateDirectory(installPath);\n            }\n\n            var localFiles = ListFiles(installPath);\n            var pathComparison = GetPathComparison(installPath);\n            var pathComparer = GetPathComparer(pathComparison);\n            EnsureManagedInstallRoot(installPath, localFiles.Keys, snapshot.Files.Keys, pathComparer);\n            var plan = BuildPlan(snapshot.Files, localFiles, pathComparer);\n            var commitChanged = !string.Equals(lastSyncedCommit, snapshot.CommitSha, StringComparison.Ordinal);\n","sourceCodeStart":53,"sourceCodeEnd":89,"githubUrl":"https://github.com/CoplayDev/unity-mcp/blob/c21bf496bca87d54e75bad048563c3adb1782081/MCPForUnity/Editor/Setup/SkillSyncService.cs#L53-L89","documentation":"TryParseGitHubRepository only accepts github.com absolute URLs (any scheme) or git@github.com: SSH URLs that contain at least owner/repo segments. RunSync throws this when the configured repo URL does not match either shape, so the sync never contacts the API.","triggerScenarios":"repoUrl points at a non-GitHub host (GitLab, Bitbucket, Gitea); URL is relative or non-absolute so Uri.TryCreate fails; path has fewer than two segments ('github.com/owner'); URL is empty/whitespace.","commonSituations":"User forked the skill repo to a different host; copied a file-browser URL with no owner/repo; pasted a raw URL fragment; entered a local filesystem path.","solutions":["Use a github.com URL in the form 'https://github.com/<owner>/<repo>'.","For SSH-style input use 'git@github.com:<owner>/<repo>'.","Ensure the URL has a scheme (http/https) so it parses as absolute.","Leave repoUrl at the default (CoplayDev/unity-mcp) unless you intentionally fork."],"exampleFix":"// before\nvar repoUrl = \"gitlab.com/me/unity-mcp\";\n// after\nvar repoUrl = \"https://github.com/CoplayDev/unity-mcp\";","handlingStrategy":"validation","validationCode":"if (!SkillSyncService.TryParseGitHubRepository(repoUrl, out _))\n{\n    throw new ArgumentException($\"Repo URL must be a github.com URL like https://github.com/<owner>/<repo>: {repoUrl}\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Default to the known-good repo (CoplayDev/unity-mcp) unless forking.","Validate the URL in the UI field before starting a sync.","Accept only github.com or git@github.com: forms."],"tags":["github","config","url","validation"],"backgroundTag":null,"analyzedSha":"c21bf496bca87d54e75bad048563c3adb1782081","analyzedAt":"2026-08-13T17:36:56.095Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}