Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

curl error 28 while downloading https://repo.packagist.org/packages.json: Connection timeout after 10004 ms

I'm trying to create a new Laravel project using Composer:

> composer create-project laravel/laravel example-app

However, I get the following error:

In CurlDownloader.php line 377: curl error 28 while downloading https://repo.packagist.org/packages.json: Connection timeout after 10004 ms

composer create-project curl error 28 while downloading packages.json from repo.packagist.org

like image 440
haroun Avatar asked Jul 25 '26 00:07

haroun


2 Answers

Just Disable IPv6 and apply Open DNS it's working fine.

Step#1: In order to disable IPv6 in Windows follow the bellow explanation:

1.Use the shortcut, Windows Key + X to open the Control Panel.
2.Open Network and Internet.
3.Open Network and Sharing Center.
4.Click Change Adapter Settings.
5.Right-click your connection and go to Properties.
6.(Finally) Uncheck the box next to Internet Protocol Version 6 (TCP/IPv6) to disable it.

enter image description here

Step#2: And for Open DNS see this screenshot. enter image description here

(Done) that's it.

for more information please visit this link: https://networking.grok.lsu.edu/Article.aspx?articleid=17573

like image 121
Baseer Ebadi Avatar answered Jul 26 '26 14:07

Baseer Ebadi


run composer config -g repo.packagist composer https://packagist.org

resource = laracasts


if not worked, turn 'on' or 'off' VPN.


and if still the problem not resolved check this page and changing your DNS. it was me worked!

https://github.com/composer/composer/issues/9376#issuecomment-718921358

enter image description here

like image 28
Ali Salehi Avatar answered Jul 26 '26 13:07

Ali Salehi