Posted On: Mar 4, 2020

AWS CodeCommit, a fully-managed source control service, released a new Git remote helper that supports customers using CodeCommit with multiple accounts, or with short-lived credentials. This remote helper, git-remote-codecommit, uses the profile information configured for the AWS CLI. It also introduces a new protocol (codecommit://) that enables a URL pattern that uniquely identifies CodeCommit repositories.

The AWS CodeCommit remote helper provides better integration with the AWS CLI profiles. The remote helper does not require adding configuration to the gitconfig file. This release provides a more robust option for customers who previously used the credential helper included with the AWS CLI. The credential helper caches the temporary credentials in the operating system credential cache, which makes the credentials stale after their expiry. This was the only option available for customers who used short-lived credentials. With this launch, all customers can use git-remote-codecommit, which does not cache credentials in the operating system credential cache and lets you access your repositories even with multi-factor authentication (MFA).

The remote helper introduces a new URL pattern. You can now access your repositories with the URL pattern codecommit::{region}://{aws_cli_profile}@{repositoryname} for example codecommit::us-west-2://dev-account@Hello-Dublin, making the process of working with repositories across multiple accounts easier. The customers can store these URLs in build scripts and configuration files and do not need to connect them with the credentials they use to authenticate.

The remote helper is Apache V2 licensed on and we welcome contributions! For more information, see the AWS CodeCommit documentation.  

AWS CodeCommit is a fully-managed source control service that hosts secure Git-based repositories. It makes it easy for teams to collaborate on code in a secure and highly scalable ecosystem. To learn more about using AWS CodeCommit, try our walkthrough or visit the console directly.

For a full list of AWS Regions where AWS CodeCommit is available, see the AWS CodeCommit documentation