Skip to main content

Setting up GitHub as an Source Code Provider

Connecting GitHub using the OAuth2 flow

To connect to GitHub using an OAuth2 flow, click on the "Add a connection" button and select "github". Name your connection (for example, github-<account-name>), and click "Add connection". Once you've completed the OAuth2 consent flow, your source code provider should show as connected.

connections with github

Connecting GitHub using a PAT

To connect to GitHub using a Personal Access Token (PAT), you need to create a PAT in the GitHub UI by clicking the "Generate new token" button.

Note

Ensure that the selected scopes include at least repo and read:org so that the Aserto Console has access to the required repository information.

github pat

Once you've done that, switch back to the Aserto Console. Click on the "Add a connection" button and select "github-pat". Name your connection, copy the PAT value and paste it into the "GitHub Personal Access Token" field, and click "Add connection".