netlify deploy fails with misleading "Project not found" when extensions fetch returns 403 under send_build_bot_token_to_jigsaw (non-Owner / PAT)
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 20/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- typescript
- 领域
- cli
调研方向
The failure starts in the extensions fetch against api.netlifysdk.com, which sends the PAT as Netlify-SDK-Build-Bot-Token when the site has send_build_bot_token_to_jigsaw set. Reproduce the two curl calls in the report to confirm the 200 and 403 split, then find where @netlify/config handles that 403 and where the offline fallback produces "Project not found". Done means a non-Owner static deploy succeeds, or the extensions 403 is reported as a permissions problem instead of the link error.
由索引模型根据 Issue 内容生成。
描述
Describe the bug
On an Enterprise team (Okta/SSO), netlify deploy --site <site_id> --dir … --prod --no-build fails even though the site ID is valid and the auth token can successfully GET /api/v1/sites/:id.
With site feature flag send_build_bot_token_to_jigsaw: true, @netlify/config sends the user PAT as Netlify-SDK-Build-Bot-Token to Jigsaw. That call returns 403. The CLI then falls back to offline config resolution and reports:
Error: Project not found. Please rerun "netlify link"
That error is misleading: the project exists and is addressable; linking is not the problem.
Isolated comparison against the same extensions URL
(https://api.netlifysdk.com/team/<account_id>/integrations/installations/meta/<site_id>):
- Headers
Netlify-Config-Mode: cli+ User-Agent only → 200 [] - Same +
Netlify-SDK-Build-Bot-Token: <PAT>→ 403
Per Netlify roles docs, only Owner can install/uninstall extensions. A Developer (or other non-Owner) can still need to deploy a prebuilt static site. Making extensions fetch hard-fail blocks those deploys and hides the real cause.
Expected: static --dir / --no-build deploy should succeed (or soft-fail extensions to []), and errors should report the extensions 403 / permissions issue—not “Project not found / netlify link”.
Workaround: upload via Sites API zip deploy (POST /api/v1/sites/:id/deploys with Content-Type: application/zip), which does not call Jigsaw.
Steps to reproduce
- Use a site with
send_build_bot_token_to_jigsaw: true(GET /api/v1/sites/:id?feature_flags=cli). - Authenticate as a non-Owner (e.g. Developer) with a PAT that has SAML team access and can read the site.
- Build a static site into
dist/(no Netlify Functions/extensions required). - Run:
npx [email protected] deploy \
--dir=dist \
--prod \
--no-build \
--debug \
--site=<site_uuid>
- Observe debug warnings about extensions 403, then offline fallback, then:
Error: Project not found. Please rerun "netlify link"
- Optionally confirm with curl:
# 200 without build-bot token
curl -sS -o /dev/null -w "%{http_code}\n" \
-H "Netlify-Config-Mode: cli" \
-H "User-Agent: Netlify Config (mode:cli) / 25.2.6" \
"https://api.netlifysdk.com/team/<account_id>/integrations/installations/meta/<site_id>"
# 403 with PAT as build-bot token
curl -sS -o /dev/null -w "%{http_code}\n" \
-H "Netlify-Config-Mode: cli" \
-H "User-Agent: Netlify Config (mode:cli) / 25.2.6" \
-H "Netlify-SDK-Build-Bot-Token: $NETLIFY_AUTH_TOKEN" \
"https://api.netlifysdk.com/team/<account_id>/integrations/installations/meta/<site_id>"
Configuration
There is no netlify.toml for this project. Deploy is a prebuilt static upload only (--dir=dist --prod --no-build --site=<uuid>). No Netlify Functions, Edge Functions, or Extensions are configured for the site.
Relevant site feature flags (excerpt from GET /api/v1/sites/:id?feature_flags=cli):
{
"send_build_bot_token_to_jigsaw": true,
"cli_fetch_integrations": true,
"auto_install_required_extensions_v2": true
}
Environment
System:
OS: macOS 26.6.2
CPU: (11) arm64 Apple M3 Pro
Memory: 97.36 MB / 18.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 24.18.0 - ~/node/24.18.0/bin/node
npm: 11.10.1 - ~/npm/11.10.1/bin/npm
- 主要语言
- TypeScript
- 星标
- 1.9k
- 派生
- 482
- 平均合并
- 1 天 11 小时
- 30 天内合并 PR
- 74
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
netlify/cli 的其他 Issue
-
db-status.test fails if the database is disabled可能已有人在做 @paulleephp 于 11 天前认领。 未关闭type: bug
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
`client-ip` is not an IP address when `x-forwarded-for` holds a list or a port可能已有人在做 @Dev-next-gen 于 32 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
`netlify dev` with `--cwd` from outside the project: every function 500s with "module is not defined in ES module scope" (`detectZisiBuilder` passes a string to `readPackageUp`)可能已有人在做 @bsplatt92 于 73 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
area: command: deploy area: docs type: feature
难度 1/5 1 小时以内 新手友好度 88/100
netlify/cli#1984 · 19 条评论 · 3 个 reaction ·
维护者通常 1 天内回复
-
type: bug
难度 3/5 1-2 天 新手友好度 38/100
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
better-auth/better-auth#12132 · 1 个 reaction ·
维护者通常 1 天内回复
-
o8 next debug build aborts on Glass to Dark appearance switch (nil identifier messaged before check)未关闭bug
难度 2/5 1-3 小时 新手友好度 78/100
hurttlocker/o8#5112 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
webrecorder/wabac.js#386 ·
-
needs-triage
难度 1/5 1-3 小时 新手友好度 92/100
agent-of-empires/agent-of-empires#5098 · 1 条评论 · 1 个 reaction ·
维护者通常 1 天内回复