Code Sources

How to use different types of source code control systems with Code Pipes

To interact with Git repositories, such as GitHub or other Git-based code repositories, Code Pipes requires authentication credentials. The specific credentials and permissions depend on the type of repository.

Add a github source code

To interact with Git repositories, such as GitHub or other Git-based code repositories, Code Pipes requires authentication credentials. The specific credentials and permissions depend on the type of repository.

For GitHub, you can provide Code Pipes access to your GitHub account using either OAuth or a Personal Access Token (PAT). The steps to create code source credentials for GitHub are as follows:

  1. From the dashboard, navigate to the bottom of the narrow left panel and click the "code source" icon.
  2. Click ADD CODE SOURCE.
  3. At the top right of the "Add code source" panel, select the authentication method: either OAuth or Personal Access Token.

OAuth

  1. Click the GITHUB button, which will redirect you to a GitHub page where you need to provide your GitHub password.
  2. Specify the Code source account name you want Code Pipes to use for this GitHub credential.

Personal Access Token

  1. Specify the Code source account name you want Code Pipes to use for this GitHub credential.
  2. Provide the following information:
    • Username: The username for the GitHub account that you are granting access to.
    • Personal Access Token: The Personal Access Token (PAT) associated with the GitHub account.

For other Git-based code repositories that use a username and password/token for authentication, such as AWS CodeCommit, Code Pipes will require similar credentials. The specific steps and details may vary depending on the repository provider.

It's important to note that the exact permissions required will depend on the actions Code Pipes needs to perform, such as cloning repositories, fetching code, pushing changes, etc. When configuring credentials for Git repositories, you should grant the minimum necessary permissions to ensure the security of your code and repositories.

cred-create-github

Assign git credentials

cred-assignment-git

Generic Git Credentials Configuration

Using AWS CodeCommit

To utilize a repository hosted on AWS CodeCommit with Code Pipes, it is necessary to set up HTTPS credentials for an IAM user that has appropriate access permissions within AWS IAM. The user should have at least the "AWSCodeCommitReadOnly" permissions.

Generating HTTPS credentials through AWS console:

  • Access the IAM console and select the desired user.
  • Navigate to the "Security Credentials" tab.
  • Locate the "HTTPS Git credentials for AWS CodeCommit" section and click on "Generate credentials".
  • Ensure to securely copy or save both the "User name" and "Password" provided in the pop-up screen.

For more detailed instructions, refer to the AWS CodeCommit HTTPS Setup documentation.

You can now use this credential as a Code Source for any project, environment or application.