- Newest
- Most votes
- Most comments
AWS does not make it mandatory for GitHub repositories to be public when creating a pipeline in AWS CodePipeline. You can use both public and private GitHub repositories with AWS CodePipeline.
When connecting to GitHub repositories in CodePipeline, you have two main options:
- GitHub (via GitHub App) - This is the recommended approach that uses connections through AWS CodeStar Connections. This method works with both public and private repositories and offers several advantages:
- No need for OAuth apps or personal access tokens
- No requirement to store personal access tokens in Secrets Manager
- The same connection can be used with other AWS services like CodeGuru Reviewer
- Ability to clone repositories to access git metadata in subsequent CodeBuild actions
- Organization-level permissions management
- GitHub (via OAuth app) - The older method that uses OAuth tokens and personal access tokens, which also works with both public and private repositories.
When setting up a pipeline with GitHub as the source, you simply need to create a connection to your GitHub account, select the repository you want to use (public or private), and configure the appropriate branch. There is no restriction that limits you to only using public repositories.
If you're experiencing issues accessing a private repository, it might be related to permissions or connection configuration rather than a limitation of the service itself.
Sources
Update a GitHub (via OAuth app) source action to a GitHub (via GitHub App) source action - AWS CodePipeline
CodePipeline Setup for New Repository with Github | AWS re:Post
Create a pipeline, stages, and actions - AWS CodePipeline
Tutorial: Use full clone with a GitHub pipeline source - AWS CodePipeline
Relevant content
- asked 2 years ago
- asked 2 years ago
- AWS OFFICIALUpdated 2 years ago

I've a GitHub Enterprise Server Repository in which I'm not able to access it without making it public. Can you pls guide me how can I connect GitHub Enterprise Server Repository when I'm creating a new AWS Codepipeline.