問題
在push代碼到master的時候Github 報錯 remote: error: GH013: Repository rule violations found for refs/heads/main
這次是因為Github的保護機制引起rejected。錯誤如下:
可見是因為疑似代碼中有一些key可能會泄漏,(通過給出的幫助文檔 https://docs.github.com/zh/code-security/secret-scanning/push-protection-for-repositories-and-organizations)
解決辦法
修改代碼或者關(guān)閉這個保護掃描,我選擇關(guān)閉保護后push代碼,然后再打開:)。
在個人設置中
找到Security下的Code security and analysis。文章來源:http://www.zghlxwxcb.cn/news/detail-853156.html
看到push protection for yourself 點擊 disable后在推送代碼就好了。
一定記得push后打開,還是很有用的一個保護機制文章來源地址http://www.zghlxwxcb.cn/news/detail-853156.html
到了這里,關(guān)于解決github Push rejected報錯 remote: error: GH013: Repository rule violations found for refs/heads/maste的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!