Connect a CodeDeploy application to a GitHub repository - Amazon CodeDeploy
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Connect a CodeDeploy application to a GitHub repository

Before you can deploy an application from a GitHub repository for the first time using the Amazon CLI, you must first give CodeDeploy permission to interact with GitHub on behalf of your GitHub account. This step must be completed once for each application using the CodeDeploy console.

  1. Sign in to the Amazon Web Services Management Console and open the CodeDeploy console at https://console.amazonaws.cn/codedeploy.

    Note

    Sign in with the same user that you set up in Getting started with CodeDeploy.

  2. Choose Applications.

  3. From Applications, choose the application you want to link to your GitHub user account and choose Deploy application.

    Note

    You are not creating a deployment. This is currently the only way to give CodeDeploy permission to interact with GitHub on behalf of your GitHub user account.

  4. Next to Repository type, choose My application revision is stored in GitHub.

  5. Choose Connect to GitHub.

    Note

    If you see a Connect to a different GitHub account link:

    You might have already authorized CodeDeploy to interact with GitHub on behalf of a different GitHub account for the application.

    You might have revoked authorization for CodeDeploy to interact with GitHub on behalf of the signed-in GitHub account for all applications linked to in CodeDeploy.

    For more information, see GitHub authentication with applications in CodeDeploy.

  6. If you are not already signed in to GitHub, follow the instructions on the Sign in page.

  7. On the Authorize application page, choose Authorize application.

  8. Now that CodeDeploy has permission, choose Cancel, and continue with the steps in Create an EC2/On-Premises Compute Platform deployment (CLI).