Updated 2026-12-03
The push fails with something like remote: error: GH013: Repository rule violations found for refs/heads/<branch>. followed by remote: - GITHUB PUSH PROTECTION and remote: Push cannot contain secrets. That's GitHub secret scanning's push protection: the commit you're pushing contains a line that matches the shape of a known secret, so GitHub refuses the push outright, before it ever reaches the repository.
Push protection is pattern-matching, not a live-credential check. It flags: recognized provider token formats (AWS, Stripe, GitHub tokens and more, via GitHub's secret scanning partner program), private key blocks (-----BEGIN ... PRIVATE KEY-----), and, on repos where it's enabled, generic-looking password = "..." or api_key: "..." assignments detected by a model rather than a fixed pattern. A unit test fixture with a fake-looking AWS key, an old token pasted into a changelog for documentation, or a sample .env.example committed by mistake can all trip the same block as a genuine leak — the scanner has no way to know the value is dead or fake just by looking at its shape.
git rebase -i <commit>~1, edit the commit to drop the line, git commit --amend, git rebase --continue, then force-push the rewritten branch).| GitHub (push protection on) | Rithub | |
|---|---|---|
| When a matched secret is caught | At push time — the push is rejected | Not at push time — pushes are never scanned or blocked |
| Where it's visible | Command-line rejection + a bypass-decision page | A non-blocking "possible secret in diff" flag on the pull request's review panel, after the push |
| False positives on fixtures/placeholders | Can still block the push; needs a bypass | Flagged for a human to look at, never blocks anything |
| Real protection against a genuine leak reaching the repo | Yes, at the point of push | No — use a real pre-commit/CI scanner (gitleaks, trufflehog) if you need that guarantee |
This isn't a "Rithub is better" page — fewer surprise blocks also means less of a safety net. If push-time secret rejection is the actual thing you rely on, keep it; if it's mostly been a source of false-positive friction on test fixtures and placeholders, that friction specifically doesn't exist on Rithub.
Sign up freeImport from GitHub