stablyai/orca · error · Error
Clone destination must be an absolute path on the SSH host
Error message
Clone destination must be an absolute path on the SSH host
What it means
Thrown when isRuntimePathAbsolute(trimmedDestination, host.pathFlavor) is false. Path absoluteness is flavor-dependent: posix requires a leading '/', windows requires 'drive:/' or '//'. The destination is first trimmed and run through resolveRemoteHomePath (which expands '~' via session.resolveHome). If after that it is not absolute in the host's flavor, the clone cannot safely proceed.
Source
Thrown at src/main/ipc/repos.ts:500
url: string
destination: string
}
): Promise<Repo> {
const gitProvider = getSshGitProvider(args.connectionId)
if (!gitProvider) {
throw new Error(`SSH connection "${args.connectionId}" not found or not connected`)
}
const fsProvider = getSshFilesystemProvider(args.connectionId)
if (!fsProvider) {
throw new Error(`SSH connection "${args.connectionId}" not found or not connected`)
}
const host = gitProvider.getHostPlatform?.()
if (!host) {
throw new Error('SSH host platform is unavailable. Reconnect the SSH target before cloning.')
}
const trimmedDestination = await resolveRemoteHomePath(args.connectionId, args.destination.trim())
if (!isRuntimePathAbsolute(trimmedDestination, host.pathFlavor)) {
throw new Error('Clone destination must be an absolute path on the SSH host')
}
const repoName = deriveCloneRepoNameFromUrl(args.url.trim())
const clonePath = joinRemotePath(host, trimmedDestination, repoName)
if (relativePathInsideRoot(trimmedDestination, clonePath) === null) {
throw new Error('Clone path must be inside the destination directory')
}
const clonePathKey = normalizeRuntimePathForComparison(clonePath)
const existing = store.getRepos().find((repo) => {
return (
repo.connectionId === args.connectionId &&
normalizeRuntimePathForComparison(repo.path) === clonePathKey
)
})
if (existing && !isFolderRepo(existing)) {
emitRepoAdded('clone_url', true)
return existing
}
View on GitHub (pinned to 1136503c6a)
Solutions
- Provide an absolute path in the host's flavor: '/home/user/repos' on posix, 'C:/Users/me/repos' or '//server/share/repos' on windows.
- Prefix the path with '~/...' so resolveRemoteHomePath expands it; if expansion silently failed, upgrade the relay to one that supports session.resolveHome.
- Detect the host.pathFlavor up front and validate the destination against it before calling the clone IPC.
- Trim leading/trailing whitespace and stray quotes that can break absoluteness detection.
Defensive patterns
Strategy: validation
Validate before calling
import { isRuntimePathAbsolute } from '../../shared/cross-platform-path'
import type { RemoteHostPlatform } from '../ssh/ssh-remote-platform'
function destinationIsAbsoluteForHost(destination: string, host: RemoteHostPlatform): boolean {
return isRuntimePathAbsolute(destination.trim(), host.pathFlavor)
} Type guard
function isCloneDestinationNotAbsolute(err: unknown): boolean {
return err instanceof Error && err.message === 'Clone destination must be an absolute path on the SSH host'
} Try / catch
if (!destinationIsAbsoluteForHost(destination, host)) {
surfaceUserAction(`Provide an absolute path in the host's format (e.g. /home/user/repos or C:/Users/me/repos).`)
return
}
await cloneRemoteRepo(store, mainWindow, { connectionId, url, destination }) Prevention
- Validate the destination against host.pathFlavor before invoking the clone IPC.
- Prefer '~/...' so resolveRemoteHomePath expands it; if expansion is unreliable, upgrade the relay.
- Trim whitespace and stray quotes from the destination before submission.
When it happens
Trigger: Passing a relative destination ('repos/myrepo'), a tilde that did not expand ('~' returned as-is because the relay lacked session.resolveHome), or a Windows-style path on a posix host (or vice versa). isRuntimePathAbsolute checks flavor: 'C:\\' on posix returns false; '/home/x' on windows returns false.
Common situations: UI defaulted to a relative path; user typed 'myrepo' expecting it under home but no tilde expansion happened; cross-flavor mistake (Windows path on a Linux SSH host); older relay that didn't implement session.resolveHome returning '~' verbatim.
Related errors
- Clone path must be inside the destination directory
- Clone destination must be an absolute path
- SSH connection "${args.connectionId}" not found or not conne
- SSH host platform is unavailable. Reconnect the SSH target b
- A clone is already in progress for this SSH destination
AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12).
Data as JSON: /api/errors/1dc85b682558f431.
Report an issue: GitHub.