Setting up a Version Control Token

This article explains how to setup a Personal Access Token in GitHub and how to configure your user account with this Token.

This only applies if the Version Control Mode for the Site is set to GitHub.

After you have created a GitHub organization and repository, a Personal Access Token needs to be generated and saved in Flowgear so that it is able to interact with the repository.

The GitHub organization requires Fine-grained personal access tokens to be enabled. (https://docs.github.com/en/organizations/managing-programmatic-access-to-your-organization/setting-a-personal-access-token-policy-for-your-organization)

The user needs the following permissions on GitHub to be able to generate a Personal Access Token:

  • Must be a member of the GitHub organization.
  • Must be a collaborator on the GitHub repository where the Workflows are going to be stored.

Steps for Generating a Personal Access Token in GitHub

  1. The user needs to navigate to their personal account’s settings page (https://github.com/settings/profile).
  2. Click on Developer settings in the left hand side menu (located at the bottom).
  3. Expand Personal access tokens and click on Fine-grained tokens.
  4. Click Generate new token.
  5. Fill in an appropriate Token name.
  6. Choose the relevant expiration date.
  7. Choose the GitHub organization as Resource owner (The user needs to be a member of the GitHub organization. The PAT is linked to a specific repository with specific permissions).
  8. Under the Repository access, Choose only select repositories, then select the repository where the Workflows would be stored.
  9. Under Permissions, expand Repository permissions.
  10. Look for the Contents permission, and select Read and write as the access level.
  11. Click Generate token or Generate token and request access (The GitHub organization settings can be set up so that the token needs to be approved before the permissions are applied).
  1. Sign into Flowgear at https://app.flowgear.net/#signin
  2. Navigate to My User Account
  3. Populate Version Control Token with the generated Personal Access Token
  4. Click Save Version Control Token