stablyai/orca · error
Remote "${remote}" is not configured.
Error message
Remote "${remote}" is not configured. What it means
getReviewHeadRemoteComponent runs git remote get-url <remote> to capture the remote's identity for the durable review-head ref. If get-url exits non-zero OR returns an empty stdout (both collapsed to remoteUrl=''), the function throws — the review-head ref embeds the remote identity and cannot be built without it. The message names the missing remote so the caller can surface an actionable error rather than a raw fetch failure downstream.
Source
Thrown at src/main/git/review-head-remote-identity.ts:23
cwd: string
wslDistro?: string
}
// Why: the durable review-head ref embeds the remote's identity, and a missing
// remote must fail with an actionable message instead of a raw fetch error.
export async function getReviewHeadRemoteComponent(
remote: string,
localGitExecOptions: LocalGitExecOptions
): Promise<string> {
let remoteUrl: string
try {
const { stdout } = await gitExecFileAsync(['remote', 'get-url', remote], localGitExecOptions)
remoteUrl = stdout.trim()
} catch {
remoteUrl = ''
}
if (!remoteUrl) {
throw new Error(`Remote "${remote}" is not configured.`)
}
return reviewHeadRemoteRefComponent(remote, remoteUrl)
}
View on GitHub (pinned to 1136503c6a)
Solutions
- Verify the remote exists before calling: git remote should list it.
- If the remote was renamed, pass the new name or rename it back.
- Add the missing remote: git remote add <name> <url>.
- If the remote is genuinely gone, recompute the review-head identity from the new canonical remote rather than retrying with the old name.
Example fix
// before
const component = await getReviewHeadRemoteComponent(remoteName, { cwd: worktreePath })
// after: verify the remote exists first
const { stdout } = await gitExecFileAsync(['remote'], { cwd: worktreePath })
if (!stdout.split('\n').map((l) => l.trim()).includes(remoteName)) {
throw new Error(`Cannot build review-head ref: remote '${remoteName}' is missing. Add or rename it.`)
}
const component = await getReviewHeadRemoteComponent(remoteName, { cwd: worktreePath }) Defensive patterns
Strategy: validation
Validate before calling
import { gitExecFileAsync } from './runner'
async function remoteExists(cwd: string, remote: string): Promise<boolean> {
const { stdout } = await gitExecFileAsync(['remote'], { cwd })
return stdout.split('\n').map((l) => l.trim()).includes(remote)
}
if (!(await remoteExists(localGitExecOptions.cwd, remote))) {
throw new Error(`Cannot build review-head ref: remote '${remote}' is not configured.`)
} Type guard
function isRemoteNotConfigured(error: unknown): boolean {
return error instanceof Error && /^Remote ".+" is not configured\.$/.test(error.message)
} Try / catch
if (!(await remoteExists(cwd, remote))) await promptAddRemote(cwd, remote)
try { return await getReviewHeadRemoteComponent(remote, { cwd }) }
catch (error) { if (isRemoteNotConfigured(error)) { await promptAddRemote(cwd, remote); return await getReviewHeadRemoteComponent(remote, { cwd }) } throw error } Prevention
- Verify the remote exists in the remote list before building a review-head identity from it.
- After a remote rename, recompute review-head identity from the new canonical name.
- Do not pass stale remote names from old config into review-head construction.
When it happens
Trigger: Calling getReviewHeadRemoteComponent(remote, { cwd, wslDistro }) where 'remote' is not in the repo's remote list (typo, removed remote, wrong remote name from a stale config), or git remote get-url failed for a non-remote reason and stdout was empty.
Common situations: A review-head ref tracking a remote that was renamed or deleted; a typo in the remote name passed by the caller; a worktree whose parent lost a remote during a reconfigure; passing a fork remote name that was never added; WSL distro mismatch where the get-url ran in a context without the remote configured.
Related errors
- Repo has no configured git remotes.
- Merge request fetch remote must not start with "-".
- ${name} must be a positive integer, received ${value}
- no benchmark file exists at both HEAD and HEAD~1 in this che
- No worktrees on environment ${envName}
AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12).
Data as JSON: /api/errors/c928bb0f3544345b.
Report an issue: GitHub.