Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS CodeDeploy can't find github tar link for private repository "could not download bundle"

I am setting up AWS CodeDeploy to get revision from GitHUB private repository. I tried using both AWS CodeDeploy GUI and also aws deploy command. For GUI, I follow instruction of this page https://blogs.aws.amazon.com/application-management/post/Tx33XKAKURCCW83/Automatically-Deploy-from-GitHub-Using-AWS-CodeDeploy. I typed in my credential when connect to GitHub repository. I have also made sure that the appspec.yml file is in the root directory of the repository. During deployment, I kept getting following message.

Could not download bundle at 'https://api.github.com/repos/[GroupName]/[repositoryName]/tarball/[commitID]' after 3 retries. Server returned codes: 404 'Not Found'; 404 'Not Found'; 404 'Not Found'; 404 'Not Found'.

When I tried doing wget on that URL, I also see the same 404 return code.

MyMachine$ wget https://api.github.com/repos/[GroupName]/[repositoryName]/tarball/[commitId]
--2016-02-06 00:26:13--
https://api.github.com/repos/[GroupName]/[repositoryName]/tarball/[commitId]
Resolving api.github.com... 192.30.252.124
Connecting to api.github.com|192.30.252.124|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2016-02-06 00:26:14 ERROR 404: Not Found.

I am a bit out of luck. Any guidance or help is appreciate.

like image 909
TLee Avatar asked Feb 05 '16 18:02

TLee


2 Answers

Just an FYI for anyone looking to authorize CodeDeploy for an Organization Repository.

Follow the instructions listed here: AWS CodeDeploy Organization Instructions

I had trouble deploying from a repository owned by my Organization, but after authorizing AWS CodeDeploy specifically for that Organization, everything worked as expected.

like image 58
Chad Fisher Avatar answered Nov 02 '22 06:11

Chad Fisher


GitHub can return a 404 when you have not connected the deployment group in CodeDeploy with a GitHub account, or when you connected it to an account that does not have pull permissions. Can you try reconnecting to GitHub via the CodeDeploy console for the deployment group? You can follow the instructions at http://docs.aws.amazon.com/codedeploy/latest/userguide/github-integ.html#github-integ-behaviors-auth to do so.

like image 36
Josh McFarlane Avatar answered Nov 02 '22 08:11

Josh McFarlane