[英]How do I download release artifacts from a GitHub enterprise repository using wget/curl?
From the documentation , you must hit:从文档中,您必须点击:
/repos/{owner}/{repo}/tarball/{ref}
First of all, create a GitHub token with the necessary read permissions.首先,创建一个具有必要读取权限的 GitHub 令牌。
Then, if we say that:那么,如果我们这样说:
paolo
paolo
mycoolrepo
mycoolrepo
1.0.0
1.0.0
then you can use:那么你可以使用:
$ curl -s -L -H "Authorization: token INSERT_TOKEN_HERE" https://github.MY_ENTERPRISE_NAME.com/api/v3/repos/paolo/mycoolrepo/tarball/1.0.0 --output release_zip
obviously, replace INSERT_TOKEN_HERE
and MY_ENTERPRISE_NAME
with the token and the organisation name respectively.显然,将
INSERT_TOKEN_HERE
和MY_ENTERPRISE_NAME
分别替换为令牌和组织名称。
You can confirm the download has been successful with file
;您可以通过
file
确认下载已成功; for a successful download, it should look as follows:要成功下载,它应该如下所示:
$ file release_zip
release_zip: gzip compressed data, from Unix, original size 51200
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.