stablyai/orca · error
SSH Git provider is not available. Reconnect to this target
Error message
SSH Git provider is not available. Reconnect to this target and try again.
What it means
Thrown by fetchGitLabMergeRequestHeadRef when repo.connectionId is set (the repo lives on an SSH/remote host whose git.exec channel is read-only and rejects `fetch`) but no sshGitProvider was supplied. The dedicated RPC provider is mandatory for fetching MR head refs over an SSH connection; without it the fetch cannot run.
Source
Thrown at src/main/gitlab/mr-head-tracking-ref.ts:48
if (!isSafeReviewHeadFetchRemote(remote)) {
throw new Error('Merge request fetch remote must not start with "-".')
}
if (!repo.connectionId) {
const localGitExecOptions = options.localGitExecOptions ?? { cwd: repo.path }
const remoteComponent = await getReviewHeadRemoteComponent(remote, localGitExecOptions)
// Why: return the same path the fetch wrote so callers don't re-resolve identity.
const localRef = gitlabMergeRequestHeadLocalRef(remoteComponent, mrIid)
await gitExecFileAsync(
['fetch', '--no-tags', remote, `+refs/merge-requests/${mrIid}/head:${localRef}`],
{
...localGitExecOptions,
timeout: REVIEW_HEAD_FETCH_TIMEOUT_MS
}
)
return localRef
}
if (!sshGitProvider) {
throw new Error('SSH Git provider is not available. Reconnect to this target and try again.')
}
return sshGitProvider.fetchGitLabMergeRequestHead(repo.path, remote, mrIid)
}
View on GitHub (pinned to 1136503c6a)
Solutions
- Reconnect to the SSH/remote target so the sshGitProvider is re-established, then retry the fetch.
- Ensure the caller passes the current sshGitProvider instance (not a stale/closed one) when connectionId is set.
- If the connection is permanently gone, surface a reconnect prompt to the user rather than retrying blindly.
Defensive patterns
Strategy: try-catch
Type guard
function hasSshGitProvider(provider: unknown): provider is SshGitProvider {
return provider !== null && provider !== undefined
&& typeof (provider as SshGitProvider).fetchGitLabMergeRequestHead === 'function'
} Try / catch
try {
return await fetchGitLabMergeRequestHeadRef(repo, sshGitProvider, remote, mrIid, options)
} catch (error) {
if (error instanceof Error && /SSH Git provider is not available/.test(error.message)) {
await promptReconnect(repo.connectionId)
return await fetchGitLabMergeRequestHeadRef(repo, refreshedProvider, remote, mrIid, options)
}
throw error
} Prevention
- Pass the live sshGitProvider instance whenever repo.connectionId is set.
- Handle provider teardown before enqueuing fetches, or cancel in-flight fetches on disconnect.
- Surface a reconnect prompt immediately when the provider is missing for a connected repo.
When it happens
Trigger: Calling fetchGitLabMergeRequestHeadRef for a repo bound to a remote/SSH target (connectionId set) after the SSH session dropped, the provider was torn down, or the caller forgot to pass the sshGitProvider argument.
Common situations: SSH connection timed out or was closed by the host; reconnect/restart of the remote target cleared the provider; a code path that handles both local and SSH repos but doesn't thread the provider through; race between disconnect and a pending MR-head fetch.
Related errors
- SSH Git provider is not available. Reconnect to this target
- SSH target "${input.target.connectionId}" is not connected.
- SSH target did not connect: ${state.status}
- Remote connection dropped. Click Reconnect on the SSH target
- No SSH connection for "${connectionId}"
AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12).
Data as JSON: /api/errors/917d49f89121f0dd.
Report an issue: GitHub.