{"record":{"id":"f2115954dc3c0bc5","repo":"stablyai/orca","slug":"ssh-git-provider-is-not-available-reconnect-to-th-f21159","errorCode":null,"errorMessage":"SSH Git provider is not available. Reconnect to this target and try again.","messagePattern":"SSH Git provider is not available\\. Reconnect to this target and try again\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/main/ipc/worktrees.ts","lineNumber":2281,"sourceCode":"        headRefName?: string\n        baseRefName?: string\n        isCrossRepository?: boolean\n      }\n    ): Promise<GitHubPrStartPoint | { error: string }> => {\n      const repo = store.getRepo(args.repoId)\n      if (!repo) {\n        return { error: 'Repo not found' }\n      }\n      if (isFolderRepo(repo)) {\n        return { error: 'Folder mode does not support creating worktrees.' }\n      }\n      const gitExec = async (args: string[]): Promise<{ stdout: string; stderr: string }> => {\n        if (!repo.connectionId) {\n          return gitExecFileAsync(args, getLocalProjectGitExecOptions(store, repo))\n        }\n        const provider = getSshGitProvider(repo.connectionId)\n        if (!provider) {\n          throw new Error(\n            'SSH Git provider is not available. Reconnect to this target and try again.'\n          )\n        }\n        return provider.exec(args, repo.path)\n      }\n      // Why: SSH review-head fetches require narrow write-capable RPCs.\n      const fetchRemoteTrackingRef = (remote: string, branch: string): Promise<void> =>\n        fetchPrHeadTrackingRef(\n          repo,\n          repo.connectionId ? getSshGitProvider(repo.connectionId) : undefined,\n          remote,\n          branch,\n          { localGitExecOptions: getLocalProjectGitExecOptions(store, repo) }\n        )\n      const fetchPullRequestHeadRef = (remote: string, prNumber: number): Promise<string> =>\n        fetchGitHubPullRequestHeadRef(\n          repo,\n          repo.connectionId ? getSshGitProvider(repo.connectionId) : undefined,","sourceCodeStart":2263,"sourceCodeEnd":2299,"githubUrl":"https://github.com/stablyai/orca/blob/1136503c6a231a16dce8f921f6fadb63d181e8db/src/main/ipc/worktrees.ts#L2263-L2299","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","solutions":["Reconnect to the SSH target (re-establish the connection) and retry resolvePrBase.","If reconnection persistently fails, verify the target host is reachable and credentials/agent forwarding are valid.","Surface a 'reconnect' affordance in the UI before retrying PR base resolution for SSH repos."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// For SSH repos, ensure the connection is live before PR base resolution.\nconst status = await invoke('ssh:connectionStatus', repo.connectionId)\nif (status !== 'connected') {\n  await invoke('ssh:reconnect', repo.connectionId)\n}","typeGuard":null,"tryCatchPattern":"try {\n  await invoke('worktrees:resolvePrBase', args)\n} catch (e) {\n  if (e.message.includes('SSH Git provider is not available')) {\n    await invoke('ssh:reconnect', args.connectionId)\n    return invoke('worktrees:resolvePrBase', args) // one retry after reconnect\n  }\n  throw e\n}","preventionTips":["Keep SSH targets connected or auto-reconnect before SSH-only operations.","Show a reconnect prompt when an SSH repo provider is unavailable.","Validate target reachability after network changes."],"tags":["ssh","ipc","provider-unavailable","pr-resolution"],"backgroundTag":null,"analyzedSha":"1136503c6a231a16dce8f921f6fadb63d181e8db","analyzedAt":"2026-08-12T23:15:58.167Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}