# 远程：错误：无法推送到受保护的引用 'refs/heads/main'

- **ID:** `git/push-delete-refspec`
- **领域:** git
- **类别:** auth_error
- **验证级别:** ai_generated
- **修复率:** 85%

## 根因

尝试推送到受仓库规则保护的（例如 GitHub 分支保护）分支，需要拉取请求或管理员批准。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| git 2.37.0 | active | — | — |
| git 2.41.0 | active | — | — |
| git 2.44.0 | active | — | — |

## 解决方案

1. ```
   Create a new branch, push it, and open a pull request for review: 'git checkout -b feature-branch && git push origin feature-branch'.
   ```
2. ```
   Request admin to temporarily disable branch protection, then push.
   ```

## 无效尝试

- **** — Forcing push with 'git push --force' will be rejected by the remote server. (95% 失败率)
- **** — Deleting the protected branch locally and pushing again will fail due to remote protection. (90% 失败率)
