git clone not working when switch account

0

Hi team, I'm trying to clone a code commit repo

git clone https://xxxxx/v1/repos/myPrj I have this error :

fatal: repository 'https://git - codecommit.xxxxxxx/v1/repos/myPrj/' not found

it works without issue for another repo in another account I can clone the repos of that account

but when I switch to this account and try to git clone I have the above error,

not sure why it works for one account and not for another.

Thank you

1 Answer
1

If you are interacting with CodeCommit repositories from multiple accounts, I recommend taking a look at this blog post about Using Git with AWS CodeCommit Across Multiple AWS Accounts. The blog post walks through a solution where you can work across multiple repositories by configuring .gitconfig files.

AWS
Taka_M
answered 2 years ago
profile pictureAWS
EXPERT
Chris_G
reviewed 2 years ago
  • Thank you for this nice article, it's a cleaner way to do it! I ended up doing : git config --global credential.UseHttpPath true

    and I was prompt to give code commit creds for the new account and I was able to clone the repo

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions