continuedev/continue · error · Error
Unable to determine remote type.
Error message
Unable to determine remote type.
What it means
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.
Source
Thrown at core/context/providers/GreptileContextProvider.ts:50
const githubToken = this.getGithubToken();
if (!githubToken) {
throw new Error("GitHub token not found.");
}
let absPath = await this.getWorkspaceDir(extras);
if (!absPath) {
throw new Error("Failed to determine the workspace directory.");
}
var remoteUrl = getRemoteUrl(absPath);
remoteUrl = getRemoteUrl(absPath);
const repoName = extractRepoName(remoteUrl);
const branch = getCurrentBranch(absPath);
const remoteType = getRemoteType(remoteUrl);
if (!remoteType) {
throw new Error("Unable to determine remote type.");
}
const options = {
method: "POST",
headers: {
Authorization: `Bearer ${greptileToken}`,
"X-GitHub-Token": githubToken,
"Content-Type": "application/json",
},
body: JSON.stringify({
messages: [{ id: "<string>", content: query, role: "user" }],
repositories: [
{
remote: remoteType,
branch: branch,
repository: repoName,
},
],View on GitHub (pinned to 5522c6f44c)
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
Example fix
# before git remote -v # (no origin) # after git remote add origin git@github.com:myorg/myrepo.git git push -u origin main
Defensive patterns
Strategy: validation
Validate before calling
import { execSync } from 'child_process';
const remote = execSync('git remote get-url origin').toString().trim();
if (!/github\.com|gitlab\.com/.test(remote)) { /* skip or warn */ } Type guard
function isSupportedRemote(url: string): boolean {
return /@(github|gitlab)\.[a-z.]+[:/]/.test(url) || /https?:\/\/(github|gitlab)\.[a-z.]+\//.test(url);
} Prevention
- Ensure origin is set to a canonical https/ssh URL before using repo-aware providers
- Document supported forges in provider setup docs
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Greptile token not found.
- Failed to determine the workspace directory.
- HTTP error! status: ${response.status}
- Failed to parse Greptile response: ${rawText}
- Error getting context items from Greptile
AI-assisted analysis of continuedev/continue@5522c6f44c (2026-08-27).
Data as JSON: /api/errors/268ce0298f405a23.
Report an issue: GitHub.