I have an AWS account. I created a repository in us-east-1 region. When I try to access it from my Mac's terminal I get an error fatal: repository 'https://git-codecommit.us-east-1.amazonaws.com/v1/repos/demo/' not found
. I was able to access this repository using SourceTree GIT client.
I create another repository in California region and I was able to access that repository from the terminal itself.
Why my Mac's terminal can't find repositories in a particular AWS region?
To connect to a CodeCommit repositoryOpen the CodeCommit console at https://console.aws.amazon.com/codesuite/codecommit/home . In the region selector, choose the AWS Region where the repository was created. Repositories are specific to an AWS Region. For more information, see Regions and Git connection endpoints.
Each CodeCommit repository is associated with an AWS Region. CodeCommit offers regional endpoints to make your requests to the service. In addition, CodeCommit provides Git connection endpoints for both SSH and HTTPS protocols in every Region where CodeCommit is available.
Sign in to the AWS Management Console and open the IAM console at https://console.aws.amazon.com/iam/ . In the navigation bar on the upper right, choose your user name, and then choose My Security Credentials. Choose the AWS CodeCommit credentials tab.
I followed the link that both VonC and Uzair mentioned and I was able to get to the CLI git command to work after just entering:
git config --global credential.UseHttpPath true
Thanks VonC. PS: Make sure you have a current version of git installed. CodeCommit supports Git versions 1.7.9 and later.
Use the following commands
git config --global credential.helper '!aws codecommit credential-helper $@'
git config --global credential.UseHttpPath true
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With