GitHub: URL to raw files

前端 未结 3 355
不思量自难忘°
不思量自难忘° 2021-01-07 11:14

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 dow

相关标签:
3条回答
  • 2021-01-07 11:24

    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

    0 讨论(0)
  • 2021-01-07 11:25

    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

    0 讨论(0)
  • 2021-01-07 11:46

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

    Github has Pages, which seems even more flexible.

    0 讨论(0)
提交回复
热议问题