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
abort: HTTP Error 403: Forbidden aws --profile default codecommit
credential-helper $@ get: aws: command not found fatal: unable to
The requested URL returned error: 403
I have not tested this, but given AWS CodeCommit facilitates a credential helper too and the error being
command not found, I would assume you are affected by the same issue outlined in the SourceTree Knowledge Base article Credential helpers "git: 'credential-osxkeychain' is not a git command. See 'git --help'.":
The error [...] occurs because Git calls this helper and cannot find it meaning it has been defined and yet not found on the PATH. In terms of SourceTree as of version 1.6.3 this is nothing to worry about. There's two ways to stop this from happening.
- Not recommended, but if you're solely using SourceTree for everything you could remove the 'credential' setting from the /usr/local/git/etc/gitconfig config. This is a quick and easy method, but it does mean operations at the terminal may not be able to authenticate.
Recommended, create a symlink between git-credential-osxkeychain in the SourceTree app resources and your local git install.
ln -s /usr/local/git/bin/git-credential-osxkeychain /Applications/SourceTree.app/Contents/Resources/git_local/bin/git-credential-osxkeychain
Of course, since AWS CodeCommit requires the credential helper to be in place, only solution 2 is conceptually applicable for your scenario and you need to adjust the link source and targets as appropriate for the CodeCommit credential helper.