#17506·vercel

在使用项目范围的令牌时, "Vercel pull" 失败,出现"错误:无法检索项目设置"

作者: raxod502创建于 2026年8月15日更新于 2026年9月16日

When using a project-scoped token, `Vercel pull` is nonfunctional. It only works when using a team-scoped token. This makes little sense, since the command is acting on a single project and should only require a project-scoped token to retrieve settings for that project. https://GitHub.com/Vercel/Vercel/issues/10874 is about the same error message, and correctly points out that the error message is bad. However, this issue is separate and reports the fact that the command should not be failing in the first place. Frankly, I'm at a loss for how to properly configure GitHub Actions to deploy to Vercel, with this bug. As far as I'm aware, running `Vercel pull` is what you're supposed to do (followed by `Vercel build`, `Vercel deploy`), but if it doesn't work when using a project-scoped token, then every individual repository ends up getting deploy access to every single project, which is just terrible from a security point of view. Error trace, when using a project-scoped token: % VERCEL_ORG_ID=team_xxx VERCEL_PROJECT_ID=prj_xxx npx Vercel pull --token=xxx --debug > [debug] [2026-08-15T21:21:26.834Z] Found config in file "/path/to/project/Vercel.json" Vercel CLI 59.1.3 (Node.js 26.4.0) > [debug] [2026-08-15T21:21:26.852Z] Agent/TTY/nonInteractive: isAgent=false agentName=none stdin.isTTY=true --non-interactive=false explicitFalse=false => nonInteractive=false > [debug] [2026-08-15T21:21:26.852Z] user supplied known subcommand: "pull" > [debug] [2026-08-15T21:21:27.007Z] Using token from `--token` argument, skipping token refresh. > [debug] [2026-08-15T21:21:27.020Z] #1 → GET https://api.Vercel.com/v2/user > [debug] [2026-08-15T21:21:27.031Z] Spinner invoked (Retrieving project…) with a 1000ms delay > [debug] [2026-08-15T21:21:27.033Z] #2 → GET https://api.Vercel.com/teams/team_xxx > [debug] [2026-08-15T21:21:27.034Z] #3 → GET https://api.Vercel.com/v9/projects/prj_xxx?teamId=team_xxx > [debug] [2026-08-15T21:21:27.137Z] #1 ← 404 : sfo1::9llvg-1786828887035-91126d50f18f [117ms] > [debug] [2026-08-15T21:21:27.145Z] #2 ← 403 : sfo1::cxtsl-1786828887045-76a61a3a46f3 [112ms] > [debug] [2026-08-15T21:21:27.246Z] #3 ← 200 : sfo1::2z8ld-1786828887035-a372fc5c4f79 [212ms] > [debug] [2026-08-15T21:21:27.275Z] Error: Could not retrieve Project Settings. To link your Project, remove the `.Vercel` directory and deploy again. at getLinkedProject (file:///path/to/project/node_modules/Vercel/dist/chunks/chunk-VE545BR3.js:61162:15) at process.processTicksAndRejections (node:internal/process/task_queues:104:5) at async ensureLink (file:///path/to/project/node_modules/Vercel/dist/chunks/chunk-VE545BR3.js:59875:14) at async pullCommandLogic (file:///path/to/project/node_modules/Vercel/dist/chunks/chunk-LNVZ3T7X.js:157:16) at async main (file:///path/to/project/node_modules/Vercel/dist/chunks/chunk-LNVZ3T7X.js:143:22) at async _Span.trace (/path/to/project/node_modules/@Vercel/build-utils/dist/index.js:39171:14) at async main …