stablyai/orca · error
GitHub work items require a GitHub remote for SSH repositori
Error message
GitHub work items require a GitHub remote for SSH repositories
What it means
Thrown by assertSshRepoHasResolvedGitHubSource when a repository is reached over an SSH connection (connectionId set) but neither issueOwnerRepo nor prOwnerRepo could be resolved to an owner/repo pair. SSH repo paths are remote-only, so without a resolved owner/repo the gh CLI would silently fall back to querying local git state and return wrong results. The constant GITHUB_WORK_ITEMS_SSH_REMOTE_REQUIRED_MESSAGE is reused so callers can pattern-match it.
Source
Thrown at src/main/github/client.ts:1198
}
// Why: shared shape so listWorkItems can lift per-side errors (#1076 silent wrongness) into the IPC envelope — a swallowed side reads as end-of-data to pagination (#11485).
type PartialWorkItemsResult = {
items: MainWorkItem[]
issuesError?: ClassifiedError
prsError?: ClassifiedError
}
function assertSshRepoHasResolvedGitHubSource(args: {
connectionId?: string | null
issueOwnerRepo: OwnerRepo | null
prOwnerRepo: OwnerRepo | null
}): void {
if (!args.connectionId || args.issueOwnerRepo || args.prOwnerRepo) {
return
}
// Why: SSH repo paths are remote-only, so without a resolved owner/repo gh would query local state.
throw new Error(GITHUB_WORK_ITEMS_SSH_REMOTE_REQUIRED_MESSAGE)
}
type ResolvedPrWorkItemSource = {
source: OwnerRepo | null
originCandidate: OwnerRepo | null
upstreamCandidate: OwnerRepo | null
}
async function resolvePrWorkItemSource(
repoPath: string,
preference: IssueSourcePreference | undefined,
connectionId?: string | null,
localGitOptions: LocalGitExecOptions = {}
): Promise<ResolvedPrWorkItemSource> {
const [originCandidate, upstreamCandidate] = await Promise.all([
getOriginGitHubApiRepository(repoPath, connectionId, localGitOptions),
getGitHubApiRepositoryForRemote(repoPath, 'upstream', connectionId, localGitOptions)
])View on GitHub (pinned to 1136503c6a)
Solutions
- On the SSH host, run `git remote -v` and confirm an `origin` (or upstream) URL of the form `git@github.com:owner/repo.git` or `https://github.com/owner/repo`.
- If the remote is not GitHub, GitHub work items (PRs/issues) are not available for this target — that is expected.
- If the remote is correct but stale, re-fetch and let Orca re-resolve; for a renamed repo, update the remote URL with `git remote set-url`.
- Reconnect to the SSH target so the relay re-enumerates remotes.
Defensive patterns
Strategy: validation
Validate before calling
// Pre-resolve owner/repo and fail fast with a clearer message.
async function resolveGitHubOwnerRepo(repoPath: string): Promise<OwnerRepo | null> {
const url = await getOriginUrl(repoPath)
return parseGitHubOwnerRepo(url) // returns null for non-GitHub URLs
} Type guard
function hasResolvedOwnerRepo(o: unknown): o is { owner: string; repo: string } {
return !!o && typeof o === 'object' &&
typeof (o as any).owner === 'string' && typeof (o as any).repo === 'string'
} Try / catch
try {
await loadGitHubWorkItems(repoPath, connectionId)
} catch (err) {
if ((err as Error).message === GITHUB_WORK_ITEMS_SSH_REMOTE_REQUIRED_MESSAGE) {
showNonGitHubTargetNotice()
} else throw err
} Prevention
- Confirm `git remote -v` shows a GitHub origin before enabling GitHub work items.
- Reconnect to SSH targets after renaming a fork's remote URL.
- Cache resolved owner/repo and invalidate on remote-url change.
When it happens
Trigger: SSH target whose remote URL is not a GitHub URL (e.g. a private Gerrit or bare ssh URL); the GitHub remote was renamed or transferred and the cached owner/repo is stale; remote URL parsing failed for an scp-style URL with an unusual port or path; the SSH relay could not enumerate remotes.
Common situations: SSHing into a box whose repo has no GitHub origin; a fork was renamed upstream; ssh-host git remote uses git@custom-host:alias that the parser can't map to owner/repo; relay connection dropped before remote enumeration completed.
Related errors
- Repo has no configured origin remote.
- SSH target "${input.target.connectionId}" is not connected.
- Cannot download a directory
- Remote connection dropped. Click Reconnect on the SSH target
- Clone failed: ${getGitCloneFailureMessage(message, { clonePa
AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12).
Data as JSON: /api/errors/f96d701afefdd367.
Report an issue: GitHub.