Skip to content

Instantly share code, notes, and snippets.

@ljayz
Last active October 2, 2024 13:56
Show Gist options
  • Save ljayz/9fa6721c13f2c2d6a8f772a1e4ef1a37 to your computer and use it in GitHub Desktop.
Save ljayz/9fa6721c13f2c2d6a8f772a1e4ef1a37 to your computer and use it in GitHub Desktop.
Fix aws codecommit unable to access repository (The requested URL returned error: 403) in windows
this was tested using windows10 pro
when cloning a git this error was produced
fatal: unable to access 'https://git-codecommit.us-east-1.amazonaws.com/v1/repos/RepositoryName': The requested URL returned error: 403
to fix add the following git configuration
git config --global credential.helper "!aws codecommit credential-helper $@"
git config --global credential.UseHttpPath true
check if git has system credential.helper by typing
git config --system -l
if it has remove it by typing
git config --system --unset credential.helper
@tornado67
Copy link

tornado67 commented Jun 17, 2024

Same issue here.
Neither
git config --system --unset credential.helper
nor
git config --global credential.UseHttpPath true
nor cloning over ssh helped me.
I couldn't ever imagine that AWS would make it's service so extremely, outstandingly BAD! Shame on you AWS!

@Levispsic
Copy link

Levispsic commented Jul 13, 2024

I had this problem, when following an AWS tutorial, in the "Enable Web hosting with the AWS Amplify console" step. At this stage, when deploying to AWS Amplify via CodeCommit, the build reported this error. After a lot of research, I understood that for this process, it is necessary to attach a "service function" to the application.
Follow this procedure to create this "function" and how to attach it to the application.

https://docs.aws.amazon.com/amplify/latest/userguide/how-to-service-role-amplify-console.html

@santiago7r
Copy link

santiago7r commented Oct 2, 2024

For macOS use single quotes:

when cloning a git this error was produced
fatal: unable to access 'https://git-codecommit.us-east-1.amazonaws.com/v1/repos/RepositoryName': The requested URL returned error: 403

to fix add the following git configuration
git config --global credential.helper '!aws codecommit credential-helper $@'
git config --global credential.UseHttpPath true

check if git has system credential.helper by typing
git config --system -l

if it has remove it by typing
git config --system --unset credential.helper

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment