Create a personal access token (classic)
Create the token on the GitHub Enterprise Server instance you are connecting. Any user’s token lists every user on the instance. To read an organization’s members and teams, use a member of that organization. For two-factor status, outside collaborators, rulesets and audit logs, use an organization owner.
Open Developer settings
Sign in to your GitHub Enterprise Server instance.
- Click your profile photo in the upper-right corner, then click Settings
- In the left sidebar, click Developer settings
Generate the token
Create a classic token.
- In the left sidebar, under Personal access tokens, click Tokens (classic)
- Select Generate new token, then click Generate new token (classic)
- Enter a Note, for example StackOne
- Choose an Expiration that fits your rotation policy
Select scopes for user access reviews
Select these two scopes.
Add scopes for compliance checks
admin:org adds the organization’s two-factor requirement and organization rulesets. repo reads private repositories, pull requests, reviews, branch protection and collaborators. admin:enterprise reads the enterprise audit log for an enterprise owner. The organization audit log needs only read:org.
Add scopes for other actions
Add these only for the actions you plan to use.
Copy the token
Click Generate token and copy it. GitHub shows it only once.
Find your server URL
Use the address you open GitHub Enterprise Server at, such as https://github.example.com. Only the host name is used, so a path such as an organization page or /api/v3 is ignored. The connection always uses https://, even if you type http://.
Check the organization’s token policy
If an organization blocks classic tokens, its requests fail with 403. An organization owner can allow them in the organization’s Settings: under Personal access tokens, click Settings, open the Tokens (classic) tab, and under Restrict personal access tokens (classic) from accessing your organizations, select Allow access via personal access tokens. An enterprise policy can also block them for every organization.
Linking the Account from the Hub
Navigate to the Hub
Fill out the fields
- GitHub Enterprise Server URL
- Personal Access Token
- Organization ID (Optional)
Connect
- Click Connect
- If applicable, the provider will redirect you to a sign-in or authorization page. Complete the provider’s authorization flow.
- Once authorization is successful, you will see a confirmation popup
If the account linking is successful, you will see the newly linked account in your Accounts page.
Next Steps
Webhooks setup
Configure receiving Events for GitHub into StackOne.