paperclipai/paperclip · error · Error
--ref is only supported for GitHub import sources.
Error message
--ref is only supported for GitHub import sources.
What it means
--ref was supplied while the import source is not GitHub (local path or inline bundle), and ref pinning is only meaningful for GitHub source payloads.
Solutions
- Drop --ref, or use a GitHub import source if a ref is required.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at cli/src/commands/client/company.ts:1715 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of paperclipai/paperclip@120ae5428f (2026-08-18).
Data as JSON: /api/errors/ad6f6e26c6cbc678.
Report an issue: GitHub.
Appendix: source
Thrown at cli/src/commands/client/company.ts:1715
let sourcePayload:
| { type: "inline"; rootPath?: string | null; files: Record<string, CompanyPortabilityFileEntry> }
| { type: "github"; url: string };
let chunkedZip: { zipBytes: Uint8Array; rootPath: string } | null = null;
const treatAsLocalPath = !isHttpUrl(from) && await pathExists(from);
const isGithubSource = looksLikeRepoUrl(from) || (isGithubShorthand(from) && !treatAsLocalPath);
if (isHttpUrl(from) || isGithubSource) {
if (!looksLikeRepoUrl(from) && !isGithubShorthand(from)) {
throw new Error(
"Only GitHub URLs and local paths are supported for import. " +
"Generic HTTP URLs are not supported. Use a GitHub or GitHub Enterprise URL (https://github.com/... or https://ghe.example.com/...) or a local directory path.",
);
}
sourcePayload = { type: "github", url: normalizeGithubImportSource(from, opts.ref) };
} else {
if (opts.ref?.trim()) {
throw new Error("--ref is only supported for GitHub import sources.");
}
chunkedZip = await resolveChunkedImportZip(
from,
target === "existing"
? EXISTING_COMPANY_CHUNKED_IMPORT_THRESHOLD_BYTES
: CHUNKED_IMPORT_THRESHOLD_BYTES,
);
if (chunkedZip) {
// Too large for one request: the zip travels as a chunked
// transfer, so the inline files map is never built or sent.
sourcePayload = { type: "inline", rootPath: chunkedZip.rootPath, files: {} };
} else {
const inline = await resolveInlineSourceFromPath(from);
sourcePayload = {
type: "inline",
rootPath: inline.rootPath,
files: inline.files,
};View on GitHub (pinned to 120ae5428f)