Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Within my CloudFormation template, I would like to download text files from GitHub. When I examine the downloaded files is encoded/encrypted content instead of plain text. It doesn't seem like it should matter, but I have files in both public and private repositories.

Here the code from my CloudFormation template that downloads the files:

           "AWS::CloudFormation::Authentication" : {
                "GithubAccessCredentials" : {
                    "type" : "basic",
                    "username" : { "Ref" : "GitHubLogin" },
                    "password" : { "Ref" : "GitHubPassword" },
            "AWS::CloudFormation::Init" : {
                "configSets" : {
                    "orderedConfig" : [ "yumRepoConfig", "mainConfig" ]
                "yumRepoConfig" : {
                    "files" : {
                        "/etc/yum.repos.d/puppetlabs.repo" : {
                            "source"  : "",
                            "mode"    : "000644",
                            "owner"   : "root",
                            "group"   : "root",
                            "authentication" : "GithubAccessCredentials"
                        "/tmp/README" : {
                            "source"  : "",
                            "mode"    : "000644",
                            "owner"   : "root",
                            "group"   : "root"

I am able to download the files fine using curl:

  • For the private repo

curl -u 'myGithubLogin' -L -O

  • For a public repo:

curl -L -O

What is required to download a valid copy of the files? Also, what command is actually used by cloudFormation to download files (curl, wget,...)?

share|improve this question
As mentionned in my message, the downloaded file is encoded/encrypted instead of a plain text. – PapelPincel Dec 14 '12 at 17:32
I see, the statement that your files were corrupt was a bit buried in the question. Still, I suggest that you try and make your problem very obvious. A little repetition, of the core question is a good thing. – Zoredache Dec 14 '12 at 18:06
ok, thank you for the edit:) – PapelPincel Dec 14 '12 at 18:34
up vote 2 down vote accepted

There was an issue with cfn-init that was preventing from properly expanding downloads sent with Content-Encoding: gzip. Upgrading to the last version of cfn-init fixed the issue.

please see this thread :

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.