{"id":4956,"library":"git-remote-codecommit","title":"Git Remote CodeCommit","description":"git-remote-codecommit is a Git remote helper that simplifies interaction with AWS CodeCommit repositories by enabling a `codecommit://` URL prefix. It leverages existing AWS CLI credential profiles for authentication, supporting features like multiple AWS accounts and temporary credentials without caching them in the operating system's credential store. This tool is the recommended approach for connecting to CodeCommit with federated access or IAM roles. The current version is 1.17, with irregular but ongoing releases indicating active maintenance.","status":"active","version":"1.17","language":"en","source_language":"en","source_url":"https://github.com/aws/git-remote-codecommit","tags":["git","aws","codecommit","remote-helper","devops","version-control"],"install":[{"cmd":"pip install git-remote-codecommit","lang":"bash","label":"Install with pip (Python environments)"},{"cmd":"brew install git-remote-codecommit","lang":"bash","label":"Install on macOS with Homebrew"}],"dependencies":[{"reason":"Required to run the remote helper (versions 3.8.x, 3.9.x, 3.10.x, 3.11.x are supported).","package":"Python","optional":false},{"reason":"The underlying version control system that utilizes this remote helper.","package":"Git","optional":false},{"reason":"Required for credential management and authentication with AWS CodeCommit. The latest version is recommended.","package":"AWS CLI","optional":false}],"imports":[{"note":"git-remote-codecommit installs an executable that Git invokes internally. It does not expose Python modules for direct programmatic use.","symbol":"N/A","correct":"This is a Git remote helper, not a Python library designed for direct import into Python code."}],"quickstart":{"code":"# 1. Ensure AWS CLI is installed and configured (e.g., 'aws configure')\n# For specific profiles:\naws configure --profile my-codecommit-profile\n\n# 2. Clone a CodeCommit repository using the 'codecommit://' protocol\n# Syntax: git clone codecommit::[region]://[profile@]repository-name\n\n# Example with default profile (configured in ~/.aws/credentials)\ngit clone codecommit://MyDemoRepo\n\n# Example with a named profile and specific region\ngit clone codecommit::us-east-1://my-codecommit-profile@MyAnotherRepo\n\n# After cloning, standard git pull/push commands work as usual\ncd MyDemoRepo\ngit pull origin main\necho \"Hello from CodeCommit!\" > README.md\ngit add README.md\ngit commit -m \"Add README\"\ngit push origin main","lang":"bash","description":"The quickstart demonstrates installing `git-remote-codecommit`, configuring an AWS CLI profile (which `git-remote-codecommit` relies on for authentication), and then cloning a CodeCommit repository using the special `codecommit://` URL format. Subsequent Git operations (pull, push, commit) then work seamlessly."},"warnings":[{"fix":"Use it via Git commands (`git clone codecommit://...`), not Python `import` statements.","message":"This is a Git remote helper, not a Python library for direct `import`. It extends Git's capabilities rather than providing Python APIs for programmatic interaction.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Check the official GitHub issues for workarounds or ensure you are on the latest compatible version of `git-remote-codecommit` and AWS CLI. Consider using a virtual environment for isolated installations.","message":"AWS CLI `v2.9.x` introduced new `~/.aws/config` file formats that `git-remote-codecommit` might fail to recognize, leading to authentication issues.","severity":"breaking","affected_versions":"Potentially older versions of `git-remote-codecommit` with AWS CLI v2.9.x and newer."},{"fix":"Perform clone, push, and pull operations for CodeCommit repositories via the command line, then open the local repository in your IDE.","message":"Many IDEs (Integrated Development Environments) may not fully support Git remote helpers like `git-remote-codecommit` for cloning, pushing, or pulling. This can result in 'invalid URL' or connection errors within the IDE.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Ensure `pip install git-remote-codecommit` completed successfully. Verify that Python and the `git-remote-codecommit` executable's location are included in your system's PATH environment variable. Restart your terminal or command prompt after installation.","message":"Encountering 'fatal: Unable to find remote helper for 'codecommit'' indicates that the `git-remote-codecommit` executable is not correctly installed or not in your system's PATH.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Create and activate a Python virtual environment (`python -m venv .venv && source .venv/bin/activate`) before running `pip install git-remote-codecommit`.","message":"If `pip install git-remote-codecommit` fails with an 'externally managed environment' error, it's typically because you're trying to install into a system-managed Python installation.","severity":"gotcha","affected_versions":"Python versions with PEP 668 implementation"},{"fix":"Run `aws configure` to verify and update your AWS CLI profile. Ensure the AWS region specified in your `codecommit://` URL (or implied by your profile) matches the repository's region. Check for expired temporary credentials if using SSO or roles.","message":"Authentication errors (e.g., 403 Forbidden) often stem from misconfigured or expired AWS CLI credentials, or a mismatch between the configured AWS region and the CodeCommit repository's region.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-12T00:00:00.000Z","next_check":"2026-07-11T00:00:00.000Z"}