- Newest
- Most votes
- Most comments
Hello.
If you look at the log, you will see the following message output.
This is the message that appears when you try to extract a file other than gzip using the tar xzf command.
gzip: stdin: not in gzip format
Is the "actions-runner-linux-x64.tar.gz" downloaded with the curl command a gzip file?
Can you check the file format using "file actions-runner-linux-x64.tar.gz" etc.?
This issue appears to be related to the extraction of the GitHub Actions runner during the CodeBuild setup process. Based on the error message, the downloaded runner file is not in the expected format for extraction, despite the curl request appearing to complete successfully.
Since you're running CodeBuild in a private VPC, there might be network-related issues affecting the download of the runner. Even though the curl request seems to complete, the content might be corrupted or incomplete due to network constraints or proxy configurations.
Here are some troubleshooting steps you can try:
-
Verify that your VPC has proper outbound connectivity to GitHub's domains. Even though the curl request completes, it might be returning an error page or incomplete file rather than the actual runner package.
-
Check if you need to configure any specific network settings or NAT gateways to allow proper outbound traffic from your private VPC.
-
Ensure that your CodeBuild project has the correct permissions to download and extract the runner.
-
If you're using any label overrides in your GitHub Actions workflow, make sure they're consistent across all jobs. Inconsistent label configurations can cause issues with runner assignment.
-
Verify that the credentials associated with your CodeBuild project have the necessary read permissions for deployments and actions within GitHub.
If the issue persists, you might want to check the webhook delivery details in GitHub to see if there are any specific error messages that could provide more insight into the problem. You can use GitHub's API to get details about the webhook delivery and see CodeBuild's response to the webhook's payload.
Sources
Self-hosted GitHub Actions runners in AWS CodeBuild - AWS CodeBuild
Troubleshoot the webhook - AWS CodeBuild
CodeBuild GitHub runners are randomly failing | AWS re:Post
Relevant content
- asked 2 years ago
- AWS OFFICIALUpdated 3 months ago

Hi, thanks for your reply! This is currently what I am trying to assess. In order to do this, I am attempting to debug the codebuild to find the curl request command, and find the requested url, but so far no luck. If I create a sandbox debug session, the original buildspec.yml gets overwritten so I can't find it that way.
I'm not well versed in codebuild debugging functionalities so I'm trying to find a way to debug while keeping the original buildspec.yml file (which is managed/created by AWS, not created by myself) Any tips in that regards (or any alternative way) would be nice, thanks
To debug my codebuild, I had to:
With that, I was able to gather the following:
actions-runner-linux-x64.tar.gz is actually an XML document (???). Here's the output of the "file actions-runner-linux-x64.tar.gz" command: actions-runner-linux-x64.tar.gz: XML 1.0 document, ASCII text
The file is fetched from codefactory-eu-west-3-prod-default-build-agent-executor.s3.eu-west-3.amazonaws.com