Skip to main content

Self-Managed GitHub

Torque supports connecting asset/blueprint repositories residing in a self-managed GitHub repository.

Prerequisites

  • GitHub personal access token with read access for repositories in the server

Configuration

  1. Create Provider via Torque REST API.

    POST http://portal.qtorque.io/api/settings/repository_providers
    {
    "name":"github-enterprise",
    "type":"githubEnterprise",
    "details": {
    "token":"<Personal access token>",
    "base_url": "https://my-github-enterprise.my-org.net/"
    },
    "repos": []
    }

    Or with a curl command:

    curl --request POST \   --url https://portal.qtorque.io/api/settings/repository_providers \  
    --header 'Authorization: Bearer <Torque API toke>' \
    --header 'Content-Type: application/json' \
    --data '{
    "name":"github-enterprise",
    "type":"githubEnterprise",
    "details": {
    "token":"<Personal access token>",
    "base_url": "https://github-enterprise.qualilabs.net/"
    },
    "repos": [] }'

    • name: Display name of the provider
    • type: Value representing the type of repository provider (githubEnterprise in this case)
    • token: The personal access token (see Prerequisites)
    • base_url: __Schema://Host:Port/ of the GitHub server (include port if required)
  2. Connect the repository as an asset repository to the space and discover the suitable assets. Make sure to check the "self-managed" checkbox. The repository's URL must be in the base URL of the configured provider.
    For details regarding asset discovery, see Discover Your Assets.