How can I upload files to https://github.com/downloads/<user>/<repo>/? - github

I see people hosting files (usually binary files) under https://github.com/downloads/<user>/<repository>/. How do they do it?

You can't. That doesn't exist anymore... GitHub used to have a Downloads API that was replaced by the Releases API back in 2013. Old links were redirected and still work as you can see on the example you provided in the comments.
Nowadays, if you want to make files available for download, you should use either the Releases feature or the Packages feature.

Related

Include GitHub project using link without downloading

I found a small GitHub project that I want to use (https://github.com/NewSignature/us-map) to create a clickable map. It is a jQuery plugin. I don't want to download it and clutter up my project though. Is there a way to link to the project in like a script tag and link tag?
It is possible you could use a CDN for this if the project offers one already. You could ask the project if one exists, or see if common CDNs already offer it, and use that. Otherwise, you'll need to host it yourself.
While GitHub does provide a way to view the raw contents of a file, it isn't intended as a CDN for you to use. Raw files are not hosted directly, but instead generated from the repository, so for performance and availability reasons, GitHub doesn't want people to use it as a substitute for hosting their own dependencies.

Disable zip downloads from github

Is there any way to disable viewers to download my files from github?
I want to show my work, but I am afraid anybody can steal my code.
You can't, Github actually means you want to share something with the community, or you are showcasing your work in the open source community. Unfortunately you cannot restrict the users from downloading your content from your Repository.
Alternatively what you can do Just make your Repository private. But then in this case you are not able to make you work available to view for audience.
More you can read here :-
https://help.github.com/en/github/building-a-strong-community/limiting-interactions-in-your-repository
Disabling zip/tarballs on GitHub at the moment seems to be impossible, but it would be useful for those using git submodules, which are not included in the automatic created archives, where the repository owner could replace them with a continuous integration job with something like git-archive-all.

Github release vs actual software version

Does anyone know what is the difference between a GitHub release and the actual release that software company announces?
I'm trying to find the different versions of vue.js, on the vue.js official website there are only two versions but on the GitHub repository many releases I was wondered if the two concepts are different?
Release(may be downloadable link) version is just file which is uploaded.
Just they decide to provide only two version(may be latest) on official site.
It is all. If same version, (should be) same file. It is just like top selling tag on a store.
When they release a GitHub version, it is supposed to be open source. The one the company releases may have more code they have not reeased yet or is confidential.

Where to deploy my application?

So I got my first github page that contains download buttons. I want to create buttons that link to the current version of my app.
How should I approach this? You should keep the application and the source apart from each other, but I don't have an idea where I should put my file on github to make it accessible (including a version history).
Would you link to a Sourceforge-Project or something similar? Or is there a common way for that on github?
You can tag the current version (which you want to be downloaded) and make a release on github. You can give link to the release for download.

Programmatically add files to a GitHub download page

[[Please note that Github has changed a lot since this question was first asked; instead of "download page" read "new release".]]
I generate PDF documentation as part of my projects and I'd like them to stay in sync with my Git repository (it's not always possible for people to build their own since they often use proprietary fonts).
However, it's not really "correct" to add the PDFs to the repository since it's a derived file; furthermore, doing this adds significantly to the size of the commits and the size of the repository overall.
Is it possible to programmatically send files to the GitHub download page? (I know that tagged commits are automatically added there with git push --tags but I don't know where this is documented. I suppose I could do something fancy by adding a separate branch only containing the PDFs themselves — as done by the GitHub user pages — but I'm a bit rusty on using Git this way.)
Github API v3 supports this feature.
GitHub also provides a maven plugin based on the java API that is part of the Eclipse Mylyn connector for GitHub.
There is a ruby gem called github_api.
The other answer talks about net-github-upload which is available for perl and ruby.
check out for net-github-upload which is available
for perl: http://github.com/typester/net-github-upload-perl
and ruby: http://github.com/Constellation/ruby-net-github-upload
With that you can write a small script to upload and update your PDF easily. To sad there's no easy way provided by github guys themselves..
cheer!
The GitHub blog post announcing that this feature has been disabled: https://github.com/blog/1302-goodbye-uploads
I take it that by "GitHub download page", the owner means a repo–more specifically a branch– that can be downloaded via the "download" button.
If you want to add a file to a repo using the API, you will have to become familiar with the process described here: https://developer.github.com/v3/git/
It's not the easiest process in the world, but mastering it will force you to understand the concepts of blobs, trees, commits and references, amongst others.
You can't just "send a file" to a repo because you're working with Git, and Git has some "internal expectations" that you just can't ignore (it's impossible to think of GitHub as some sort of host that you can ftp). Explaining the flow required to create a file in a GitHub repo is certainly beyond the scope of the original question, but to provide a clear answer: no, it's not possible to programmatically upload a file on GitHub, but yes it is possible to programmatically push a file on GitHub".
There's a PHP library named GitHubTreePHP that lets you automate the process (Disclaimer: I wrote it).