简体   繁体   中英

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.

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. You can look up the commit ID of a specific release on this page: https://github.com/openssl/openssl/releases .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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