lowcoupling
lowcoupling

Reputation: 2169

GitHub: URL to raw files

I have some Eclipse extension projects hosted by GitHub. These projects also include the related update sites. I thus need an URL to the raw data that Eclipse can use to download and install the plugins.

I used to use this url pattern

https://github.com/USERNAME/PROJECTNAME/raw/BRANCH

like

https://github.com/lowcoupling/dono/raw/master

But it suddenly stopped to work

How am I supposed to to this now!?

Upvotes: 2

Views: 5427

Answers (3)

Rafael Chaves
Rafael Chaves

Reputation: 563

I use Bitbucket's support for static sites to host an Eclipse update site.

Github has Pages, which seems even more flexible.

Upvotes: 0

VonC
VonC

Reputation: 1327324

The url is indeed https://raw.githubusercontent.com/username/projectname, but it only applies to files, not the project itself (which would return 400: Invalid request)

https://raw.githubusercontent.com/username/projectname/branchName/file

For instance:

https://raw.githubusercontent.com/VonC/compileEverything/master/make_env.sh

This is different from a project archive (tarball or zip) download, which does download the full repo.
See get archive link:

GET /repos/:owner/:repo/:archive_format/:ref

with:

  • archive_format string Can be either tarball or zipball.
    Default: tarball
  • ref string A valid Git reference.
    Default: the repository’s default branch (usually master)

For instance:

https://api.github.com/repos/VonC/compileEverything/zipball/master

Upvotes: 3

manojlds
manojlds

Reputation: 301347

You can try this tarball url - https://github.com/lowcoupling/dono/tarball/master

Or the zipfile url - https://api.github.com/repos/lowcoupling/dono/zipball/master

Upvotes: -1

Related Questions