Install the GitHub Integration
Joel Bradley avatar
Written by Joel Bradley
Updated over a week ago

Tags | Integrations | GitHub |

Admin privileges required

Applies to: Business

Enterprise users can access their documentation here. Find your plan.

Stack Overflow for Teams can integrate with GitHub. With this integration, GitHub URLs for file blobs, gists, pull requests, and commits will unfurl in your Team's questions and answers.

To learn more about the features included in our GitHub integration, read the GitHub Integration article.

NOTE: If you're using an on-premises Github Enterprise server, please ensure that it is publicly accessible over the Internet. If it is behind a VPN or otherwise inaccessible, link unfurling will not function.

The GitHub integration requires a GitHub user to act as a bot account for the instance. We strongly recommend creating a new GitHub bot user account for Stack Overflow Enterprise and generating a personal access token for this user.

Once the bot user account is created, verify your email address (if it hasn't been verified yet) and log in as the bot user.

To generate a personal access token, go to your profile photo in the upper-right corner of any page and choose Settings.

In the left sidebar, choose Developer settings. Next, choose Personal access tokens and Generate new token.

The token will need the repo scopes to work.

If your organization requires SSO to authenticate into GitHub, you'll need to authorize the token. In GitHub, click Configure SSO next to the token you'd like to authorize. In the dropdown menu, locate your organization and click Authorize.

On the personal access tokens screen, copy the token. As GitHub mentions, you won’t be able to see the token again after you leave this page.

On Stack Overflow for Teams, an admin should go to Settings -> Integrations -> Github Enterprise, and paste the Github personal access token into the GitHub access token in the API key field.

Also, include the Base URL for your Github Enterprise instance (if self-hosted) or (if GitHub-hosted).

After saving this form, the GitHub integration is active and available for all users to use immediately. All new GitHub URLs for file blobs, gists, pull requests, and commits that appear on their own line in a question or answer will automatically preview. GitHub links on existing questions or answers will not be previewed until the post is edited.

Need help? Submit an issue or question through our support portal.

Did this answer your question?