首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用curl从Github发行版下载的压缩大小仅为9个字节。

使用curl从Github发行版下载的压缩大小仅为9个字节。
EN

Stack Overflow用户
提问于 2022-10-24 00:22:51
回答 2查看 97关注 0票数 0

Github公共回购公司有版本1.0

下面的curl命令仅下载9个字节的输出42 of。

curl -O -L -J --ssl-no-revoke https://github.com/marmayogi/TTF2PostscriptCID-Win/releases/v1.0/TTF2PostscriptCID-Win-1.0.zip

代码语言:javascript
复制
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                               Dload  Upload   Total   Spent    Left  Speed
100     9  100     9    0     0      9      0  0:00:01 --:--:--  0:00:01     9

根据收到的评论,只使用curl标志的L命令的响应将添加到post中:

curl -L https://github.com/marmayogi/TTF2PostscriptCID-Win/releases/v1.0/TTF2PostscriptCID-Win-1.0.zip

代码语言:javascript
复制
curl: (35) schannel: next InitializeSecurityContext failed: Unknown error (0x80092012) - The revocation function was unable to check revocation for the certificate.

添加了基于收到的评论的帖子。

我的桌面希望--ssl-no-revokecurl命令一起使用。使用标志k解决了这个问题。这是证据。

"C:\Program Files\Neovim\bin\curl.exe" -o TTF2PostscriptCID-Win-1.0.zip -L https://github.com/marmayogi/TTF2PostscriptCID-Win/archive/refs/tags/v1.0.zip

代码语言:javascript
复制
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
of Certificate Authority (CA) public keys (CA certs). If the default
bundle file isn't adequate, you can specify an alternate file
using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
the bundle, the certificate verification probably failed due to a
problem with the certificate (it might be expired, or the name might
not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
the -k (or --insecure) option.

有人能在这个问题上说点什么吗?

提前谢谢。

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2022-10-24 00:40:40

我建议你用

代码语言:javascript
复制
curl -sL https://github.com/marmayogi/TTF2PostscriptCID-Win/archive/refs/tags/v1.0.zip >filename.zip 

代码语言:javascript
复制
curl -sLO https://github.com/marmayogi/TTF2PostscriptCID-Win/archive/refs/tags/v1.0.zip

您也可以选择使用(放松SSL安全性)

代码语言:javascript
复制
curl -sL --ssl-no-revoke https://github.com/marmayogi/TTF2PostscriptCID-Win/archive/refs/tags/v1.0.zip >filename.zip 

代码语言:javascript
复制
curl -sLO --ssl-no-revoke https://github.com/marmayogi/TTF2PostscriptCID-Win/archive/refs/tags/v1.0.zip

-s,-沉默安静或安静模式。不要显示进度表或错误信息。使卷曲变哑。除非您重定向,否则它仍将输出所需的数据,甚至可能会输出到终端/stdout。除此选项外,还可使用--显示错误--禁用进度表,但仍显示错误消息.-L,-地点 (HTTP)如果服务器报告被请求的页面已移动到不同的位置(用位置:头和3XX响应代码表示),则此选项将在新位置上重新执行请求。-O,--远程名称将输出写入一个本地文件,名为远程文件。(只使用远程文件的文件部分,就会切断路径。)该文件将保存在当前工作目录中。-ssl-不-撤销 (通道)此选项告诉curl禁用证书吊销检查。警告:此选项解除了SSL安全性,通过使用此标志,您将准确地请求该选项。

然后,curl将重定向获取到您想要的任何文件名(filename.zip),或者使用-sLO自动选择文件名。

票数 3
EN

Stack Overflow用户

发布于 2022-10-24 07:44:55

看来你的网址是坏的?试一试

代码语言:javascript
复制
curl 'https://github.com/marmayogi/TTF2PostscriptCID-Win/archive/refs/tags/v1.0.zip' -LO
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/74175681

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档