{"record":{"id":"45f3f91883190db2","repo":"nodejs/node","slug":"vcs-origin-must-not-include-a-scheme-e-g-use-g","errorCode":null,"errorMessage":"vcs-origin must not include a scheme (e.g., use 'github.com/owner/repo' not 'https://github.com/owner/repo')","messagePattern":"vcs-origin must not include a scheme \\(e\\.g\\., use 'github\\.com/owner/repo' not 'https://github\\.com/owner/repo'\\)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"deps/npm/lib/commands/trust/circleci.js","lineNumber":64,"sourceCode":"      description: 'CircleCI context UUID to match',\n    }),\n    trustDefinitions['allow-publish'],\n    trustDefinitions['allow-stage-publish'],\n    // 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","sourceCodeStart":46,"sourceCodeEnd":82,"githubUrl":"https://github.com/nodejs/node/blob/1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e/deps/npm/lib/commands/trust/circleci.js#L46-L82","documentation":"Thrown by the CircleCI trust provider's `validateVcsOrigin` when the `--vcs-origin` value contains `://`, i.e. it includes a URL scheme. The expected format is a bare host path (`provider/owner/repo`) because the tool prepends `https://` itself.","triggerScenarios":"Calling the trust command with `--vcs-origin https://github.com/owner/repo` (or any `scheme://...` value); `value.includes('://')` is true.","commonSituations":"Copy-pasting the repository URL directly from a browser; CI config templating that injects a full URL; confusion with the GitHub provider which accepts a different shape.","solutions":["Strip the scheme and trailing slash: pass `github.com/owner/repo`.","Use the helper `getVcsOriginUrl` mentally — the tool adds `https://` for you.","If scripting, normalize with `value.replace(/^https?:\\/\\//, '').replace(/\\/$/, '')` before passing."],"exampleFix":"// before\n--vcs-origin https://github.com/npm/repo\n// after\n--vcs-origin github.com/npm/repo","handlingStrategy":"validation","validationCode":"function normalizeVcsOrigin(value) {\n  let v = String(value).trim().replace(/^https?:\\/\\//, '').replace(/\\/$/, '')\n  if (v.includes('://')) throw new Error('vcs-origin must not include a scheme')\n  return v\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Treat vcs-origin as `host/owner/repo`, never a full URL.","Add a normalization step in CI templates before invoking the trust command.","Cross-check against `getVcsOriginUrl`, which prepends https:// itself."],"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"}