Error when pushing to the repository with protected branch
Last updated
Last updated
This error occurs when your Git branch is protected.
Git Sync requires our bot to make and push changes to your repo without restrictions. This means that even during setup, our app must have full permission to make those changes.
You need to allow the GitBook app to bypass any branch protections for the Git Sync sync to work.
Currently, we support the following branch protections:
Require a pull request before merging
Restrict who can push to matching branches
In both cases, you can allow the app to bypass specific teams or apps.
To do so, navigate to your settings in GitHub and allow gitbook-com
to bypass those restrictions. The branch protections should look like this: