stablyai/orca · error · 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 inside the gitExec closure of worktrees:resolvePrBase when repo.connectionId is set (an SSH-backed repo) but getSshGitProvider(connectionId) returns undefined. The SSH Git provider is a registered, live connection; an undefined result means the target is disconnected or was never registered. The message directs the user to reconnect.

Source

Thrown at src/main/ipc/worktrees.ts:2281

        headRefName?: string
        baseRefName?: string
        isCrossRepository?: boolean
      }
    ): Promise<GitHubPrStartPoint | { error: string }> => {
      const repo = store.getRepo(args.repoId)
      if (!repo) {
        return { error: 'Repo not found' }
      }
      if (isFolderRepo(repo)) {
        return { error: 'Folder mode does not support creating worktrees.' }
      }
      const gitExec = async (args: string[]): Promise<{ stdout: string; stderr: string }> => {
        if (!repo.connectionId) {
          return gitExecFileAsync(args, getLocalProjectGitExecOptions(store, repo))
        }
        const provider = getSshGitProvider(repo.connectionId)
        if (!provider) {
          throw new Error(
            'SSH Git provider is not available. Reconnect to this target and try again.'
          )
        }
        return provider.exec(args, repo.path)
      }
      // Why: SSH review-head fetches require narrow write-capable RPCs.
      const fetchRemoteTrackingRef = (remote: string, branch: string): Promise<void> =>
        fetchPrHeadTrackingRef(
          repo,
          repo.connectionId ? getSshGitProvider(repo.connectionId) : undefined,
          remote,
          branch,
          { localGitExecOptions: getLocalProjectGitExecOptions(store, repo) }
        )
      const fetchPullRequestHeadRef = (remote: string, prNumber: number): Promise<string> =>
        fetchGitHubPullRequestHeadRef(
          repo,
          repo.connectionId ? getSshGitProvider(repo.connectionId) : undefined,

View on GitHub (pinned to 1136503c6a)

Solutions

  1. Reconnect to the SSH target (re-establish the connection) and retry resolvePrBase.
  2. If reconnection persistently fails, verify the target host is reachable and credentials/agent forwarding are valid.
  3. Surface a 'reconnect' affordance in the UI before retrying PR base resolution for SSH repos.
Defensive patterns

Strategy: retry

Validate before calling

// For SSH repos, ensure the connection is live before PR base resolution.
const status = await invoke('ssh:connectionStatus', repo.connectionId)
if (status !== 'connected') {
  await invoke('ssh:reconnect', repo.connectionId)
}

Try / catch

try {
  await invoke('worktrees:resolvePrBase', args)
} catch (e) {
  if (e.message.includes('SSH Git provider is not available')) {
    await invoke('ssh:reconnect', args.connectionId)
    return invoke('worktrees:resolvePrBase', args) // one retry after reconnect
  }
  throw e
}

Prevention

When it happens

Trigger: Calling worktrees:resolvePrBase on an SSH repo whose connection has dropped, timed out, or been unregistered (e.g. host went away, SSH agent stopped, or the relay connection was closed).

Common situations: Long-idle SSH target reaped by the relay, network change suspending the SSH session, orca restarted without restoring the SSH connection, or a configured target whose host key/auth changed.

Related errors


AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12). Data as JSON: /api/errors/f2115954dc3c0bc5. Report an issue: GitHub.