Skip to main content

Create a GitHub personal access token for Snowflake and DataTools Pro

To integrate GitHub source control with Snowflake or even DataTools Pro, you can create GitHub personal access token, which grants fine grained control.

You can click here to go directly to the “Generate new token page” or follow 5 steps below:
https://github.com/settings/personal-access-tokens/new

1. Login to your GitHub

    2. Access Settings: Log in to your GitHub account. Click on your profile picture in the top-right corner and select “Settings.”

    3. Navigate to Developer Settings: In the left sidebar, click on “Developer settings.”

    4. Personal Access Tokens: Under “Personal access tokens,” select “Fine-grained tokens.”

    5. Generate New Token: Click on “Generate new token.”

    There are a lot of options to configure fine grained access for your token, which is very helpful to narrow the scope of use for use with Snowflake or DataTools Pro.

    Configure your GitHub personal access token:

    • Token Name: Provide a descriptive name for the token.
    • Expiration: Set an expiration date to enhance security. Typically we select a 90 day window and rotate keys as part of maintenance. Because this is a read-only token. The option to implement a non-expiring token exists but we do not recommend using it.
    • Resource Owner: Choose the appropriate resource owner (your account or an organization).
    • Repository Access: Select “Only select repositories.”
      • Specify the repositories the token can access. You can start with a single repository and always come back to add more later. Do not grant access to “All repositories”
    • Repository Access: Selected repositories → Choose only the repository you need.
    • Permissions: Permissions can be daunting because there are so many options.. Here are the necessary permissions for use with Snowflake. This is to ensure you have designed your token for minimal access:
      • Required: Metadata, Contents.
      • Optional: Actions (if relevant to your setup).

    This setup ensures your token is secure and adheres to the principle of least privilege, giving Snowflake only the access it needs to function properly with your GitHub repository. Let me know if you need further clarification!

    Generate Token: After configuring the settings, click “Generate token.” Ensure you copy and store the token securely, as it will not be displayed again.

    Learn more about personal access tokens from GitHub documentation

    Save your Token

    Store your token in a safe location, specifically a key vault like Azure key vault or password management app like 1Password.

    GitHub Personal Access Token