Connect an on-bounds Azure DevOps Server to a GitHub repo

Azure DevOps Server 2022 | Azure DevOps Server 2019

By connecting your Azure DevOps Server project to your GitHub repositories, yous back up linking between GitHub commits and pull requests to work items. You lot can use GitHub for software evolution while using Azure Boards to plan and track your work.

To connect to GitHub.com repositories, you must install Azure DevOps Server 2020.1.1 Patch two. Without this patch, yous can just connect to your GitHub Enterprise Server repositories.

Note

On-premises Azure DevOps Server 2022 supports integration with GitHub.com and GitHub Enterprise Server repositories. If you want to connect from Azure DevOps Services, run across Connect Azure Boards to GitHub.

By connecting your Azure DevOps Server projection with your GitHub Enterprise Server repositories, y'all support linking between GitHub commits and pull requests to work items. You can use GitHub Enterprise for software evolution while using Azure Boards to plan and track your work.

Note

On-bounds Azure DevOps Server 2022 supports integration with GitHub Enterprise Server repositories. If you desire to connect from Azure DevOps Services, meet Connect Azure Boards to GitHub.

Prerequisites

  • Install the Azure Boards app for GitHub on the GitHub organizations or account.
  • Connect to an Azure Boards or Azure DevOps project. If y'all don't have a project however, create one.
  • Yous must be a fellow member of the Project Collection Administrators grouping and the project's Contributors group. If you created the project, then y'all have permissions.
  • Yous must be an ambassador of the GitHub Enterprise Server you'll connect to.

Authentication options

The post-obit authentication options are supported.

  • PAT
  • Username plus password

Note

OAuth is no longer supported for Azure DevOps Server 2020.

  • OAuth (Recommended, registration required)
  • PAT
  • Username plus password

Annals Azure DevOps in GitHub equally an OAuth App

If you plan to use OAuth to connect Azure DevOps Server with your GitHub Enterprise Server, you first need to register the application as an OAuth App. For details, encounter Creating an OAuth App.

Annals Azure DevOps Server

  1. Sign into the web portal for your GitHub Enterprise server.

    Sign into GitHub Enterprise server

  2. Open Settings>Developer settings>Oauth Apps and cull New OAuth App.

    Open Settings>Developer settings>Oauth Apps and choose New OAuth App.

  3. Fill out the form to register your Azure DevOps Server application.

    Register your Azure DevOps Server project

    For the Homepage URL, specify the Public URL of your project collection. You can discover this URL by opening the Azure DevOps Administration Console and viewing the Awarding Tier node.

    Azure DevOps Server Administration Console, Application Tier

    For the Authorization callback URL, utilize the following blueprint to construct the URL.

    {Azure DevOps Server Public Url}/{Collection Proper name}/_admin/oauth2/callback

    For instance:

    http://contoso/DefaultCollection/_admin/oauth2/callback

    Or,

    https://tfs.contoso.com/MyCollection/_admin/oauth2/callback

  4. Choose Register application.

  5. Upon success, yous'll see a page that provides the Customer ID and Customer Hush-hush for your registered OAuth application.

    Client ID and Client Secret for your registered OAuth application.

Annals your OAuth configuration in Azure DevOps Server

  1. Sign into the web portal for your Azure DevOps Server.

  2. Add the GitHub Enterprise Oauth configuration to your Azure DevOps Server collection.

  3. Open up Admin settings>Oauth configurations, and choose Add together Oauth configuration.

    Admin Settings>OAuth configurations

  4. Make full in the class that appears, and then cull Create.

    OAuth configuration dialog

Connect Azure DevOps Server to GitHub Enterprise Server

You can connect up to 250 GitHub repositories to an Azure Boards project.

Note

Connection to more than 100 GitHub repositories requires Azure DevOps Server 2020.1 update or afterward version.
Connection to GitHub.com repositories requires Azure DevOps Server 2020.1.i Patch ii or afterwards version.

You tin can connect up to 100 GitHub repositories to an Azure Boards project. This limit can't be inverse.

  1. Open the web portal for your Azure DevOps Server.

  2. Choose the Azure DevOps logo to open Projects, and so choose the Azure Boards project you want to configure to connect to your GitHub Enterprise repositories.

  1. Cull (i) Projection Settings> (2) GitHub connections.

    Screenshot of open Project Settings>GitHub connections.

  2. If it's the first time making a connection from the projection, choose the authentication method you want to utilise to make the connection:

    • Personal Access Token, for details see Connect using a Personal Access Token.
    • User Name and Password, see Connect using a Username and Password.

    Screenshot of first time connecting with GitHub credentials.

    Otherwise, cull New connection, and select your authentication method from the New Connection dialog.

  1. Cull (one) Project Settings> (two) GitHub connections, then (three) Connect your GitHub Enterprise account.

    Project Settings>Integrations

    Or, choose a personal access token or username and password, if you're using those credentials.

Connect using OAuth

  • Choose the configuration that you gear up up in Stride 4 of Register your OAuth configuration in Azure DevOps Server. Then, choose Connect.

    New GitHub Enterprise connection, OAuth dialog

Connect using a Personal Access Token

  1. To create a PAT, see Creating a personal access token.

    Tip

    When creating your GitHub PAT, brand certain that you include these scopes: repo, admin:repo_hook, read:user, user:e-mail.

  2. Enter the URL for your GitHub Enterprise server and the Personal admission token credentials recognized by that server. And then cull Connect.

    Sign in with personal access token.

Connect using a Username and Password

  1. Enter the URL for your GitHub Enterprise server and the administrator business relationship credentials recognized by that server. And then cull Connect.

    Sign in with username and password.

  2. The dialog lists all repositories for which you take GitHub assistants rights. You lot can toggle between Mine and All to make up one's mind if others announced, and so check the ones that yous want to add. Cull Save when done.

    Choose repositories to add.

  3. If you lot're connecting to a GitHub business relationship or organization from Azure Boards for the showtime time, you'll also exist installing the Azure Boards app for GitHub. Consummate the integration past following the procedures outlined in Confirm the connectedness.

Resolve connection problems

See Troubleshoot GitHub repository connexion.

Try this next

  • Add or remove GitHub repositories
  • What is Azure Boards?
  • Troubleshoot GitHub & Azure Boards integration
  • Build GitHub Enterprise Server repositories
  • Trigger an Azure Pipelines run from GitHub Actions