Personal Access Token Permissions and User Roles for GitHub

Updated

Certain personal access token permissions and user roles are required to perform backups and restores for GitHub.

Operation

Context

Personal access token permissions

User roles (member of the organization)

Backup

All contexts

  • Full permissions at the repo scope level for private repositories

  • Public_repo permission at the repo scope level for public repositories

  • User must have the Read role at the Organization level or at the Repository level

Restore

If the destination repository does not exist

  • Full permissions at the repo scope level for private repositories

  • Public_repo permissions at the repo scope level for public repositories

  • If a workflow is present in the repository, full permissions at the workflow scope level for public and private repositories

  • User must have the Create repository permission enabled

  • User will be set with the Admin role for the repository created by the restore operation

If the destination repository exists

  • Full permissions at the repo scope level for private repositories

  • Public_repo permissions at the repo scope level for public repositories

  • If a workflow is present in the repository, full permissions at the workflow scope for public and private repositories

  • User must have the Write role at the Organization level or at the Repository level