Troubleshooting
About 1013 wordsAbout 3 min
2026-09-01
Identify the observed symptom, review potential root causes, and follow the remediation steps.
1. Dispatch fails: 403 Resource not accessible by integration
Symptom: the dispatch step in the content repo's trigger-build.yml workflow fails.
HttpError: Resource not accessible by integrationCause: DISPATCH_TOKEN lacks write permissions on the theme repo, or was scoped to the wrong repository.
Fix:
- Open token settings in GitHub, confirm Repository access selects your theme repo;
- Confirm Contents permission is configured to Read and write;
- Generate a new token and update the
DISPATCH_TOKENsecret in the content repo.
See Access Tokens for detailed steps.
2. Host build fails: Authentication failed
Symptom: Cloudflare Pages, Vercel, or other hosts fail to clone the content repo during builds. Two error messages are common:
fatal: Authentication failed for 'https://github.com/...'fatal: could not read Username for 'https://github.com': terminal prompts disabledCause: the content repo is private while CONTENT_REPO_URL lacks an access token, or the token expired or lacks read access to the content repo. The second message typically appears on build machines such as EdgeOne Pages: Git cannot prompt for credentials in a non-interactive environment and fails immediately.
Fix:
Create a personal access token with
Contents: Readaccess on the content repo;Update the platform dashboard environment variable to include the token:
https://x-access-token:<TOKEN>@github.com/OWNER/CONTENT_REPO.gitTrigger a rebuild on the platform.
Public content repositories do not require access tokens. If the content repository is public, ensure the URL does not use SSH formatting (build containers usually have no SSH keys configured).
3. Host build fails: 403 Write access to repository not granted
Symptom: the platform build fails while fetching the content repo:
remote: Write access to repository not granted.
fatal: unable to access 'https://github.com/OWNER/CONTENT_REPO.git/': The requested URL returned error: 403Cause: the message is misleading — the problem is not missing write access. Usually the fine-grained PAT's Repository access does not include the content repo (for example, the theme repo was selected by mistake, or the token only covers public repositories), or the Contents permission was never set. A fine-grained token's repository scope and permissions cannot be edited after creation; it must be regenerated.
Fix:
Generate a new token: scope Repository access to the content repo only, with
Contents: Read;Verify locally first. Listing refs (or no output on an empty repo, without errors) means the token works:
git ls-remote https://x-access-token:<TOKEN>@github.com/OWNER/CONTENT_REPO.gitUpdate the token inside the platform's
CONTENT_REPO_URLvariable and rebuild.
See Access Tokens for detailed steps.
4. Host build fails: couldn't find remote ref main
Symptom: the platform build fails while fetching the content repo:
fatal: couldn't find remote ref mainCause: the content repo has no commits yet (the remote repository is empty, so the target branch does not exist), or CONTENT_REPO_REF points to a non-existent branch.
Fix:
- Confirm the content repo has been pushed at least once and the build branch exists remotely;
- Verify that
CONTENT_REPO_REFmatches the actual branch name (defaultmain).
5. YAML changed but the page did not
Symptom: edits to config/site.yaml or other configuration files do not appear locally or in production.
Fix:
Check field spelling
pnpm content:validateThe terminal specifies invalid keys and provides suggestions.
Check array syntax
List fields in
nav-bar.yamlandsidebar.yamlfollow full replacement rules; declaring only newly added entries will not merge. See Configuration Overlay.Check file location
Configuration files must reside in
config/inside the content repo, with file names matching documented conventions. Files placed elsewhere are ignored.Verify active content source
pnpm content:statusIf the output displays
local, the theme is reading bundled default content. Verify thatCONTENT_DIRorCONTENT_REPO_URLvariables are configured and active.
6. A new post is missing from the list
Check the following in order:
draft: true: draft posts are excluded from production builds;publishedcontains a future date: unpublished posts are hidden by default;- File extension is neither
.mdnor.mdx; - File is not placed directly under
content/posts/, or the filename contains unescaped whitespace; - Run
npx astro checkin the theme repo to detect missing required frontmatter properties.
7. A deleted post is still reachable
Cause: stale files remain in local build caches or the hosting platform's build cache.
Fix:
pnpm content:clean # preview cleanup plan
pnpm content:clean --yes # apply cleanup; backed up to .content-backup/
pnpm content:sync # re-sync contentIf this occurs on a hosting platform, clear its build cache and redeploy.
8. How to write image and file paths
- Standard image assets: use relative paths such as
./image.png, or site-root absolute paths such as/images/...; - Relative path layouts in the content repo match the theme repo and preserve relative hierarchy after syncing;
@[code-tree]and<!-- @include: ... -->read the filesystem directly, so their paths must be relative to the theme repo root.
Other standard Markdown syntax is unaffected by content separation.
9. Build succeeds but deployment fails
Symptom: the theme repo's Actions build succeeds, but the host's deployment log reports:
Error: Command "pnpm build" exited with 1Cause: GitHub Actions uploaded pre-built static dist/ files containing no package.json, but the host still ran its pre-configured build command.
Fix: configure the host as pure static hosting:
- Set Framework Preset to
Other; - Clear Build Command and Output Directory fields;
- Disconnect automatic Git build triggers.
Menu labels vary across platforms; consult Deployment Overview and specific platform guides. Disconnecting Git alone is often insufficient, as build commands persist in project settings and must be cleared explicitly.
Other questions
- Validating content repo structure: run
pnpm content:validate; - Choosing a deployment platform: see Deployment Overview;
- Debugging local preview issues: see Local Preview & Debugging.
Copyright
Copyright Ownership:Dawn6666666
License under:Attribution 4.0 International (CC-BY-4.0)