Skip to main content

GitHub

GitHub connector form

Standard connector form, described in general in Connectors. Both github.com and GitHub Enterprise are supported.

FieldWhat to enterExample
Connector API URLthe instance's API addresshttps://api.github.com or https://github.company.com/api/v3
Usernamethe login of the account the token was generated onq247-service
Personal access tokena token with permission to read repositoriesghp_xxxxxxxx or $$GITHUB_TOKEN
Organization ID (optional)the organization's name, when scanning should be limited to itfirma

The Organization ID field is optional here. Without it, the connector will discover all repositories the service account has access to. Providing an organization narrows the scope, which is useful when the account belongs to several organizations at once.

The username and token can be entered directly, or you can point to an environment variable on the plugin host, using the notation $$GITHUB_TOKEN. This second option keeps the credential outside the Q247 database, and is described in more detail in Connectors.

The token is generated in the GitHub account settings, in the Developer settings section. The connector needs read access to repositories. For a fine-grained token, that corresponds to the Contents permission at Read-only level. For a classic token it is the repo scope, which covers read and write; GitHub has no read-only variant of it.

To collect CI/CD deployments, a fine-grained token additionally needs the Deployments, Actions and Metadata permissions, each at Read-only level. A classic token with the repo scope is enough without changes.

See also​