My local laptop is a Mac.
The ssh key is configured properly. This is the content of ~/.ssh/config
Host barthea
Hostname git-codecommit.us-east
After running below commands, I had to add the below mentioned policy to my IAM user to solve this problem. refrence
git config --global credential.helper '!aws codecommit credential-helper $@'
git config --global credential.UseHttpPath true
Policy:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"codecommit:*"
],
"Resource": "*"
}
]
}