Git submodules are not being pulled in using CodePipeline

0

When source step is set to “Full Clone” instead of “CodePipeline Default”

I get the following error at the Build step:

authorization failed for primary source and source version commit hash

When it's set to "CodePipeline Default" that error does not appear and the repo does get pulled in but the submodule is not there, the submodule folder is empty.

asked 7 months ago356 views
1 Answer
1
Accepted Answer

The Git clone mode allows you to interact with the source code as a working Git repository. To use this mode, you must grant your CodeBuild environment permissions to use the connection.

To add permissions to your CodeBuild service role policy, you create a customer-managed policy that you attach to your CodeBuild service role. The following steps create a policy where the UseConnection permission is specified in the action field, and the connection ARN is specified in the Resource field.

Add CodeBuild GitClone permissions for connections to Bitbucket, GitHub, or GitHub Enterprise Server

answered 7 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions