[React.js] Error: GH013: Repository rule violations found
About Error
This error occurred when I git push -u origin main
to push my commits.
The reason was because I wrote personal access token in the index.html
file. I copied and pasted on there because it’s something I can never remember, but I will need it at some point in the future.
The problem is that github scans all these informations related to security issues, so they blocked my push.
Solution
In the error message, there is a link that directs you to the webpage that asks you about the sensitive information in your file. Once you tell them a reason, they will allow your push.
git push -f origin main
-f
means force. You can anyway push your files.Delete sensitive information. Github is a space where everyone can see your code (if your repo is public). So, it’s not a good idea to write sensitive information like a personal access token.
Subscribe to my newsletter
Read articles from Lim Woojae directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Lim Woojae
Lim Woojae
Computer Science Enthusiast with a Drive for Excellence | Web Development | Passionate About Tech & Innovation