Search code examples
gitamazon-web-servicesaws-codecommitaws-codestar

AWS CodeCommit access denied while cloning


Recently i set up and downloaded the repo by using the git credentials generated from AWS IAM user but then

  • i deleted that AWS git generated key that i had used to clone the repo first time.

now

  • i have generated another AWS git key but it is not asking me for the username and key instead i am getting

ERROR

Cloning into 'myawsrepo'...
fatal: unable to access 'https://git-codecommit.us-east-1.amazonaws.com/v1/repos/myawsrepo/': The requested URL returned error: 403
MacBook-Pro:~ apple$ 

Solution

    1. Went to user in AWS IAM console
    2. Deleted git credential
    3. Deleted user credentials
    4. Created new user credentials
    5. Created new git credentials