Question:
I want to download a source code from GitHub using API and UI, how to do that?
Answer:
Using API:
If you have a repository say “https://github.com/CloudAffaire/rest” and the branch you want to download is “main” then the link or URL to download your code will be “https://github.com/CloudAffaire/rest/zipball/main/” or “https://github.com/CloudAffaire/rest/archive/refs/heads/main.zip“
You can use wget command to download a public GitHub repository as shown below
1 2 3 4 5 |
wget https://github.com/ ## OR wget https://github.com/ |
Using GitHub UI:
In your repository page, click “Code” => “Download ZIP”.
