Skip to content

PromptScript API


Function: validateRemoteAccess()

validateRemoteAccess(repoUrl, ref?): Promise\<RemoteValidation>

Defined in: resolver/src/git-registry.ts:1021

Validate that a remote Git repository is accessible via git ls-remote.

Use this before writing a lockfile entry to catch auth/network problems early and surface actionable error messages rather than failing silently at clone time.

Parameters

repoUrl

string

Repository URL to check (HTTPS or SSH)

ref?

string

Optional branch, tag, or commit to resolve

Returns

Promise\<RemoteValidation>

RemoteValidation result with accessibility status and optional commit hash