{"record":{"id":"820993288cdf2b4c","repo":"nodejs/node","slug":"vcs-origin-must-be-in-format-provider-owner-repo","errorCode":null,"errorMessage":"vcs-origin must be in format 'provider/owner/repo'","messagePattern":"vcs-origin must be in format 'provider/owner/repo'","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"deps/npm/lib/commands/trust/circleci.js","lineNumber":68,"sourceCode":"    // globals are alphabetical\n    globalDefinitions['dry-run'],\n    globalDefinitions.json,\n    globalDefinitions.registry,\n    globalDefinitions.yes,\n  ]\n\n  validateUuid (value, fieldName) {\n    validateUUID(value, fieldName)\n  }\n\n  validateVcsOrigin (value) {\n    // Expected format: provider/owner/repo (e.g., github.com/owner/repo, bitbucket.org/owner/repo)\n    if (value.includes('://')) {\n      throw new Error(\"vcs-origin must not include a scheme (e.g., use 'github.com/owner/repo' not 'https://github.com/owner/repo')\")\n    }\n    const parts = value.split('/')\n    if (parts.length < 3) {\n      throw new Error(\"vcs-origin must be in format 'provider/owner/repo'\")\n    }\n  }\n\n  // Generate a URL from vcs-origin (e.g., github.com/npm/repo -> https://github.com/npm/repo)\n  getVcsOriginUrl (vcsOrigin) {\n    if (!vcsOrigin) {\n      return null\n    }\n    // vcs-origin format: github.com/owner/repo or bitbucket.org/owner/repo\n    return `https://${vcsOrigin}`\n  }\n\n  static optionsToBody (options) {\n    const { orgId, projectId, pipelineDefinitionId, vcsOrigin, contextIds } = options\n    const trustConfig = {\n      type: 'circleci',\n      claims: {\n        'oidc.circleci.com/org-id': orgId,","sourceCodeStart":50,"sourceCodeEnd":86,"githubUrl":"https://github.com/nodejs/node/blob/1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e/deps/npm/lib/commands/trust/circleci.js#L50-L86","documentation":"Thrown by the CircleCI trust provider's `validateVcsOrigin` when the value, split on `/`, has fewer than three parts. The required shape is `provider/owner/repo` (e.g. `github.com/owner/repo`).","triggerScenarios":"Passing `--vcs-origin owner/repo` (2 parts) or a single segment; `value.split('/').length < 3` after the scheme check passes.","commonSituations":"Omitting the host (`owner/repo`); using `git@host:owner/repo`; trailing or missing segments from templating.","solutions":["Include the provider host: `github.com/owner/repo` (or `bitbucket.org/owner/repo`).","Convert SSH-style `git@github.com:owner/repo` to `github.com/owner/repo`.","Ensure no empty segments from double slashes."],"exampleFix":"// before\n--vcs-origin npm/repo\n// after\n--vcs-origin github.com/npm/repo","handlingStrategy":"validation","validationCode":"function assertVcsOriginFormat(value) {\n  const parts = String(value).split('/').filter(Boolean)\n  if (parts.length < 3) {\n    throw new Error(`vcs-origin \"${value}\" must be provider/owner/repo (e.g. github.com/owner/repo)`)\n  }\n  return parts.slice(0, 3).join('/')\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always include the provider host (github.com, bitbucket.org).","Convert SSH URLs to host/owner/repo before passing.","Avoid empty segments from double slashes."],"tags":["trust","circleci","vcs-origin","argument-validation","oidc"],"backgroundTag":null,"analyzedSha":"1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e","analyzedAt":"2026-08-13T00:53:24.642Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}