Dattatray
Dattatray

Reputation: 1871

Git Lab to AWS S3 Integration

I am trying to build CI/CD using AWS CodePipeline.

I am integrating the Git lab with AWS S3.I am using this link -

https://aws.amazon.com/quickstart/architecture/git-to-s3-using-webhooks/

When the code is pushed into a specific branch, the AWS API is called. ( I can see in the CloudWatch logs). But I am getting below error -

Failed to authenticate SSH session: Waiting for USERAUTH response: GitError

Do I need to configure the GITlab username/keys anywhere on AWS/S3/Cloudformation side?

I have configured GIT PULL URL ( GitPullWebHookApi) on the Gitlab Webhooks side.

I have configured, the PublicSSHKey from AWS S3 Cloudformation into the Secret Token in Gitlab.

Am I missing any step?

Is there any document which specifies the steps to configure the Gitlab keys/user credentials for this integration?

Upvotes: 0

Views: 673

Answers (1)

shariqmaws
shariqmaws

Reputation: 8890

Add the SSH public key resource "PublicSSHKey" generated by the Cloudformation Stack in the Gitlab user public key settings. Please remember that the public needs to added to each user's account who need to invoke the pipeline when committing a change in the Git repository. The Outputs tab for the CloudFormation stack contain the two webhook endpoint URLs, the output bucket name, and the public SSH key [1].

[1] https://aws-quickstart.s3.amazonaws.com/quickstart-git2s3/doc/git-to-amazon-s3-using-webhooks.pdf

Upvotes: 1

Related Questions