Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Error 400 when trying to download asset(s) of a release #1695

@dblbirdie

Description

@dblbirdie

Describe the bug

When trying to download an asset from a release, the attempt leads to a 400 error at the point when the GET request to the binary is performed.

Affected version:

$ gh --version
[--version] -> [--version]
gh version 0.12.0-86-gb34fe81 (2020-09-14)
https://github.com/cli/cli/releases/latest

Steps to reproduce the behavior

  1. Perform gh release download {tag} on a private or public repository with existing release (incl. assets)
  2. No files are downloaded
  3. Look for HTTP 400: 400 Bad Request in the ouput

Expected vs actual behavior

The command is expected to return successfully (exit 0) after downloading all specified assets in the command line parameters.

Logs

~/go/src/github.com/cli/cli $ gh release download v0.12.0 -p '*_checksums.txt'
[git remote -v]
* Request at 2020-09-14 13:25:35.327152 +0200 CEST m=+0.034618508
* Request to https://api.github.com/graphql
* Request took 393.165624ms
* Request at 2020-09-14 13:25:35.720638 +0200 CEST m=+0.428107757
* Request to https://api.github.com/repos/cli/cli/releases/tags/v0.12.0
* Request took 188.494005ms
* Request at 2020-09-14 13:25:35.910262 +0200 CEST m=+0.617733060
* Request to https://api.github.com/repos/cli/cli/releases/assets/25147130
⣾ * Request took 343.963773ms
* Request at 2020-09-14 13:25:36.254302 +0200 CEST m=+0.961775820
* Request to https://github-production-release-asset-2e65be.s3.amazonaws.com/212613049/d4883d00-f1be-11ea-9a48-8e2cc1789ed7?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20200914%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20200914T112536Z&X-Amz-Expires=300&X-Amz-Signature=ce673ce259e2ea2b24c25f06d0dfaedf542fe7b1488d0066f3daa012bdec1965&X-Amz-SignedHeaders=host&actor_id=6597626&key_id=0&repo_id=212613049&response-content-disposition=attachment%3B%20filename%3Dgh_0.12.0_checksums.txt&response-content-type=application%2Foctet-stream
⣻ * Request took 479.564398ms
HTTP 400: 400 Bad Request (https://github-production-release-asset-2e65be.s3.amazonaws.com/212613049/d4883d00-f1be-11ea-9a48-8e2cc1789ed7?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20200914%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20200914T112536Z&X-Amz-Expires=300&X-Amz-Signature=ce673ce259e2ea2b24c25f06d0dfaedf542fe7b1488d0066f3daa012bdec1965&X-Amz-SignedHeaders=host&actor_id=6597626&key_id=0&repo_id=212613049&response-content-disposition=attachment%3B%20filename%3Dgh_0.12.0_checksums.txt&response-content-type=application%2Foctet-stream)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions