9

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.

TLee
  • 91
  • 1
  • 6

3 Answers3

5

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.

Chad Fisher
  • 353
  • 4
  • 16
3

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.

  • 3
    After I did a manual codedeploy deployment, all automatic deployments started working. – rsc Dec 02 '17 at 07:22
0

I faced exactly same issue. Resolution worked for me was: 1. Delete the application 2. Create new application and deployment 3. Re-authenticate with github 4. Authorize codedeploy to access github 5. Deploy

Here without deleting application it was not providing way to re-authorize codedeploy to github and that's the root cause of this issue.

for working your CI integration correctly, Go to -- You profile -->setting --> Application --> Authorize OAuth app should list codedeploy.