GitHub 私有库,如何**长久的**读取文件的 raw 格式。

2019-10-22 17:25:11 +08:00
 weioyi

问题:

https://raw.githubusercontent.com/[user]/repo/path/file

这个格式的网址是长久可以访问的。

https://raw.githubusercontent.com/[user]/repo/path/file?token=xxxxxxxxxxxxxxxxx

这个是临时访问网址,过一会就不能访问了。

尝试方法:

然后在网上找了一些格式,也不能访问,测试格式如下:

https://raw.githubusercontent.com/[user]/repo/path/file?token=OAUTH-TOKEN

https://OAUTH-TOKEN@github.com/[user]/repo/path/file

https://rawgit.com/[user]/repo/path/file?token=OAUTH-TOKEN

https://api.github.com/[user]/repo/path/file?access_token=OAUTH-TOKEN

https://api.github.com/[user]/repo/path/file?client_id=MY-CLIENT-ID&client_secret=MY-CLIENT-SECRET

请赐教:

如何像公开库一样( HTTP 方式),实现长久访问私有库的 raw 格式文件,请大佬赐教,或给个解决方法的链接。

谢谢!

9276 次点击
所在节点    GitHub
34 条回复
qingyin
2022-07-18 01:26:17 +08:00
现在还有人解决吗
VT2
2022-07-19 16:16:12 +08:00
围观,也是试了半天都没有发现解决方案
geekyouth
2022-07-29 15:04:25 +08:00
同求
eudemonwind
2022-09-01 06:58:51 +08:00
把文件加密了传公有库?
shindgewongxj
2022-09-01 14:11:05 +08:00
`https://<Personal Access Tokens>@raw.githubusercontent.com/<username>/<reponame>/<branchname>/<path>/<filename>`
levine
2022-10-06 14:43:17 +08:00
@jfgyjghrjry 请问是 OAuth Apps 这个?还是 Personal access tokens 呢?
levine
2022-10-06 14:44:40 +08:00
请问有解决嘛?或者有没有其他可以实现的网站呢?
levine
2022-10-07 09:52:26 +08:00
@shindgewongxj 浏览器中操作不行哦。
jfgyjghrjry
2022-10-19 13:21:46 +08:00
@levine 我重新回复了我自己,这个操作已经已经无法使用了
levine
2022-10-21 17:08:15 +08:00
@jfgyjghrjry 谢谢。
yidongnan
2023-03-08 20:14:29 +08:00
同求~
Dragonphy
2023-03-19 05:57:05 +08:00
sunny2580839896
2023-03-20 07:47:57 +08:00
@Dragonphy 谢谢,最后用 gist 解决了
yxmyxmyyy
182 天前
去 cf worker 搭一个反代,反代带上 token 请求头就行了

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/611818

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX