heroku / heroku-repo

Plugin for heroku CLI that can manipulate the repo
MIT License
689 stars 114 forks source link

heroku repo:download does not work #88

Closed duanehutchins closed 6 years ago

duanehutchins commented 6 years ago

On a fresh heroku-repo install, repo:download fails to download the repo contents/slug.

Instead, the downloaded repo.tgz content is actually an XML-formatted error:

$ heroku repo:download -a my-heroku-app
Downloading repository to my-heroku-app-repo.tgz

$ cat my-heroku-app-repo.tgz
<?xml version="1.0" encoding="UTF-8"?>
<Error>
    <Code>NoSuchKey</Code>
    <Message>The specified key does not exist.</Message>
    <Key>heroku.com/60229328.tgz</Key>
    <RequestId>AFBE9A598812A475</RequestId>
    <HostId>x0LcD46ioclNlW7hkZstE8+C0OEw5x564ZS6cnwRB8P7cE/ykc/kXZaeuxe3TtSAVMPaZLYx+XU=</HostId>
</Error>

This issue is possibly related to #87.

dmathieu commented 6 years ago

This error means you have no GIT repository. This happens if you never actually did a git push. Are you using GitHub Sync? When using that, we don't update the GIT repository.

duanehutchins commented 6 years ago

Oh, I do have a github repository though, but the repository is private and not the same name as my heroku app (several heroku apps for one github repo). So, maybe it's erroring for one of those two reasons?

Does this only download the github archive? I thought it downloaded an archive of the actual heroku app files. I was hoping to use it to debug.

Thanks for your help!

dmathieu commented 6 years ago

This command downloads the git repository used when doing a git push. When using GitHub Sync, our build api is used. Then, the GIT repository on our end isn't updated. You source of truth is then GitHub.