nodejs/node · error · Error

vcs-origin must be in format 'provider/owner/repo'

Error message

vcs-origin must be in format 'provider/owner/repo'

What it means

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`).

Source

Thrown at deps/npm/lib/commands/trust/circleci.js:68

    // globals are alphabetical
    globalDefinitions['dry-run'],
    globalDefinitions.json,
    globalDefinitions.registry,
    globalDefinitions.yes,
  ]

  validateUuid (value, fieldName) {
    validateUUID(value, fieldName)
  }

  validateVcsOrigin (value) {
    // Expected format: provider/owner/repo (e.g., github.com/owner/repo, bitbucket.org/owner/repo)
    if (value.includes('://')) {
      throw new Error("vcs-origin must not include a scheme (e.g., use 'github.com/owner/repo' not 'https://github.com/owner/repo')")
    }
    const parts = value.split('/')
    if (parts.length < 3) {
      throw new Error("vcs-origin must be in format 'provider/owner/repo'")
    }
  }

  // Generate a URL from vcs-origin (e.g., github.com/npm/repo -> https://github.com/npm/repo)
  getVcsOriginUrl (vcsOrigin) {
    if (!vcsOrigin) {
      return null
    }
    // vcs-origin format: github.com/owner/repo or bitbucket.org/owner/repo
    return `https://${vcsOrigin}`
  }

  static optionsToBody (options) {
    const { orgId, projectId, pipelineDefinitionId, vcsOrigin, contextIds } = options
    const trustConfig = {
      type: 'circleci',
      claims: {
        'oidc.circleci.com/org-id': orgId,

View on GitHub (pinned to 1b2de5e052)

Solutions

  1. Include the provider host: `github.com/owner/repo` (or `bitbucket.org/owner/repo`).
  2. Convert SSH-style `git@github.com:owner/repo` to `github.com/owner/repo`.
  3. Ensure no empty segments from double slashes.

Example fix

// before
--vcs-origin npm/repo
// after
--vcs-origin github.com/npm/repo
Defensive patterns

Strategy: validation

Validate before calling

function assertVcsOriginFormat(value) {
  const parts = String(value).split('/').filter(Boolean)
  if (parts.length < 3) {
    throw new Error(`vcs-origin "${value}" must be provider/owner/repo (e.g. github.com/owner/repo)`)
  }
  return parts.slice(0, 3).join('/')
}

Prevention

When it happens

Trigger: Passing `--vcs-origin owner/repo` (2 parts) or a single segment; `value.split('/').length < 3` after the scheme check passes.

Common situations: Omitting the host (`owner/repo`); using `git@host:owner/repo`; trailing or missing segments from templating.

Related errors


AI-assisted analysis of nodejs/node@1b2de5e052 (2026-08-13). Data as JSON: /api/errors/820993288cdf2b4c. Report an issue: GitHub.