docs(cloudflare): 坑 3 — wrangler pages deploy 多行 commit 被 CF 拒#16
Merged
Merged
Conversation
CF Pages deployment API(错误码 8000111)不接受带换行的 commit message。 wrangler 默认会把 git log -1 的 subject+body 整块发过去,于是带 body 的提交 就会 deploy 失败。错误信息称"not valid UTF-8"是误导——实际拒的是换行符。 加了坑 3 完整说明 + 两种修法(手动 --commit-message "$(git log -1 --pretty=%s)" 或在项目里写 scripts/deploy.sh 封装)。错误调试速查表也补了 8000111 + 8000007。 发现来源:classics-learning 项目 deploy 时踩到,单行中文 commit 没事, 本次 commit 带了 body 才暴露。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
wrangler pages deploy默认把git log -1的多行 commit message(subject+body)发给 CF Pages deployment API,CF 拒,报8000111 must be a valid UTF-8 string—— 错误信息有误导性,实际拒的是换行符不是 UTF-8。--commit-message "$(git log -1 --pretty=%s)"、或写scripts/deploy.sh封装一次。8000111和8000007(坑 1 提到但表里没收)。发现来源
classics-learning部署时踩到。历史 commits 都是单行中文 subject、没 body,所以没暴露;这次 commit 带了 body 才出错。Test plan