April 30th 1 PM ET

Git Integration for Jira Cloud Documentation

AWS CodeCommit for Git Integration for Jira Cloud

Using Jira Server or Data CenterSee the corresponding article.

Integrate AWS CodeCommit with Jira Cloud

AWS CodeCommit is a git host service by Amazon Web Services to store and manage source code, related files and private Git repositories in the cloud.

You can use the AWS CLI or the AWS CodeCommit console to track and manage your repositories.

Quickly learn how to connect AWS CodeCommit git repositories via Git Integration for Jira Cloud.

 

Required permissions

IMPORTANT

Before performing an AWS CodeCommit integration, make sure to configure the recommended permissions.

The permissions detailed in the connect/Full feature integrations wizard are necessary for specific features to work.

We recommend that the following AWS IAM policies are configured beforehand based on what features that will be used.

Configure AWSCodeCommitReadOnly » IAM policy for basic features:

Feature Required Permission
show commits, process smart commits, show branches codecommit:ListRepositories
codecommit:GitPull
codecommit:BatchGetRepositories
show pull requests codecommit:ListPullRequests
codecommit:GetPullRequest

Configure AWSCodeCommitPowerUser » IAM policy for all features:

Feature Required Permission
create pull request codecommit:CreatePullRequest
create branch codecommit:CreateBranch
delete branch codecommit:DeleteBranch
configure webhooks automatically codecommit:GetRepositoryTriggers
codecommit:PutRepositoryTriggers
sns:CreateTopic
sns:DeleteTopic
sns:Subscribe

See this article for related information.

 

Webhooks and Triggers

RECOMMENDED

CodeCommit doesn’t have webhooks but it has SNS triggers requiring a subscription confirmation ».

For webhooks to work automatically, the IAM user used to setup the connection must have the configure webhooks automatically permissions (see Required permissions above – under IAM policy for all features). If permissions has not been set, the repositories are connected but no webhooks are created.

While the new UI is not fully functional in AWS CodeCommits, users are required to create triggers via the old UI or with the API.

Shorthand:
With an existing AWS CC repository, enable triggers then create an SNS topic and subscribe to that topic.

For more information on Amazon SNS, see Amazon SNS: Getting Started ».

Right click here to open this video in a new browser tab for more viewing options.
Updated video coming soon.

Using Git service integration

This process requires an AWS account with existing CodeCommit repositories.

We recommend using the Full feature integrations panel (formerly Auto-connect integration panel) to connect multiple repositories from your AWS CodeCommit git host.

To connect your repository to Jira thru the Git Integration for Jira app, open the Add new integration wizard:

  1. On the Jira Cloud dashboard menu, go to Apps ➜ Git Integration: Manage integrations.


  2. On the Manage integrations page, click Add integration.


  3. For the following screen, click AWS CodeCommit to start integration with this git service.


  4. On the following screen, proceed to enter information on the provided field boxes.


    • Enter the Access key ID and the Secret access key in their respective fields.

    • Select the Region where the CodeCommit repositories reside. See below for the supported regions:

      • AWS GovCloud (US)
      • AWS GovCloud (US-East)
      • US East (N. Virginia)
      • US East (Ohio)
      • US West (N. California)
      • US West (Oregon)
      • EU (Ireland)
      • EU (London)
      • EU (Paris)
      • EU (Frankfurt)
      • EU (Stockholm)
      • EU (Milan)
      • Asia Pacific (Hong Kong)
      • Asia Pacific (Mumbai)
      • Asia Pacific (Singapore)
      • Asia Pacific (Sydney)
      • Asia Pacific (Jakarta)
      • Asia Pacific (Tokyo)
      • Asia Pacific (Seoul)
      • Asia Pacific (Osaka)
      • South America (Sao Paulo)
      • China (Beijing)
      • China (Ningxia)
      • Canada (Central)
      • Middle East (Bahrain)
      • Africa (Cape Town)
      • US ISO East
      • US ISOB East (Ohio)
      • US ISO West

  1. Click Connect and select repositories to continue. On the following screen, the Git Integration for Jira Cloud app will read all available repositories from your AWS CodeCommit account.


    • Select one or more repositories to connect to your Jira Cloud instance.
    • Repositories of the logged-in AWS CodeCommit user can be automatically connected to Jira Cloud. Repositories that are added or removed from AWS CodeCommit will be likewise connected or disconnected from Jira Cloud.
  2. Click Connect repositories to complete this setup.

The AWS CodeCommit repositories are now connected to Jira Cloud.

If the connected git host has newly added repositories, the Git Integration for Jira app will automatically add them to the git repositories configuration on the next reindex.

Single repository (Manually connect via HTTP/HTTPS)

Connect a single AWS CodeCommit repository manually to Jira via HTTP/HTTPS connection.

Use the HTTP/HTTPS git clone URL from your AWS CodeCommit repository project page. Click on the HTTPS (Clone URL column – column 1) and use this for single git repository integrations with Git Integration for Jira cloud app.

Single git repository integration (HTTPS)

The repository is now connected to Jira Cloud.

 

Single repository (Manually connect via SSH)

Connect a single AWS CodeCommit repository manually to Jira via SSH connection.

Right click here to open this video in a new browser tab for more viewing options.

Use the SSH git clone URL from your AWS CodeCommit repository project page. Click on the SSH (Clone URL column – column 2) and use this for single git repository integrations with Git Integration for Jira cloud app.

Single git repository integration (SSH)

The repository is now connected to Jira Cloud.

SSH setup
SSH connections are handled automatically if the PUBLIC KEY was added in the AWS IAM console and the associated PRIVATE KEY was added/uploaded on the Jira side (Manage repositories page ➜ Actions ➜ Edit repository with an SSH repository on the list).

SSH authentication issues
If authentication issues are encountered during connecting an AWS repository to Jira, modify the original URL by inserting the SSH Key ID as the username. The SSH Key ID is an alphanumeric sequence provided by AWS IAM when importing a PUBLIC KEY for a particular user account in IAM.

For example, the original URL is:

ssh://git-codecommit.us-east-1.amazonaws.com/v1/repos/test-repo

If the SSH Key ID 1a2b3c4d5e is applied to the original SSH URL, the resulting URL would be:

The modified URL can now be used as a valid repository URL via Manage repositories page ➜ Add integration ➜ Single git repository integration panel.

Troubleshooting integration

Some repositories are not showing for the integration user. If this is the case, make adjustments to the configuration on the following settings:

  • Permissions – verify correct permissions have been granted to the integration user.

For detailed information, see Required permissions.

Setting up AWS CodeCommit web links

The Git Integration for Jira app automatically configures web linking for AWS CodeCommit repositories connected via Git service integration in Jira Cloud.

For single repository connections, configuring web linking is optional. For more information, see Web linking documentation.

Viewing git commits in Jira Cloud

  1. Perform a git commit by adding the Jira issue key in the commit message. This will associate the commit to the mentioned Jira issue.

  2. Open the Jira issue.

  3. Scroll down to the Activity panel then click the Git Commits tab.

  4. Click View Full Commit to view the code diff.

For detailed information on this process, see Linking git commits to Jira issues.

Working with branches and pull requests

This section requires the necessary permissions for all features.

The user must have the required permissions in IAM to proceed creating the branch or pull request. Otherwise, no branch or pull request is created. For more information, see Required permissions at the start of this guide.

The Git Integration for Jira app supports creation of branches and pull requests from Jira via the developer panel.

Default branch

Most git integrations allow changing of the default branch of the repository/project other than “master”.  This change is reflected in the  Repository Settings of the Git Integration for Jira app on the next reindex. Full feature integrations support this function where Git Integration for Jira app gets the default branch from almost all integrations and apply this setting at repository level. 

Main branch for repositories within an integration can only be changed on the git server.

Creating branches

On your Jira Cloud, open a Jira issue. On the Jira Git development panel, click Open Git Integration then click Create branch. The following dialog is displayed.

Pointers:

  1. Select a Repository from the list.

    • The selected repository will display the git service logo to identify which git host it is located from.

    • If there are several repositories with the same name, the listed CodeCommit repositories will have their names attached with a region name. For example, us-west-2/test-repo.

    • Use the search box to look for the specific repository that will be used.

    • OPTIONAL Designate the repository to be the default selected repository for current Jira project. To configure default repositories for more than one Jira project – use the User settings page.

  2. Choose a Source branch. OPTIONAL Designate the branch to be the default selected branch for the currently selected repository. To configure default branches for more than one repository – use the User settings page.

  3. Enter a Branch name or leave it as is (recommended).

  4. Click Create branch to complete this process.

For more detailed information on this feature, see Create branch.

The newly-created branch is now listed in the Jira git development panel under Branches. Perform a commit to the newly-created branch to be ready for merge.

The branch is also created and can be viewed under the Branches tab in your AWS CodeCommit web portal.

Creating pull requests

Before you can create a pull request, you need to create a branch first.

The pull request feature works the same as merge request.

On your Jira Cloud, open the Jira issue where your previously created a branch. On the developer panel under Git integration, click Create Pull Request. The following dialog is displayed.

Pointers:

  1. Select a Repository from the list.

    • The selected repository will display the git service logo to identify which git host it is located from.

    • If there are several repositories with the same name, the listed CodeCommit repositories will have their names attached with a region name. For example, us-west-2/test-repo.

    • Use the search box to look for the specific repository that will be used.

    • OPTIONAL Designate the repository to be the default selected repository for current Jira project. To configure default repositories for more than one Jira project – use the User settings page.

  2. Choose the newly-created branch as the Source branch. OPTIONAL Designate the branch to be the default selected branch for the currently selected repository. To configure default branches for more than one repository – use the User settings page.

  3. Set master as the Target branch.

  4. Enter a descriptive Title or leave it as is (recommended).

  5. Click Create pull request to complete this setup.

Pull/merge requests are still indexed based on branch name even if the PR/MR title does not have the Jira issue key – as long as the branch name contains the Jira issue key.

**Preview** allows you to see the comparison view of the current changes in the selected **Source branch** vs **Target branch** (usually master).

For more detailed information on this feature, see Create pull/merge request.

The pull request is listed on the developer panel of the Jira issue page.

The pull request is also ready for approval by the reviewers in your AWS CodeCommit web portal.

The branch and the pull request status are also displayed on the developer panel.

More Integration Guides

GitHub.com (Git Integration for Jira Cloud)

GitHub Enterprise Server (Git Integration for Jira Cloud)

GitLab.com (Git Integration for Jira Cloud)

GitLab CE/EE (Git Integration for Jira Cloud)

Azure DevOps | Visual Studio Team Services (VSTS) (Git Integration for Jira Cloud)

Azure DevOps Server | Team Foundation Services (TFS) (Git Integration for Jira Cloud)

AWS CodeCommit (Git Integration for Jira Cloud)

Gerrit (Git Integration for Jira Cloud)

Bitbucket Cloud (Git Integration for Jira Cloud)

Introduction to Git integration (Git Integration for Jira Cloud)

Have feedback about this article? Did we miss something? Let us know!
On this page