GitHub:原始文件的URL [英] GitHub: URL to raw files
问题描述
我曾经使用这个网址格式
https:// github.com/USERNAME/PROJECTNAME/raw/BRANCH
喜欢
https://github.com/lowcoupling/dono/raw/master
但是突然停止工作
现在我应该怎么样了?
这个URL确实是 https:// raw。 githubusercontent.com/username/projectname ,但它仅适用于文件,而不适用于项目本身(将返回400:无效请求)
https://raw.githubusercontent.com/username/projectname/branchName/file
例如:
https://raw.githubusercontent.com/VonC/compileEverything/master/make_e nv.sh
这与项目存档(tarball或zip)下载,它下载完整的repo。
请参阅 pre> GET / repos /:owner /:repo /:archive_format /:ref
with:
-
archive_format
string可以是tarball或zipball 。
默认值:tarball -
ref
string有效的Git引用。
默认:存储库的默认分支(通常是master)
例如:
https://api.github.com/repos/VonC/compileEverything/zipball/master
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!?
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: tarballref
string A valid Git reference.
Default: the repository’s default branch (usually master)
For instance:
https://api.github.com/repos/VonC/compileEverything/zipball/master
这篇关于GitHub:原始文件的URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!