I want to download a source code from GitHub using API and UI, how to do that?
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
Using GitHub UI:
In your repository page, click “Code” => “Download ZIP”.