user1751825
user1751825

Reputation: 4309

Cannot clone from aws code-commit repo. Repo is "not found"

I'm having problems cloning from an AWS CodeCommit repo.

As far as I can see, I've done all of the nescessary setup steps.

However, when I try to clone the repo, it immediately returns with...

fatal: repository 'https://git-codecommit.ap-southeast-2.amazonaws.com/[my-repo]' not found

It doesn't prompt for credentials.

If I try to curl the repo URL directly, I can see that it's returning a 401, which presumably is correct.

git version: 2.26.2.windows.1
aws cli version: aws-cli/2.0.17 Python/3.7.7 Windows/10 botocore/2.0.0dev21

I'm trying to do this in powershell on Windows 10 Pro.

Any thoughts about what might be going wrong?

Upvotes: 9

Views: 2292

Answers (1)

Jakub Paulina
Jakub Paulina

Reputation: 21

This worked for me You need to change aws profile to account where repo is created:

In windows it can be done with:

setx AWS_PROFILE your_profile

After that you need to config git with credentials helper

git config --global credential.helper '!aws codecommit credential-helper $@'

Now you should be able to clone your repo

Upvotes: 2

Related Questions