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 Antwort
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
beantwortet vor 2 Jahren
profile pictureAWS
EXPERTE
Chris_G
überprüft vor 2 Jahren
  • 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

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen