解决HEAD -> main (push declined due to repository rule violations)
解决github Push rejected报错 remote: error: GH013: Repository rule violations found for refs/heads/maste
特别注意:
当前抱错其实是github的一种保护机制,因为检测到上传代码中包含secrets 密钥之类的代码。谨慎上传到公共平台!!!
将本地代码push到 github 时抱错
remote: Resolving deltas: 100% (155/155), completed with 10 local objects.
remote: error: GH013: Repository rule violations found for refs/heads/main.
remote:
remote: - GITHUB PUSH PROTECTION
remote: —————————————————————————————————————————
remote: Resolve the following violations before pushing again
remote:
remote: - Push cannot contain secrets
remote:
remote:
remote: (?) Learn how to resolve a blocked push
remote: https://docs.github.com/code-security/secret-scanning/working-with-secret-scanning-and-push-protection/working-with-push-protection-from-the-command-line#resolving-a-blocked-push
remote:
remote:
remote: —— Tencent Cloud Secret ID ———————————————————————————
remote: locations:
remote: - commit: fedf9849cd7bb1695210249f1cb941ba1e5c60bf
remote: path: libs/twikoo/twikoo.all.min.js:2
remote:
remote: (?) To push, remove secret from commit(s) or follow this URL to allow the secret.
remote: https://github.com/reveryday/reveryday.github.io/security/secret-scanning/unblock-secret/2rqMKt5lDoaLcDFiSGG2eRvmiwz
remote:
remote:
remote:
To github.com:reveryday/reveryday.github.io.git
! [remote rejected] HEAD -> main (push declined due to repository rule violations)
解决办法:打开 to push 下面 一行的连接,点击同意就行,再重新push就行。
127

被折叠的 条评论
为什么被折叠?



