Skip to main content

GitHub Source Control

Torque supports connecting asset/blueprint repositories on GitHub out of the box. However, to connect a repository, you must have access to the repository and grant Torque permission to the repository using a PAT (Personal Access Token), as explained below. For details about adding your assets to Torque, see Discover Your Assets. You should be able to sign in with an account on any one of these online services and immediately get going by connecting asset repositories and launching environments.

In this article:

This article refers to the SAAS version of GitHub (github.com). If you're using self hosted GitHub Enterprise, check here.

Ensure your account is added to the GitHub organization you're connecting

  1. Go to https://github.com/orgs/{YOUR_ORG}/people.
  2. Make sure your user is listed in the organization. If not, make sure the user is added as a member with global read access.

What is a Personal Access Token?

A Personal Access Token (PAT) is a credential you generate on GitHub that Torque uses in place of a password to authenticate and access your repositories. GitHub offers two types of PAT:

  • Classic tokens — grant access based on broad, predefined scopes (e.g., repo, read:org).
  • Fine-grained tokens — grant access to specific repositories with more granular permissions, offering tighter control over what Torque can access.

Either type works with Torque. For instructions on generating one, see GitHub's Managing your personal access tokens documentation.

Connect a repository using a Personal Access Token

Torque connects to GitHub using a Personal Access Token (PAT). Both classic and fine-grained tokens are supported.

  1. In Torque, go to the space's Settings > Repositories area and click Add a Repository.

    Add a Repository

  2. Select GitHub as the repository provider.

    Select a repository provider

  3. Fill in the Repository URL, Repository Name, and optionally a Branch.
  4. Under Credentials, start typing to create a new credential set, or select an existing one from the list.

    Connection details and credentials

  5. Give the new credential set a name, then enter your Personal Access Token in the field that appears.

    Enter your Personal Access Token

    info

    Click the Auto-Track Environment Files option if you want to automatically discover and track Environment Files from this repository.

  6. Leave Self Managed Repository unchecked — that option is only for self-hosted GitHub Enterprise. See Self-Managed GitHub for that flow.
  7. Click Connect.

Token expiration and revocation

GitHub imposes a limit on the number of tokens an application can create for the same user, and will revoke the oldest one once this limit is passed. For details, see GitHub token expiration and revocation policy.