Errors with branch protection rules and dependencies in GitHub backup

We have recently deployed an update to GitProtect, up to version 1.7.0, which added support for backup of Branch Protection Rules and Dependencies. We always stay on top of changes in GitHub API, and if they allow us to broaden our protection coverage, we follow through with updates in our platform.

This widened coverage requires extra permissions, as we need user authorizing GitProtect to be able to access those metadata.

If you connect GitHub with GitProtect via OAuth App:

  1. Please make sure that the user whose account you’ve used for GitProtect OAuth App authorization has access to Branch Protection rules and Dependencies metadata. Only users who have Admin permissions in the repository are able to access those.

  2. If you have the correct permissions, you need to reauthorize the connection between GitProtect and GitHub.

  3. To complete reauthorization, you need to re-add the GitHub organization in the same manner as you would add it from scratch. You don’t need to remove it from GitProtect beforehand. Act like it's not there yet.

  4. If you’re not sure how to add organization in GitProtect, follow instructions from our Knowledge Base in the same manner as you’d be adding this organization from the first time. Adding GitHub organization to GitProtect

  5. After you’ve done that, reauthorization is complete. You’re good to go!

If you connect GitHub with GitProtect via Personal Access Token (PAT)

  1. You need to update permissions of your Personal Access Token in GitHub. You can find those in Settings -> Developer Settings -> Personal Access Tokens -> Tokens (classic).

  2. Once there, grant two new permissions to your Personal Access Token: read:org and read:discussion.

  3. After you’ve updated your token permissions, you’re good to go!

I don’t want to change any permissions, but I don’t want to get errors in GitProtect too

Adding more permissions is not mandatory overall if you don't want to protect those metadata. You just need to edit your Backup Plan in GitProtect, and disable protection of those two metadata - then Error messages will stop as well.

Last updated