Docs: troubleshooting for required checks on direct pushes and fsck-refused pushes (#78)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016q5wwBFck8JHq14gHUM2CL
Canberk Demirci authored · GitHub committed signed1 parent b5a488ecommit e0fc0c62aa4feed09b40438374e5c2580328de7fBrowse files
2 files changed+4−0
modifiedapps/diffinery/docs/repositories/branch-protection.md+1−0View file
| @@ -357,6 +357,7 @@ | ||
| 357 | 357 | | `protected branch: changes must be made through a pull request` | The rule sets `requirePullRequest`. | |
| 358 | 358 | | `protected branch: force push not allowed` | The update is not a fast-forward and the rule does not set `allowForcePush`. | |
| 359 | 359 | | `protected branch: merge commits not allowed (linear history)` | The pushed commits include a merge commit. | |
| 360 | +| `protected branch: required check '<name>' has not run on <sha>; push to another branch and open a pull request` (or `has not finished`, `ended with <conclusion>`) | The rule requires status checks, and the commit the push moves the branch to hasn't passed them. Push to another branch and open a pull request. Administrators are exempt unless `enforceAdmins` is set. | | |
| 360 | 361 | | `only maintainers may move tags` | Moving an existing tag needs the maintain role. | |
| 361 | 362 | | `merge queue branches are read-only` | `gh-readonly-queue/...` branches belong to the merge queue. | |
| 362 | 363 | | `refs/pull/ is managed by Diffinery for pull requests` | Pull request refs cannot be pushed. | |
modifiedapps/diffinery/docs/repositories/git.md+3−0View file
| @@ -265,6 +265,7 @@ | ||
| 265 | 265 | | Force push without **Allow force pushes** | `protected branch: force push not allowed` | |
| 266 | 266 | | Deletion without **Allow deletion** | `protected branch: deletion not allowed` | |
| 267 | 267 | | **Require linear history** and the push adds a merge commit | `protected branch: merge commits not allowed (linear history)` | |
| 268 | +| **Required status checks** and the new commit hasn't passed one | `protected branch: required check '<name>' has not run on <sha>; push to another branch and open a pull request` (or `has not finished`, or `ended with <conclusion>`) | | |
| 268 | 269 | |
| 269 | 270 | Admins (with an `admin`-scoped token) bypass these rules on push unless the rule has **Do not allow administrators to bypass these rules**. |
| 270 | 271 | |
| @@ -334,6 +335,8 @@ | ||
| 334 | 335 | | `The requested URL returned error: 403` on push from a workflow | The job's token has no `contents: write` (`Resource not accessible by integration`). | Add `permissions: contents: write` to the workflow or job, or have an admin change the repository's default workflow permissions. | |
| 335 | 336 | | `[remote rejected] ... (refusing to allow a GitHub App to create or update workflow ...)` | A workflow's job token tried to push a change to a workflow file. | Push workflow changes with a personal or agent token instead. | |
| 336 | 337 | | `remote unpack failed: push exceeds 100 MB; split it into smaller pushes` | The pack for this push is larger than 100 MB. | Push history in steps, oldest first, for example `git push origin <older-commit>:refs/heads/main`, then later commits. Move large binaries to Git LFS. | |
| 338 | +| `remote: Push refused: tree <id>: duplicate entry '<name>'` (or another reason), `remote unpack failed: fsck error: ...` and `[remote rejected] ... (fsck failed)` | A tree or `.gitmodules` file in the push fails git's `fsck` checks: an entry that is empty, `.`, `..`, a spelling of `.git`, contains `/` or appears twice, a `.gitmodules` that is a symbolic link, or a submodule whose name has `..` or whose `url` or `path` starts with `-`. Nothing from the push is kept. | Run `git fsck` locally to find the object, fix the tree or `.gitmodules` in a new commit (or rewrite the commit that added it), and push again. | | |
| 339 | +| `[remote rejected] ... (protected branch: required check '<name>' has not run on <sha>; ...)` | The branch requires status checks, and the commit you pushed hasn't passed them. | Push to another branch and open a pull request, or push a commit that already passed the checks. | | |
| 337 | 340 | | `[remote rejected] ... (secret detected (push protection))` | A pushed file contains something that looks like a credential. | Remove it from every commit in the push (`git commit --amend`, or `git rebase -i`), rotate the credential, and push again. See [Push protection](/docs/security/push-protection). | |
| 338 | 341 | | `[remote rejected] ... (fetch first (stale info))` | The branch moved since you fetched. | `git pull --rebase` (or fetch and merge), then push. | |
| 339 | 342 | | `[remote rejected] ... (missing objects)` | The push referenced objects the server doesn't have, often after a shallow clone. | Fetch the full history (`git fetch --unshallow`) and push again. | |