Download Github build artifact (release) using wget/curl

The Goal: Download github release tar.gz in Docker Build Script, so that the release files can be used for the docker image. I do not want the full source downloaded, which I can get to download through the archive path using the tag, but rather a build artifact that is part of the release.

To Be Noted: This is a download from a private repository, which is why I’m attempting to send my github_token as part of the command currently.

  • google app engine configure a specific image / snapshot / docker?
  • running commands in docker-compose
  • How to create dynamic indexes in Kibana
  • Is there a Docker Swarm dashboard like Kubernetes' dashboard/ui? [closed]
  • How do I limit a volume's size using the API?
  • cadvisor, elasticsearch, docker: no Elasticsearch node available
  • The Problem: I’m having trouble downloading a github release tar.gz using wget.

    wget --header="Authorization: token <GITHUB_TOKEN>" --output-document=<FILENAME>.tar.gz<USER>/<REPO>/releases/download/<TAG>/<FILENAME>.tar.gz

    This is returning the following error:

    --2014-12-02 16:19:25--<USER>/<REPO>/releases/download/<TAG>/<FILENAME>.tar.gz
    Resolving (,
    Connecting to (||:443... connected.
    HTTP request sent, awaiting response... 404 Not Found
    2014-12-02 16:19:25 ERROR 404: Not Found.

    It’s worth noting that I’m not opposed to using curl for the download either or some other solution if necessary.

  • Docker compose: Multiple isolated environments on a single host with overridable volumes and ports
  • Installing Jenkins Plugins to Docker Jenkins
  • How do you setup an AWS Elastic Beanstalk Docker Platform running Django?
  • Can I connect VisualVM to remote Java process in Docker without exposing the RMI port as itself?
  • Simulation “docker build -f” with ansible module “docker_image”
  • Request hangs for nginx reverse proxy to an ASP.NET 5 web application on docker
  • One Solution collect form web for “Download Github build artifact (release) using wget/curl”

    You can use the GitHub API.

    To download a release using wget, you can do:

    wget --header "Authorization: token <GITHUB TOKEN>"  --output-document=<RELEASE>.tar.gz<USER>/<REPO>/tarball/<RELEASE NAME>

    Use can change tarball to zipball to get a zip file.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.