How to download GitHub Release from private repo u

2019-01-11 00:44发布

GitHub guide explains 2 way to authorize but looks neither of those works with the Release files.

as a result of:

curl -u 'username' -L -o a.tgz https://github.com/company/repository/releases/download/TAG-NAME/A.tgz

there always is something like

<!DOCTYPE html> <!-- Hello future GitHubber! ...

7条回答
看我几分像从前
2楼-- · 2019-01-11 01:40

We had to download release assets from private GitHub repos fairly often, so we created fetch, which is an open source, cross-platform tool that makes it easy to download source files and release assets from a git tag, commit, or branch of public and private GitHub repos.

For example, to download the release asset foo.exe from version 0.1.3 of a private GitHub repo to /tmp, you would do the following:

GITHUB_OAUTH_TOKEN="your token"
fetch --repo="https://github.com/foo/bar" --tag="0.1.3" --release-asset="foo.exe" /tmp
查看更多
登录 后发表回答