$ git push -f origin master
Enumerating objects: 4, done.
Counting objects: 100% (4/4), done.
Delta compression using up to 12 threads
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 744 bytes | 744.00 KiB/s, done.
Total 4 (delta 0), reused 0 (delta 0), pack-reused 0
remote: error: GH013: Repository rule violations found for refs/heads/master.
remote: Review all repository rules at http://github.com/Dhara6101/df/rules?ref=refs%2Fheads%2Fmaster
remote:
remote: - GITHUB PUSH PROTECTION
remote: ——————————————————————————————————————————————————————
remote: Resolve the following secrets before pushing again.
remote:
remote: (?) Learn how to resolve a blocked push
remote: https://docs.github.com/code-security/secret-scanning/pushing-a-branch-blocked-by-push-protection
remote:
remote:
remote: —— Amazon AWS Access Key ID ——————————————————————————
remote: locations:
remote: - commit: c4124b68309ef93439ca8c47cb5c22efffd1b0b3
remote: path: terraform.tf:3
remote:
remote: (?) To push, remove secret from commit(s) or follow this URL to allow the secret.
remote: https://github.com/Dhara6101/df/security/secret-scanning/unblock-secret/2dtVxT48OVa6yRih2eu4Z32xVCp
remote:
remote:
remote: —— Amazon AWS Secret Access Key ——————————————————————
remote: locations:
remote: - commit: c4124b68309ef93439ca8c47cb5c22efffd1b0b3
remote: path: terraform.tf:4
remote:
remote: (?) To push, remove secret from commit(s) or follow this URL to allow the secret.
remote: https://github.com/Dhara6101/df/security/secret-scanning/unblock-secret/2dtVxWWHKtoh69KjxL1U2dGaiNC
remote:
To https://github.com/Dhara6101/df.git
! [remote rejected] master -> master (push declined due to repository rule violations)
error: failed to push some refs to 'https://github.com/Dhara6101/df.git'
我想将我的代码推送到 GitHub 上。
你解决了吗?我遇到同样的错误。