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 個回答
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
已回答 2 年前
profile pictureAWS
專家
Chris_G
已審閱 2 年前
  • 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

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南