2 Answers
- Newest
- Most votes
- Most comments
0
The error "CLIENT_ERROR: Submodule error authorization failed" typically occurs when your AWS CodeBuild project is trying to download a Git submodule that points to another AWS CodeCommit repository, but it doesn't have the proper permissions to access the submodule repository.
- Update IAM Role: Ensure that the IAM role used by CodeBuild has the necessary permissions to access both the primary and submodule repositories.
- Verify Submodule URL: Check the submodule URL in the .gitmodules file to ensure it points correctly to the CodeCommit repository.
- Consider SSH: If you face HTTPS issues, switch to SSH-based authentication for the submodules.
- Ensure Submodule Initialization: Make sure that submodules are being initialized correctly during the build process.
0
Hello.
Try adding the following IAM policy to your CodeBuild IAM role.
This error could occur when CodeBuild did not have permission to pull from CodeCommit.
https://docs.aws.amazon.com/codecommit/latest/userguide/auth-and-access-control-permissions-reference.html#aa-git
https://docs.aws.amazon.com/codebuild/latest/userguide/setting-up-service-role.html
{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"codecommit:GitPull"
],
"Resource": "arn:aws:codecommit:region:account-id:repository-name",
"Effect": "Allow"
}
]
}
Relevant content
- asked a year ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 5 months ago
- AWS OFFICIALUpdated a year ago
i tried the #3 point to switch from https to ssh in .gitmodules...now getting a different error.... CLIENT_ERROR: Submodule error error creating SSH agent: "SSH agent requested but SSH_AUTH_SOCK not-specified"