Set Up Push Restrictions
You can protect the repository by prohibiting pushes from unauthenticated commiters, and pushes of oversized or unwanted files.
Open the Repository Settings page.
Go to the Push Restrictions tab.
Apply the following restrictions:
Verify committer— Authenticate the user pushing a commit and prohibit to push if they are not the commit author.
Limit file size— Prohibit to push files larger than a specified size.
Use default list of forbidden files— Prohibit to push files in the pre-defined list (the list currently includes one file: id_rsa.)
Prohibit to push files with specific name or type.