简体   繁体   English

通过发布从GitHub下载单个文件

[英]Download a single file from GitHub by release

I've managed the list all the tags (or releases which is kind of the same thing on GitHub) for a repo and now I would like to download a single file from each of them. 我已经为一个仓库管理了所有标签(或GitHub上相同的发行版)的列表,现在我想从每个标签中下载一个文件。

The reason is I want to track the differences between them. 原因是我想跟踪它们之间的差异。

I have been told to use 有人告诉我使用

https://raw.githubusercontent.com/<user>/<repository>/<hash>/main.c

which doesn't seem to work. 这似乎不起作用。 Here is the actual query I used: 这是我使用的实际查询:

https://raw.githubusercontent.com/openssl/openssl/ab2de707f72a82e0294bae08cca97455b635a656/crypto/rsa/rsa_gen.c

The URL you used is correct, but <hash> must be a valid commit ID. 您使用的URL是正确的,但是<hash>必须是有效的提交ID。 You can look up the commit ID of a specific release on this page: https://github.com/openssl/openssl/releases . 您可以在此页面上查找特定版本的提交ID: https : //github.com/openssl/openssl/releases

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM