I usually download a project by reference (see Screenshot)
How to program and save to local disk using octokit.net:
- save in “zip” format?
- or in unpacked format?

When we hover the mouse over the "Download ZIP" button, the browser suggests that this file is located at https://github.com/Ryozuki/HelperBot/archive/master.zip The question is that the solution should receive this link, and not form it on the basis of

var url = "https://github.com/" + textBox2.Text + "/" + textBox3.Text + "/archive/master.zip"; 

Because I used to come across links that don't have "master.zip" at the end, but a release number (in my opinion) ...
Now I can't find these projects, but it was

I try to use the code, but creates an empty archive "* .zip"

  var latestAsset = await client.Repository.Get("Ryozuki", "HelperBot"); //Download Release.zip here var response = await client.Connection.Get<object>(new Uri(latestAsset.Url), new Dictionary<string, string>(), null); byte[] bytes = Encoding.ASCII.GetBytes(response.HttpResponse.Body.ToString()); ; File.WriteAllBytes("RyozukiHelperBot.zip", bytes); 

Link to the repository - https://github.com/Ryozuki/HelperBot

enter image description here

  • If you need what's in the picture, then this is like the Get archive link method. You are trying to use List releases (that is, you are trying to download what is on the screen in your center, 57 releases , the project is already compiled). If you still need releases, an example seems to be in the documentation . - EvgeniyZ
  • git clone git@github.com:NataliaTepluhina/vue-storefront.git use the same bash !!! - user273805
  • @EvgeniyZ Could you describe in more detail ... and show an example of the code ... And then I read something already ... my head was spinning ... I tried several variants of the code and everyone works with some kind of jambs .. - user9832524
  • @EvgeniyZ And what if the number of releases is "0"? - user9832524
  • one
    You have the download of source code in the picture, and in the code work with releases. You decide what you want then - tym32167

0