27

I want allow users to download executable of one of my project on github, without downloading all sources or browsing the entire project.

According to this similar question, you could use a upload/download service, which apparently, github has shut down.

So is there another way? Is github aiming at sharing code only, not software?

Community
  • 1
  • 1
corentin
  • 679
  • 1
  • 6
  • 17
  • Note: you now can define a release in GitHub and host executable that way: see [my edited answer below](http://stackoverflow.com/a/14034459/6309) – VonC Jul 03 '13 at 05:55

4 Answers4

49

Update 2d July 2013, you now can define a release.

release

  • Releases are accompanied by release notes and links to download the software or source code.
  • Following the conventions of many Git projects, releases are tied to Git tags. You can use an existing tag, or let releases create the tag when it's published.
  • You can also attach binary assets (such as compiled executables, minified scripts, documentation) to a release. Once published, the release details and assets are available to anyone that can view the repository.

This is what replaces the old binary upload service, which was removed in December 2012!


Ideally, you would store your executable in an artifact repository, as opposed as a source repository like GitHub.
So yes, GitHub is for source control management, not deliveries (like binaries produced from your code).

Nexus is the usual choice for any generated artifacts like binaries, with a free upload possibility for open-source projects.
See "How do I get my software into Central?" (from this answer, also mentioned in "Maven repository hosting for non-public artifacts?")

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
14

You can create another repository to host all your builds , I mean executable files . With in that repository don't add any of your code other than your builds ,

As a result of this , people can click on download Zip button at git hub , which downloads only executable ( as a zip file ).

while building you can copy the executable file in a folder just push to remote repository which is hosting only builds .

Hope this helps .

basically , GIT is just an SCM ( source code management system ) it is not meant for this purpose .

but still this how you can utilize the service of github.org amd git .

hope this helps .

EDIT : -

Git hub now has a solution for hosting releases it has been well explained by @VonC in the post below . Please use that as a solution.

Aravind.HU
  • 9,194
  • 5
  • 38
  • 50
  • Thank you for the answer. I don't want to mess with another repo and left the binary executable in the main repo, but maybe I should try another host provider. – corentin Dec 26 '12 at 19:44
  • @corentin you can also upload it in a dorpbox account , and share the link with your customers , I guess drop box has file version system . – Aravind.HU Dec 27 '12 at 06:17
  • DO NOT. Pushing binaries to git is never a good idea. Use releases, as described below. – Chris Warrick Jul 28 '14 at 08:38
  • @Kwpolska, by the time I posted this the release option was not there, Its better you see the post date and then decide. – Aravind.HU Jul 28 '14 at 09:14
  • @aravind.udayashankara I did notice, and I knew about it. However, this answer is the accepted answer, and also bad advice — and people might not read far enough to know this is a very bad thing to do. – Chris Warrick Aug 09 '14 at 16:06
  • It'd be cool to put the edit to the top :-) – Ulugbek Abdullaev Mar 21 '21 at 07:15
0

The following worked for me, YMMV. On a MAC and using Chrome browser, after getting to this page I clicked on the "Raw" button (the "View Raw" link also worked), and it downloaded the executable tatuMicro.kit to my Downloads folder

Dexygen
  • 12,287
  • 13
  • 80
  • 147
0

An exe file can be hosted under releases and the link can be distributed among friends etc. I tested it as recently as yesterday. Only issue is if someone sabotages the program for profit. The exe files can be moved around and distributed easily on pendrives.