Quickstart: Using GitHub repositories in CodeCatalyst - Amazon CodeCatalyst

Quickstart: Using GitHub repositories in CodeCatalyst

Perform the following steps to install the GitHub repositories extension, connect to your GitHub account, and link your GitHub repositories to your existing CodeCatalyst projects.

You can also install the GitHub repositories extension, connect to your GitHub account, link GitHub repositories when creating a new CodeCatalyst project. For more information, see Creating a project with a linked GitHub repository.

Step 1: Install the GitHub extension from the CodeCatalyst catalog

The first step to using GitHub repositories in CodeCatalyst is to install the GitHub repositories extension from the CodeCatalyst catalog. To install the extension, perform the following steps, choosing the GitHub repositories extension.

Important

As part of installing and configuring the GitHub repositories extension, you must install an extension into your GitHub account. To do this, you must be both the GitHub account administrator and the CodeCatalyst Space administrator.

To install an extension from the CodeCatalyst catalog
  1. Open the CodeCatalyst console at https://codecatalyst.aws/.

  2. Navigate to your CodeCatalyst space.

  3. Navigate to the CodeCatalyst CodeCatalyst catalog by choosing the Catalog icon The CodeCatalyst catalog icon in the top navigation bar in CodeCatalyst. in the top menu. You can search for GitHub repositories or filter extensions based on categories.

  4. (Optional) To see more details about the extension, such as the permissions the extension will have, choose the GitHub repositories extension name.

  5. Choose Install. Review the permissions required by the extension, and if you want to continue, choose Install again.

After installing the GitHub repositories extension, you are taken to the GitHub repositories extension details page, where you can view and manage connected GitHub accounts and linked GitHub repositories.

Step 2: Connect your GitHub account to your CodeCatalyst space

After you install the GitHub repositories extension, the next step is to connect your GitHub account to your CodeCatalyst space.

Important

To connect your GitHub account to your CodeCatalyst space, you must be both the GitHub account administrator and the CodeCatalyst Space administrator.

To connect your GitHub account to CodeCatalyst
  1. In the Connected GitHub accounts tab, choose Connect GitHub account to go to the external site for GitHub.

  2. Sign into your GitHub account using your GitHub credentials, and then choose the account where you want to install Amazon CodeCatalyst.

    Tip

    If you have previously connected your GitHub account to another space, you will not be prompted to re-authorize. You will instead see a dialog asking you where you would like to install the extension if you are a member or collaborator in more than one GitHub account, or the configuration page for the Amazon CodeCatalyst application if you only belong to one GitHub account. Configure the application for the repository access you want to allow, and then choose Save. If the Save button is not active in GitHub, make a change to the configuration, and then try again.

  3. Choose whether you want to allow CodeCatalyst to access all current and future repositories, or choose the specific GitHub repositories you want to use in CodeCatalyst. The default option is all GitHub repositories in the GitHub account.

  4. Review the permissions given to CodeCatalyst, and then choose Install.

After connecting to your GitHub account to CodeCatalyst, you can view the connected account in the GitHub accounts tab of the GitHub repositories extension details page.

Step 3: Link your GitHub repository to your CodeCatalyst project

The third and final step to using your GitHub repositories in CodeCatalyst is to link the repository to the CodeCatalyst project in which you want to use it.

Important

While you can link a GitHub repository as a Contributor, you can only unlink a GitHub repository as the Space administrator or the Project administrator. For more information, see Unlinking a GitHub repository from a CodeCatalyst project.

To link a GitHub repository to a CodeCatalyst project from the GitHub repositories extension details page
  1. In the Linked GitHub repositories tab, choose Link GitHub repository.

  2. From the GitHub account drop-down menu, choose the GitHub account that contains the repository that you want to link.

  3. From the GitHub repository drop-down menu, choose the repository you want to link to a CodeCatalyst project.

    Tip

    If the name of the repository is greyed out, you can't link that repository because it has already been linked to another project in the space.

  4. From the CodeCatalyst project drop-down menu, choose the CodeCatalyst project you want to link the GitHub repository to.

  5. Choose Link.

You can also link your GitHub repository to a project from Source repositories in Code. For more information, see Managing GitHub repositories in CodeCatalyst.

Next steps

After installing the GitHub repositories extension, connecting your GitHub account, and linking your GitHub repositories to your CodeCatalyst projects, you can use it in CodeCatalyst workflows and Dev Environments. For more information, see Using GitHub repositories in CodeCatalyst workflows and Creating a Dev Environment.