Failed to connect SourceTree to AWS CodeCommit

bluenowhere picture bluenowhere · Oct 8, 2015 · Viewed 9k times · Source

I'm using Atlassian's SourceTree to work with git on Mac OS, and choose AWS CodeCommit as the remote hosting server.

Following these steps for HTTPs connection between AWS and my local repo,

here's how my git config --global --edit looks like:

enter image description here

Then try to clone a created empty repo from AWS to SourceTree: enter image description here

And I get error printed out:

abort: HTTP Error 403: Forbidden aws --profile default codecommit credential-helper $@ get: aws: command not found fatal: unable to access 'https://git-codecommit.us-east-1.amazonaws.com/v1/repos/my-git-repo/': The requested URL returned error: 403

UPDATE

Tried the answer provided by @Steffen Opel and got more like:

enter image description here

Did I miss anything?

Answer

ebandersen picture ebandersen · Sep 20, 2016

I just found this answer here (https://geekprotem.com/2015/07/10/aws-codecommit-with-sourcetree/)

After following the setup steps for AWS CLI on Amazon's website, the final step to get this to work was editing my repository's config file in SourceTree to include the following:

[credential]
helper = /usr/local/bin/aws codecommit credential-helper $@
UseHttpPath = true