How can I download all releases of a specific repository on GitHub at once? - Stack Overflow

admin2025-04-17  4

I want to download all releases of a specific repository on GitHub, including the source code, at once.

I tried using the 'gh release download' command in GitHub CLI for this, but it didn't allow me to download all releases at once. Instead, I could only download them one by one. I also tried searching for the information I needed, but I couldn't find the answer I was looking for.

I want to download all releases of a specific repository on GitHub, including the source code, at once.

I tried using the 'gh release download' command in GitHub CLI for this, but it didn't allow me to download all releases at once. Instead, I could only download them one by one. I also tried searching for the information I needed, but I couldn't find the answer I was looking for.

Share asked Jan 31 at 12:35 upyenupyen 112 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

you can loop through releases:

for tag in $(gh release list -R owner/repo --json tagName -q '.[].tagName'); do gh release download $tag -R owner/repo done

This script fetches all releases and downloads their assets.

转载请注明原文地址:http://anycun.com/QandA/1744861733a88661.html