Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

can't download github project with curl command

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. 

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

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?

like image 633
Ziyaddin Sadigov Avatar asked Apr 28 '13 08:04

Ziyaddin Sadigov


People also ask

How do I download using curl command?

How to download a file with curl command. The basic syntax: Grab file with curl run: $ curl https://your-domain/file.pdf. Get file using ftp or sftp protocol: $ curl ftp://ftp-your-domain-name/file.tar.gz.

How do I download an entire GitHub project?

When downloading materials to your laptop, it is easiest to download the entire repository. To do this, go to the GitHub page for the workshop, click on the green Code button, then download the repository as a ZIP file.


1 Answers

curl -L -O https://github.com/ziyaddin/xampp/archive/master.zip 
  • you must use https://
  • you must use -L to follow redirects
like image 140
2 revs Avatar answered Oct 06 '22 09:10

2 revs