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
The following solution worked for a handful of devs that use Git Bash on Windows 10.
If you select Windows as your operating system on the "Connect to your repository" tab, the commands are formatted like this:
git config --global credential.helper "!aws codecommit credential-helper $@"
git config --global credential.UseHttpPath true
However, if you use Git Bash, select the "Linux, MacOS, or Unix" option instead. Note the single quote instead of double quote on the first line.
git config --global credential.helper '!aws codecommit credential-helper $@'
git config --global credential.UseHttpPath true
Best of luck.
Referred: https://forums.aws.amazon.com/thread.jspa?threadID=198356 Posted by: mwhardesty
Whenever it asks to enter Username and Password while trying to clone or pull the code from AWS, instead of copying the password manually enter it by typing each letter. This resolved my problem.
In my case, I had a permission issue.
You need to need to attach the AWSCodeCommitFullAccess policy to your IAM user to give you access to CodeCommit.
Something was wrong with my default aws credentials, I ran aws configure
again with no profile, restarted terminal and it worked.
On MAC, if above-mentioned tricks don't work, do the following:
Now try again. It should work. You may have to do it again next time as well when you face the error 403.
One of the possible reason for this issue is the keychain password different than login password on your MAC.
I also face same 403 error while using git push command in windows. I done all settings mentioned in AWS docs, but non resolved my issue. After i reviewed git credential set via Windows Credential as shown in screen. I found instead of git https credentials, it set access key / secret key (don't know how).
Click on edit link, update credential with proper git credential generated for AWS User, everything worked fine.