本文介绍了如何从私人仓库使用命令行下载GitHub发布的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! GitHub指南解释了2种授权方式,但看不到这些作品 curl -u' 总是有类似 <!DOCTYPE html> <! - Hello future GitHubber! ... 解决方案似乎这两种身份验证方法仅适用于API端点。 有一个用于下载发布资源的API端点( docu ): GET / repos /:owner /:repo / releases / assets /:id 但是需要知道资产的数字ID。 我问他们的支持,他们是否可以添加一个API端点来下载发布资源的名称(就像他们有tarballs)。 更新:来自Github支持的响应: 我们不提供任何API,如果发布资源的标签或文件名发生变化,我们会尽量避免脆弱的网址。我会将您的反馈反馈给小组进一步讨论。 GitHub guide explains 2 way to authorize but looks neither of those works with the Release files.as a result of:curl -u 'username' -L -o a.tgz https://github.com/company/repository/releases/download/TAG-NAME/A.tgzthere always is something like<!DOCTYPE html><!--Hello future GitHubber! ... 解决方案 Seems both authentication methods only work for the API endpoints.There's an API endpoint for downloading release assets (docu):GET /repos/:owner/:repo/releases/assets/:idBut one will need to know the asset's numerical ID for that.I asked their support whether they could add an API endpoint to download release assets by name (like they have for tarballs).Update: Response from Github support: We don't offer any API like you're suggesting. We try to avoid brittle URLs that would change if the tag or filename of the release asset change. I'll take your feedback to the team to discuss further. 这篇关于如何从私人仓库使用命令行下载GitHub发布的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
07-27 23:43