{"record":{"id":"268ce0298f405a23","repo":"continuedev/continue","slug":"unable-to-determine-remote-type","errorCode":null,"errorMessage":"Unable to determine remote type.","messagePattern":"Unable to determine remote type\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"core/context/providers/GreptileContextProvider.ts","lineNumber":50,"sourceCode":"\n    const githubToken = this.getGithubToken();\n    if (!githubToken) {\n      throw new Error(\"GitHub token not found.\");\n    }\n\n    let absPath = await this.getWorkspaceDir(extras);\n    if (!absPath) {\n      throw new Error(\"Failed to determine the workspace directory.\");\n    }\n\n    var remoteUrl = getRemoteUrl(absPath);\n    remoteUrl = getRemoteUrl(absPath);\n    const repoName = extractRepoName(remoteUrl);\n    const branch = getCurrentBranch(absPath);\n    const remoteType = getRemoteType(remoteUrl);\n\n    if (!remoteType) {\n      throw new Error(\"Unable to determine remote type.\");\n    }\n\n    const options = {\n      method: \"POST\",\n      headers: {\n        Authorization: `Bearer ${greptileToken}`,\n        \"X-GitHub-Token\": githubToken,\n        \"Content-Type\": \"application/json\",\n      },\n      body: JSON.stringify({\n        messages: [{ id: \"<string>\", content: query, role: \"user\" }],\n        repositories: [\n          {\n            remote: remoteType,\n            branch: branch,\n            repository: repoName,\n          },\n        ],","sourceCodeStart":32,"sourceCodeEnd":68,"githubUrl":"https://github.com/continuedev/continue/blob/5522c6f44ca0ac3528b37244818fbfa39b5af470/core/context/providers/GreptileContextProvider.ts#L32-L68","documentation":"getRemoteType(remoteUrl) returned a falsy value, meaning the git remote URL of the workspace repo is not recognizable (not GitHub/GitLab/etc. as supported by the helper). Greptile requires knowing the remote type to build its query.","triggerScenarios":"The workspace repo's origin remote is missing, empty, or a non-supported URL format (local path remote, SSH alias, or an unsupported forge) when the greptile provider runs.","commonSituations":"git remote origin never set; remote like /home/me/repo.git or git@myalias:org/repo (custom SSH config) that the parser doesn't recognize; repo hosted on an unsupported platform.","solutions":["Run git remote -v and ensure origin points to a supported https/ssh GitHub URL","If using an SSH alias, rewrite origin to the canonical git@github.com:org/repo.git form","Push the repo to GitHub/GitLab first if it only exists locally"],"exampleFix":"# before\ngit remote -v\n# (no origin)\n# after\ngit remote add origin git@github.com:myorg/myrepo.git\ngit push -u origin main\n","handlingStrategy":"validation","validationCode":"import { execSync } from 'child_process';\nconst remote = execSync('git remote get-url origin').toString().trim();\nif (!/github\\.com|gitlab\\.com/.test(remote)) { /* skip or warn */ }","typeGuard":"function isSupportedRemote(url: string): boolean {\n  return /@(github|gitlab)\\.[a-z.]+[:/]/.test(url) || /https?:\\/\\/(github|gitlab)\\.[a-z.]+\\//.test(url);\n}","tryCatchPattern":null,"preventionTips":["Ensure origin is set to a canonical https/ssh URL before using repo-aware providers","Document supported forges in provider setup docs"],"tags":["git","remote","greptile"],"backgroundTag":"git-remote-not-found","analyzedSha":"5522c6f44ca0ac3528b37244818fbfa39b5af470","analyzedAt":"2026-08-27T11:28:54.683Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}