GitHub and GitHub Enterprise configuration
GitHub provides version control through an open-source distributed version control system, which enables your entire codebase and history to be available to every developer and allows for easy branching and merging.
DevOps Intelligence supports your use of GitHub and GitHub Enterprise. This topic describes the configuration requirements for both tools. For DevOps Intelligence to pull data from GitHub, you must configure a GitHub account.
Pre-requisites
- Initial GitHub configuration: Follow the steps in subsequent sections of this topic.
- Configure Webhook: To ensure proper data synchronization, you must configure Webhook as part of the GitHub integration. Click here for details: GitHub Webhook configuration.
Integration of GitHub with DevOps Intelligence
The process for onboarding GitHub comprises the following steps, each of which is a multistep procedure:
- Create a Personal Access Token.
- Create a connection.
- Configure the application.
- Onboard the GitHub technical service.
Create a GitHub token
The Application requires the following information for GitHub:
Name: Local account name. It could be any string and is used only for reference.
- User: Username for GitHub. Generally, the e-mail ID with which the user logged in to GitHub.
- Token: Personal access token. The personal access token requires permissions within the following recommended scopes:
The application also requires to set up permissions:
- On GitHub, navigate to the main page of the repository.
- Under your repository name, select Settings → Developer settings → Personal Access Tokens → Generate new token.
Create a GitHub Enterprise token
The Application requires the following information for GitHub Enterprise:
- Name: Local account name. It could be any string and is used only for reference.
- Host: Git API URL of the Git Host. eg, API URL will take the form https://github.domain.com.
- User: Username for GitHub Enterprise. Generally, the e-mail ID with which the user logged in to GitHub Enterprise.
- Token: Personal access token. The personal access token requires permissions within the following scopes:
The Application also requires the following GitHub Enterprise credentials:
- GitEndPoint: GitHub Enterprise
- Host: https://github.domain.com
- Name: User's Name
- User: [email protected]
- Token: your personal access token
Create a connection
Before GitHub and DevOps Intelligence can exchange information, you must establish a connection between the two services. Use the following procedure:
- Click App Manager → IAM → Connections → Add New → Add Connection.
- Choose Content Provider as GitHub.
- Provide a local account name for reference.
- Add the Host Git API URL of the Git Host (e.g., https://github.test.net).
- Enter your GitHub account user name.
- Enter the token you created in the Create a Token section.
- If you are using a Proxy Adapter, provide the ProxyID UUID. A proxy adapter is necessary when you want to access a service or system with a different interface than your application expects
- When Sync is enabled, all organizations and repositories accessible to the user will be synced.
- When Archive is enabled, the connection is archived for future use.
Secure alert synchronization
- Pre-requisites
- GitHub personal access token.
- Token user needs to have secure alert access enabled.
For DevOps Intelligence to pull data from GitHub and GitHub enterprise, you must provide the following permissions:
Repository permissions
- On GitHub, navigate to the main page of the repository.
- Under your repository name, select Settings.
- In the "Security" section of the sidebar, select Code security and analysis.
- Under "Access to alerts", in the search field, start typing the name of the person or team you'd like to find, then select a name in the list of matches.
- Select Save changes.
Only one user credential can be used to pull information at a single time for a specific application. This avoids reaching the IP rate limit.
For more information regarding DevOps Intelligence secure alerts see: Secure alerts dasboard.
For the GitHub Enterprise account: If the administrator has set a limit on API calls, DevOps Intelligence optimizes its process of fetching data and will take around 1000 calls each hour. This is to make sure no other tasks using the credentials are hampered. Once the limit is exceeded we see a message depicting the same on sync page of GitHub.