GitHub
  • 12 Mar 2023
  • 2 Minutes to read
  • Dark
    Light
  • PDF

GitHub

  • Dark
    Light
  • PDF

GitHub provides hosting for software development version control using Git, including distributed version control and source code management (SCM) functionality.

Types of Assets Fetched

This adapter fetches the following types of assets:

  • Users


Parameters

  1. GitHub Domain (required, default: https://api.github.com) - The hostname or IP address of the GitHub server.
  2. Organization (optional) - The organization for the GitHub account. To connect this adapter, either this setting must be set or the Fetch all organizations for logged user setting on the Advanced Configuration screen. You can also fetch data without specifiying the Organization, see Fetching data without Specifying the Organization.
  3. Authorization Token (optional) - Specify the personal access token that has read access. For details, see Creating the Authorization Token. If you authenticate using GitHub App leave this field blank.
  4. Authenticate using GitHub App - Select to authenticate using the GitHub App. Make sure you add the 'org' scope.
  5. GitHub App's ID - Github app's ID, can be found under the GitHub app's page. Only use if authenticating with GitHub app.
  6. App Key File (pem) - Click Upload File to upload the GitHub app's pem key file. You can download this through the GitHub app's page. Only use if authenticating with GitHub App.
  7. Verify SSL - Select to verify the SSL certificate offered by the value supplied in GitHub Domain. For more details, see SSL Trust & CA Settings.
  8. HTTPS Proxy (optional) - A proxy to use when connecting to the value supplied in GitHub Domain.
  9. For details on the common adapter connection parameters and buttons, see Adding a New Adapter Connection.

Github1


Advanced Settings

Note:

From Version 4.6, Advanced settings can either apply for all connections for this adapter, or you can set different advanced settings and/or different scheduling for a specific connection, refer to ​Advanced Configuration for Adapters.

  1. Fetch public organizations for users - Select whether to fetch the public organizations each user is a member.

    • If disabled, this adapter will not fetch the public organizations each user is a member of. As a result, the fetch time will be shorter.
  2. Fetch public gists for users - Select whether to fetch data about public gists for users.

  3. Fetch all organizations for logged user - Select whether to fetch all organizations for the logged user. To connect this adapter, either this setting must be set or the Organizations setting for each connection's basic configuration.

  4. Fetch user role and organization data - Select whether to fetch each user role in the organization and additional information about the organization.

Note:

For details on general advanced settings under the Adapter Configuration tab, see Adapter Advanced Settings.

APIs

Axonius uses the GitHub API.

Creating the Authorization Token

To create a personal access token:

  1. From GitHub, navigate to Settings > Developer Settings > Personal access token.
  2. Generate a new token and then give the following read-only permissions:
    • read:packages
    • read:org
    • read:public_key
    • read:user
    • user:email
    • read:enterprise
  3. To use a personal access token with an organization that uses SAML single sign-on (SSO), you must first authorize the token. For details, see GitHub Docs - Authorizing a personal access token for use with SAML single sign-on.
    image.png


Fetching Data Without Specifying the Organization

It is possible to fetch data without specifying the organization.

  1. Go to GitHub Settings

GitHubSettings

  1. Select Developer settings

GitHubSettings2

  1. Select GitHub App, then select 'Your App', and choose Edit.

Github3

  1. From Permissions and events select Organization permissions.

Github4

  1. Under Metadata and Pull Requests select Access: Read-only.

Github5

  1. Under Members select Access Read-only.

github6

  1. Under Account Permissions select Access:Read-only for Email addresses and Followers and Access Read and write for Gists and Profile.

Github7



What's Next
Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.