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 Risposta
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
con risposta 2 anni fa
profile pictureAWS
ESPERTO
Chris_G
verificato 2 anni fa
  • 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

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande