curl命令无法从api.github获取内容,但网络没问题

时间:2015-06-09 09:12:13

标签: php laravel curl composer-php

我正在尝试使用命令composer create-project laravel/laravel Laravel来创建一个新的laravel项目。

但我在终端得到了这个:

Failed to download jakub-onderka/php-console-color from dist: The "https://api.github.com/repos/JakubOnderka/PHP-Console-Color/zipball/e0b393dacf7703fc36a4efc3df1435485197e6c1" file could not be downloaded: failed to open stream: Connection timed out
    Now trying to download from source

然后,我尝试了这个命令:

curl https://api.github.com/repos/JakubOnderka/PHP-Console-Color/zipball/e0b393dacf7703fc36a4efc3df1435485197e6c1

它不起作用。

然而,当我在浏览器(FireFox)中输入地址时,它可以工作!

这有什么问题?这几天都受苦了。

0 个答案:

没有答案