# `remote: error: GH013: Repository rule violations found — Push cannot contain secrets`

**Where it appears:** Terminal

**What it means:** GitHub scanned the commits you were about to push, spotted a real API key or secret inside a file, and blocked the push to protect your account.

## Likely causes

- A key was pasted into a code file, config file or `.env.example` instead of `.env.local`.
- `.env.local` wasn't listed in `.gitignore` when the commit was made.

## Message for your agent

```text
GitHub blocked my push with `GH013: Push cannot contain secrets`. Never bypass the block: I am revoking the key now. Remove the secret from the file and the unpushed commit, and verify `.gitignore` covers `.env*`.
```

**Prevention:** Never put real keys anywhere except `.env.local` and Vercel's Environment Variables.

---
Source: [Agentic Makers](https://agenticmakers.app/en/help/errors/github-push-protection-secret-detected-gh013) · License: CC BY 4.0
