Skip to content

Latest commit

 

History

History
56 lines (32 loc) · 1.95 KB

config-github.rst

File metadata and controls

56 lines (32 loc) · 1.95 KB

GitHub

Configuration settings for backing up repositories from GitHub.

Warning

Known limitations:

Sources

For the basics, please read the config-sources section first.

For GitHub, the hoster entry in the config file needs to look like this:

hoster: github

Authentication

Without authentication, SCM Backup can only backup your public repositories.

In this case, it shows a warning:

image

To backup your private repositories as well, you need to authenticate:

  • To backup a user's repositories, you need to authenticate with that user.
  • To backup an organization's repositories, you need to authenticate with a user who has sufficient permissions to that organization's repositories.

Create a personal access token for SCM Backup for that user:

  1. In the user's settings on GitHub, go to Developer settings ⇒ Personal access tokens and create a new token. Give it at least the repo scope.

    This scope allows SCM Backup to get a list of that user's repositories, including private ones, via the GitHub API (read more about scopes).

  2. Put the username and the token into the authName and password properties of the source in the config file.

    Example:

    sources:
    
      - title: some_title
        hoster: github
        type: org
        name: your_org_name
        authName: your_user_name
        password: your_token

    This will backup the repositories of the organization your_org_name, but authenticate with the user your_user_name.