! [remote rejected] main -> main (push declined due to repository rule violations)

解决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就行。

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值