GitHub Setup Guide
Follow our setup guide to connect GitHub to Fivetran.
Prerequisites
To connect GitHub to Fivetran, you need access to an active GitHub account with the permissions appropriate for the following GitHub scopes:
repo
read:org
admin:org_hook
admin:repo_hook
See the GitHub Scopes For OAuth Apps documentation for details.
If you use fine-grained personal access tokens, grant the following permissions:
Administration:read
Issues:read
Members:read
Metadata:read
Pull requests:read
Organization projects:read
- To sync the
WORKFLOWS
tables, grant theActions: read
permission - To sync the
SECURITY_ALERT
tables, grant theRepository security advisories: read
andDependabot alerts: read
permissions - To sync the
RELEASE
table, grant theContents:read
permission - To sync the
DEPLOYMENT
table, grant theDeployments:read
permission - To use webhooks to sync your data, grant the
Organization hooks:write
andRepository hooks:write
permissions
- To sync the
NOTE: Fine-grained tokens don't provide permissions to sync repository-level projects. In this case, you must disable the
CARD
,COLUMN
, andPROJECT
tables on the schema tab.
IMPORTANT: Only use an HTTPS URL with TLS version 1.2 or above.
Setup instructions
In the connector setup form, enter your chosen destination schema name.
(Hybrid Deployment only) If your destination is configured for Hybrid Deployment, the Hybrid Deployment Agent associated with your destination is pre-selected in the Select an existing agent drop-down menu. To use a different agent, select the agent of your choice, and then select the same agent for your destination.
Select the authentication mode: OAuth, Personal Access Token, or GitHub App.
If you choose OAuth, do the following:
a. Click Authorize to authorize Fivetran to connect to your GitHub account. You will be redirected to GitHub.
b. In GitHub, click authorize Fivetran and enter your password when prompted. You will be redirected to the connector setup form.
IMPORTANT: We recommend logging in while in Incognito mode to ensure authorization of the correct account.
If you choose Personal Access Token, do the following:
a. Create the Personal access tokens on behalf of several different GitHub users.
b. Enter the Personal Access Tokens in the setup form.
c. Click Validate Personal Access Tokens.
IMPORTANT: GitHub sets a rate limit on the number of requests per hour from one user. You can work around this limitation in one of the following ways:
- Use multiple accounts to create personal access tokens, with each token created by a different account. Specify 4-5 personal access tokens to avoid exceeding the request rate limit and make the sync more efficient.
- Use multiple accounts with OAuth2 authentication. Create separate Fivetran connectors for each account, then distribute syncing tasks across these connectors to leverage multiple API quotas.
If you choose GitHub App, do the following:
a. Create a new GitHub App.
b. Select the Repository permissions and Organization permissions:
Administration:read
Issues:read
Members:read
Metadata:read
Pull requests:read
Organization projects:read
Repository projects:read
Contents:read
Deployments:read
c. (Optional) To sync
SECURITY_ALERT
tables, grant theRepository security advisories: read
andDependabot alerts: read
permissions.d. (Optional) To sync
WORKFLOWS
tables, grant theActions: read
permission.e. Install the GitHub App into your account or organization account. You can find it by the following URL
https://github.com/settings/apps/<your app name>/installations
.NOTE: Currently, we support only one installation per application.
f. Generate a private key for your application following the instructions on your GitHub app page.
g. Enter your GitHub App Client ID and drag-and-drop your Private Key file.
h. Click Authorize.
Choose the sync mode: Sync All Repositories or Sync Specific Repositories.
- If you choose Sync Specific Repositories, select the accounts you'd like to sync.
NOTE: Fivetran skips permission-restricted data when in the Sync All Repositories mode. If you select to Sync Specific Repositories, you will have to set up the appropriate permissions manually.
If you want to use webhooks, set the Use Webhooks toggle to ON.
Click Save & Test. Fivetran will take it from here and sync your GitHub data.
Related articles
description Connector Overview
account_tree Schema Information
settings API Connector Configuration