Setting up a Version Control Token
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.
Once the GitHub organization and repository has been created to store the Workflow definitions, a Personal Access Token needs to be generated and saved in Flowgear to be able to load or save Workflows.
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:
- Member of the GitHub organization.
- Collaborator on the GitHub repository where the Workflows are going to be stored.
Steps for Generating a Personal Access Token in GitHub
- The user needs to navigate to their personal account’s settings page (https://github.com/settings/profile).
- Click on
Developer settings
in the left hand side menu (located at the bottom). - Expand
Personal access tokens
and click onFine-grained tokens
. - Click
Generate new token
. - Fill in an appropriate Token name.
- Choose the relevant expiration date.
- 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). - Under the Repository access, Choose
only select repositories
, then select the repository where the Workflows would be stored. - Under
Permissions
, expandRepository permissions
. - Look for the
Contents
permission, and selectRead and write
as the access level. - Click
Generate token
orGenerate 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).
Link the Personal Access Token in Flowgear
- Sign into Flowgear at https://app.flowgear.net/#signin
- Navigate to
My User Account
- Populate
Version Control Token
with the generated Personal Access Token - Click
Save Version Control Token