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

11,135

Solution 1

CodeBuild role needs permission to access and use CodePipeline connection:

Solution 2

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.

Share:
11,135
Ada_lovelace
Author by

Ada_lovelace

Updated on June 10, 2022

Comments

  • Ada_lovelace
    Ada_lovelace almost 2 years

    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

    • Marcin
      Marcin over 3 years
      There seem to something wrong with the setup of your source action. But there are no details how it was setup, so its difficult to speculate.
    • Hussain Mansoor
      Hussain Mansoor over 3 years
      Please mention if you're Github connector or webhook integration ?
    • Minsik Park
      Minsik Park over 3 years
      I have same issues. I connected with github using github2 provider. What is problem?
  • jaustin
    jaustin over 2 years
    That link is for CodeStar; I don't see anything in the question about codestar.