A Rust implementation of the AWS CodeCommit remote helper for Git. This project aims to provide a maintained alternative to the official Python implementation.
The adapted Rust implementation was done by Bart LEBOEUF on July 13, 2025.
This Git remote helper enables pushing and pulling from AWS CodeCommit repositories using Git over HTTPS. It handles AWS authentication and credential management automatically.
- Support for AWS CodeCommit repositories over HTTPS
- Automatic AWS credentials management from environment or credentials file
- Support for AWS profiles and regions
- Cross-platform support (Windows, Linux, and macOS)
- Multi-architecture support (x86_64 and arm64)
- Native performance with Rust implementation
- Self-contained dynamically linked binary
- Context-aware error messages for common authentication issues
- Git 2.0 or newer
- AWS credentials configured (see Configuration section)
- Rust 1.93.0+ (for local builds; install from rustup.rs)
- Docker (optional, for cross-platform builds)
Supported platforms:
- Linux (x86_64, aarch64)
- macOS (Intel, Apple Silicon)
- Windows 10/11
If you have Rust installed:
cargo install --path .# Clone the repository
git clone https://github.com/bartleboeuf/git-remote-codecommit
cd git-remote-codecommit
# Build using Docker (automatically detects OS and architecture)
chmod +x build.sh
./build.sh
# Copy the binary to your PATH
# For Linux x86_64:
sudo cp target/x86_64-unknown-linux-gnu/release/git-remote-codecommit /usr/local/bin/
# For Linux arm64:
sudo cp target/aarch64-unknown-linux-gnu/release/git-remote-codecommit /usr/local/bin/
# For macOS Intel:
sudo cp target/x86_64-apple-darwin/release/git-remote-codecommit /usr/local/bin/
# For macOS Apple Silicon:
sudo cp target/aarch64-apple-darwin/release/git-remote-codecommit /usr/local/bin/# 1. Install
cargo install --path .
# 2. Configure AWS credentials (if not already done)
aws configure
# 3. Clone a CodeCommit repository
git clone codecommit://my-repo
# 4. Start working!
cd my-repo# Using default AWS profile (falls back to us-east-1 region)
git clone codecommit://repository-name
# Using a specific AWS profile
git clone codecommit://profile@repository-name
# Using a specific AWS region
git clone codecommit::us-west-2://repository-name
# Using both region and profile
git clone codecommit::us-west-2://profile@repository-namegit remote add origin codecommit://repository-nameThe helper uses AWS credentials in this order:
- Environment variables:
AWS_ACCESS_KEY_IDandAWS_SECRET_ACCESS_KEY - AWS credentials file:
~/.aws/credentials - AWS configuration file:
~/.aws/config - AWS SSO profiles: Via
aws sso login --profile <name>
Using IAM Access Keys:
aws configure
# Enter your AWS Access Key ID and Secret Access KeyUsing AWS SSO:
aws configure sso
aws sso login --profile your-profile
git clone codecommit://your-profile@repository-nameUsing Environment Variables:
export AWS_ACCESS_KEY_ID=your-access-key
export AWS_SECRET_ACCESS_KEY=your-secret-key
git clone codecommit://repository-name# Clone using default profile in us-east-1
git clone codecommit://my-repo
# Clone using specific region
git clone codecommit::us-east-1://my-repo
# Clone using 'development' profile
git clone codecommit://development@my-repo
# Clone using specific region and profile
git clone codecommit::eu-west-1://staging@my-repo
# Add remote using specific region and profile
git remote add origin codecommit::us-west-2://production@my-repoThe helper provides context-aware error messages to help you troubleshoot:
Empty repository name:
Invalid repository name in URL: codecommit:///
Repository name cannot be empty.
Examples:
• codecommit://my-repo
• codecommit://profile@my-repo
• codecommit::us-east-1://my-repo
Invalid AWS region:
The following AWS Region is not available for use with AWS CodeCommit: eu-south-5.
Available regions: af-south-1, ap-east-1, ap-northeast-1, ... [31 total]
SSO session expired:
AWS authentication failed: Your session token is invalid or has expired.
This usually happens when:
• Your AWS SSO session has expired
• You haven't logged in with 'aws sso login'
• Your temporary credentials have expired
Try running: aws sso login --profile myprofile
Credentials not found:
AWS credentials not found.
Please configure your AWS credentials using one of:
• aws configure (for access keys)
• aws sso login --profile myprofile (for SSO)
• Set AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables
Prerequisites:
- Rust 1.93.0+ (MSRV)
Build with quality checks (required for releases):
# Clone the repository
git clone https://github.com/bartleboeuf/git-remote-codecommit
cd git-remote-codecommit
# Check code quality (clippy linter)
cargo clippy --all-targets --all-features -- -D warnings
# Build with optimizations and crypto acceleration
cargo build --release --features fast-crypto
# Format check
cargo fmt --check
# Run tests
cargo testDevelopment build (no optimizations):
cargo build- Written in Rust instead of Python
- Self-contained binary (no external dependencies or runtime)
- No Python runtime requirement
- Improved error handling with context-aware messages
- Native performance and smaller binary size
- Cross-platform binary releases
Contributions are welcome! Please feel free to submit issues and pull requests.
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
- Original git-remote-codecommit project by AWS
- AWS SDK for Rust team
For security concerns, please open an issue or contact the maintainers directly.
1. Permission Denied
chmod +x /usr/local/bin/git-remote-codecommit2. AWS Credentials Not Found
# Check if credentials are configured
aws configure list
# Configure credentials if needed
aws configure
# Or set environment variables
export AWS_ACCESS_KEY_ID=your-key
export AWS_SECRET_ACCESS_KEY=your-secret3. Git Not Found in PATH
# Ensure git is installed
git --version
# Verify git location
which git4. SSO Session Expired
# Re-authenticate with SSO
aws sso login --profile your-profile5. Repository Not Found
- Verify the repository exists in AWS CodeCommit
- Check you have access to the AWS account
- Verify you're using the correct repository name and region
For bugs and feature requests:
- Check existing issues
- If not found, create a new issue with:
- Your OS and version
- Git version (
git --version) - Rust version (
rustc --version) - Steps to reproduce
- Expected vs actual behavior
- Full error message output