"[GitHub] Not Found" - CodePipeline (Github V2)

1

I have setup a Github (V2) connection on codestar/codeconnection. It lists/autocompletes the repository name and branches as expected in the CodePipeline source stage The problem occurs when I trigger a release, it throws an error "[GitHub] Not Found" when using the 'CodePipeline default' artifact format. The error persists even when using 'Full clone' format, it just occurs downstream in the build stage ('repository/revision not found..')

What am I doing wrong?

The service role has access to codestar/codeconnection (without which it throws an access denied error instead)

KD
asked 23 days ago533 views
3 Answers
0

Hello,

Check this Steps to Troubleshoot:

Revalidate the GitHub (V2) Connection:

  • Go to the AWS CodeStar Connections section in the AWS Console.
  • Revalidate the connection to ensure it’s still active and properly configured.
  • Test the connection to see if it successfully links to your GitHub repository.

Check Repository Access:

  • Ensure the GitHub token associated with the connection has the necessary permissions for the repository. The token should have at least repo and admin:repo_hook permissions.

Verify Repository and Branch Names:

  • Double-check that the repository and branch names you selected in the CodePipeline are accurate, with no typos or case sensitivity issues.

Service Role Permissions:

  • Confirm that the service role used by CodePipeline has the following permissions:
  • codestar-connections:UseConnection
  • Necessary permissions for CodePipeline and CodeBuild (if applicable).
  • Ensure no other policies or restrictions are blocking access to your GitHub repository.

Pipeline Artifacts Configuration:

  • If you're using the 'CodePipeline default' artifact format, try switching to a different artifact format temporarily to see if it resolves the issue.
  • Ensure that the build stage has the correct repository and branch references if the error is occurring downstream.

Recreate the Pipeline:

  • As a last resort, consider deleting the existing pipeline and creating a new one to rule out any configuration issues that might have occurred during the setup.
profile picture
EXPERT
answered 23 days ago
  • There's no github token involved. The org owner connected the aws app to the repo directly.

    And i've tried everything mentioned here. Redid the connection, build project, and the pipeline. Still the same error shows up.

  • could you share more details about error like ci-cd consol output

  • I am also facing this same issue. As OP said, there are no tokens associated with the V2 connection. I'm not sure where to do to get more detailed output, other than the message that's shown in CodePipeline "[GitHub] Not Found." What is this "ci-cd console output" that you're referring to?

    I've created two pipelines, one with CloudFormation and one through the console. Both worked with GitHub V1 using Webhooks, but when switching to GitHub V2 using the CodeStar Connection I get the error that was mentioned. The connection appears to be working, I can retrieve the names of repos and branches through the connection. Just doesn't work when I try to initiate the pipeline, both manually or by pushing to me repo.

0

Hi,

You may be facing same issue as https://github.com/aws/aws-cdk/issues/28694

A solution has been merged in CDK: https://github.com/aws/aws-cdk/pull/28538

Please, update your CDK version accordingly

Best,

Didier

profile pictureAWS
EXPERT
answered 23 days ago
  • I'm not using CDK, everything was done via the console.

0

I was able to resolve this issue by going through the following steps:

  1. Delete the CodeStar Connection.
  2. Uninstall the GitHub application from GitHub Org/Repo.
  3. Recreate the CodeStar Connection.
  4. Reinstall the GitHub application.

Also, in order to install the GitHub application you should be the owner of the Org (if installing in an Org), or the owner of the repo (if not installing in an Org).

This link may be helpful for the details about setting up a GitHub connection: https://docs.aws.amazon.com/codepipeline/latest/userguide/action-reference-CodestarConnectionSource.html

profile picture
answered 22 days 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