无法使用curl命令下载github项目 [英] can't download github project with curl command

查看:112
本文介绍了无法使用curl命令下载github项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 curl -sO命令从此GitHub项目链接下载项目文件:
http ://github.com/ziyaddin/xampp/archive/master.zip

I used "curl -sO" command to download project files from this GitHub project link: http://github.com/ziyaddin/xampp/archive/master.zip

但是我无法下载。发生错误,并说:

but, I couldn't download. There is error occured and says that:

Archive:  /home/ziyaddin/Desktop/master.zip
[/home/ziyaddin/Desktop/master.zip]   End-of-central-directory
signature not found.  Either this file is not   a zipfile, or it
constitutes one disk of a multi-part archive.  In the   latter case
the central directory and zipfile comment will be found on   the last
disk(s) of this archive. zipinfo:  cannot find zipfile directory in
one of /home/ziyaddin/Desktop/master.zip or
          /home/ziyaddin/Desktop/master.zip.zip, and cannot find 
/home/ziyaddin/Desktop/master.zip.ZIP, period.

但是我可以使用curl命令下载此链接:
http://cloud.github.com/downloads/pivotal/jasmine/jasmine-standalone-1.3.1.zip

but I can download this link with curl command: http://cloud.github.com/downloads/pivotal/jasmine/jasmine-standalone-1.3.1.zip

我认为这是因为它在cloud.github.com中。我想知道如何使用curl命令从第一个链接下载?

I think that it is because it is in cloud.github.com. I want to know how can I download from first link with curl command?

推荐答案

curl -L -O https://github.com/ziyaddin/xampp/archive/master.zip



  • 您必须使用 https://

  • 您必须使用 -L 跟随重定向

    • you must use https://
    • you must use -L to follow redirects
    • 这篇关于无法使用curl命令下载github项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆