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

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.

Step#2: And for Open DNS see this screenshot.

(Done) that's it.
for more information please visit this link: https://networking.grok.lsu.edu/Article.aspx?articleid=17573
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

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With