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

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠