Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS CodeCommit - fatal: repository 'https://git-codecommit.us-east-1..' not found

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?

like image 823
ujjwal garg Avatar asked Jun 01 '18 02:06

ujjwal garg


People also ask

How do I connect to CodeCommit repository?

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.

Is CodeCommit region specific?

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.

How do I access my AWS CodeCommit?

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.


2 Answers

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.

like image 92
Michael Behrens Avatar answered Sep 19 '22 16:09

Michael Behrens


Use the following commands

git config --global credential.helper '!aws codecommit credential-helper $@'
git config --global credential.UseHttpPath true
like image 25
Ramesh Avatar answered Sep 20 '22 16:09

Ramesh