I'm using Homebrew to run php and composer under OSX. To develop my php applications I use Valet. Everytime I want to require a package or update my installed packages I get this error:
The "https://repo.packagist.org/packages.json" file could not be downloaded: failed to open stream: Operation timed out Retrying with degraded mode, check https://getcomposer.org/doc/articles/troubleshooting.md#degraded-mode for more info
I've tried several solutions (allowing "secure-http":false
, changing the repository-url, etc.).
But nothing seems to work global. Using the secure-http flag works sometimes, but the script takes way too long to finish (e.g. installing a new laravel project).
Is there a way to fix this permanently?