Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS CodeBuild failed CLIENT_ERROR: authorization failed for primary source and source version

I have already authenticated the GitHub account.

My AWS CodePipeline is failing with this error:

CLIENT_ERROR: authorization failed for primary source and source version

enter image description here

like image 842
Ada_lovelace Avatar asked Oct 11 '20 02:10

Ada_lovelace


Video Answer


2 Answers

CodeBuild role needs permission to access and use CodePipeline connection:

  • https://docs.aws.amazon.com/codepipeline/latest/userguide/troubleshooting.html#codebuild-role-connections
like image 178
shariqmaws Avatar answered Oct 24 '22 20:10

shariqmaws


Disconnecting and re-authenticating to GutHub in CodeBuild of the job fixed this error for me.

Make sure that you still have access to the access token used to connect to GitHub before disconnecting from it!

Access tokens can be set up/found here on your GitHub profile.

  1. Select Source

    Select Source

  2. Edit Source (disconnect and reconnect)

    Edit Source

3.Enter access token and Save.

like image 23
Orla Avatar answered Oct 24 '22 19:10

Orla