Errors with branch protection rules and dependencies in GitHub backup
Last updated
Last updated
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.
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.
If you have the correct permissions, you need to reauthorize the connection between GitProtect and GitHub.
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.
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
After you’ve done that, reauthorization is complete. You’re good to go!
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).
Once there, grant two new permissions to your Personal Access Token: read:org and read:discussion.
After you’ve updated your token permissions, you’re good to go!
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.