【发布时间】:2022-11-04 04:20:51
【问题描述】:
我正在尝试从私有存储库中的版本下载单个添加的资产,但我得到的只是 404 响应。资源下载地址为https://github.com/<user>/<repo>/releases/download/20211022/file.json
我尝试了几种不同的方法来指定用户名和私有访问令牌,但都给出了相同的结果。当我使用访问令牌访问 api.github.com 时,它似乎可以工作。
我在 curl 中尝试过以下格式
curl -i -u <user>:<token> <url>
curl -i "https://<user>:<token>@github.com/ ...."
curl -i -H "Authorization: token <token>" <url>
我能够从发行版下载源代码 (zip),但这有不同的 url:https://github.com/<user>/<repo>/archive/refs/tags/20211022.zip
我究竟做错了什么?
【问题讨论】:
标签: github github-api